/* Marvel Digest — Slim Creative event-schedule skin (cream + black) */

:root {
  --cream: #f5efe3;
  --cream-deep: #ebe3d2;
  --cream-edge: #e8e0d0;
  --ink: #121212;
  --ink-soft: #2a2a2a;
  --muted: #5a5448;
  --brick: #b83a32;
  --brick-soft: rgba(184, 58, 50, 0.1);
  --hairline: rgba(18, 18, 18, 0.22);
  --line: #121212;
  --badge-bg: #121212;
  --badge-fg: #f5efe3;
  --official: #121212;
  --rumor: #121212;
  --trivia: #121212;
  --interview: #121212;
  --industry: #121212;
  --radius: 0;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
    "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei",
    "Noto Sans TC", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Noto Serif TC", "Songti TC", Georgia, serif;
  --script: "Segoe Script", "Apple Chancery", "Brush Script MT", cursive;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

::selection {
  background: var(--ink);
  color: var(--cream);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.55;
  /* Soft dark photo bleed only at far edges; calm cream page center */
  background-color: #1a1a1c;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(60, 80, 110, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 75%, rgba(90, 40, 45, 0.28), transparent 50%),
    linear-gradient(180deg, #141416, #1c1c1e 40%, #161618);
  background-attachment: fixed;
}

/* Solid cream page surface — no comic collage */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 1.75rem auto 2.5rem;
  padding: 2.25rem 1.35rem 2.75rem;
  background: var(--cream);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 48px rgba(0, 0, 0, 0.35);
}

a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Masthead — THE / Slim-script / DIGEST */
.site-header {
  text-align: center;
  padding: 0.25rem 0 1.75rem;
  margin-bottom: 0.25rem;
}

.masthead-display {
  position: relative;
  margin: 0;
  line-height: 1;
  user-select: none;
}

.masthead-display .eyebrow,
.masthead-display .word {
  display: block;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
}

.masthead-display .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  margin-bottom: 0.15rem;
}

.masthead-display .word {
  font-size: clamp(1.85rem, 7.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-top: 0.1rem;
}

.masthead-display .script {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.55rem, 6.5vw, 2.35rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ink);
  transform: rotate(-4deg);
  margin: 0.05rem 0 0.1rem;
  line-height: 1.1;
}

.site-header .schedule-title {
  margin: 1.35rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.15;
}

.site-header .subtitle {
  margin: 0.55rem auto 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Controls — quiet strip, no heavy borders */
.controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 2rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--hairline);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
}

.chip {
  appearance: none;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.chip.active {
  color: var(--badge-fg);
  background: var(--badge-bg);
  border-color: var(--badge-bg);
}

.search-wrap {
  position: relative;
  max-width: 22rem;
  margin: 0 auto;
  width: 100%;
}

.search-wrap input {
  width: 100%;
  appearance: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.5rem 0.55rem 1.85rem;
  border-radius: 0;
  outline: none;
  caret-color: var(--ink);
  transition: border-color 0.15s var(--ease);
}

.search-wrap input::placeholder {
  color: #8a8478;
}

.search-wrap input:focus {
  border-bottom-color: var(--ink);
}

.search-wrap .search-icon {
  position: absolute;
  left: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-wrap .search-icon::after {
  content: "";
  position: absolute;
  right: -0.26rem;
  bottom: -0.16rem;
  width: 0.38rem;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
}

/* Digest list — schedule rhythm */
.digest-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.digest-card {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  padding: 1.65rem 0 1.85rem;
  border-bottom: 1px solid var(--hairline);
  box-shadow: none;
}

.digest-card:last-child {
  border-bottom: none;
}

.digest-card-header {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.digest-card-header:hover .digest-title {
  opacity: 0.72;
}

/* Date left + rule + black time badge right */
.schedule-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.schedule-date {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 8vw, 2.85rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 2.2ch;
}

.schedule-rule {
  height: 1px;
  background: var(--ink);
  width: 100%;
  min-width: 2rem;
}

.schedule-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  border: none;
  border-radius: 0;
}

.digest-title {
  margin: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--ink);
  transition: opacity 0.15s var(--ease);
}

.digest-title .count-pill {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  vertical-align: middle;
}

.digest-when {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.digest-card-header .toggle {
  float: right;
  margin: 0.15rem 0 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  flex-shrink: 0;
}

.digest-meta {
  padding: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  clear: both;
}

.digest-body {
  padding: 0.85rem 0 0;
  clear: both;
}

.digest-body.collapsed {
  display: none;
}

/* Items */
.item {
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--hairline);
}

.item:last-of-type {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.4rem;
}

.badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 0;
  color: var(--badge-fg);
  background: var(--badge-bg);
  border: none;
}

.badge.official,
.badge.rumor,
.badge.trivia,
.badge.interview,
.badge.industry {
  background: var(--badge-bg);
  color: var(--badge-fg);
}

.media-note {
  font-size: 0.62rem;
  color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 0.12rem 0.35rem;
  border-radius: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
}

.item-title {
  margin: 0;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.35;
}

.item-summary {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.55rem;
  list-style: none;
  padding: 0;
}

.item-links a {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--hairline);
}

.item-links a:hover {
  border-bottom-color: var(--ink);
  text-decoration: none;
}

/* Official X embeds — light theme on cream */
.item-embeds {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 550px;
}

.x-embed {
  margin: 0;
  min-width: 0;
}

.x-embed .twitter-tweet {
  margin: 0 !important;
}

.x-embed iframe {
  max-width: 100% !important;
}

.x-embed-fallback {
  display: none;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.x-embed-fallback a {
  font-family: var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}

.x-embed-fallback a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
}

html.no-twitter-widgets .x-embed-fallback {
  display: block;
}

html.no-twitter-widgets .x-embed > .twitter-tweet:not(.twitter-tweet-rendered) {
  display: none;
}

.digest-notes {
  margin: 0.95rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.empty,
.status {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.empty-inline {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.footer {
  position: relative;
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--ink);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  box-shadow: none;
}

.footer .cta {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.footer .url {
  display: block;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer .fine {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* Tiny brick accent — only on active filter hover edge case / selection already ink */
.accent-dot {
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--brick);
  border-radius: 50%;
  margin: 0 0.35rem;
  vertical-align: middle;
}

@media (min-width: 560px) {
  .wrap {
    margin: 2.5rem auto 3rem;
    padding: 2.75rem 2.25rem 3.25rem;
  }

  .controls {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
  }

  .chips {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }

  .search-wrap {
    flex: 0 0 13.5rem;
    margin: 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
