/* ============================================================================
   BehaviorScout™ — Legal Document Sheet
   ----------------------------------------------------------------------------
   Same visual system as the Brand Guide One-Sheet: borderless layout, hairline
   rules, kicker/title/desc section heads, multi-column bands with dividers, a
   full-bleed dark callout band, mono captions, figure-mark footer.
   Adds clause typography for long-form legal prose.
   ============================================================================ */

@import "colors_and_type.css";

* { box-sizing: border-box; margin: 0; padding: 0; }
.ramp, .ramp .s, .tone i, .anchor i, .dark-block, .pill, .tag-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { background: #fff; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ---- the print sheet ---- */
.sheet {
  width: 1056px;
  min-height: 1392px;
  background: #fff;
  padding: 42px 56px 38px;
  display: flex;
  flex-direction: column;
}

/* section header — a smaller echo of the masthead */
.section-head { margin-top: 20px; margin-bottom: 22px; max-width: 92ch; }
.section-head .sh-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.section-head .sh-title { font-size: 20px; font-weight: 600; letter-spacing: -0.012em; margin-top: 6px; line-height: 1.1; }
.section-head .sh-desc { font-size: 12.5px; color: var(--fg-2); margin-top: 5px; line-height: 1.45; }

.overline { font-size: 9.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.rule { height: 1px; background: var(--border); border: 0; }

/* ---- masthead ---- */
.head { display: flex; justify-content: space-between; align-items: flex-start; }
.title-block { max-width: 60ch; }
.kicker { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.title { font-size: 32px; font-weight: 600; letter-spacing: -0.015em; margin-top: 9px; line-height: 1.1; }
.title-tm { font-size: 0.4em; font-weight: 500; vertical-align: super; letter-spacing: 0; }
.desc { font-size: 14px; color: var(--fg-2); margin-top: 9px; line-height: 1.5; max-width: 80ch; }
.desc b { font-weight: 600; color: var(--fg); }
.head .doc { text-align: right; padding-top: 3px; flex: none; }
.head .doc .t { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--fg-2); white-space: nowrap; }
.head .doc .m { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 4px; white-space: nowrap; }

/* shared wordmark styling */
.wm .b { font-weight: 300; letter-spacing: -0.02em; }
.wm .s { font-weight: 600; letter-spacing: -0.02em; }
.wm .tm { font-size: 0.4em; font-weight: 500; vertical-align: super; }

/* running header for pages 2+ */
.runhead { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; }
.runhead .lockup-sm { margin-top: 0; }
.runhead .rh-meta { text-align: right; }
.runhead .rh-meta .t { font-size: 11px; font-weight: 500; color: var(--fg-2); }
.runhead .rh-meta .m { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); margin-top: 3px; white-space: nowrap; }

.lockup-sm { display: flex; align-items: center; gap: 11px; }
.lockup-sm .lk-art { width: 26px; height: 26px; flex: none; display: block; }
.lockup-sm .lk-art svg { width: 100%; height: 100%; display: block; }
.lockup-sm .wm { text-transform: lowercase; line-height: 1; font-size: 20px; }

/* ---- main flow ---- */
.flow { flex: 1; display: flex; flex-direction: column; padding-top: 26px; min-height: 0; }
.band { display: grid; }
.band > .cell { padding: 0 34px; }
.band > .cell:first-child { padding-left: 0; }
.band > .cell:last-child { padding-right: 0; }
.divider { width: 1px; background: var(--border); align-self: stretch; }
.cell .overline { margin-bottom: 16px; }
.band-gap { height: 26px; }
.band-gap.lg { height: 38px; }

/* ---- summary band (3-up, echoes the identity band) ---- */
.summary { grid-template-columns: 1fr 1px 1fr 1px 1fr; }
.summary .cell .s-lead { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.summary .cell .s-body { font-size: 11px; color: var(--fg-2); line-height: 1.5; margin-top: 7px; }
.summary .cell .s-cap { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); margin-top: 11px; letter-spacing: 0.02em; }

/* ---- dark callout band (full-bleed, echoes inverse identity) ---- */
.dark-block { background: var(--plum-990); margin: 0 -32px; padding: 34px 36px; border-radius: var(--r-lg); }
.dark-block .overline { color: oklch(1 0 0 / 0.5); }
.dark-block .divider { background: oklch(1 0 0 / 0.12); }
.dark-block .principle .p-title { color: var(--grey-0); }
.dark-block .principle .p-body { color: oklch(1 0 0 / 0.62); }
.dark-block .db-statement { color: var(--grey-0); }
.dark-block .db-statement b { color: var(--grey-0); }
.dark-block .db-cap { color: oklch(1 0 0 / 0.42); }

.db-statement { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.28; max-width: 30ch; }
.db-statement b { font-weight: 600; }
.db-cap { font-family: var(--font-mono); font-size: 9px; margin-top: 16px; letter-spacing: 0.04em; }
.principles { grid-template-columns: 1fr 1px 1fr 1px 1fr; margin-top: 4px; }
.principle .p-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.principle .p-body { font-size: 10.5px; line-height: 1.5; margin-top: 7px; }

/* ---- legal clauses ---- */
.legal { grid-template-columns: 1fr 1px 1fr; }
.legal .cell { padding-top: 2px; }
.clause { margin-bottom: 24px; }
.clause:last-child { margin-bottom: 0; }
.clause-head { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: baseline; margin-bottom: 9px; }
.clause-num { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--accent-fg); line-height: 1.3; }
.clause-title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.legal-body p { font-size: 11px; line-height: 1.58; color: var(--fg-2); margin-bottom: 7px; text-wrap: pretty; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-body b { font-weight: 600; color: var(--fg); }
.legal-body a { color: var(--accent-fg); text-decoration: none; border-bottom: 1px solid var(--border-2); }
.legal-body .lbl { font-weight: 600; color: var(--fg); }
.legal-body ul { list-style: none; margin: 7px 0 8px; padding: 0; }
.legal-body li { font-size: 11px; line-height: 1.5; color: var(--fg-2); padding-left: 16px; position: relative; margin-bottom: 5px; text-wrap: pretty; }
.legal-body li:last-child { margin-bottom: 0; }
.legal-body li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 4px; height: 4px; border-radius: 1px; background: var(--accent); }
.legal-body li b { font-weight: 600; color: var(--fg); }

/* definitions row (mono term + plain definition) */
.def { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin-top: 4px; }
.def dt { font-family: var(--font-mono); font-size: 10px; color: var(--fg); font-weight: 500; padding-top: 1px; }
.def dd { font-size: 11px; line-height: 1.5; color: var(--fg-2); }

/* small chips / pills */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag-chip { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.02em; color: var(--fg-2); background: var(--accent-quiet); border: 1px solid var(--border); border-radius: var(--r-full); padding: 4px 10px; }

/* ---- footer ---- */
.foot { display: flex; justify-content: space-between; align-items: stretch; padding-top: 40px; margin-top: auto; }
.foot .lockup { display: flex; align-items: center; gap: 10px; }
.foot .lockup .lk-art { width: 26px; height: 26px; flex: none; display: block; }
.foot .lockup .lk-art svg { width: 100%; height: 100%; display: block; }
.foot .lockup .wm { text-transform: lowercase; line-height: 1; font-size: 17px; }
.foot .lockup .tag { font-size: 6.5px; letter-spacing: 0.2em; margin-top: 4px; white-space: nowrap; text-transform: uppercase; font-weight: 500; color: var(--fg-3); }
.foot-right { display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.foot-right .l { font-size: 9.5px; font-weight: 500; color: var(--fg-2); letter-spacing: 0.01em; white-space: nowrap; }
.foot-right .s { font-size: 9px; color: var(--fg-3); white-space: nowrap; }
.foot-right .pg { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); }

@media print {
  @page { size: 11in 14.5in; margin: 0; }
  html, body { background: #fff; padding: 0; gap: 0; }
  .sheet { box-shadow: none; width: 100%; min-height: 100vh; page-break-after: always; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet:last-child { page-break-after: auto; }
  .dark-block { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================================
   RESPONSIVE — the sheet is an 1056px print artifact; below that it becomes a
   fluid, comfortably-set mobile document. Columns collapse to a single stack,
   vertical dividers become horizontal hairlines, and type scales up for reading.
   ============================================================================ */

/* Tablet / small laptop — let the sheet go fluid before it can overflow. */
@media (max-width: 1120px) {
  body { padding: 20px; gap: 20px; }
  .sheet { width: 100%; max-width: 1056px; min-height: 0; padding: 40px 6vw 34px; }
}

/* Phone — full single-column reflow with larger, legible type. */
@media (max-width: 720px) {
  body { padding: 0; gap: 0; background: #fff; }

  .sheet {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 30px 22px 30px;
  }

  /* --- masthead stacks --- */
  .head { flex-direction: column; align-items: stretch; gap: 16px; }
  .head .title-block { max-width: none; }
  .head .doc { text-align: left; padding-top: 0; }
  .head .doc .t, .head .doc .m { white-space: normal; }
  .head .doc .m { margin-top: 5px; }
  .kicker { font-size: 12px; }
  .title { font-size: 30px; margin-top: 10px; }
  .desc { font-size: 16px; line-height: 1.55; margin-top: 12px; max-width: none; }

  /* --- running header (now mid-document) stays compact --- */
  .runhead { flex-wrap: wrap; gap: 10px; padding-bottom: 16px; }
  .runhead .rh-meta { text-align: left; }

  /* --- section heads --- */
  .section-head { margin-top: 12px; margin-bottom: 18px; max-width: none; }
  .section-head .sh-kicker { font-size: 11px; }
  .section-head .sh-title { font-size: 22px; }
  .section-head .sh-desc { font-size: 15px; line-height: 1.5; }

  .flow { padding-top: 22px; }
  .band-gap { height: 30px; }
  .band-gap.lg { height: 34px; }

  /* --- every multi-column band becomes one column --- */
  .band { grid-template-columns: 1fr !important; gap: 0; }
  .band > .cell,
  .band > .cell:first-child,
  .band > .cell:last-child { padding: 0; }

  /* vertical dividers → horizontal hairlines between stacked cells */
  .divider { width: auto; height: 1px; align-self: auto; margin: 22px 0; }
  .dark-block .divider { background: oklch(1 0 0 / 0.14); }

  /* summary band */
  .summary .cell .s-lead { font-size: 17px; }
  .summary .cell .s-body { font-size: 14px; line-height: 1.55; margin-top: 8px; }
  .summary .cell .s-cap { font-size: 11px; margin-top: 12px; }
  .summary .cell + .divider { margin: 24px 0; }

  /* dark callout */
  .dark-block { margin: 0 -22px; padding: 30px 26px; border-radius: 0; }
  .db-statement { font-size: 22px; line-height: 1.3; max-width: none; }
  .db-cap { font-size: 11px; margin-top: 18px; }
  .principles { margin-top: 18px; }
  .principle .p-title { font-size: 16px; }
  .principle .p-body { font-size: 13.5px; line-height: 1.55; margin-top: 8px; }

  /* legal clauses */
  .clause { margin-bottom: 26px; }
  .clause-num { font-size: 13px; }
  .clause-title { font-size: 16.5px; }
  .legal-body p { font-size: 14.5px; line-height: 1.62; margin-bottom: 10px; }
  .legal-body li { font-size: 14.5px; line-height: 1.55; padding-left: 18px; margin-bottom: 8px; }
  .legal-body li::before { top: 9px; }
  .def { grid-template-columns: 1fr; gap: 4px 0; }
  .def dt { font-size: 12.5px; padding-top: 10px; }
  .def dd { font-size: 14px; line-height: 1.55; padding-bottom: 6px; }
  .def dt:first-child { padding-top: 0; }
  .chips { gap: 8px; margin-top: 14px; }
  .tag-chip { font-size: 11px; padding: 6px 12px; }

  /* footer stacks */
  .foot { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 34px; }
  .foot-right { text-align: left; align-items: flex-start; gap: 5px; }
  .foot .lockup .wm { font-size: 19px; }
  .foot-right .l { font-size: 11px; }
  .foot-right .s { font-size: 10.5px; }
  .foot-right .pg { font-size: 10.5px; }
}

/* Very small phones — tighten horizontal padding a touch more. */
@media (max-width: 380px) {
  .sheet { padding: 26px 16px 26px; }
  .dark-block { margin: 0 -16px; padding: 26px 18px; }
  .title { font-size: 26px; }
}
