/* Clipping File: newsprint paper, black ink, one archive-blue accent. */
:root {
  --paper: #fbfaf6; --ink: #161512; --mute: #5d5b55; --faint: #8b887f; --rule: #e3e0d6; --card: #ffffff;
  --accent: #1d4e89; --hit: #fff0a8; --hit-ink: #161512; --warn-bg: #fdf3dc; --warn-ink: #5a4100; --err: #a3271b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121311; --ink: #ecebe6; --mute: #a7a59d; --faint: #7d7b74; --rule: #2a2b28; --card: #191a18;
  --accent: #8db4ea; --hit: #5b4c0c; --hit-ink: #fff6cf; --warn-bg: #2c2510; --warn-ink: #f2dc94; --err: #ff8f80;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121311; --ink: #ecebe6; --mute: #a7a59d; --faint: #7d7b74; --rule: #2a2b28; --card: #191a18;
    --accent: #8db4ea; --hit: #5b4c0c; --hit-ink: #fff6cf; --warn-bg: #2c2510; --warn-ink: #f2dc94; --err: #ff8f80;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.55 "IBM Plex Sans", system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 9; }

.top { max-width: 1120px; margin: 0 auto; padding: 18px 20px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; border-bottom: 3px double var(--ink); }
.brand { font: 700 21px/1 Georgia, "Times New Roman", serif; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; margin-right: auto; }
.brand small { font: 500 12px/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--mute); letter-spacing: 0.06em; margin-left: 8px; text-transform: uppercase; }
.top nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14.5px; }
.top nav a { color: var(--ink); }
.theme { font: 500 12.5px/1 "IBM Plex Mono", ui-monospace, monospace; background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; min-height: 32px; padding: 0 10px; cursor: pointer; }

main { max-width: 1120px; margin: 0 auto; padding: 26px 20px 40px; }
h1 { font: 700 clamp(28px, 4.4vw, 44px)/1.08 Georgia, "Times New Roman", serif; margin: 6px 0 12px; letter-spacing: -0.01em; max-width: 22em; }
h2 { font: 700 24px/1.2 Georgia, "Times New Roman", serif; margin: 34px 0 10px; }
h3 { margin: 0; }
.lede { font-size: 18px; max-width: 40em; margin: 0 0 18px; }
.mut { color: var(--mute); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; margin: 6px 0 2px; }
.prose { max-width: 42em; }
.prose li { margin: 6px 0; }

/* search form */
#f { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; display: grid; gap: 12px; grid-template-columns: repeat(6, 1fr); }
#f label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
#f .q { grid-column: 1 / -1; }
#f .q-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#f .q-row input[type="search"] { flex: 1 1 260px; }
#f .s2 { grid-column: span 2; }
#f .s1 { grid-column: span 1; }
#f .check { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; font-size: 14.5px; margin: 0; }
input[type="search"], input[type="text"], input[type="email"], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--faint); border-radius: 5px; min-height: 44px; padding: 8px 10px;
}
select:disabled { opacity: 0.6; }
button, .btn {
  font: 600 15px/1 "IBM Plex Sans", system-ui, sans-serif; color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
  border-radius: 5px; min-height: 44px; padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--faint); font-weight: 500; font-size: 14px; min-height: 38px; padding: 0 12px; }
button:disabled { opacity: 0.55; cursor: default; }
#f .go { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.examples { font-size: 14.5px; margin: 12px 0 0; color: var(--mute); }
.examples a { margin-right: 4px; }
@media (max-width: 720px) {
  #f { grid-template-columns: 1fr 1fr; }
  #f .s2 { grid-column: 1 / -1; }
}

/* status */
#status p { margin: 18px 0 0; padding: 12px 14px; border-radius: 6px; background: var(--card); border: 1px solid var(--rule); }
#status p.err { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--faint); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* results */
#out { margin-top: 22px; }
.sumbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--ink); }
.sumbar .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; margin: 14px 0 6px; border-bottom: 1px solid var(--rule); }
.tabs button { background: transparent; color: var(--mute); border: 0; border-bottom: 3px solid transparent; border-radius: 0; font-weight: 600; font-size: 15px; min-height: 42px; padding: 0 12px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.clip { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.clip figure { margin: 0; }
.clip img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: contain; object-position: top left; border: 1px solid var(--rule); border-radius: 3px; }
.kicker { margin: 0; font: 500 12.5px/1.4 "IBM Plex Mono", ui-monospace, monospace; color: var(--mute); text-transform: uppercase; letter-spacing: 0.03em; }
.clip h3 { font: 700 22px/1.2 Georgia, "Times New Roman", serif; margin: 4px 0 0; }
.clip .body > .mut { margin: 2px 0 10px; }
.ocr { font: 400 15.5px/1.6 Georgia, "Times New Roman", serif; margin: 0; max-width: 40em; overflow-wrap: anywhere; }
mark { background: var(--hit); color: var(--hit-ink); padding: 0 2px; border-radius: 2px; }
.same { font-size: 14px; background: var(--card); border-left: 3px solid var(--accent); padding: 8px 12px; margin: 12px 0; }
.cite { margin: 12px 0 0; }
.others { margin: 10px 0 0; }
.others summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.other { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.other img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; object-position: top left; border: 1px solid var(--rule); }
.other p { margin: 0 0 6px; }
.cite summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.ref { font-size: 13.5px; margin: 0 0 8px; padding: 8px 10px; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; user-select: all; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.locked { margin: 22px 0; padding: 16px; border: 1px dashed var(--faint); border-radius: 8px; background: var(--card); }
.locked p { margin: 0 0 10px; }
@media (max-width: 720px) { .clip { grid-template-columns: 1fr; } .clip img { max-height: 520px; } }

.year { font: 700 20px/1.2 Georgia, serif; margin: 22px 0 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.rows img { width: 64px; height: auto; border: 1px solid var(--rule); background: #eee; flex: none; }
.tl { list-style: none; padding: 0; margin: 10px 0; max-width: 720px; }
.tl li { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; padding: 3px 0; font-size: 14.5px; }
.tl .bar { height: 12px; background: var(--accent); border-radius: 2px; }
.tl .n { text-align: right; font-variant-numeric: tabular-nums; }
#more { margin: 22px 0 0; }

/* pages */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.plan { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; }
.plan h3 { font: 700 19px/1.2 Georgia, serif; }
.plan .price { font: 700 26px/1.1 Georgia, serif; margin: 8px 0; }
.plan ul { padding-left: 18px; margin: 8px 0 0; font-size: 15px; }
.notice { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 14px; border-radius: 6px; max-width: 44em; }
.notify { display: flex; gap: 8px; flex-wrap: wrap; max-width: 520px; }
.notify input { flex: 1 1 240px; }
.ok { color: var(--accent); font-weight: 600; }
.err-text { color: var(--err); }

.foot { max-width: 1120px; margin: 0 auto; padding: 20px; border-top: 1px solid var(--rule); color: var(--mute); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot p { margin: 0; }
.foot a { color: var(--mute); }
