:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --paper: #15181d;
  --panel: #20242b;
  --panel-2: #292e36;
  --line: #38404a;
  --text: #f6f3ec;
  --muted: #b5b0a5;
  --soft: #827d72;
  --green: #23c989;
  --green-2: #7ef0bc;
  --teal: #23b8c7;
  --amber: #f2b35c;
  --rose: #e26d7d;
  --ink: #101216;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.newsletter-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.page-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: #14171b;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 28px;
  align-items: center;
  min-height: 520px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  align-content: center;
  min-width: 0;
}

.eyebrow,
.category {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 1.03;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-media {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 24px;
}

.brief-item,
.story-card,
.market-note,
.event-note,
.local-note,
.restaurant-note,
.closing-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
}

.brief-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 170px;
  padding: 20px;
}

.brief-item span {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
}

.brief-item strong {
  font-size: 1.25rem;
}

.brief-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-list {
  display: grid;
  gap: 18px;
}

.local-note {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 26px;
}

.event-note {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 26px;
}

.market-note {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 26px;
}

.restaurant-note {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 26px;
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.local-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.local-card,
.event-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #101318;
}

.local-card span,
.event-card span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.local-card h3,
.event-card h3 {
  margin-bottom: 0;
  font-size: 1.22rem;
  line-height: 1.35;
}

.local-card p,
.event-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.local-card strong,
.event-card strong {
  display: block;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(35, 201, 137, 0.08);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.local-card a {
  width: fit-content;
  border: 1px solid rgba(35, 201, 137, 0.72);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(35, 201, 137, 0.12);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.local-card a::after {
  content: " >";
  color: var(--green);
}

.event-card a {
  width: fit-content;
  border: 1px solid rgba(35, 201, 137, 0.72);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(35, 201, 137, 0.12);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.event-card a::after {
  content: " >";
  color: var(--green);
}

.market-overview,
.watchlist-grid {
  display: grid;
  gap: 12px;
}

.market-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.watchlist-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-overview article,
.watchlist-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #101318;
}

.market-overview span,
.watchlist-grid span {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
}

.market-overview strong,
.watchlist-grid strong {
  font-size: 1.35rem;
  line-height: 1.2;
}

.market-overview small,
.watchlist-grid small,
.market-source {
  color: var(--muted);
  line-height: 1.5;
}

.market-change {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 900;
}

.market-change.up {
  background: rgba(35, 201, 137, 0.14);
  color: var(--green-2);
}

.market-change.down {
  background: rgba(226, 109, 125, 0.14);
  color: var(--rose);
}

.upper-limit-box {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(242, 179, 92, 0.34);
  border-radius: 8px;
  padding: 18px;
  background: rgba(242, 179, 92, 0.06);
}

.upper-limit-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upper-limit-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #101318;
}

.upper-limit-list span,
.upper-limit-list strong,
.upper-limit-list em {
  min-width: 0;
}

.upper-limit-list span {
  display: grid;
  gap: 3px;
  color: var(--text);
  font-weight: 900;
}

.upper-limit-list small {
  color: var(--muted);
  font-size: 0.82rem;
}

.upper-limit-list strong {
  white-space: nowrap;
}

.upper-limit-list em {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(226, 109, 125, 0.14);
  color: var(--rose);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 900;
}

.market-source {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.daily-restaurant {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(35, 201, 137, 0.46);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(35, 201, 137, 0.12), rgba(35, 184, 199, 0.05));
}

.restaurant-meta,
.restaurant-list-card span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.daily-restaurant h3 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.daily-restaurant p,
.restaurant-list-card p,
.restaurant-schedule {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.daily-restaurant strong {
  display: block;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(35, 201, 137, 0.1);
  color: var(--text);
  line-height: 1.5;
}

.restaurant-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.restaurant-toolbar h3 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.restaurant-toolbar a,
.map-link,
.source-mini-link {
  width: fit-content;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.restaurant-toolbar a,
.map-link {
  border: 1px solid rgba(35, 201, 137, 0.72);
  background: rgba(35, 201, 137, 0.12);
  color: var(--text);
}

.source-mini-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

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

.restaurant-archive {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.restaurant-list-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #101318;
}

.restaurant-list-card h4 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.story-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  overflow: hidden;
}

.story-index {
  display: grid;
  place-items: start center;
  padding-top: 28px;
  background: var(--panel-2);
  color: var(--soft);
  font-size: 1.32rem;
  font-weight: 900;
}

.story-body {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 28px;
}

.story-body h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.story-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.ai-card .category {
  color: var(--teal);
}

.market-card .category {
  color: var(--green);
}

.life-card .category {
  color: var(--amber);
}

.routine-card .category {
  color: var(--rose);
}

.takeaway {
  border-left: 4px solid var(--green);
  padding: 2px 0 2px 16px;
}

.ai-card .takeaway {
  border-color: var(--teal);
}

.life-card .takeaway {
  border-color: var(--amber);
}

.routine-card .takeaway {
  border-color: var(--rose);
}

.takeaway h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.source-link {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #111418;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #101318;
}

.market-strip span {
  display: block;
  min-height: 12px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green), var(--teal));
}

.market-strip span:nth-child(5),
.market-strip span:nth-child(6) {
  background: linear-gradient(180deg, var(--rose), var(--amber));
}

.budget-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.budget-table div {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  background: #101318;
}

.budget-table div + div {
  border-top: 1px solid var(--line);
}

.budget-table span {
  color: var(--muted);
  font-weight: 800;
}

.budget-table strong {
  color: var(--text);
}

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

.topic-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #101318;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

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

.prompt-chips span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.closing-note {
  margin-top: 24px;
  padding: 26px;
}

.closing-note h2 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.closing-note p {
  color: var(--muted);
  line-height: 1.75;
}

.closing-note small {
  display: block;
  color: var(--soft);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .newsletter-shell {
    width: calc(100% - 24px);
    max-width: 366px;
    margin: 0 12px;
    overflow-x: hidden;
    padding-top: 16px;
  }

  .page-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .page-nav a {
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    max-width: 100%;
    font-size: 2.25rem;
    line-height: 1.18;
    word-break: break-all;
  }

  h2,
  .brief-item strong,
  .brief-item p,
  .story-body p {
    word-break: break-all;
  }

  .hero-media {
    order: -1;
  }

  .brief-grid {
    grid-template-columns: 1fr;
  }

  .market-note,
  .event-note,
  .restaurant-note,
  .local-note {
    padding: 22px;
  }

  .market-overview,
  .watchlist-grid,
  .event-grid,
  .local-grid,
  .restaurant-archive {
    grid-template-columns: 1fr;
  }

  .upper-limit-list li {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .restaurant-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brief-item {
    min-height: auto;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-index {
    display: block;
    padding: 16px 22px 0;
    background: transparent;
  }

  .story-body {
    padding: 18px 22px 24px;
  }

  .budget-table div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .newsletter-shell {
    width: calc(100% - 24px);
  }

  h1 {
    font-size: 2rem;
  }

  .lead,
  .story-body p,
  .brief-item p {
    font-size: 0.98rem;
  }
}
