/* ============================================================================
   A Year in 22,197 Plays — article styles
   Everything is namespaced under #quarto-document-content so nothing leaks into the
   rest of the site. The story renders as a fixed "paper" sheet in both the
   site's light and dark modes — it is a designed, printed object.
   ========================================================================== */

@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-VariableItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
}

body {
  font-family: "Satoshi", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

#quarto-document-content {
  /* TEMP: recolored to match edodanilyan.com's own palette instead of the
     original warm-paper theme. Original values are backed up in
     .backups/site-palette-experiment/ at the project root. */
  --sp-paper: #ffffff;
  --sp-panel: #f5f6f8;
  --sp-card:  #ffffff;
  --sp-line:  #dee2e6;
  --sp-ink:   #212529;
  --sp-ink2:  #6c757d;
  --sp-mute:  #adb5bd;
  --sp-ember: #a8401f;
  --sp-teal:  #0f6876;

  color: var(--sp-ink);
  font-feature-settings: "ss01" on;
  line-height: 1.62;
  overflow-wrap: break-word;
}
#quarto-document-content ::selection { background: var(--sp-ember); color: var(--sp-paper); }
#quarto-document-content a { color: var(--sp-teal); text-decoration-color: var(--sp-mute); }
#quarto-document-content a:hover { color: var(--sp-ember); }
#quarto-document-content p, #quarto-document-content li { color: var(--sp-ink); }
#quarto-document-content strong { color: var(--sp-ink); }
#quarto-document-content hr {
  border: 0; height: 1px; background: var(--sp-line); margin: 2.6rem 0;
}

/* ---- masthead ---- */
.sp-dek {
  font-size: 1.06rem; color: var(--sp-ink2); max-width: 34em;
  margin: .2rem 0 .4rem;
}
.sp-byline {
  font-size: .8rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--sp-mute); margin-bottom: 2rem;
}

/* ---- section kickers ---- */
#quarto-document-content h2 { margin-top: 3.2rem; line-height: 1.25; color: var(--sp-ink); }
.sp-kicker {
  display: block; font-size: .74rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sp-ember);
  margin-bottom: .35rem;
}
.sp-kicker::before {
  content: ""; display: inline-block; width: 1.6em; height: 2px;
  background: var(--sp-ember); vertical-align: .32em; margin-right: .55em;
}

.sp-lead { font-size: 1.13rem; line-height: 1.66; }

/* ---- figures ---- */
.sp-figure { margin: 1.7rem 0 2.1rem; }
.sp-figure svg, .sp-figure img { width: 100%; height: auto; display: block; }
.sp-cap {
  font-size: .82rem; color: var(--sp-ink2); margin-top: .55rem;
  line-height: 1.5; max-width: 46em;
}
.sp-cap .sp-cap-mark { color: var(--sp-mute); }
.sp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-scroll > svg, .sp-scroll > img { min-width: 640px; }
.sp-scroll-hint { display: none; font-size: .74rem; color: var(--sp-mute); margin-top: .3rem; }
@media (max-width: 700px) { .sp-scroll-hint { display: block; } }

.sp-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.4rem; }
@media (max-width: 640px) { .sp-duo { grid-template-columns: 1fr; } }

/* ---- margin notes (findings) ---- */
.sp-note {
  border-left: 3px solid var(--sp-ember);
  background: var(--sp-panel);
  padding: .85rem 1.05rem .9rem;
  margin: 1.6rem 0;
  border-radius: 0 8px 8px 0;
  font-size: .95rem;
}
.sp-note b:first-child { display: block; margin-bottom: .15rem; }
.sp-note .sp-n { color: var(--sp-ember); font-weight: 700; font-variant-numeric: tabular-nums; }

/* numbers set inline in prose */
.sp-stat { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- interactive shells ---- */
.sp-jsonly { display: none; }
.sp-ready .sp-jsonly { display: block; }
.sp-ready .sp-static-swap { display: none; }
.sp-hint { font-size: .78rem; color: var(--sp-mute); margin: .4rem 0 .8rem; }

/* buttons / chips */
.sp-chiprow { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 1rem; }
.sp-chip {
  font: inherit; font-size: .82rem; line-height: 1;
  padding: .48em .8em; border-radius: 999px;
  border: 1px solid var(--sp-mute); background: transparent; color: var(--sp-ink2);
  cursor: pointer; transition: border-color .12s, color .12s, background .12s;
}
.sp-chip:hover { border-color: var(--sp-ink); color: var(--sp-ink); }
.sp-chip[aria-pressed="true"] {
  background: var(--sp-ink); border-color: var(--sp-ink); color: var(--sp-paper);
}
.sp-chip.sp-chip-teal[aria-pressed="true"] { background: var(--sp-teal); border-color: var(--sp-teal); }

/* ---- calendar ---- */
.sp-cal {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.05rem .95rem; margin: 1.2rem 0 .4rem;
}
.sp-cal-month {}
.sp-cal-mlab {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  color: var(--sp-ink2); margin-bottom: .3rem; text-transform: uppercase;
}
.sp-cal-mlab.sp-poland { color: var(--sp-teal); }
.sp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2.5px; }
.sp-cal-day {
  aspect-ratio: 1; border: 0; border-radius: 2.5px; padding: 0;
  background: var(--sp-cell, var(--sp-panel)); cursor: pointer; position: relative;
}
.sp-cal-day:hover { outline: 1.5px solid var(--sp-ink2); outline-offset: 1px; z-index: 1; }
.sp-cal-day[aria-pressed="true"] { outline: 2px solid var(--sp-ember); outline-offset: 1px; z-index: 2; }
.sp-cal-day.sp-silent::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 4px; height: 4px; border-radius: 50%;
  border: 1.2px solid var(--sp-ink2);
}
.sp-cal-blank { aspect-ratio: 1; }

/* day card */
.sp-daycard {
  border: 1px solid var(--sp-line); background: var(--sp-card);
  border-radius: 10px; padding: 1rem 1.15rem 1.1rem; margin: 1.1rem 0 .4rem;
  box-shadow: 0 1px 0 var(--sp-line);
}
.sp-daycard-date { font-weight: 700; font-size: 1.02rem; }
.sp-daycard-era {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sp-teal); margin-left: .5em;
}
.sp-daycard-row {
  display: flex; flex-wrap: wrap; gap: .3rem 1.6rem;
  font-size: .9rem; color: var(--sp-ink2); margin: .45rem 0 .65rem;
}
.sp-daycard-row b { color: var(--sp-ink); font-variant-numeric: tabular-nums; }
.sp-daycard-top { font-size: .9rem; }
.sp-daycard-top em { color: var(--sp-ink2); font-style: normal; }
.sp-daycard svg { width: 100%; height: auto; display: block; margin-top: .6rem; }

/* ---- clock lab ---- */
.sp-clocklab svg { width: 100%; height: auto; display: block; }

/* ---- explorer ---- */
.sp-explorer {
  border: 1px solid var(--sp-line); border-radius: 12px;
  background: var(--sp-card); padding: 1.15rem 1.25rem 1.35rem; margin: 1.4rem 0;
}
.sp-x-controls { display: grid; gap: .85rem; }
.sp-x-search { position: relative; max-width: 26rem; }
.sp-x-search input {
  width: 100%; font: inherit; font-size: .95rem;
  padding: .55em .9em; border-radius: 8px;
  border: 1px solid var(--sp-mute); background: var(--sp-paper); color: var(--sp-ink);
}
.sp-x-search input:focus { outline: 2px solid var(--sp-teal); border-color: var(--sp-teal); }
.sp-x-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(33, 37, 41, .12);
  max-height: 15rem; overflow: auto; margin: 0; padding: .25rem; list-style: none;
}
.sp-x-list li { padding: .4em .7em; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.sp-x-list li:hover { background: var(--sp-panel); }
.sp-x-range { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.sp-x-range label { font-size: .8rem; color: var(--sp-ink2); }
.sp-x-range output { font-size: .85rem; font-weight: 700; min-width: 10.5em; }
.sp-x-range input[type="range"] { accent-color: var(--sp-ember); width: min(11rem, 38vw); }
.sp-x-head { margin: 1rem 0 .2rem; font-size: .95rem; }
.sp-x-head b { font-variant-numeric: tabular-nums; }
.sp-x-figs svg { width: 100%; height: auto; display: block; }
.sp-x-tracks { margin: .9rem 0 0; padding: 0; list-style: none; font-size: .9rem; }
.sp-x-tracks li {
  display: flex; gap: .8rem; justify-content: space-between;
  padding: .34em 0; border-bottom: 1px dashed var(--sp-line);
}
.sp-x-tracks .sp-x-n { color: var(--sp-ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-x-empty { color: var(--sp-ink2); font-size: .9rem; padding: .6rem 0; }

/* ---- methodology ---- */
.sp-method { font-size: .95rem; color: var(--sp-ink); }
.sp-method code {
  background: var(--sp-panel); color: var(--sp-ink);
  padding: .1em .35em; border-radius: 4px; font-size: .86em;
}

/* footnote-ish */
.sp-foot { font-size: .8rem; color: var(--sp-ink2); }

@media (max-width: 480px) {
  .sp-cal { grid-template-columns: repeat(2, 1fr); gap: .9rem .7rem; }
  .sp-daycard-row { gap: .25rem 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  #quarto-document-content * { transition: none !important; }
}
