/* Player pages (#4004): the approved support redesign (Randy, 2026-09-29; canvas boards P1-P7). Light theme.
   The palette below is the canvas's, defined once; scripts/check-contrast.mjs proves every text pair used here
   meets WCAG AA. Logical properties throughout so Arabic (dir="rtl") mirrors without a second stylesheet.
   Inter is self-hosted (support must not depend on a font CDN), as in the staff console. */
@font-face { font-family: "Inter"; src: url("/console/fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f5ff;
  --ink: #03041f;
  --muted: #4b4e7a;
  --card: #ffffff;
  --line: #d9dbf3;
  --line-soft: #e3e5f7;
  --field: #767aa8;
  --action: #2bd9a0;
  --action-hover: #25c793;
  --link: #0f766e;
  --link-hover: #115e59;
  --mark: #0f766e;
  --danger-bg: #fee4e2;
  --danger-ink: #912018;
  --notice-bg: #dff7ee;
  --notice-ink: #0b4f3e;
  --open-bg: #dcfce7;
  --open-ink: #14532d;
  --wait-bg: #fef3c7;
  --wait-ink: #78350f;
  --done-bg: #e3e5f7;
  --done-ink: #33366b;
  --support-bg: #dff7ee;
  --support-line: #b5ead4;
  --support-ink: #2c4a40;
  --ok-line: #86efac;
  --wait-line: #fcd34d;
  --bad-bg: #fee4e2;
  --bad-ink: #912018;
  --bad-line: #fda29b;
  --info-line: #b5ead4;
  --dot-ok: #16a34a;
  --dot-warn: #b45309;
  --dot-bad: #d92d20;
  --dot-info: #0f766e;
  --dot-off: #6b6e9c;
  --shadow: 0 8px 30px rgba(3, 4, 31, 0.06);
  --radius: 20px;
  --radius-field: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.5 "Inter", system-ui, sans-serif; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* Header and footer */
.site { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-inline: 48px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand:hover { color: var(--ink); }
.mark { flex: none; width: 32px; height: 32px; border-radius: 9px; display: block; } /* the SPN tile: the icon on navy, so it reads on the light page */
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; color: var(--muted); }
.site-foot { margin-top: auto; padding: 20px 48px 28px; text-align: center; font-size: 14px; color: var(--muted); }

/* Page and card */
.page { flex: 1 0 auto; width: 100%; max-width: 560px; margin-inline: auto; padding: 24px 24px 8px; display: flex; flex-direction: column; gap: 20px; }
.page.wide { max-width: 880px; }
.page.form { max-width: 680px; }
.page.center { justify-content: center; padding-block: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 20px; }
h1 { margin: 0; font-size: 30px; line-height: 1.2; }
h2 { margin: 0; font-size: 20px; line-height: 1.3; }
p { margin: 0; }
h1 + p, h2 + p { margin-top: 8px; }
.lede, .muted { color: var(--muted); }
.small { font-size: 14px; }
.divider { border-top: 1px solid var(--line-soft); padding-top: 18px; color: var(--muted); font-size: 15px; }

/* Forms */
form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 15px; font-weight: 600; }
input:not([type="radio"]):not([type="checkbox"]), textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--field); border-radius: var(--radius-field); padding: 0 16px; min-height: 52px; }
textarea { padding: 14px 16px; min-height: 150px; resize: vertical; }
input[type="file"] { padding: 12px 16px; height: auto; }
.prose p + p { margin-top: 1em; }
/* Buttons on pages not yet moved to .btn (survey, help articles) keep the primary look. */
button:not([class]), .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border: 0; border-radius: var(--radius-field); background: var(--action); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--action-hover); color: var(--ink); }
.btn.secondary { background: var(--card); border: 1.5px solid var(--field); }
.btn.secondary:hover { background: var(--bg); }
.alert, .notice { padding: 12px 16px; border-radius: var(--radius-field); font-size: 15px; }
.alert { background: var(--danger-bg); color: var(--danger-ink); }
.notice { background: var(--notice-bg); color: var(--notice-ink); }
.turnstile { min-height: 65px; max-width: 100%; overflow-x: auto; }

/* Header account bits */
.site-nav .who-email { overflow-wrap: anywhere; }
.inline { display: contents; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--link-hover); }
.linklike.strong { font-weight: 600; }

/* Ticket list (P2) */
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-row .push { margin-inline-start: auto; }
.card.tickets { padding: 0; overflow: hidden; gap: 0; }
.tick { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.tick:first-child { border-top: 0; }
.tick:hover { background: var(--bg); color: var(--ink); }
.tick .t { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.tick .s { font-size: 15px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--done-bg); color: var(--done-ink); }
.pill.open { background: var(--open-bg); color: var(--open-ink); }
.pill.wait { background: var(--wait-bg); color: var(--wait-ink); }
.center-row { display: flex; justify-content: center; }
.list-plain { list-style: none; margin: 0; }
.list-plain > li + li .tick { border-top: 1px solid var(--line-soft); }
.list-plain .tick { border-top: 0; }

/* Status page (P6): public and script-free. Colour is never the only signal; every state also has its word. */
.page.status-page { max-width: 760px; gap: 16px; padding-block-start: 32px; }
.status-page h2 { margin-block-start: 16px; font-size: 18px; letter-spacing: 0.01em; }
.hero { display: block; }
.banner { display: flex; align-items: center; gap: 24px; padding: 36px 40px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.banner h1 { font-size: 32px; letter-spacing: -0.01em; }
.banner .sub { margin: 6px 0 0; font-size: 15px; }
.banner.tone-operational { background: var(--open-bg); color: var(--open-ink); border-color: var(--ok-line); }
.banner.tone-degraded { background: var(--wait-bg); color: var(--wait-ink); border-color: var(--wait-line); }
.banner.tone-outage { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-line); }
.banner.tone-maintenance { background: var(--notice-bg); color: var(--notice-ink); border-color: var(--info-line); }
.banner.tone-unknown .sub { color: var(--muted); }
.dot { flex: none; width: 12px; height: 12px; border-radius: 999px; background: var(--dot-off); }
.dot.big { width: 28px; height: 28px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-off) 18%, transparent); }
.tone-operational .dot, .dot.tone-operational { background: var(--dot-ok); }
.tone-degraded .dot, .dot.tone-degraded { background: var(--dot-warn); }
.tone-outage .dot, .dot.tone-outage { background: var(--dot-bad); }
.tone-maintenance .dot, .dot.tone-maintenance { background: var(--dot-info); }
.tone-operational .dot.big { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-ok) 22%, transparent); }
.tone-degraded .dot.big { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-warn) 22%, transparent); }
.tone-outage .dot.big { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-bad) 22%, transparent); }
.tone-maintenance .dot.big { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-info) 22%, transparent); }
/* Not yet monitored: calm and intentional. A hollow dot and a quiet outline pill, no alarm colour. */
.banner.tone-unknown .dot.big, .dot.tone-unknown { background: transparent; border: 2px solid var(--dot-off); }
.banner.tone-unknown .dot.big { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot-off) 12%, transparent); }
.card.components { padding: 0; gap: 0; overflow: hidden; border-radius: 20px; }
.components-list { list-style: none; margin: 0; }
.comp { display: flex; align-items: center; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; padding: 20px 28px; border-top: 1px solid var(--line-soft); font-size: 17px; font-weight: 500; }
.comp:first-child { border-top: 0; }
.comp .name { flex: 1; overflow-wrap: anywhere; }
.comp .sub { flex-basis: 100%; padding-inline-start: 26px; font-size: 14px; font-weight: 400; color: var(--muted); }
.pill.tone-operational { background: var(--open-bg); color: var(--open-ink); }
.pill.tone-degraded { background: var(--wait-bg); color: var(--wait-ink); }
.pill.tone-outage { background: var(--bad-bg); color: var(--bad-ink); }
.pill.tone-maintenance { background: var(--notice-bg); color: var(--notice-ink); }
.pill.tone-unknown { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.incidents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.incident { background: var(--card); border: 1px solid var(--line); border-inline-start: 6px solid var(--dot-off); border-radius: 16px; padding: 22px 26px; box-shadow: var(--shadow); }
.incident.impact-minor { border-inline-start-color: var(--dot-info); }
.incident.impact-major { border-inline-start-color: var(--dot-warn); }
.incident.impact-critical { border-inline-start-color: var(--dot-bad); }
.incident h3 { margin: 0 0 4px; font-size: 18px; }
.impact-tag { font-weight: 600; color: var(--ink); }
.updates { list-style: none; margin: 16px 0 0; padding: 0; }
.updates li { position: relative; margin-block-start: 0; padding-inline-start: 28px; padding-block-end: 18px; }
.updates li:last-child { padding-block-end: 0; }
.updates li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 6px; width: 12px; height: 12px; border-radius: 999px; background: var(--dot-off); }
.updates li::after { content: ""; position: absolute; inset-inline-start: 5px; inset-block-start: 22px; inset-block-end: -2px; width: 2px; background: var(--line); }
.updates li:last-child::after { display: none; }
.updates .upd-investigating::before { background: var(--dot-bad); }
.updates .upd-identified::before { background: var(--dot-warn); }
.updates .upd-monitoring::before { background: var(--dot-info); }
.updates .upd-resolved::before { background: var(--dot-ok); }
.updates p { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.status-foot { display: flex; align-items: center; justify-content: center; gap: 12px; }
.status-foot .mark { width: 24px; height: 24px; border-radius: 7px; }

/* Survey (P5) */
.scores { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: 100%; }
.scores legend { grid-column: 1 / -1; padding: 0; margin-bottom: 4px; font-weight: 600; text-align: center; }
.score { position: relative; }
.score input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; cursor: pointer; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; max-width: 104px; margin-inline: auto; aspect-ratio: 1; border-radius: 18px; background: var(--card); border: 1.5px solid var(--field); font-size: 32px; font-weight: 700; }
.tile small { font-size: 13px; font-weight: 500; color: var(--muted); }
.score input:checked + .tile { background: var(--notice-bg); border-color: var(--link); }
.score input:focus-visible + .tile { outline: 3px solid var(--link); outline-offset: 2px; }
.tile:hover { border-color: var(--ink); }
.card.center-text { text-align: center; align-items: center; }
.card.center-text .field { width: 100%; text-align: start; }

/* Help articles */
.results .tick .t { font-size: 17px; }

/* Thread (P3, P7) */
.back { font-size: 15px; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 640px; padding: 18px 20px; border-radius: 16px; line-height: 1.55; background: var(--card); border: 1px solid var(--line); align-self: flex-end; }
.msg.support { background: var(--support-bg); border-color: var(--support-line); align-self: flex-start; }
.msg.support .who { color: var(--support-ink); }
.who { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; color: var(--link); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.reply { padding: 18px; border-radius: 16px; gap: 12px; box-shadow: none; }
.chip:hover { text-decoration: underline; }
.reply textarea { min-height: 110px; }
.reply-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reply-actions .hint { flex: 1 1 220px; }
.attach input { position: static; }
.js .attach input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.js .attach:focus-within { outline: 3px solid var(--link); outline-offset: 2px; }
.chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.side-note { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.meta { font-size: 14px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }

@media (max-width: 400px) {
  .page { padding-inline: 12px; }
  .card { padding: 16px; }
}
@media (max-width: 640px) {
  .site { padding-inline: 16px; min-height: 60px; }
  .site-foot { padding-inline: 16px; }
  .page { padding: 16px 16px 8px; }
  .card { padding: 24px; border-radius: 16px; }
  h1 { font-size: 26px; }
  .btn { width: 100%; }
  .site-nav .who-email { display: none; }
  .banner { padding: 24px 20px; gap: 18px; }
  .banner h1 { font-size: 24px; }
  .dot.big { width: 22px; height: 22px; }
  .comp { padding: 16px 18px; }
  .incident { padding: 18px 18px; }
  .tick { padding: 16px; grid-template-columns: 1fr; gap: 10px; }
  .msg { max-width: none; }
  .tile { aspect-ratio: 3 / 4; font-size: 24px; border-radius: 14px; }
  .tile small { font-size: 11px; }
  .scores { gap: 8px; }
  .msg.you { margin-inline-start: 28px; }
  .msg.support { margin-inline-end: 28px; }
  .reply-actions { align-items: stretch; flex-direction: column; }
  .reply-actions .hint { flex-basis: auto; }
}
