/* NoogaSignal — tokens and devices copied verbatim from NoogaCrush
   (~/gits/noogacrush/site/index.html). Do not approximate them; a near-miss
   on shadow offset or border weight reads as a knock-off. */
:root {
  --paper:   #FDF4E7;
  --paper-2: #F7E9D5;
  --card:    #FFFDF9;
  --ink:     #2A2018;
  --ink-soft:#6B5B4D;
  --coral:   #F0523C;
  --butter:  #F5B93F;
  --sky:     #4A7FA5;
  --mint:    #5E9E7E;
  --rule:    #E0CDB4;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--paper-2) 1px, transparent 1.2px),
    radial-gradient(var(--paper-2) 1px, transparent 1.2px);
  background-size: 18px 18px, 18px 18px;
  background-position: 0 0, 9px 9px;
  color: var(--ink);
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--sky); }
a:hover { color: var(--coral); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px 80px;
  padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }

/* ---------- masthead ---------- */
.mast { padding: 46px 0 6px; text-align: center; position: relative; }
.mast--small { padding: 22px 0 4px; }
.mast__home { text-decoration: none; color: inherit; display: inline-block; }
.mast__logo {
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 120;
  font-weight: 700;
  font-size: clamp(3.1rem, 11vw, 5.4rem);
  line-height: 0.92; margin: 0; letter-spacing: -0.025em; color: var(--ink);
}
.mast--small .mast__logo { font-size: clamp(2.2rem, 7vw, 3rem); }
.mast__logo em { font-style: italic; color: var(--coral); text-shadow: 1.5px 1.5px 0 var(--butter); }
.mast__tag { margin: 14px auto 0; max-width: 40rem; font-size: 1.06rem; color: var(--ink-soft); }
.stamp { margin-top: 10px; font-size: 0.83rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 18px; }
.mast--small .nav { margin-top: 12px; }
.pill {
  font-size: 0.86rem; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink); min-height: 36px; display: inline-flex; align-items: center;
}
.pill:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
.pill.is-on.pill--coral  { background: var(--coral); color: #fff; }
.pill.is-on.pill--butter { background: var(--butter); }
.pill.is-on.pill--sky    { background: var(--sky); color: #fff; }
.pill.is-on.pill--mint   { background: var(--mint); color: #fff; }
.rule {
  height: 3px; margin: 24px 0 0; border: 0;
  background: repeating-linear-gradient(90deg,
    var(--coral) 0 16px, transparent 16px 26px,
    var(--butter) 26px 42px, transparent 42px 52px,
    var(--sky) 52px 68px, transparent 68px 78px);
}

/* ---------- live bar ---------- */
.livebar {
  display: flex; flex-wrap: nowrap; justify-content: safe center; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 9px 14px; background: var(--ink); color: var(--paper);
  border-bottom: 3px solid var(--coral); font-size: .82rem; line-height: 1.2;
  padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right));
}
.livebar__label {
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
  color: var(--ink); background: var(--butter); border-radius: 999px; padding: 4px 10px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: 0 0 auto;
}
.livebar__label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--coral);
  animation: ns-pulse 1.6s ease-in-out infinite; }
.livebar__label:hover { color: var(--ink); background: #fff; }
@keyframes ns-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.lv[hidden] { display: none !important; }
.lv { flex: 0 0 auto; display: inline-flex; align-items: baseline; padding: 3px 10px; border: 1.5px solid rgba(253,244,231,.28); border-radius: 999px; white-space: nowrap; }
.lv b { font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.lv i { font-style: normal; font-weight: 600; color: rgba(253,244,231,.72); margin-left: 4px; }
.livebar::-webkit-scrollbar { display: none; }
@media (max-width: 1360px) { .livebar { justify-content: flex-start; } }
#lv-911 b { color: #FFB4A6; }
#lv-power b { color: var(--butter); }
.lv--ytd { border-style: dashed; }
.lv--ytd b { color: #A9D3F0; }

/* ---------- live page ---------- */
.livecard { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 20px 20px 16px; box-shadow: 4px 4px 0 var(--ink); }
.livecard__n { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 60, 'WONK' 1; font-weight: 700; font-size: 2.8rem; line-height: 1; margin: 0; color: var(--coral); font-variant-numeric: tabular-nums; }
.livecard__t { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.15rem; margin: 10px 0 4px; }
.livecard__d { font-size: .9rem; color: var(--ink-soft); margin: 0 0 8px; }
.livecard__x { font-size: .85rem; margin: 0 0 8px; line-height: 1.5; }
.livecard a { font-size: .82rem; font-weight: 700; }

/* ---------- ticker ---------- */
.ticker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 20px; }
.chip {
  font-size: 0.83rem; font-weight: 700; letter-spacing: 0.01em; padding: 5px 13px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: #fff; box-shadow: 2px 2px 0 var(--ink);
}
.chip--hot   { background: var(--coral); color: #fff; }
.chip--quiet { background: var(--butter); }
.chip--live  { background: #fff; }
.chip--live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); margin-right: 7px; border: 1.5px solid var(--ink); vertical-align: 0; }
.alerts { margin: 16px auto 0; max-width: 760px; }
.alert { border: 2px solid var(--ink); border-radius: 12px; background: var(--butter); padding: 10px 14px;
  box-shadow: 3px 3px 0 var(--ink); font-weight: 700; font-size: .95rem; margin-top: 8px; }
.alert a { color: var(--ink); }

/* ---------- report banner ---------- */
.report-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 26px 0 0;
  padding: 14px 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card);
  box-shadow: 4px 4px 0 var(--ink); text-decoration: none; color: var(--ink);
}
.report-banner strong { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; }
.report-banner span:last-child { color: var(--ink-soft); font-size: .93rem; }
.report-banner:hover { box-shadow: 6px 7px 0 var(--ink); color: var(--ink); }

/* ---------- top of front page ---------- */
.top:has(> :only-child) { grid-template-columns: 1fr; }
.top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; margin-top: 30px; align-items: start; }
.side__title { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 50, 'WONK' 1;
  font-weight: 600; font-size: 1.45rem; margin: 0 0 12px; }
.side__more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .9rem; }

/* ---------- shelves ---------- */
.shelf { margin-top: 38px; }
.shelf__head { margin-bottom: 18px; }
.shelf__title { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 50, 'WONK' 1;
  font-weight: 600; font-size: 1.85rem; margin: 0; letter-spacing: -0.01em; }
.shelf__title a { color: var(--ink); text-decoration: none; }
.shelf__title a:hover { color: var(--coral); }
.shelf__note { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.wall { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: stretch; }

/* ---------- cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 2px solid var(--ink); border-radius: 14px;
  padding: 22px 20px 18px; box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(var(--tilt)); transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 6px 7px 0 var(--ink); }
.card::before { content: ''; position: absolute; inset: -2px -2px auto -2px; height: 9px;
  border-radius: 12px 12px 0 0; border: 2px solid var(--ink); border-bottom: 0; }
.card--coral::before  { background: var(--coral); }
.card--butter::before { background: var(--butter); }
.card--sky::before    { background: var(--sky); }
.card--mint::before   { background: var(--mint); }
.card__pin { position: absolute; top: -9px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.card__img { margin: 4px -6px 14px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; background: var(--paper-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.12) contrast(1.02); }
.card__chart { margin: 4px -4px 10px; }
.card__chart .chart { margin: 0; }
.card__chart figcaption { display: none; }
.card__kicker { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--ink-soft); font-weight: 700; margin: 4px 0 8px; }
.card__title { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin: 0; letter-spacing: -0.005em; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; }
.card__title a:hover { color: var(--coral); }
.card__dek { margin: 9px 0 0; font-size: .97rem; color: #3A2E24; line-height: 1.55; }
.card--big { transform: none; padding: 26px 26px 24px; }
.card--big .card__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.12; }
.card--big .card__dek { font-size: 1.08rem; }
.card--big:hover { transform: translateY(-3px); }
.badge { font-size: 0.7rem; font-weight: 800; text-transform: lowercase; padding: 2px 9px; border-radius: 999px;
  border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); position: relative; z-index: 1; }
.badge--coral  { background: var(--coral); color: #fff; }
.badge--butter { background: var(--butter); }
.badge--sky    { background: var(--sky); color: #fff; }
.badge--mint   { background: var(--mint); color: #fff; }

/* ---------- on this day ---------- */
.otd { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 16px 16px 14px;
  box-shadow: 4px 4px 0 var(--ink); position: relative; }
.otd__img { border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.otd__img img { width: 100%; max-height: 340px; object-fit: cover; filter: sepia(.35) contrast(1.05); }
.otd__credit { font-size: .72rem; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.4; }
.otd__year { font-weight: 800; color: var(--coral); margin: 10px 0 2px; font-size: .9rem; letter-spacing: .02em; }
.otd__title { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.15rem; line-height: 1.25; margin: 0; }
.otd__sum { margin: 6px 0 8px; font-size: .95rem; color: #3A2E24; }
.otd__src { font-size: .85rem; font-weight: 700; }
.otd-wall { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.otd--big { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 22px; }
.otd--big .otd__img { grid-row: span 6; }
.otd--big .otd__img img { max-height: 460px; height: 100%; }
.otd--big .otd__title { font-size: 1.6rem; }
.cal { columns: 3 240px; column-gap: 26px; }
.cal__m { margin: 0 0 10px; break-inside: avoid; font-size: .92rem; }
.cal__m strong { display: block; font-family: Fraunces, Georgia, serif; }
.cal__m a { display: inline-block; min-width: 30px; padding: 2px 0; }

/* ---------- story page ---------- */
.story { max-width: 760px; margin: 34px auto 0; }
.story__kicker { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--ink-soft); font-weight: 700; }
.story__title { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 100;
  font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; margin: 12px 0 0; }
.story__dek { font-size: 1.2rem; color: var(--ink-soft); margin: 12px 0 0; line-height: 1.45; }
.story__hero { margin: 24px 0 0; }
.story__hero img { width: 100%; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); filter: sepia(.15); }
.story__hero figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; }
.story__hero figcaption span { display: block; font-size: .76rem; }
.story__body { margin-top: 22px; font-size: 1.08rem; line-height: 1.7; }
.story__body h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.5rem; margin: 34px 0 6px; line-height: 1.2; }
.story__body h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.2rem; margin: 26px 0 4px; }
.story__body blockquote { margin: 18px 0; padding: 4px 18px; border-left: 4px solid var(--butter); color: var(--ink-soft); }
.story__body table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 18px 0; display: block; overflow-x: auto; }
.story__body th, .story__body td { text-align: left; padding: 7px 10px; border-bottom: 1.5px dashed var(--rule); white-space: nowrap; }
.story__body th { border-bottom: 2px solid var(--ink); font-weight: 800; }
.story__body td:not(:first-child), .story__body th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.box { margin-top: 34px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 18px 20px; box-shadow: 4px 4px 0 var(--ink); }
.box__title { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.15rem; margin: 0 0 6px; }
.box__list { margin: 0; padding-left: 20px; font-size: .93rem; }
.box__list li { margin: 4px 0; }
.box__method, .box__through, .box__ai { font-size: .88rem; color: var(--ink-soft); margin: 10px 0 0; }

/* ---------- charts ---------- */
.chart { margin: 26px 0; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 12px 10px; box-shadow: 4px 4px 0 var(--ink); }
.chart__svg { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 4; }
.chart__axis { font: 700 12px Nunito, sans-serif; fill: var(--ink-soft); }
.chart__bar { fill: var(--sky); stroke: var(--ink); stroke-width: 1.5; }
.chart__bar--hi { fill: var(--coral); }
.chart__line { fill: none; stroke: var(--sky); stroke-width: 3; stroke-linejoin: round; }
.chart__dot { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.chart__dot--hi { fill: var(--coral); }
.chart figcaption { font-weight: 700; font-size: .92rem; margin: 6px 4px 0; }
.chart figcaption span { display: block; font-weight: 400; color: var(--ink-soft); font-size: .82rem; }

/* ---------- empty / footer ---------- */
.empty { border: 2.5px dashed var(--rule); border-radius: 16px; padding: 34px 26px; text-align: center; background: var(--card); margin-top: 30px; }
.empty__big { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.32rem; margin: 0 0 6px; }
.empty__small { margin: 0 auto; max-width: 38rem; color: var(--ink-soft); font-size: 0.95rem; }
.foot { margin-top: 64px; padding-top: 24px; border-top: 2px solid var(--rule); font-size: 0.87rem; color: var(--ink-soft); text-align: center; }
.foot p { max-width: 52rem; margin: 10px auto; }
.foot strong { color: var(--ink); }

@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; }
  .otd--big { grid-template-columns: 1fr; }
  .otd--big .otd__img { grid-row: auto; }
}
@media (max-width: 640px) {
  .livebar { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: .78rem; }
  .livebar::-webkit-scrollbar { display: none; }
  body { font-size: 16px; }
  .wrap { padding: 0 15px 56px; padding-left: max(15px, env(safe-area-inset-left)); padding-right: max(15px, env(safe-area-inset-right)); }
  .mast { padding: 30px 0 4px; }
  .shelf { margin-top: 30px; }
  .wall, .otd-wall { grid-template-columns: 1fr; gap: 17px; }
  .card { transform: none; box-shadow: 3px 3px 0 var(--ink); }
  .card:hover { transform: none; }
  .shelf__title { font-size: 1.5rem; }
  .pill { font-size: .8rem; padding: 5px 11px; }
  .story__body { font-size: 1.02rem; }
}
@media (hover: none) { .card:hover, .pill:hover, .report-banner:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
