/* Real Estate Transactions: "Closing Disclosure".
   A settlement statement: white form, navy section bars, a plain sans with monospaced figures, itemized line
   items with dotted leaders, and one green "cash to close" box. Loaded after study.css. */

:root {
  --paper: #ffffff; --ink: #16223a; --ink-2: #2c3a55; --muted: #5b6b88;
  --rule: #16223a; --hair: #d6dbe5; --tint: #f1f4f9; --accent: #1f7a4d;
  --ok: #1f7a4d; --warn: #a33a1d; --link: #16223a;
  --cash: #1f7a4d; --bar: #16223a; --bar-ink: #ffffff; --leader: #9aa6bd;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Inter, Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1626; --ink: #e6ebf4; --ink-2: #c3cbdb; --muted: #8e9ab3;
    --rule: #c3cbdb; --hair: #27324a; --tint: #172036; --accent: #5fd19a;
    --ok: #5fd19a; --warn: #ff9f85; --link: #e6ebf4;
    --cash: #5fd19a; --bar: #26385f; --bar-ink: #ffffff; --leader: #46557a;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1626; --ink: #e6ebf4; --ink-2: #c3cbdb; --muted: #8e9ab3;
  --rule: #c3cbdb; --hair: #27324a; --tint: #172036; --accent: #5fd19a;
  --ok: #5fd19a; --warn: #ff9f85; --link: #e6ebf4;
  --cash: #5fd19a; --bar: #26385f; --bar-ink: #ffffff; --leader: #46557a;
}

body { font: 17px/1.55 var(--sans); }

/* frame */
.top { border-bottom: 3px solid var(--rule); }
.brand { text-transform: uppercase; letter-spacing: .03em; font-size: .98rem; }
.brand .mark { background: var(--cash); border-radius: 1px; }
.top nav a[aria-current="page"] { border-bottom-color: var(--cash); }
.top .aside .cta { background: var(--cash); color: #fff; padding: 3px 12px; border-radius: 2px; text-decoration: none; }
.foot { border-top: 3px solid var(--rule); }
.lockbar { background: var(--bar); color: var(--bar-ink); }

/* type */
h1 { font-weight: 700; letter-spacing: -.012em; line-height: 1.12; }
h2 { letter-spacing: -.005em; }
.kicker { font: 600 .74rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kicker b { color: var(--cash); }
.meta, .date, .label { font-family: var(--mono); font-size: .82em; }
.cases .meta { color: var(--muted); }

/* buttons */
.button, button.button { background: var(--cash); color: #fff; border: 0; border-radius: 2px; font-weight: 600; }
.button:hover { filter: brightness(1.08); }

/* the facts grid reads as the loan-terms box */
.facts-grid { border: 2px solid var(--rule); gap: 0; }
.facts-grid > div { border-right: 1px solid var(--hair); padding: 10px 14px; }
.facts-grid dt { font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts-grid dd { font: 600 1.45rem var(--mono); }

/* section bars: any h2 inside the settlement form, and the outline's parts */
.cd-sec, .cd-form h2 { background: var(--bar); color: var(--bar-ink); font: 600 .78rem/1 var(--mono);
  letter-spacing: .07em; text-transform: uppercase; padding: 8px 10px; margin: 28px 0 0;
  display: flex; justify-content: space-between; gap: 12px; }
.cd-li { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: baseline; gap: 8px;
  padding: 9px 2px; border-bottom: 1px solid var(--hair); }
.cd-li .n { font: 600 .76rem var(--mono); color: var(--muted); }
.cd-li .t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cd-li .t a { font-weight: 600; text-decoration: none; }
.cd-li .t a:hover { text-decoration: underline; }
.cd-li .t::after { content: ""; flex: 1; border-bottom: 1px dotted var(--leader); transform: translateY(-4px); min-width: 1rem; }
.cd-li .v { font: 600 .9rem var(--mono); }
.cd-li .topics { grid-column: 2 / 4; font-size: .85rem; color: var(--muted); margin-top: -2px; }
.cd-li .topics a { color: var(--muted); }
.cd-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 2px solid var(--cash); padding: 12px 16px; margin: 22px 0 8px; }
.cd-total span { font: 600 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.cd-total b { font: 700 1.6rem var(--mono); color: var(--cash); }
.cd-total .button { margin-left: auto; }
.cd-note { font-size: .82rem; color: var(--muted); }
.cd-stamp { font: 600 .72rem var(--mono); letter-spacing: .1em; color: var(--muted); border: 1px solid var(--hair);
  display: inline-block; padding: 2px 8px; }

/* outline page: parts read as numbered sections */
section > h2 { border-bottom: 2px solid var(--rule); padding-bottom: 4px; }
ol.cases li::marker { font-family: var(--mono); color: var(--muted); }

/* worked problems look like a line-item worksheet */
.problem { border: 1px solid var(--hair); border-left: 4px solid var(--bar); background: var(--tint); }
.gate { border: 2px solid var(--cash); background: var(--tint); }

@media (max-width: 640px) {
  .facts-grid > div { border-right: 0; border-bottom: 1px solid var(--hair); }
  .cd-li { grid-template-columns: 2.8rem 1fr auto; }
  .cd-total b { font-size: 1.3rem; }
}
