
/* Early Modern Drama — Character Clustering · site.css
   Generated by code/07_generate_site.py — edit there, not here. */
:root {
  --ink: #1b1b22; --muted: #5f5f6b; --faint: #8b8b95;
  --accent: #5a4a8a; --accent-ink: #45376f; --accent-soft: #efecf7;
  --bg: #fbfbf8; --card: #ffffff; --rule: #e6e6df; --soft: #f3f3ec;
  --warm: #f8f4e8;
  --b-proto-bg: #e9e3f6; --b-proto-fg: #4a3a7a;
  --b-typ-bg:  #e3ebf3;  --b-typ-fg:  #3c5570;
  --b-fam-bg:  #ececec;  --b-fam-fg:  #55555f;
  --b-time-bg: #f5eecb;  --b-time-fg: #7a6a2e;
  --highlight: #fff3a8;
  --maxw: 1060px; --mast-h: 47px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--mast-h) + 12px); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
       Helvetica, Arial, sans-serif;
       color: var(--ink); background: var(--bg); margin: 0; padding: 0;
       line-height: 1.6; font-size: 16px;
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- masthead ------------------------------------------------------ */
.masthead { position: sticky; top: 0; z-index: 60; height: var(--mast-h);
            background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.masthead .in { max-width: var(--maxw); margin: 0 auto; height: 100%;
                padding: 0 28px; display: flex; align-items: center; gap: 20px; }
.masthead .brand { font-weight: 700; font-size: .95rem; letter-spacing: -.01em;
                   color: var(--ink); text-decoration: none; white-space: nowrap; }
.masthead .brand span { color: var(--faint); font-weight: 500; }
.masthead nav { margin-left: auto; display: flex; gap: 4px; font-size: .88rem; }
.masthead nav a { color: var(--muted); text-decoration: none; padding: 4px 10px;
                  border-radius: 6px; }
.masthead nav a:hover { color: var(--accent-ink); background: var(--accent-soft); }
.masthead nav a.active { color: var(--accent-ink); background: var(--accent-soft);
                         font-weight: 600; }

/* ---- layout & type ------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 34px 28px 96px; }
nav.crumbs { font-size: .82rem; color: var(--faint); margin: 0 0 1.6em; }
nav.crumbs a { color: var(--muted); text-decoration: none; }
nav.crumbs a:hover { color: var(--accent); text-decoration: underline; }
h1 { font-size: 1.85rem; font-weight: 750; letter-spacing: -.022em;
     line-height: 1.2; margin: 0 0 .3em; }
h2 { font-size: 1.02rem; font-weight: 700; letter-spacing: .005em;
     margin: 3em 0 .8em; padding-bottom: .45em; border-bottom: 1px solid var(--rule);
     display: flex; align-items: baseline; gap: 8px; }
h2::before { content: ""; width: 22px; height: 4px; border-radius: 2px;
             background: var(--accent); align-self: center; flex: none; opacity: .85; }
h3 { font-size: .95rem; font-weight: 650; margin: 1.6em 0 .4em; }
p { max-width: 76ch; }
.lede { color: var(--muted); margin: 0 0 1.3em; max-width: 78ch; }
.lede.sub { font-size: .92rem; }
a { color: var(--accent); }
code { background: var(--soft); border-radius: 4px; padding: 1px 5px; font-size: .88em; }

/* ---- fact strip ---------------------------------------------------- */
.facts { display: flex; flex-wrap: wrap; gap: 6px 34px; margin: 1.2em 0 1.5em; }
.facts .f { min-width: 0; }
.facts .f b { display: block; font-size: 1.22rem; font-weight: 700;
              letter-spacing: -.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.facts .f i { font-style: normal; display: block; font-size: .78rem; color: var(--muted);
              letter-spacing: .04em; text-transform: uppercase; }
.kvp { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem;
       color: var(--muted); margin-bottom: .8em; }
.kvp b { color: var(--ink); font-weight: 650; }

/* ---- notes & banners ----------------------------------------------- */
.banner { background: var(--accent-soft); border-left: 3px solid var(--accent);
          border-radius: 0 8px 8px 0; padding: 10px 16px; font-size: .88rem;
          line-height: 1.55; margin: 0 0 1.6em; color: #3f3f49; max-width: none; }
.banner b { color: var(--ink); }
.kw-caveat { color: var(--faint); font-size: .82rem; margin: -.8em 0 1.4em; max-width: 78ch; }
.curated { background: #fbf7ee; border: 1px solid #eadfc8; border-radius: 10px;
           padding: 12px 18px; margin: 0 0 1.4em; font-size: .93rem; }
.curated .clabel { font-weight: 650; font-size: .72rem; letter-spacing: .06em;
                   color: #7a6a2e; text-transform: uppercase; margin-right: .5em; }

/* ---- badges & chips (one system) ----------------------------------- */
.badge, .chip {
  display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 8px;
  margin-left: 6px; vertical-align: 2px;
  background: var(--b-fam-bg); color: var(--b-fam-fg); white-space: nowrap; }
.badge-proto, .chip-prototype { background: var(--b-proto-bg); color: var(--b-proto-fg); }
.chip-typical { background: var(--b-typ-bg); color: var(--b-typ-fg); }
.badge-time { background: var(--b-time-bg); color: var(--b-time-fg); }

/* ---- cards --------------------------------------------------------- */
.idx-card { display: block; background: var(--card); border: 1px solid var(--rule);
            border-radius: 10px; padding: 15px 20px; margin: 10px 0;
            text-decoration: none; color: inherit;
            transition: border-color .12s, box-shadow .12s; }
.idx-card:hover { border-color: #c9c0e2; box-shadow: 0 2px 10px rgba(90,74,138,.08); }
.idx-card h3 { margin: 0 0 .25em; color: var(--accent-ink); font-size: 1rem; }
.idx-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.idx-card small { color: var(--faint); }
.landmarks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
             gap: 10px; margin: .6em 0 1em; }
.lm-card { background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
           padding: 11px 15px; font-size: .9rem; }
.lm-card .who { font-weight: 650; display: flex; align-items: baseline; gap: 4px;
                justify-content: space-between; flex-wrap: wrap; }
.lm-card .who a { color: var(--accent-ink); text-decoration: none; }
.lm-card .who a:hover { text-decoration: underline; }
.lm-card .whence { color: var(--muted); font-size: .84rem; margin-top: 2px; }
h2.fam { margin-top: 3.2em; }
.fam-desc { color: var(--muted); font-size: .9rem; margin: -.2em 0 .6em; }

/* ---- tables -------------------------------------------------------- */
table { border-collapse: collapse; width: 100%; font-size: .89rem; margin-top: .6em; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--rule);
         vertical-align: top; }
thead th { background: var(--soft); font-weight: 650; font-size: .8rem;
           letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
table.sortable thead th { position: sticky; top: var(--mast-h); z-index: 10; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { color: var(--accent-ink); text-decoration: none; }
td a:hover { text-decoration: underline; }
tbody tr:hover td { background: #f6f6ef; }
tr.formative td { background: var(--warm); }
tr.formative:hover td { background: #f3edda; }
tr.formative td:first-child { box-shadow: inset 3px 0 0 #cfc3e8; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #eaeae1; }
th.sortable::after { content: " ↕"; color: var(--faint); font-size: .85em; }

/* ---- bars, strips, sparks ------------------------------------------ */
.bar { display: flex; align-items: center; gap: 8px; font-size: .85rem;
       color: var(--muted); margin: 1px 0; }
.bar .label { width: 5.5em; text-align: right; }
.bar .fill { background: #c9bfe0; height: 11px; border-radius: 4px; min-width: 1px; }
.bar .count { width: 3em; }
.tag { display: inline-block; background: var(--soft); border-radius: 999px;
       padding: 2px 10px; font-size: .84rem; margin: 0 4px 5px 0; }
.tag .n { color: var(--faint); margin-left: 4px; font-size: .92em; }
.tstrip { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin: .7em 0 .2em; }
.tslot { position: relative; width: 9px; height: 56px; }
.tslot .c1 { position: absolute; bottom: 0; left: 0; width: 4px; background: #ddddd3; border-radius: 1px; }
.tslot .c2 { position: absolute; bottom: 0; right: 0; width: 4px; background: var(--accent);
             border-radius: 1px; opacity: .85; }
.taxis { font-size: .76rem; color: var(--faint); margin-bottom: .6em; max-width: 78ch; }
.sig-group { margin: .3em 0 .55em; }
.sig-group .glabel { display: inline-block; min-width: 7.5em; color: var(--muted);
                     font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
                     vertical-align: top; padding-top: 3px; }
.spark { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; margin-left: 8px; }
.spark i { display: inline-block; width: 3px; background: #c9bfe0; }

/* ---- excerpts & character blocks ----------------------------------- */
.character-block { background: var(--card); border: 1px solid var(--rule);
                   border-radius: 10px; padding: 14px 18px; margin: 14px 0; }
.character-block .ch-head { display: flex; justify-content: space-between;
                            flex-wrap: wrap; gap: 6px 10px; }
.character-block .ch-head .name { font-weight: 650; font-size: 1rem; }
.character-block .ch-head .name a { color: var(--accent-ink); text-decoration: none; }
.character-block .ch-head .name a:hover { text-decoration: underline; }
.character-block .ch-head .meta { color: var(--faint); font-size: .85rem; text-align: right; }
.excerpt { background: var(--soft); border-left: 3px solid var(--accent);
           border-radius: 0 6px 6px 0; padding: 9px 14px; margin: 8px 0;
           font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
           font-size: .97rem; line-height: 1.55; }
mark { background: var(--highlight); padding: 0 2px; border-radius: 2px; }
.plot { background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
        padding: 12px 16px; margin: 10px 0; }
.plot .title { font-weight: 650; margin-bottom: .2em; }
.plot .meta { color: var(--faint); font-size: .85rem; margin-bottom: .5em; }
.plot .body { font-size: .93rem; }
.full-speech { background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
               padding: 18px 22px; font-family: Georgia, "Iowan Old Style",
               "Times New Roman", serif; font-size: 1rem; line-height: 1.68;
               max-height: 640px; overflow-y: auto; }

/* ---- disclosure ---------------------------------------------------- */
details { margin: 1.1em 0; border: 1px solid var(--rule); border-radius: 10px;
          background: var(--card); padding: 0 18px; }
details > summary { cursor: pointer; font-weight: 650; font-size: .95rem;
                    padding: 12px 0; color: var(--ink); list-style: none; }
details > summary::before { content: "▸"; color: var(--accent); margin-right: 8px;
                            display: inline-block; transition: transform .12s; }
details[open] > summary::before { transform: rotate(90deg); }
details[open] { padding-bottom: 14px; }
details > summary::-webkit-details-marker { display: none; }

/* ---- landing ------------------------------------------------------- */
.hero { padding: 30px 0 6px; }
.hero h1 { font-size: 2.15rem; max-width: 28ch; }
.hero .lede { font-size: 1.06rem; max-width: 62ch; margin-bottom: 1.8em; }
.entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
           gap: 14px; margin: 1.4em 0 .6em; }
.entry { display: block; background: var(--card); border: 1px solid var(--rule);
         border-radius: 12px; padding: 18px 20px 16px; text-decoration: none;
         color: inherit; transition: border-color .12s, box-shadow .12s; }
.entry:hover { border-color: #c9c0e2; box-shadow: 0 3px 14px rgba(90,74,138,.1); }
.entry h3 { margin: 0 0 .3em; font-size: 1.02rem; color: var(--accent-ink); }
.entry p { margin: 0 0 .8em; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.entry .go { font-size: .85rem; color: var(--accent); font-weight: 600; }
.methods h2 { margin-top: 2.6em; }
.methods p b { color: var(--ink); }

/* ---- footer -------------------------------------------------------- */
.footer { color: var(--faint); font-size: .84rem; margin-top: 4em;
          border-top: 1px solid var(--rule); padding-top: 1.4em; max-width: none; }
.footer a { color: var(--muted); }

/* ---- small screens ------------------------------------------------- */
@media (max-width: 760px) {
  .wrap { padding: 24px 16px 72px; }
  .masthead .in { padding: 0 16px; gap: 10px; }
  .masthead .brand span { display: none; }
  .facts { gap: 6px 22px; }
  table.sortable { display: block; overflow-x: auto; }
  .hero h1 { font-size: 1.7rem; }
}
