/* /support — the public support page (CLAUDE.md §108). The app's palette, the landing page's type. */
:root {
  --navy: #041e4f;
  --ink: #082341;
  --slate: #5f738f;
  --blue: #1c5fd4;
  --blue-dark: #124cae;
  --blue-light: #67b6ff;
  --mist: #f4f9ff;
  --mist-2: #e8f2ff;
  --line: #cfe1f5;
  --card: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fff8e6;
  --warn-line: #f5d58a;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --radius: 14px;
  --text: 'Saira', system-ui, -apple-system, sans-serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6f0ff;
    --slate: #9fb6d8;
    --mist: #030f2b;
    --mist-2: #0b2350;
    --line: #1d3a6b;
    --card: #071a40;
    --danger: #ff8a7a;
    --danger-bg: #3a1212;
    --warn-bg: #2e2510;
    --warn-line: #6b5420;
    --ok: #6ee7a8;
    --ok-bg: #0b2e1d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  overflow-x: hidden;
}
a { color: var(--blue); }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.top { background: #fff; border-bottom: 1px solid #cfe1f5; }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 12px; }
.brand img { display: block; height: 40px; width: auto; }

.hero { padding: 32px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; font-weight: 700; color: var(--ink); }
.hero p { margin: 0; color: var(--slate); max-width: 60ch; }

.tabs { display: flex; gap: 6px; margin: 22px 0 0; border-bottom: 1px solid var(--line); }
.tab {
  font: inherit; font-weight: 600; color: var(--slate); background: none; border: 0;
  padding: 10px 14px; border-bottom: 3px solid transparent; cursor: pointer; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.tab:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; border-radius: 6px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); padding: 22px; margin-bottom: 32px;
}

.notice {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; margin-bottom: 18px;
}
.notice strong { display: block; margin-bottom: 2px; }

fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 17px; margin-bottom: 10px; padding: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .card { padding: 16px; } }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; min-width: 0; }
.label { font-weight: 600; font-size: 14.5px; }
.opt { font-weight: 400; color: var(--slate); }
.req { color: var(--danger); font-style: normal; }
.hint { font-size: 13px; color: var(--slate); }
.counter { text-align: right; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-light); outline-offset: 1px; border-color: var(--blue); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; min-height: 0; }
.err:empty { display: none; }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; border: 2px dashed var(--line); border-radius: 12px;
  padding: 18px 12px; cursor: pointer; background: var(--mist);
}
.drop.over { border-color: var(--blue); background: var(--mist-2); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop small { color: var(--slate); }
.drop-small { padding: 10px; flex-direction: row; gap: 6px; }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.files li {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 8px; background: var(--card); max-width: 100%; font-size: 13.5px;
}
.files img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.files button { font: inherit; border: 0; background: none; color: var(--danger); cursor: pointer; padding: 2px 4px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 4px; font-size: 14.5px; }
.check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.form-error { color: var(--danger); font-size: 14px; }
.fine { font-size: 13px; color: var(--slate); margin: 14px 0 0; }

.btn {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary[disabled] { opacity: .65; cursor: progress; }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 14px; background: var(--mist-2); color: var(--blue); }

.state { color: var(--slate); }
.state.error { color: var(--danger); }

.done { text-align: center; padding: 12px 0; }
.done:focus { outline: none; }
.done-badge {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  font-size: 28px; color: var(--ok); background: var(--ok-bg);
}
.done h2 { margin: 0 0 6px; }
.done p { margin: 6px auto; max-width: 52ch; }
.ref { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ref code { font-size: 24px; font-weight: 700; letter-spacing: 1px; color: var(--blue); }
.done .actions { justify-content: center; }

.tv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 18px; }
.tv-head h2 { margin: 2px 0; font-size: 20px; overflow-wrap: anywhere; }
.tv-ref { margin: 0; font-weight: 700; color: var(--blue); letter-spacing: .5px; }
.tv-meta { margin: 0; color: var(--slate); font-size: 14px; }
.tv-desc { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--mist); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.tv-files { font-size: 14px; color: var(--slate); }
.chip { flex: 0 0 auto; border-radius: 999px; padding: 4px 12px; font-size: 13.5px; font-weight: 700; background: var(--mist-2); color: var(--blue); }
.chip.open { background: #e0edff; color: #124cae; }
.chip.awaiting_customer { background: #fff1d6; color: #8a5300; }
.chip.resolved { background: var(--ok-bg); color: var(--ok); }
.chip.closed { background: #eceff3; color: #475467; }
h3 { margin: 18px 0 8px; font-size: 16px; }
.thread { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.thread li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.thread li.staff { border-color: #b9d4fb; background: #f2f7ff; }
.thread li.status { border-style: dashed; color: var(--slate); font-size: 14px; }
.thread .who { font-weight: 700; font-size: 14px; }
.thread .when { color: var(--slate); font-size: 13px; margin-left: 6px; font-weight: 400; }
.thread .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.thread .att { font-size: 13px; color: var(--slate); margin-top: 4px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .thread li.staff { background: #0b2350; border-color: #1d3a6b; }
  :root:not([data-theme="light"]) .chip.open { background: #12305f; color: #9cc6ff; }
  :root:not([data-theme="light"]) .chip.awaiting_customer { background: #3a2a08; color: #f7c66b; }
  :root:not([data-theme="light"]) .chip.closed { background: #1f2a3a; color: #c0cad8; }
}

.foot { border-top: 1px solid var(--line); padding: 18px 0 28px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot small { color: var(--slate); }
