/* === DOSE. THEME === */

:root {
  --bg: #0e0d0b;
  --bg-2: #15130f;
  --ink: #f3ece0;
  --ink-2: #b8ad99;
  --ink-3: #7a715f;
  --rule: #2a2620;
  --amber: #f5a623;
  --amber-soft: #e89c1c;
  --green: #6bd47a;
  --red: #e85d6f;
  --paper: #1a1813;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at top left, rgba(245, 166, 35, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(245, 166, 35, 0.03) 0%, transparent 50%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

/* === TOP BAR === */
.topbar {
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.topbar-right { display: flex; gap: 24px; }
.topbar-right span { color: var(--ink-2); }

/* === MASTHEAD === */
.masthead {
  padding: 28px 0 20px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.masthead .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-left, .nav-right { display: flex; gap: 28px; align-items: center; }
.nav-right { justify-content: flex-end; }
.nav-link {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--amber); }
.nav-link.active { color: var(--ink); }

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--ink);
  text-align: center;
}
.logo .dot { color: var(--amber); }

.subscribe-btn {
  background: var(--amber);
  color: var(--bg);
  border: none;
  padding: 9px 18px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}
.subscribe-btn:hover { background: var(--ink); }

/* === TICKER === */
.ticker {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
  padding: 14px 0;
  position: relative;
}
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.ticker-item { display: flex; gap: 10px; align-items: center; }
.ticker-sym { color: var(--ink); font-weight: 700; }
.ticker-px { color: var(--ink-2); }
.ticker-chg.up { color: var(--green); }
.ticker-chg.dn { color: var(--red); }
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === ISSUE BAR === */
.issue-bar {
  padding: 32px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.issue-bar .num { color: var(--amber); }

/* === HERO === */
.hero {
  padding: 8px 0 80px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
  border-left: 2px solid var(--amber);
  padding-left: 10px;
}
.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  margin-bottom: 24px;
}
.hero-title a:hover { color: var(--amber); }
.hero-deck {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 580px;
  margin-bottom: 28px;
}
.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  gap: 16px;
  align-items: center;
}
.hero-meta .sep { color: var(--rule); }

.hero-side {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
}
.hero-side-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.side-item {
  padding: 16px 0;
  border-bottom: 1px dashed var(--rule);
  transition: padding 0.2s;
}
.side-item:hover { padding-left: 8px; }
.side-item:last-child { border-bottom: none; }
.side-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--amber);
  margin-right: 8px;
}
.side-headline {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.side-headline a:hover { color: var(--amber); }
.side-tldr {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
}

/* === SECTION HEADERS === */
.section-head {
  padding: 56px 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 60;
}
.section-head .bar { flex: 1; height: 1px; background: var(--rule); }
.section-head .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--amber);
  padding: 4px 8px;
}

/* === TLDR GRID === */
.tldr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  padding-bottom: 40px;
}
.tldr-card {
  padding: 28px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s;
  position: relative;
}
.tldr-card:hover { background: var(--bg-2); }
.tldr-card:nth-child(3n) { border-right: none; }

.tldr-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}
.tldr-cat .time { color: var(--ink-3); }
.tldr-head {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 12px;
}
.tldr-head a:hover { color: var(--amber); }
.tldr-text {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.tldr-text strong { color: var(--ink); font-weight: 600; }

.read-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.read-time::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
}

/* === EMPTY STATE === */
.empty-state {
  padding: 80px 32px;
  text-align: center;
  color: var(--ink-2);
  border: 1px dashed var(--rule);
  margin-bottom: 60px;
}
.empty-state h3 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--ink);
}

/* === POST PAGE === */
.post-page {
  padding: 60px 0 80px;
  max-width: 760px;
  margin: 0 auto;
}
.post-page .wrap { padding: 0 32px; }
.post-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-block;
  border-left: 2px solid var(--amber);
  padding-left: 10px;
}
.post-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.post-excerpt {
  font-size: 20px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 32px;
}
.post-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.post-meta .sep { color: var(--rule); }
.post-feature {
  margin: 0 -32px 48px;
}
.post-feature img { width: 100%; }
.post-content {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.post-content p { margin-bottom: 24px; }
.post-content h2, .post-content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  color: var(--ink);
}
.post-content h2 { font-size: 32px; }
.post-content h3 { font-size: 24px; }
.post-content a { color: var(--amber); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content blockquote {
  border-left: 2px solid var(--amber);
  padding-left: 24px;
  margin: 32px 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-2);
}
.post-content code {
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: var(--amber);
}
.post-content pre {
  background: var(--bg-2);
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--rule);
}
.post-content pre code { background: none; padding: 0; color: var(--ink); }
.post-content ul, .post-content ol { margin: 0 0 24px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content img { margin: 32px auto; border-radius: 4px; }

/* === KOENIG EDITOR CARDS (Ghost-required) === */
.kg-width-wide {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
}
.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
}
.kg-width-wide img, .kg-width-full img { width: 100%; }
.kg-image { max-width: 100%; }
.kg-image-card { margin: 32px 0; }
.kg-image-card figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 12px;
  font-family: 'Manrope', sans-serif;
}
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  margin: 32px 0;
}
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; }
.kg-gallery-row:not(:first-of-type) { margin-top: 8px; }
.kg-gallery-image:not(:first-of-type) { margin-left: 8px; }
.kg-bookmark-card,
.kg-bookmark-publisher {
  position: relative;
  width: 100%;
}
.kg-bookmark-container {
  display: flex;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  text-decoration: none;
  min-height: 148px;
  border-radius: 4px;
  overflow: hidden;
}
.kg-bookmark-container:hover { border-color: var(--amber); }
.kg-bookmark-content { padding: 20px; flex: 2 1 240px; display: flex; flex-direction: column; }
.kg-bookmark-title { font-weight: 600; }
.kg-bookmark-description { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.kg-bookmark-metadata { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--ink-3); }
.kg-bookmark-thumbnail { flex: 1 1 180px; min-height: 100%; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-embed-card, .kg-video-card, .kg-audio-card { margin: 32px 0; }
.kg-callout-card {
  padding: 20px 24px;
  background: var(--bg-2);
  border-left: 3px solid var(--amber);
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
}
.kg-toggle-card {
  border: 1px solid var(--rule);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 4px;
}
.kg-button-card { text-align: center; margin: 32px 0; }
.kg-button-card a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--amber);
  color: var(--bg) !important;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 4px;
}

/* === NEWSLETTER === */
.newsletter {
  padding: 100px 0;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.newsletter h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 auto 20px;
  font-weight: 400;
}
.newsletter h2 em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.newsletter p {
  color: var(--ink-2);
  font-size: 17px;
  margin-bottom: 36px;
}
.news-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.news-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 18px 20px;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  outline: none;
}
.news-form input::placeholder { color: var(--ink-3); }
.news-form button {
  background: var(--amber);
  color: var(--bg);
  border: none;
  padding: 0 28px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.news-form button:hover { background: var(--ink); }

/* === FOOTER === */
footer {
  padding: 60px 0 32px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.foot-logo {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  font-weight: 600;
}
.foot-logo .dot { color: var(--amber); }
.foot-tag {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}
.foot-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.foot-col a {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--amber); }
.foot-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === FADE IN ANIM === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-tag { animation: fadeUp 0.7s ease-out 0.1s both; }
.hero-title { animation: fadeUp 0.8s ease-out 0.2s both; }
.hero-deck { animation: fadeUp 0.8s ease-out 0.35s both; }
.hero-meta { animation: fadeUp 0.8s ease-out 0.45s both; }
.hero-side { animation: fadeUp 0.9s ease-out 0.55s both; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-grid, .tldr-grid, .foot-grid { grid-template-columns: 1fr; }
  .hero-side { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 32px; margin-top: 16px; }
  .tldr-card { border-right: none; }
  .masthead .wrap { grid-template-columns: 1fr; text-align: center; gap: 16px; }
  .nav-left, .nav-right { justify-content: center; flex-wrap: wrap; gap: 16px; }
  .logo { font-size: 44px; }
  .topbar .wrap { flex-direction: column; gap: 6px; }
  .topbar-right { gap: 12px; }
  .post-feature { margin: 0 0 32px; }
}
