/* ============================================================================
   GeniusLaw — CaseCheck Report
   SF Pro Display · white · GeniusLaw blues. Type and hairline rules carry the
   design system from the terms app; the dark theme does not come with it.
============================================================================ */

/* One palette, no theme switching. A client's case report should look like the
   document it is — white paper — on every device, whatever the reader's OS
   theme is set to. Surfaces are white; structure comes from hairline rules and
   one faint tint for the acceptance block. */
:root {
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --brand: #2f6bff;
  --brand-strong: #1d54e8;
  --green: #16a34a;
  --red: #e5484d;

  --r-card: 20px;
  --r-sm: 12px;

  --bg: #ffffff;
  --card: #ffffff;
  --text: #0b1220;
  --text-2: #35435c;
  --muted: #6b7890;
  --line: rgba(13, 27, 62, 0.1);
  --line-2: rgba(13, 27, 62, 0.16);
  --chip-bg: #eef3ff;
  --chip-text: #2f6bff;
  --soft-bg: #f7f9fc;
  --green-bg: rgba(22, 163, 74, 0.09);
  --red-bg: rgba(229, 72, 77, 0.08);
  --shadow-sm: 0 1px 2px rgba(13, 27, 62, 0.04);
  --shadow: 0 1px 2px rgba(13, 27, 62, 0.04), 0 14px 34px -28px rgba(13, 27, 62, 0.22);
}

* { box-sizing: border-box; }
html { height: 100%; }

/* The state sections use display:flex/grid, which would beat the UA's
   [hidden] rule — force hidden to always win. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----------------------------- nav ------------------------------------- */
.nav { position: sticky; top: 0; z-index: 20; padding: 16px clamp(14px, 3vw, 28px); }
.nav__inner {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__word { font-weight: 700; font-size: 17px; letter-spacing: 0.02em; line-height: 1; }
.brand__word b { color: var(--text); }
.brand__word i { color: var(--brand); font-style: normal; }
.brand__word sup { font-size: 8px; color: var(--muted); top: -0.9em; position: relative; }

.nav__right { display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; padding: 7px 13px;
  border-radius: 999px; color: var(--chip-text); background: var(--chip-bg); white-space: nowrap;
}

/* ----------------------------- layout ---------------------------------- */
.layout {
  flex: 1;
  width: 100%; max-width: 860px; margin: 0 auto;
  padding: 10px clamp(14px, 3vw, 28px) 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 6px;
}

/* ----------------------------- states ---------------------------------- */
.state { padding: 46px 32px; }
.state--center {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center;
}
.state__badge {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--green); background: var(--green-bg);
}
.state__badge--red { color: var(--red); background: var(--red-bg); }
.state__title { font-size: clamp(21px, 3.4vw, 26px); font-weight: 700; margin: 4px 0 0; letter-spacing: -0.02em; }
.state__text { color: var(--text-2); margin: 0; max-width: 46ch; font-size: 15px; }
.state__small { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.splash__badge {
  width: 72px; height: 72px; border-radius: 22px;
  display: grid; place-items: center; background: var(--soft-bg); border: 1px solid var(--line);
}

.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------- report ---------------------------------- */
.report { padding: clamp(24px, 4vw, 44px); }

.report__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.report__logo { width: 132px; height: auto; }
.report__stamp { text-align: right; }
.report__title {
  font-size: clamp(20px, 3.2vw, 25px); font-weight: 700;
  letter-spacing: -0.02em; margin: 4px 0 0;
}

/* Case detail block — same pairs the PDF prints above the body. */
.meta {
  display: grid; gap: 2px 26px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 22px 0 4px;
}
.meta__row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.meta__label {
  flex: 0 0 auto; min-width: 96px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.meta__value { font-size: 14.5px; font-weight: 600; color: var(--text); word-break: break-word; }

/* Section band that separates the report half from the guidance half. */
.band {
  display: flex; align-items: center; gap: 14px;
  margin: 38px 0 6px;
}
.band::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.band__text {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand);
}

.section { margin: 26px 0 0; }
.section__heading {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand);
  margin: 0 0 10px;
}
.section__body p {
  font-family: var(--serif);
  font-size: 16.5px; line-height: 1.72; letter-spacing: 0;
  color: var(--text-2); margin: 0 0 14px;
}
.section__body p:last-child { margin-bottom: 0; }

/* ----------------------------- accept ---------------------------------- */
.accept {
  margin: 40px 0 0; padding: 22px clamp(18px, 3vw, 26px);
  background: var(--soft-bg); border: 1px solid var(--line); border-radius: var(--r-card);
}
.accept__title { font-size: 16px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.accept__text { font-size: 14px; color: var(--text-2); margin: 0 0 16px; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--line-2); border-radius: 7px;
  background: var(--card); cursor: pointer; position: relative;
  transition: all 0.15s ease;
}
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after {
  content: ""; position: absolute; left: 7px; top: 3px;
  width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.check__text { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.45; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font); font-size: 15px; font-weight: 650;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: all 0.18s ease; margin-top: 18px;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--brand-strong); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn__spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.formerror {
  margin: 14px 0 0; font-size: 14px; font-weight: 600;
  color: var(--red); background: var(--red-bg);
  padding: 11px 14px; border-radius: var(--r-sm);
}

/* Accepted banner, shown in place of the checkbox on revisits. */
.accepted {
  margin: 40px 0 0; padding: 22px clamp(18px, 3vw, 26px);
  display: flex; align-items: flex-start; gap: 15px;
  background: var(--green-bg); border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: var(--r-card);
}
.accepted__ic { flex: 0 0 auto; color: var(--green); margin-top: 1px; }
.accepted__title { font-size: 16px; font-weight: 700; margin: 0 0 5px; }
.accepted__text { font-size: 14px; color: var(--text-2); margin: 0; }

.foot {
  text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 0 20px 28px;
}

@media (max-width: 560px) {
  .report__head { flex-direction: column; gap: 14px; }
  .report__stamp { text-align: left; }
  .meta { grid-template-columns: 1fr; }
}
