/* ─────────────────────────────────────────────────────────────────────────
   DARKROOM — the Reference section. Loaded after cc.css by both of its pages.

   The umbrella's cards and the family index's rows. The rows are this sheet's
   own `.rfr` rather than cc.css's `.rr`: the ledger row is a version, a date
   and two counts, and this one is a name, a line of prose and two markers, so
   sharing the class would have meant one of them overriding four rules of the
   other on every page.
   ───────────────────────────────────────────────────────────────────────── */

/* Top padding only. `.ref` sits on the same element as `.shell`, and a padding
   shorthand here has equal specificity and loads second, so it would wipe
   `.shell`'s `padding:0 var(--pad)` and run the page 80px wider than the
   masthead above it. DarkroomAssetsTest fails on the shorthand. */
.ref{padding-top:62px}

.ref h1{
  font-family:"Instrument Serif",serif; font-weight:400;
  font-size:clamp(32px,5vw,58px); line-height:1.04; letter-spacing:-.012em;
}
.ref h1 em{font-style:italic; color:var(--sig)}
.ref .deck{margin-top:20px; max-width:62ch; font-size:17.5px; line-height:1.6; color:var(--ink-2); font-weight:300}
.ref .deck b{color:var(--ink); font-weight:500}
.ref .deck code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.86em; color:var(--ink)}

.ref .kick .lbl a{color:inherit; text-decoration:none; border-bottom:1px solid var(--rule-2)}
.ref .kick .lbl a:hover{color:var(--ink)}

/* The number that is this site's own, so it reads as a statement and not as a
   caption. */
.refnum{
  margin-top:30px; padding:18px 20px; border-left:2px solid var(--sig); background:var(--bg-2);
  font-size:16px; line-height:1.6; color:var(--ink-2); font-weight:300; max-width:70ch;
}
.refnum b{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:19px; color:var(--sig); font-weight:500}

.refnote{margin-top:22px; max-width:70ch; font-size:14px; line-height:1.6; color:var(--ink-3); font-weight:300}
.refnote b{color:var(--ink-2); font-weight:500}

/* ── the umbrella's eight cards ──────────────────────────────────────── */
.refcards{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1px;
  margin-top:34px; background:var(--rule); border:1px solid var(--rule);
}
.refcard{
  display:flex; flex-direction:column; gap:9px; padding:22px 20px 24px;
  background:var(--bg); text-decoration:none; color:inherit;
  transition:background .18s;
}
.refcard:hover{background:var(--bg-2)}
.refcard .ct{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--sig);
}
.refcard .hh{font-family:"Instrument Serif",serif; font-size:25px; line-height:1.15; color:var(--ink)}
.refcard .bb{font-size:14px; line-height:1.55; color:var(--ink-3); font-weight:300}
.refcard .bb code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.86em}

/* ── the family index's toolbar ──────────────────────────────────────── */
.reffam .tools{
  display:flex; align-items:center; gap:18px 24px; flex-wrap:wrap;
  margin-top:38px; padding:18px 0 20px; border-top:1px solid var(--rule);
}
.reffam .fbox{position:relative; flex:1 1 260px; min-width:0}
.reffam .fbox input{
  width:100%; background:var(--bg-2); color:var(--ink);
  border:1px solid var(--rule-2); border-radius:0;
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:13px; letter-spacing:.02em;
  padding:11px 46px 11px 14px;
  transition:border-color .18s, background .18s;
  -webkit-appearance:none; appearance:none;
}
.reffam .fbox input::placeholder{color:var(--ink-4)}
.reffam .fbox input:focus{outline:none; border-color:var(--sig); background:var(--sig-ghost)}
.reffam .fbox input::-webkit-search-cancel-button{-webkit-appearance:none; appearance:none}
.reffam .fbox .kbd{
  position:absolute; right:10px; top:50%; transform:translateY(-50%); pointer-events:none;
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px; color:var(--ink-4);
  border:1px solid var(--rule-2); padding:2px 7px; line-height:1.4;
  transition:opacity .18s;
}
.reffam .fbox input:focus~.kbd{opacity:0}

.reffam .sort{display:flex; border:1px solid var(--rule-2)}
.reffam .sb{
  background:none; border:0; cursor:pointer; padding:9px 14px;
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-3);
  transition:color .18s, background .18s;
}
.reffam .sb+.sb{border-left:1px solid var(--rule-2)}
.reffam .sb:hover{color:var(--ink)}
.reffam .sb.on{color:var(--sig); background:var(--sig-ghost)}

.reffam .ct{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:11px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-3); white-space:nowrap;
}

.reflegend{
  margin-top:14px; font-size:12.5px; color:var(--ink-4); font-weight:300;
}
.reflegend .mk{font-family:"JetBrains Mono",ui-monospace,monospace}
.reflegend .undoc,.rfr .mm .undoc{color:var(--sig)}

/* ── the rows ────────────────────────────────────────────────────────── */
/* One grid, four cells: the name, its line, when it was in a build, and the
   markers. The description is clamped to a single line, which is the decision
   #337 asked for over paginating: pagination would cost the filter and the
   crawl path at once, and a wrapped paragraph per row turns a thousand names
   into a page nobody can scan. */
.rn{margin-top:26px; border-top:1px solid var(--rule)}
.rfr{
  display:grid; grid-template-columns:minmax(140px,26%) 1fr 130px 34px; gap:4px 20px;
  align-items:baseline; padding:11px 0; border-bottom:1px solid var(--rule);
  text-decoration:none; color:inherit;
}
.rfr:hover{background:var(--bg-2)}
.rfr .nn{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:13px; font-weight:500;
  color:var(--ink); overflow-wrap:anywhere; min-width:0;
}
.rfr.gone .nn{color:var(--ink-3)}
.rfr .dd{
  font-size:14px; line-height:1.45; color:var(--ink-2); font-weight:300; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.rfr .dd i{color:var(--ink-4); font-style:italic}
.rfr .dd code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.85em; color:var(--ink)}
.rfr .sv{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px; letter-spacing:.04em;
  color:var(--ink-4); white-space:nowrap; text-align:right;
}
.rfr .mm{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:12px; text-align:right; color:var(--ink-4)}
.rfr .mm b{font-weight:400}

/* The filter runs over a thousand rows on every keystroke, so it toggles one
   class and never touches layout or the DOM's shape. */
.rfr.off{display:none}

.refempty{
  padding:44px 0; font-size:17px; color:var(--ink-2); font-weight:300; max-width:66ch;
}
#empty{display:none; border-bottom:1px solid var(--rule)}
#empty.on{display:block}

/* ── one name's own page ──────────────────────────────────── */
/* Blocks, not cards. Every section is a heading and one of two bodies: the
   data, or a sentence saying what was looked for and not found. The empty
   sentence is styled like prose rather than like an error, because "nobody has
   written a line about this one" is a finding and not a fault. */
.refname h1{margin-top:8px}
.refname h1 code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.62em; letter-spacing:-.01em}
.refname .hh{
  margin-top:52px; padding-bottom:10px; border-bottom:1px solid var(--rule);
  font-family:"Instrument Serif",serif; font-weight:400; font-size:24px; color:var(--ink);
}
.refname .refnone{margin-top:16px; max-width:66ch; font-size:15.5px; line-height:1.6; color:var(--ink-3); font-weight:300}
.refname .refnote{margin-top:14px; max-width:70ch; font-size:13px; line-height:1.6; color:var(--ink-4); font-weight:300}
.refname .refnote b{color:var(--ink-3); font-weight:500}
.refname .refnote code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.9em}
.refname .refnote a,.refname .refdesc .src a{color:var(--ink-3); border-bottom:1px solid var(--rule-2); text-decoration:none}
.refname .refnote a:hover,.refname .refdesc .src a:hover{color:var(--sig)}

/* The description carries whose sentence it is directly underneath it, at a
   size that cannot be mistaken for part of the sentence. */
.refdesc{margin-top:22px; max-width:68ch}
.refdesc p{font-size:18px; line-height:1.6; color:var(--ink); font-weight:300}
.refdesc code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.86em}
.refdesc .src{margin-top:10px; font-size:12.5px; line-height:1.6; color:var(--ink-4); font-weight:400}

/* ── the per-release tables ─────────────────────────────── */
.reftl{margin-top:20px; width:100%; border-collapse:collapse; font-size:13px}
.reftl th{
  padding:0 12px 8px 0; text-align:left; font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-4); font-weight:400;
}
.reftl td{padding:9px 12px 9px 0; border-top:1px solid var(--rule); vertical-align:baseline}
.reftl .vv{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:12px; color:var(--ink); white-space:nowrap}
.reftl .vv a{color:inherit; text-decoration:none; border-bottom:1px solid var(--rule-2)}
.reftl .vv a:hover{color:var(--sig)}
.reftl .vv .n{margin-left:8px; font-size:10.5px; color:var(--ink-4); letter-spacing:.04em}
.reftl .ss{color:var(--ink-2)}
.reftl .tt{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:11.5px; color:var(--ink-3)}
/* Never mined is dimmer than absent on purpose: it is the row that says
   nothing was read, and it must not read as a measurement. */
.reftl .st-in-build .ss{color:var(--ink)}
.reftl .st-absent .ss{color:var(--ink-3)}
.reftl .st-unknown td{color:var(--ink-4)}
.reftl .st-unknown .ss{color:var(--ink-4); font-style:italic}

/* ── the entries, the join this page exists for ────────────────── */
.refents{margin-top:22px; list-style:none; border-top:1px solid var(--rule)}
.refents li{padding:15px 0; border-bottom:1px solid var(--rule)}
.refents .hd{display:flex; gap:14px; align-items:baseline; text-decoration:none; color:inherit}
.refents .hd:hover .tx{color:var(--sig)}
.refents .vv{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:11px; letter-spacing:.04em;
  color:var(--ink-4); white-space:nowrap;
}
.refents .tx{font-size:16px; line-height:1.4; color:var(--ink); font-weight:400}
.refents .tx code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.86em}
.refents .ln{margin-top:6px; max-width:70ch; font-size:14px; line-height:1.55; color:var(--ink-2); font-weight:300}
.refents .ln code{font-family:"JetBrains Mono",ui-monospace,monospace; font-size:.85em; color:var(--ink)}
.refents .wy{
  margin-top:6px; font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px;
  letter-spacing:.04em; color:var(--ink-4);
}

.refdocs{margin-top:20px; list-style:none; border-top:1px solid var(--rule)}
.refdocs li{
  display:flex; gap:12px; align-items:baseline; flex-wrap:wrap;
  padding:11px 0; border-bottom:1px solid var(--rule); font-size:14px;
}
.refdocs a{color:var(--ink); text-decoration:none; border-bottom:1px solid var(--rule-2)}
.refdocs a:hover{color:var(--sig)}
.refdocs .wy,.refdocs .pp{
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10.5px;
  letter-spacing:.04em; color:var(--ink-4);
}
.refdocs .pp{margin-left:auto}

@media(max-width:860px){
  .ref{padding-top:38px}
  .ref .deck{font-size:16.5px; margin-top:16px}
  .refcards{grid-template-columns:1fr}
  .reffam .tools{margin-top:26px; gap:14px 18px; padding:14px 0 16px}
  .reffam .fbox{flex:1 1 100%}
  .reffam .fbox input{font-size:16px} /* under 16px iOS zooms the whole page on focus */
  .reffam .fbox .kbd{display:none}    /* a phone has no slash key to advertise */
  /* The name and its line stack; the dates and the markers share the last
     row, because a version range in a 90px column wraps to three lines. */
  .rfr{grid-template-columns:1fr 34px; gap:3px 12px}
  .rfr .nn{grid-column:1 / -1}
  .rfr .dd{white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
  .rfr .sv{text-align:left}
  .refname .hh{margin-top:38px; font-size:21px}
  .refdesc p{font-size:16.5px}
  /* A five-column gate table does not fit a phone; let it scroll sideways
     rather than wrap a version number to three lines. */
  .reftl{display:block; overflow-x:auto}
  .refdocs .pp{margin-left:0}
}
