/* Marginalia Library: direction A, the card catalog. Light only for now; every color is a token here, so a dark
   version can follow the reader's system setting later without touching the pages. */
/* The two fonts, served from this site (no request goes to any other site). Both are under the SIL Open Font
   License: static/fonts/OFL-*.txt. Latin and Latin Extended subsets, as Google Fonts splits them. */
/* Courier Prime 400 normal, latin-ext */
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/courier-prime-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Courier Prime 400 normal, latin */
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/courier-prime-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Courier Prime 700 normal, latin-ext */
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/courier-prime-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Courier Prime 700 normal, latin */
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/courier-prime-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Libre Caslon Text 400 italic, latin-ext */
@font-face { font-family: 'Libre Caslon Text'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Libre Caslon Text 400 italic, latin */
@font-face { font-family: 'Libre Caslon Text'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Libre Caslon Text 400 normal, latin-ext */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Libre Caslon Text 400 normal, latin */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Libre Caslon Text 700 normal, latin-ext */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Libre Caslon Text 700 normal, latin */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/libre-caslon-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --paper: #EDE5D3;      /* the page: cabinet paper */
  --drawer: #E2D8C3;     /* drawer fronts */
  --card: #F8F3E8;       /* panels and drawer labels */
  --card-white: #FFFDF8; /* index cards */
  --head: #F4EEE1;       /* the header band */
  --ink: #22201C;
  --ink-2: #4A443B;      /* secondary text, 8:1 on --card */
  --muted: #5E574C;      /* labels, 6:1 on --paper */
  --rule: #C9D0D3;       /* ruled lines on cards */
  --rule-2: #B9AE98;     /* card edges */
  --slate: #8C9AA3;      /* link underlines, lighter marks (never text) */
  --accent: #A8402E;     /* the catalog card's red rule, stamps, negative views */
  /* Chart series (Patterns): ink blue and manila ochre, validated as a pair against --card (lightness, chroma,
     colorblind separation); ochre is under 3:1, so every chart using it has labels and a table. */
  --series-1: #1F5E9E;
  --series-2: #C7860F;
  --series-other: #B9AE98;
  --serif: 'Libre Caslon Text', 'Iowan Old Style', Georgia, serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the hidden attribute beats display rules like .btn's */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-decoration-color: var(--slate); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card-white); padding: 6px 10px; z-index: 10; }
h1, h2, h3 { font-weight: 400; }
i, em { font-style: italic; }

/* ---------------------------------------------------------------- header and footer */
.site-head { background: var(--head); border-bottom: 2px solid var(--ink); }
.site-head .wrap { padding-top: 18px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 12px 32px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand a { font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: 0.16em; text-decoration: none; }
.brand span { font-size: 14px; color: var(--muted); font-style: italic; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 15px; }
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration-color: var(--accent); }
.lookup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; margin-top: 22px;
  border: 1px solid var(--ink); background: var(--card); }
.lookup label { font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; }
.lookup input { flex: 1 1 240px; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--slate);
  background: var(--card-white); font-family: var(--serif); font-size: 17px; color: var(--ink); }
.btn { height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--head);
  font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--card-white); }
.btn-quiet { background: transparent; color: var(--ink); }
.site-foot { margin-top: 56px; border-top: 2px solid var(--ink); }
.site-foot .wrap { padding-top: 18px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 10px 40px;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.site-foot p { margin: 0; flex: 1 1 380px; }

/* ---------------------------------------------------------------- shared pieces */
.crumbs { padding-top: 18px; font-family: var(--mono); font-size: 14px; color: var(--muted); display: flex;
  flex-wrap: wrap; gap: 4px 10px; }
.label { margin: 0; font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase; }
.sub-label { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin: 0; }
.section-head h1, .section-head h2 { margin: 0; line-height: 1.15; }
.section-head h1 { font-size: 34px; }
.section-head h2 { font-size: 24px; }
.section-head .note { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.page-title { margin: 22px 0 0; font-size: 40px; line-height: 1.12; }
.lede { margin: 8px 0 0; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.layout { display: flex; flex-wrap: wrap; gap: 36px; padding-top: 18px; }
.main-col { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 34px; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.panel { background: var(--card); border: 1px solid var(--rule-2); padding: 16px 18px; display: flex;
  flex-direction: column; gap: 14px; }
.panel h2.label { border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.panel li { display: flex; flex-direction: column; line-height: 1.3; }
.panel li span { font-size: 14px; color: var(--ink-2); }
.fineprint { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.more { font-family: var(--mono); font-size: 14px; }

/* MR's view as a typed sign: + positive, ± mixed, − negative, · no view */
.sign { display: inline-block; width: 16px; flex: none; font-family: var(--mono); font-weight: 700; font-size: 17px;
  line-height: 1.3; text-align: center; }
.sign.negative { color: var(--accent); }
.stamp { display: inline-block; border: 2px solid var(--accent); color: var(--accent); padding: 2px 8px;
  font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; background: var(--card-white);
  transform: rotate(-4deg); white-space: nowrap; }
.tag { display: inline-block; border: 1.5px solid var(--accent); color: var(--accent); padding: 0 6px;
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: 0.12em; white-space: nowrap; }

/* ---------------------------------------------------------------- drawers (home and category pages) */
.drawer-group { display: flex; flex-direction: column; gap: 10px; }
.drawers { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; }
.drawer { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--ink);
  background: var(--drawer); text-decoration: none; color: var(--ink); }
.drawer:hover { color: var(--ink); border-color: var(--accent); }
.drawer:hover .drawer-name { color: var(--accent); }
.drawer-label { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--slate);
  background: var(--card); }
.drawer-code { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); }
.drawer-name { font-size: 16px; line-height: 1.25; }
.drawer-count { font-family: var(--mono); font-size: 13px; color: var(--ink-2); padding: 0 2px; }

/* ---------------------------------------------------------------- the index card (work pages, random card) */
.card { position: relative; background: var(--card-white); border: 1px solid var(--rule-2); padding: 18px 26px 24px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-family: var(--mono);
  font-size: 14px; color: var(--ink-2); }
.card-rule { height: 2px; background: var(--accent); margin: 10px 0 16px; }
.card .stamp { float: right; margin: 6px 0 12px 18px; font-size: 15px; padding: 3px 10px; }
.card h1 { margin: 0; font-size: 40px; line-height: 1.12; }
.card .subtitle { margin: 6px 0 0; font-size: 19px; font-style: italic; color: var(--ink-2); }
.card .byline { margin: 10px 0 0; font-size: 18px; }
.fields { margin: 20px 0 0; font-family: var(--mono); font-size: 15px; clear: both; border-bottom: 1px solid var(--rule); }
.fields > div { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 7px 0; border-top: 1px solid var(--rule); }
.fields dt { width: 128px; flex: none; color: var(--muted); letter-spacing: 0.06em; }
.fields dd { margin: 0; flex: 1 1 300px; min-width: 0; }
.mini-card { padding: 14px 18px 18px; }
.mini-card .title { font-size: 23px; line-height: 1.2; text-decoration: none; }
.mini-card .subtitle { font-size: 15px; margin-top: 2px; }
.mini-card .byline { font-size: 15px; margin: 6px 0 0; }
.mini-card .fields { font-size: 14px; margin-top: 12px; }
.mini-card .fields dt { width: 92px; }
.mini-card .stamp { font-size: 13px; }
/* the whole random card goes to the work: the title link stretches over it */
.mini-card .title::after { content: ''; position: absolute; inset: 0; }
.mini-card:hover { border-color: var(--accent); }
.mini-card:hover .title { color: var(--accent); }
.mini-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-card .title:focus-visible { outline: none; }

/* ---------------------------------------------------------------- ruled lists of mentions and works */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 0;
  border-bottom: 1px solid var(--rule); }
.rows .when { flex: none; width: 168px; display: flex; gap: 10px; font-family: var(--mono); font-size: 14px;
  color: var(--ink-2); }
.rows .when .n { width: 24px; text-align: right; }
.rows .what { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rows .what > a, .rows .what > .t { font-size: 17px; line-height: 1.35; }
.rows .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.rows .not-counted .what > a { color: var(--ink-2); }
.side-col .rows > li { flex-wrap: nowrap; gap: 10px; }
.side-col .rows .what { flex: 1 1 auto; }
.work-rows > li { gap: 4px 12px; }
.work-rows .shelf { flex: none; width: 220px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); padding-top: 3px; }
.work-rows .counts { flex: none; font-family: var(--mono); font-size: 13px; color: var(--ink-2); text-align: right; min-width: 92px; }
.post-rows > li { flex-direction: column; gap: 4px; }
.post-rows .post-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.post-rows .post-line a { font-size: 17px; }
.post-rows ul { list-style: none; margin: 0; padding: 0 0 0 178px; display: flex; flex-direction: column; gap: 2px; }
.post-rows ul li { display: flex; gap: 8px; align-items: baseline; }

/* ---------------------------------------------------------------- charts (SVG drawn by build.py) */
.chart-box { background: var(--card); border: 1px solid var(--rule-2); border-top: none; padding: 16px 16px 10px;
  overflow-x: auto; }
/* On a phone a chart keeps a readable size and scrolls sideways inside its box, rather than shrinking its text. */
.chart-box > svg.chart, .scroll-x > svg.chart { min-width: 540px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 14px; fill: var(--ink-2); }
.chart .bar { fill: var(--ink); }
.chart .bar.partial { fill: var(--slate); }
.chart .bar:hover, .chart .hit:hover + .bar { fill: var(--accent); }
.chart .axis { stroke: var(--ink); stroke-width: 1; }
.dot-pos { fill: var(--ink); stroke: var(--ink); }
.dot-mixed { fill: var(--card-white); stroke: var(--ink); }
.dot-mixed-half { fill: var(--ink); }
.dot-neg { fill: var(--accent); stroke: var(--accent); }
.dot-none { fill: var(--card-white); stroke: var(--ink); }
.spark { display: inline-block; vertical-align: -3px; }
.spark rect { fill: var(--ink); }
.spark rect.zero { fill: var(--rule-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 15px; color: var(--ink); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .key { display: inline-block; width: 14px; height: 14px; flex: none; }
details.table-view { margin-top: 8px; font-family: var(--mono); font-size: 14px; }
details.table-view summary { cursor: pointer; color: var(--ink-2); }
.data-table { border-collapse: collapse; margin-top: 8px; font-family: var(--mono); font-size: 14px; }
.data-table th, .data-table td { padding: 3px 12px 3px 0; text-align: right; border-bottom: 1px solid var(--rule); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.split { display: flex; height: 12px; gap: 2px; margin-top: 6px; max-width: 420px; }
.split span { display: block; height: 100%; }
.split .s-pos { background: var(--ink); }
.split .s-mixed { background: var(--slate); }
.split .s-neg { background: var(--accent); }
.split .s-none { background: var(--rule-2); }

/* ---------------------------------------------------------------- Patterns */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pattern-lede { margin: 12px 0 0; max-width: 760px; font-size: 19px; line-height: 1.55; }
.pattern-body { display: flex; flex-direction: column; gap: 26px; padding-top: 22px; max-width: 980px; }
.figure { display: flex; flex-direction: column; gap: 0; }
.fig-title { margin: 0 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-size: 22px; line-height: 1.2; }
.figure .chart-box { border-top: none; }
.figure > .fineprint { margin-top: 6px; font-size: 14px; }
.figure > .body-text { margin-top: 10px; }
.fill-s1 { fill: var(--series-1); background: var(--series-1); color: #fff; }
.fill-s2 { fill: var(--series-2); background: var(--series-2); color: var(--ink); }
.fill-other { fill: var(--series-other); background: var(--series-other); color: var(--ink); }
.chart .hit { fill: transparent; }
.chart .col:hover rect:not(.hit) { opacity: 0.8; }
.chart .col.partial rect:not(.hit) { opacity: 0.5; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.stroke-s1 { stroke: var(--series-1); }
.stroke-s2 { stroke: var(--series-2); }
.chart .dot.stroke-s1 { fill: var(--series-1); stroke: none; }
.chart .dot.stroke-s2 { fill: var(--series-2); stroke: none; }
.chart .pt:hover .dot { r: 4; }
.chart .end-label { font-size: 16px; fill: var(--ink); }
.legend .key-line { width: 22px; }
.hbars { width: 100%; border-collapse: collapse; font-size: 17px; }
.hbars th, .hbars td { padding: 6px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.hbars thead th { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.hbars tbody th { width: 34%; padding-right: 12px; line-height: 1.3; }
.hbars td.hb { width: 50%; }
.hbars td.hb span { display: block; height: 14px; background: var(--ink); border-radius: 0 3px 3px 0; min-width: 2px; }
.hbars td.hb.pair span { height: 11px; }
.hbars td.hb.pair span + span { margin-top: 3px; }
.hbars td.hb .s1 { background: var(--series-1); }
.hbars td.hb .s2 { background: var(--series-2); }
.hbars .num { text-align: right; font-family: var(--mono); font-size: 15px; color: var(--ink); padding-left: 12px; white-space: nowrap; }
.hbars tbody tr:hover th, .hbars tbody tr:hover .num { color: var(--accent); }
.shares { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.share-row { display: flex; gap: 12px; align-items: center; }
.share-label { flex: none; width: 82px; font-family: var(--mono); font-size: 15px; color: var(--ink); }
.share-bar { flex: 1 1 auto; display: flex; gap: 2px; height: 32px; min-width: 0; }
.share-bar span { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 15px;
  overflow: hidden; white-space: nowrap; }
/* Tyler and Alex compared: fills its box, labels on the left, each writer's figures in a right-aligned column */
.data-table.compare { width: 100%; margin-top: 0; }
.data-table.compare th, .data-table.compare td { padding: 9px 0 9px 20px; }
.data-table.compare thead th { font-family: var(--serif); font-size: 19px; font-weight: 400; color: var(--ink);
  border-bottom: 2px solid var(--ink); }
.data-table.compare th[scope="row"] { width: 44%; padding-left: 0; text-align: left; font-family: var(--serif);
  font-size: 17px; font-weight: 400; }
.data-table.compare td { font-size: 17px; color: var(--ink); white-space: nowrap; }
.strips .strip-axis { margin-top: 8px; }
.strip-rows > li { display: block; padding: 8px 0 2px; }
.strip-head { display: flex; gap: 10px; align-items: baseline; }
.strip { display: block; margin-top: 2px; }
.strip a:focus-visible circle { stroke: var(--accent); stroke-width: 3; }
details.year-block { border-top: 1px solid var(--rule); padding: 6px 0; }
details.year-block > summary { cursor: pointer; font-family: var(--mono); font-size: 15px; padding: 6px 0; }

.patterns-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; padding-top: 26px; }
.pattern-toc { position: sticky; top: 16px; align-self: start; }
.pattern-toc ol { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.pattern-toc a { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
  font-size: 17px; line-height: 1.3; }
.pattern-toc .n, .pattern-head .n { font-family: var(--mono); color: var(--accent); }
.pattern-toc .n { font-size: 14px; padding-top: 2px; flex: none; }
.pattern-sections { display: flex; flex-direction: column; gap: 64px; min-width: 0; }
.pattern { scroll-margin-top: 16px; }
.pattern-head { display: flex; gap: 14px; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.pattern-head .n { font-size: 18px; }
.pattern-head h2 { margin: 0; font-size: 32px; line-height: 1.15; }
.pattern-head h2 a { text-decoration: none; }
.pattern-finding { margin: 14px 0 0; max-width: 780px; font-size: 21px; line-height: 1.45; }
.pattern .pattern-lede { margin-top: 8px; font-size: 17px; color: var(--ink-2); }
.pattern .pattern-body { max-width: none; }
.to-top { margin: 18px 0 0; font-family: var(--mono); font-size: 14px; }
.sort-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.sort-bar .label { margin-right: 4px; }
.sort-bar button { border: 1px solid var(--ink); background: var(--card-white); font-family: var(--serif); font-size: 15px;
  padding: 6px 12px; min-height: 40px; cursor: pointer; color: var(--ink); }
.sort-bar button[aria-pressed="true"] { background: var(--ink); color: var(--card-white); }
.show-all { margin-top: 14px; }
.sign.big { font-size: 26px; width: 26px; line-height: 1; }
.pile-rows .counts { min-width: 40px; }

/* ---------------------------------------------------------------- home: the evaluation bar and the patterns */
.eval-figure { padding-top: 24px; }
.sub-head { margin: 0 0 10px; font-size: 21px; font-weight: 400; line-height: 1.25; }
.evalbar { display: flex; gap: 2px; height: 36px; width: 100%; }
.evalbar span { display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap;
  font-family: var(--mono); font-size: 15px; }
.evalbar .s-pos, .eval-key .s-pos { background: var(--ink); color: var(--card-white); }
.evalbar .s-mixed, .eval-key .s-mixed { background: var(--slate); color: var(--ink); }
.evalbar .s-neg, .eval-key .s-neg { background: var(--accent); color: #fff; }
.evalbar .s-none, .eval-key .s-none { background: var(--rule-2); color: var(--ink); }
.eval-key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 16px; }
.eval-key li { display: flex; align-items: center; gap: 8px; }
.eval-key .sw { display: inline-block; width: 14px; height: 14px; flex: none; }
.eval-key .pc { color: var(--ink-2); }
.home-pattern { padding-top: 20px; }
.home-pattern + .home-pattern { margin-top: 18px; border-top: 1px solid var(--rule-2); }
.home-pattern h3 { margin: 0; font-size: 23px; line-height: 1.2; }
.home-pattern .body-text { margin-top: 6px; }
.home-pattern .chart-box { margin-top: 12px; border-top: 1px solid var(--rule-2); }

/* ---------------------------------------------------------------- Surprise me */
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 16px; }
.presets .label { margin-right: 6px; }
.preset { border: 1px solid var(--ink); background: var(--card-white); font-family: var(--serif); font-size: 15px;
  padding: 6px 12px; min-height: 40px; cursor: pointer; }
.preset:hover { border-color: var(--accent); color: var(--accent); }
.tools label.check { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; font-family: var(--serif); font-size: 15px; }
.tools label.check input { width: auto; height: auto; }
.pick-bar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin-top: 18px; }
.pick-bar .lede { margin: 0; }
.random-pick { padding-top: 14px; max-width: 820px; }
/* the full card, linked as a whole to the work's page; its own links stay clickable above the cover */
.card.linked { position: relative; }
.card.linked .card-title { margin: 0; font-size: 38px; line-height: 1.12; font-weight: 400; }
.card.linked .cover { text-decoration: none; }
.card.linked .cover::after { content: ''; position: absolute; inset: 0; }
.card.linked .byline a, .card.linked .fields a { position: relative; z-index: 1; }
.card.linked:hover { border-color: var(--accent); }
.card.linked:hover .cover { color: var(--accent); }
.card.linked:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.linked .cover:focus-visible { outline: none; }

/* ---------------------------------------------------------------- year grid */
.year-grid { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.year-grid th, .year-grid td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--rule); }
.year-grid th:first-child { text-align: left; }
.year-grid td.zero { color: var(--rule-2); }
.scroll-x { overflow-x: auto; }

/* ---------------------------------------------------------------- browse */
.browse { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 18px; }
.facets { flex: 1 1 280px; min-width: 0; max-width: 340px; display: flex; flex-direction: column; gap: 18px; }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.facet { background: var(--card); border: 1px solid var(--rule-2); padding: 12px 14px; }
.facet h2 { margin: 0 0 8px; }
.facet ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.facet ul ul { padding-left: 16px; margin-top: 2px; }
.facet button.opt { display: flex; width: 100%; justify-content: space-between; gap: 10px; align-items: baseline;
  border: none; background: none; padding: 5px 4px; min-height: 32px; font-family: var(--serif); font-size: 15px;
  color: var(--ink); text-align: left; cursor: pointer; }
.facet button.opt:hover { color: var(--accent); }
.facet button.opt[aria-pressed="true"] { background: var(--ink); color: var(--card-white); }
.facet button.opt .c { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.facet button.opt[aria-pressed="true"] .c { color: var(--card-white); }
.facet button.opt:disabled { color: var(--slate); cursor: default; }
.facet .expand { font-family: var(--mono); font-size: 13px; border: none; background: none; color: var(--ink-2); cursor: pointer; padding: 4px; }
.facet .row-pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.facet input[type=number], .facet select { height: 40px; padding: 0 8px; border: 1px solid var(--slate); background: var(--card-white);
  font-family: var(--mono); font-size: 14px; color: var(--ink); width: 92px; }
.facet label.check { display: flex; gap: 8px; align-items: center; min-height: 36px; font-size: 15px; cursor: pointer; }
.result-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.result-bar .count { font-family: var(--mono); font-size: 14px; }
.result-bar select { height: 40px; border: 1px solid var(--slate); background: var(--card-white); font-family: var(--mono); font-size: 14px; }
.chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.chosen button { border: 1px solid var(--ink); background: var(--card-white); font-family: var(--mono); font-size: 13px;
  padding: 4px 8px; cursor: pointer; min-height: 32px; }
.chosen button:hover { border-color: var(--accent); color: var(--accent); }
.noscript { font-family: var(--mono); font-size: 14px; }

/* ---------------------------------------------------------------- home */
.intro p { margin: 14px 0 0; max-width: 760px; font-size: 19px; line-height: 1.55; }
.body-text { margin: 12px 0 0; max-width: 760px; font-size: 17px; }
.howto { margin: 0; border-bottom: 1px solid var(--rule); }
.howto > div { display: flex; flex-wrap: wrap; gap: 2px 20px; padding: 10px 0; border-top: 1px solid var(--rule); }
.howto > div:first-child { border-top: none; }
.howto dt { flex: none; width: 210px; font-family: var(--mono); font-size: 15px; font-weight: 700; }
.howto dd { margin: 0; flex: 1 1 320px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 14px 0 0;
  border: 1px solid var(--ink); background: var(--card); }
.stats > div { padding: 10px 14px 12px; border-left: 1px solid var(--rule-2); }
.stats > div:first-child { border-left: none; }
.stats dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 27px; line-height: 1.2; }

/* ---------------------------------------------------------------- authors */
.tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; padding: 12px 14px; margin-top: 14px;
  border: 1px solid var(--rule-2); background: var(--card); font-family: var(--mono); font-size: 13px; }
.tools label { display: flex; flex-direction: column; gap: 4px; }
.tools input, .tools select { height: 40px; padding: 0 8px; border: 1px solid var(--slate); background: var(--card-white);
  font-family: var(--mono); font-size: 14px; color: var(--ink); }
.tools input { width: 220px; font-family: var(--serif); font-size: 16px; }
#author-key { margin-top: 10px; }
#author-results { margin-top: 6px; }
#author-results .counts { min-width: 140px; }

/* ---------------------------------------------------------------- prose (About) */
.prose { max-width: 720px; font-size: 17px; }
.prose h2 { font-size: 24px; margin: 32px 0 8px; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.prose p, .prose li { margin: 0 0 10px; }
.prose dt { font-family: var(--mono); font-weight: 700; font-size: 15px; margin-top: 10px; }
.prose dd { margin: 2px 0 0 0; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-head .wrap { padding-top: 12px; padding-bottom: 10px; gap: 6px; }
  .brand a { font-size: 17px; }
  .brand span { font-size: 13px; }
  .site-nav { gap: 4px 16px; font-size: 14px; }
  .lookup { flex-wrap: nowrap; padding: 8px; margin-top: 12px; gap: 8px; }
  .lookup label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lookup input { flex: 1 1 0; }
  .lookup .btn { padding: 0 12px; }
  .drawers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drawer { padding: 6px; gap: 4px; }
  .drawer-label { padding: 6px 8px; }
  .drawer-name { font-size: 15px; }
  .card { padding: 14px 16px 18px; }
  .card h1, .page-title { font-size: 31px; }
  .section-head h1 { font-size: 28px; }
  .card .stamp { font-size: 13px; margin-left: 10px; }
  .fields dt { width: 100%; }
  .rows .when { width: auto; }
  .work-rows .shelf { width: 100%; padding-top: 0; }
  .post-rows ul { padding-left: 12px; }
  .intro p { font-size: 17px; }
  .howto dt { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { border-left: none; border-top: 1px solid var(--rule-2); }
  .stats > div:nth-child(-n+2) { border-top: none; }
  .stats > div:nth-child(even) { border-left: 1px solid var(--rule-2); }
  .tools label, .tools input, .tools select { width: 100%; }
  .tools label.check { width: auto; }
  .pattern-lede { font-size: 17px; }
  .hbars tbody th { width: 40%; }
  .share-label { width: 64px; font-size: 14px; }
  .patterns-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pattern-toc { position: static; }
  .pattern-head h2 { font-size: 26px; }
  .pattern-finding { font-size: 18px; }
  .card.linked .card-title { font-size: 30px; }
  .data-table.compare th, .data-table.compare td { padding-left: 10px; font-size: 15px; }
  .data-table.compare thead th { font-size: 16px; }
  .data-table.compare td { white-space: normal; }
  .data-table.compare th[scope="row"] { width: 40%; padding-left: 0; }
  .evalbar span { font-size: 13px; }
  .facets { max-width: none; }
}
@media print {
  .site-head nav, .lookup, .site-foot { display: none; }
  body { background: #fff; }
}
