/* Insurance Law: "Declarations Page".
   Cream form paper, policy navy and a signal-orange accent; a plain grotesk for reading and a monospace
   for every label, as on a policy's declarations page. Boxes are ruled like form fields. Loaded after study.css. */

:root {
  --paper: #f6f4ee; --ink: #1b2a3a; --ink-2: #33465a; --muted: #5b6b7b;
  --rule: #1b2a3a; --hair: #c9cfd5; --tint: #eceae2; --accent: #c2410c;
  --ok: #1d5e34; --warn: #a12a12; --link: #1b2a3a;
  --form: #ffffff; --form-line: #9aa6b2;
  --sans: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1720; --ink: #e6ebf0; --ink-2: #c3ccd6; --muted: #8d9aa8;
    --rule: #c3ccd6; --hair: #2a3644; --tint: #17212c; --accent: #ff8a4c;
    --ok: #86d19c; --warn: #ffab8f; --link: #e6ebf0; --form: #15202b; --form-line: #3a4858;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1720; --ink: #e6ebf0; --ink-2: #c3ccd6; --muted: #8d9aa8;
  --rule: #c3ccd6; --hair: #2a3644; --tint: #17212c; --accent: #ff8a4c;
  --ok: #86d19c; --warn: #ffab8f; --link: #e6ebf0; --form: #15202b; --form-line: #3a4858;
}

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

/* frame */
.top { border-bottom: 2px solid var(--rule); }
.brand { font: 700 .95rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.brand .mark { width: auto; height: auto; background: var(--ink); color: var(--paper); padding: 3px 6px; margin-right: 8px; }
.brand .mark::before { content: "IL"; font: 700 .8rem/1 var(--mono); letter-spacing: .04em; }
.top nav, .top .aside { font: .78rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.top nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.top .aside .cta { color: var(--accent); border: 1.5px solid var(--accent); padding: 3px 10px; }
.top .aside .cta:hover { background: var(--accent); color: var(--paper); }
.foot { border-top: 2px solid var(--rule); font-family: var(--mono); font-size: .74rem; letter-spacing: .02em; }
.lockbar { background: var(--accent); color: #fff; font-family: var(--mono); }

/* type */
h1 { letter-spacing: -.02em; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font: 400 .8rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; border-top: 1.5px solid var(--rule); }
main > section > h2:first-child::before, main > h2::before { content: "§ " counter(sec); min-width: 3rem; color: var(--accent); }
h3 { font-family: var(--mono); font-weight: 600; letter-spacing: .08em; color: var(--ink); }
.kicker { font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.kicker b { color: var(--accent); }
.lede { color: var(--ink-2); }
.meta, .cases .meta { font-family: var(--mono); font-size: .78rem; }
blockquote { border-left: 4px solid var(--accent); background: var(--form); }
mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; }

/* buttons and forms */
.button, button { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 0;
                  font: 600 .8rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.button:hover, button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.quiet, button.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.button.quiet:hover, button.quiet:hover { background: var(--ink); color: var(--paper); }
textarea, select, input { background: var(--form); border: 1px solid var(--form-line); border-radius: 0; }
.badge { border-radius: 0; font-family: var(--mono); font-size: .72rem; }

/* form-ruled boxes: gates, facts, hidden notes */
.gate, .facts, .hidden { background: var(--form); border: 1.5px solid var(--rule); border-radius: 0; }
.facts-grid { border: 1.5px solid var(--rule); background: var(--form); }
.facts-grid div { padding-left: calc(1.5*var(--u)); border-right: 1px solid var(--form-line); border-bottom: 1px solid var(--form-line); }
.facts-grid dt { font-family: var(--mono); font-size: .68rem; }
.facts-grid dd { font-size: 1.15rem; }
.ticks li::before { background: var(--accent); }
.opara:target { box-shadow: -8px 0 0 var(--tint), inset 3px 0 0 var(--accent); }
.problem { background: var(--form); border: 1.5px solid var(--rule); }

/* ---------- home: the declarations page ---------- */
.dec { border: 1.5px solid var(--rule); background: var(--form); margin: calc(1*var(--u)) 0 calc(3*var(--u)); }
@media (min-width: 1100px) { main > .dec { grid-column: 1 / -1; } }
.dec-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--ink); color: var(--paper);
            padding: 8px 14px; font: .74rem var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.dec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-bottom: 1.5px solid var(--rule); }
.dec-grid div { padding: 9px 14px; border-right: 1px solid var(--form-line); border-bottom: 1px solid var(--form-line); }
.dec-grid div:nth-child(3n) { border-right: 0; }
.dec-grid div:nth-last-child(-n+3) { border-bottom: 0; }
.dec-grid dt { font: .66rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.dec-grid dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dec-body { padding: calc(2.5*var(--u)) 14px calc(2*var(--u)); }
.dec-body h1 { margin-top: 0; max-width: 18ch; }
.dec-body .lede { max-width: 40rem; }
.dec-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
@media (max-width: 640px) {
  .dec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec-grid div:nth-child(3n) { border-right: 1px solid var(--form-line); }
  .dec-grid div:nth-child(2n) { border-right: 0; }
  .dec-grid div:nth-last-child(-n+3) { border-bottom: 1px solid var(--form-line); }
  .dec-grid div:nth-last-child(-n+2) { border-bottom: 0; }
}

table.schedule { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.schedule td { padding: 8px 4px; border-bottom: 1px dashed var(--form-line); vertical-align: top; }
table.schedule td.sec { font: .76rem/1.9 var(--mono); color: var(--muted); width: 4.6rem; white-space: nowrap; }
table.schedule td.cnt { font: .76rem/1.9 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
table.schedule a { color: var(--ink); text-decoration: none; }
table.schedule a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.endorsement { border-left: 4px solid var(--accent); background: var(--form); padding: 12px 16px; margin: calc(3*var(--u)) 0 0; }
.endorsement p { margin: 4px 0; }
.endorsement .end-label { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.endorsement a { text-decoration: none; }

@media print { .dec-head { background: none; color: var(--ink); border-bottom: 1px solid var(--ink); } }
