/* 모개숲 뉴스 — AI Daily Briefing (static site generated by ainews_batch/site.py) */

:root {
  --bg: #07080e;
  --bg-soft: #0b0d15;
  --card: #0f121b;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #f4f5f9;
  --text-2: #c9cfdb;
  --muted: #8f97aa;
  --accent: #ff5c84;
  --accent-soft: rgb(255 77 121 / 0.14);
  --amber: #ffbf5a;
  --grad: linear-gradient(100deg, #ff4d79 0%, #ff7d4a 52%, #ffc25e 100%);
  --grad-solid: linear-gradient(100deg, #e11d48 0%, #f0384f 42%, #ea580c 100%);
  --grad-text: linear-gradient(100deg, #ff6b8e 0%, #ff9a5c 55%, #ffd27a 100%);
  --glow: rgb(240 56 79 / 0.85);
  --orb-a: rgb(124 92 255 / 0.5);
  --orb-b: rgb(255 61 110 / 0.42);
  --orb-c: rgb(255 160 70 / 0.38);
  --grid-line: rgb(255 255 255 / 0.045);
  --header-bg: rgb(7 8 14 / 0.76);
  --glass: rgb(16 19 29 / 0.62);
  --chip: rgb(255 255 255 / 0.05);
  --chip-hover: rgb(255 255 255 / 0.1);
  --shadow: 0 24px 60px -34px rgb(0 0 0 / 0.95);
  --media-bg: radial-gradient(120% 120% at 0% 0%, rgb(124 92 255 / 0.25), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgb(255 77 121 / 0.22), transparent 60%), #141826;
  --key-bg: linear-gradient(100deg, rgb(255 77 121 / 0.13), rgb(255 170 70 / 0.08));
  --key-line: rgb(255 120 100 / 0.3);
  --mark: rgb(255 120 90 / 0.3);
  --focus: #ffc25e;
  --notice-bg: rgb(255 191 90 / 0.1);
  --notice-line: rgb(255 191 90 / 0.3);
  --notice-text: #ffd793;
  --gutter: 16px;
  --header-h: 60px;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f6f7fb;
  --bg-soft: #eef0f6;
  --card: #ffffff;
  --line: rgb(15 23 42 / 0.08);
  --line-strong: rgb(15 23 42 / 0.15);
  --text: #0c1222;
  --text-2: #353e52;
  --muted: #677185;
  --accent: #e11d48;
  --accent-soft: rgb(225 29 72 / 0.08);
  --amber: #c2410c;
  --grad: linear-gradient(100deg, #f43f5e 0%, #fb7a3c 52%, #f5a524 100%);
  --grad-text: linear-gradient(100deg, #e11d48 0%, #ea580c 62%, #d97706 100%);
  --glow: rgb(225 29 72 / 0.5);
  --orb-a: rgb(139 120 255 / 0.24);
  --orb-b: rgb(255 92 132 / 0.22);
  --orb-c: rgb(255 176 80 / 0.3);
  --grid-line: rgb(15 23 42 / 0.05);
  --header-bg: rgb(255 255 255 / 0.82);
  --glass: rgb(255 255 255 / 0.74);
  --chip: rgb(15 23 42 / 0.04);
  --chip-hover: rgb(15 23 42 / 0.08);
  --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 18px 40px -26px rgb(15 23 42 / 0.28);
  --media-bg: radial-gradient(120% 120% at 0% 0%, rgb(139 120 255 / 0.18), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgb(255 92 132 / 0.16), transparent 60%), #eef0f6;
  --key-bg: linear-gradient(100deg, #fff1f4, #fff7ed);
  --key-line: #fdd0d9;
  --mark: rgb(251 122 60 / 0.24);
  --focus: #e11d48;
  --notice-bg: #fff7ea;
  --notice-line: #fbd59d;
  --notice-text: #8a3c0b;
  color-scheme: light;
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
    --header-h: 68px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text-2);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

::selection {
  background: rgb(255 77 121 / 0.32);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.ico {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Header ---------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

.hdr__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}

.logo__mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--grad-solid);
  color: #fff;
  font-size: 19px;
  box-shadow:
    0 8px 22px -8px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 0.28);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__text b {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo__text small {
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  white-space: nowrap;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
}

.tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-current='page'] {
  background: var(--grad-solid);
  color: #fff;
  box-shadow: 0 6px 18px -8px var(--glow);
}

.icon-btn {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text-2);
  font-size: 19px;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.icon-btn:hover {
  background: var(--chip-hover);
  color: var(--text);
}

.icon-btn .ico:last-child {
  display: none;
}

:root[data-theme='light'] .icon-btn .ico:first-child {
  display: none;
}

:root[data-theme='light'] .icon-btn .ico:last-child {
  display: block;
}

@media (max-width: 400px) {
  .logo__text small {
    display: none;
  }

  .tab {
    padding: 0 11px;
  }
}

.progress {
  display: none;
}

@supports (animation-timeline: scroll()) {
  .progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    display: block;
    height: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: 0 50%;
    animation: progress linear both;
    animation-timeline: scroll(root block);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  animation: drift 22s ease-in-out infinite alternate;
}

.orb--a {
  top: -34rem;
  left: -18rem;
  width: 52rem;
  height: 52rem;
  background: radial-gradient(closest-side, var(--orb-a), transparent);
}

.orb--b {
  top: -30rem;
  right: -20rem;
  width: 48rem;
  height: 48rem;
  background: radial-gradient(closest-side, var(--orb-b), transparent);
  animation-duration: 27s;
  animation-direction: alternate-reverse;
}

.orb--c {
  bottom: -22rem;
  left: 50%;
  width: 64rem;
  height: 32rem;
  margin-left: -32rem;
  background: radial-gradient(closest-side, var(--orb-c), transparent);
  animation-duration: 18s;
}

.backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 75% at 50% 0%, #000 25%, transparent 78%);
}

.backdrop__horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 140 90 / 0.75), transparent);
}

.hero__inner {
  padding-top: 28px;
  padding-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d79;
  animation: pulse 2.2s ease-out infinite;
}

.hero__date {
  margin: 18px 0 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
}

.hero__title {
  margin: 6px 0 0;
  color: var(--text);
  font-size: clamp(34px, 9vw, 68px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  max-width: 560px;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--notice-line);
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 14px;
  font-weight: 600;
}

.notice a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  text-decoration: none;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats li,
.share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.stats .ico {
  color: var(--accent);
  font-size: 16px;
}

.stats strong {
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.share {
  border-color: transparent;
  background: var(--grad-solid);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px var(--glow);
}

.share .ico {
  font-size: 16px;
}

@media (min-width: 640px) {
  .hero__inner {
    padding-top: 44px;
    padding-bottom: 40px;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding-top: 60px;
    padding-bottom: 54px;
  }

  .hero__date {
    font-size: 17px;
  }
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 56px;
}

.layout__main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.layout__side {
  display: none;
}

@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    padding-top: 32px;
    max-width: 1180px;
  }

  .layout__main {
    gap: 24px;
  }

  .layout__side {
    display: block;
  }

  .toc--inline {
    display: none;
  }

  .toc--side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
  }
}

/* ---------- Headlines (table of contents) ---------- */

.toc {
  padding: 18px 18px 8px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.toc__title span {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__list li + li {
  border-top: 1px solid var(--line);
}

.toc__section {
  padding: 12px 0 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
}

.toc__link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  padding: 11px 0;
  color: var(--text);
  text-decoration: none;
}

.toc__num {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.toc__text {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 180ms ease;
}

.toc__link:hover .toc__text,
.toc__link[aria-current='true'] .toc__text {
  color: var(--accent);
}

/* ---------- Story ---------- */

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--grad);
}

.story {
  position: relative;
  padding: 22px 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  animation: rise 560ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.story > * {
  margin: 0;
}

.story > * + * {
  margin-top: 14px;
}

.story__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.story__rank {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 32px;
  margin-top: 1px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--chip);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.story__rank.is-top {
  border-color: transparent;
  background: var(--grad-solid);
  color: #fff;
  box-shadow: 0 8px 22px -10px var(--glow);
}

.story__title {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 5.4vw, 27px);
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.story__meta {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.story__figure {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--media-bg);
}

.story__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

.story__figure figcaption {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.story__figure.is-logo img {
  max-height: 160px;
  padding: 12px;
}

.story__key {
  position: relative;
  padding: 14px 16px 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--key-line);
  background: var(--key-bg);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
}

.story__key::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
}

.story p:not([class]),
.story ul,
.story ol {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.88;
}

.story strong {
  color: var(--text);
  font-weight: 800;
  background: linear-gradient(transparent 62%, var(--mark) 62%);
}

.story__key strong {
  background: none;
}

.story a:not(.pill) {
  color: var(--accent);
  text-underline-offset: 3px;
}

.story__label {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.story__label + p {
  margin-top: 6px;
}

.story__note,
.story__muted {
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.story__muted {
  border-top: 0;
  padding-top: 0;
}

.story ul,
.story ol {
  padding-left: 1.3em;
}

.story li + li {
  margin-top: 0.4em;
}

.story li::marker {
  color: var(--accent);
}

.story__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--chip);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.pill:hover {
  border-color: var(--accent);
  background: var(--chip-hover);
}

.story__links .pill:first-child {
  border-color: transparent;
  background: var(--grad-solid);
  color: #fff;
}

.callout {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--text);
  font-weight: 600;
}

.callout p {
  margin: 0;
}

.story--intro p {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.85;
}

.story pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--chip);
  font-size: 13.5px;
}

.story details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

/* Notion text colours that survive inside paragraphs */
.tc-gray,
.tc-brown {
  color: var(--muted);
}
.tc-red,
.tc-pink,
.tc-orange {
  color: var(--accent);
}
.tc-blue,
.tc-purple,
.tc-green {
  color: #7cc4ff;
}
:root[data-theme='light'] .tc-blue,
:root[data-theme='light'] .tc-purple,
:root[data-theme='light'] .tc-green {
  color: #1d63c9;
}
[class*='-background'] {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--mark);
  color: var(--text);
}

@media (min-width: 640px) {
  .story {
    padding: 28px 30px 26px;
    border-radius: 24px;
  }

  .story > * + * {
    margin-top: 16px;
  }

  .story p:not([class]),
  .story ul,
  .story ol {
    font-size: 17.5px;
    line-height: 1.9;
  }

  .story__key {
    font-size: 18px;
    padding: 16px 20px 16px 22px;
  }
}

/* ---------- Pager ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pager__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: border-color 180ms ease;
}

.pager__link:hover {
  border-color: var(--accent);
}

.pager__link.is-next {
  grid-column: 2;
  justify-content: flex-end;
  text-align: right;
}

.pager__link small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pager__link .ico {
  color: var(--accent);
  font-size: 20px;
}

/* ---------- Archive ---------- */

.archive {
  padding: 8px 0 64px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.archive__month + .archive__month {
  margin-top: 24px;
}

.archive__month h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

details.archive__month summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  list-style: none;
}

details.archive__month summary::-webkit-details-marker {
  display: none;
}

details.archive__month summary h3 {
  margin: 0;
  color: var(--text);
}

details.archive__month summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

details[open].archive__month summary {
  margin-bottom: 12px;
}

.archive__grid {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .archive__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ed {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.ed[aria-current='page'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

@media (hover: hover) {
  .ed:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 50px -30px var(--glow);
  }
}

.ed__date {
  display: grid;
  place-items: center;
  align-content: center;
  height: 56px;
  border-radius: 14px;
  background: var(--chip);
  border: 1px solid var(--line);
}

.ed__date b {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ed__date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ed__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ed__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ed__meta {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.ed__tag {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
}

.ed__thumb {
  overflow: hidden;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--media-bg);
}

.ed__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Footer ---------- */

.ftr {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.ftr__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.ftr__brand {
  display: grid;
  gap: 10px;
}

.ftr__brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.ftr__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ftr__links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.ftr__links a:hover {
  background: var(--chip-hover);
  color: var(--text);
}

.empty {
  display: grid;
  gap: 16px;
  place-content: center;
  min-height: 80vh;
  text-align: center;
}

/* ---------- Motion ---------- */

.layout__main > .story:nth-of-type(2) {
  animation-delay: 60ms;
}
.layout__main > .story:nth-of-type(3) {
  animation-delay: 120ms;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(6%, 7%, 0) scale(1.12);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(255 77 121 / 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgb(255 77 121 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(255 77 121 / 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .eyebrow__dot,
  .story {
    animation: none;
  }

  .ed {
    transition: none;
  }
}
