:root {
  color-scheme: dark;
  --bg: #091018;
  --panel: #101926;
  --line: rgba(255,255,255,.12);
  --text: #edf6ff;
  --muted: #a8b8c8;
  --accent: #78d6ff;
  --accent-2: #55e6b5;
  --warn: #ffd166;
  --bad: #ff8f8f;
  --ok: #8cf2bf;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(120,214,255,.2), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(85,230,181,.13), transparent 26rem),
    linear-gradient(180deg, #0a111b 0%, #091018 52%, #070d14 100%);
  overflow-x: hidden;
}

button,
textarea { font: inherit; }

button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  padding: .78rem 1rem;
  cursor: pointer;
}

button:hover,
button:focus-visible,
a:focus-visible {
  border-color: rgba(120,214,255,.65);
  outline: none;
}

.whd-primary {
  background: var(--accent);
  color: #07121b;
  border-color: var(--accent);
  font-weight: 700;
}

.whd-hero,
.whd-related,
.whd-shell,
.whd-policy,
.whd-comments,
.whd-return,
.whd-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.whd-hero { padding: 54px 0 22px; }

.whd-kicker,
.whd-label {
  letter-spacing: .08em;
  font-size: .76rem;
  color: var(--accent);
  font-weight: 700;
}

.whd-hero h1 {
  margin: .25rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.whd-lead {
  max-width: 780px;
  color: #d8e7f5;
  font-size: 1.05rem;
  line-height: 1.8;
}

.whd-notice {
  max-width: 900px;
  color: #ffeab0;
  background: rgba(255,209,102,.1);
  border: 1px solid rgba(255,209,102,.28);
  border-radius: 8px;
  padding: 1rem;
  line-height: 1.75;
}

.whd-back {
  display: inline-flex;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(120,214,255,.38);
  border-radius: 999px;
  padding: .45rem .75rem;
  margin-bottom: 1rem;
}

.whd-back:hover,
.whd-back:focus-visible { background: rgba(120,214,255,.12); }

.whd-policy {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.whd-policy span,
.whd-badge,
.whd-score {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .42rem .68rem;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 700;
}

.whd-policy span {
  color: var(--accent-2);
  background: rgba(85,230,181,.08);
}

.whd-badge {
  color: var(--accent);
  background: rgba(120,214,255,.08);
}

.whd-shell {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 30px;
}

.whd-panel,
.whd-related,
.whd-comments {
  background: linear-gradient(180deg, rgba(16,25,38,.94), rgba(10,18,29,.96));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.whd-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.whd-section-head h2,
.whd-related h2 {
  margin: .15rem 0 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.whd-score-ok {
  color: var(--ok);
  border-color: rgba(140,242,191,.45);
  background: rgba(140,242,191,.1);
}

.whd-score-warn {
  color: var(--warn);
  border-color: rgba(255,209,102,.45);
  background: rgba(255,209,102,.1);
}

.whd-score-bad {
  color: var(--bad);
  border-color: rgba(255,143,143,.45);
  background: rgba(255,143,143,.1);
}

.whd-score-neutral { color: var(--muted); }

textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.16);
  background: #111923;
  color: var(--text);
  border-radius: 8px;
  padding: 1rem;
  line-height: 1.6;
  resize: vertical;
}

textarea::placeholder { color: #718397; }

textarea:focus {
  outline: 2px solid rgba(120,214,255,.35);
  border-color: rgba(120,214,255,.75);
}

.whd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.whd-help,
.whd-comment-note {
  color: var(--muted);
  line-height: 1.7;
}

.whd-status {
  color: #d8e7f5;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem;
}

.whd-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.whd-summary div {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
}

.whd-summary dt {
  color: var(--muted);
  font-size: .78rem;
}

.whd-summary dd {
  margin: .18rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.whd-result-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 14px;
}

.whd-subpanel,
.whd-copybox {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.whd-subpanel h3,
.whd-copybox h3 {
  margin: 0 0 .75rem;
  font-size: 1rem;
}

.whd-tag-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.whd-tag-list div {
  display: grid;
  grid-template-columns: minmax(8rem, .42fr) minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 8px;
}

.whd-tag-list dt {
  color: var(--accent);
  font-weight: 800;
}

.whd-tag-list dd {
  margin: 0;
  color: #d8e7f5;
}

.whd-issues {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.whd-issues li + li { margin-top: .45rem; }
.whd-issues .warn { color: #ffe3a3; }
.whd-issues .bad { color: #ffb3b3; }
.whd-issues .ok { color: #b9ffd6; }

#manualCopy {
  margin-top: 12px;
  min-height: 120px;
}

.whd-related {
  margin-top: 8px;
  margin-bottom: 42px;
}

.whd-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.whd-links a,
.whd-return a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.whd-links a:hover,
.whd-links a:focus-visible,
.whd-return a:hover,
.whd-return a:focus-visible {
  border-color: rgba(120,214,255,.65);
}

.whd-links strong,
.whd-links span,
.whd-return strong,
.whd-return span,
.whd-return small {
  display: block;
}

.whd-links span,
.whd-return span,
.whd-return small {
  color: var(--muted);
  margin-top: .35rem;
  font-size: .88rem;
  line-height: 1.5;
}

.whd-comments {
  margin-top: 8px;
  margin-bottom: 28px;
}

.whd-comment-note { margin-top: 0; color: #d8e7f5; }

.whd-comments #app-comments,
.whd-comments #app-comments * { color: var(--text); }

.whd-comments #app-comments input:not([type="hidden"]),
.whd-comments #app-comments textarea,
.whd-comments #app-comments select {
  color: var(--text);
  background: #111923;
  border-color: rgba(255,255,255,.16);
}

.whd-comments #app-comments button,
.whd-comments #app-comments input[type="submit"] {
  color: #07121b;
  background: var(--accent);
  border-color: var(--accent);
}

.whd-return {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.whd-footer {
  color: var(--muted);
  text-align: center;
  padding: 0 0 40px;
}

h1, h2, h3, p, li, a, span, dd, dt, button, textarea {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .whd-shell,
  .whd-result-grid,
  .whd-return { grid-template-columns: 1fr; }
  .whd-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .whd-hero,
  .whd-related,
  .whd-shell,
  .whd-comments,
  .whd-return,
  .whd-footer,
  .whd-policy { width: min(100% - 24px, 1120px); }
  .whd-hero { padding-top: 34px; }
  .whd-panel,
  .whd-related,
  .whd-comments { padding: 14px; }
  .whd-section-head { flex-direction: column; }
  .whd-summary { grid-template-columns: 1fr; }
  .whd-tag-list div { grid-template-columns: 1fr; }
  button { width: 100%; }
}
