:root {
  --ink: #12324a;
  --ink-soft: #33546a;
  --mist: #e7eef3;
  --paper: #f9faf8;
  --line: #c7d5de;
  --amber: #ffb547;
  --violet: #835ccd;
  --mint: #58ab98;
  --rose: #d86970;
  --body: "Newsreader", Georgia, serif;
  --display: "Space Grotesk", sans-serif;
  --mono: "DM Mono", monospace;
  --shadow: 0 18px 45px rgba(18, 50, 74, .10);
}

* { box-sizing: border-box; }
html { background: var(--mist); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 87% 8%, rgba(255, 181, 71, .30), transparent 23rem), linear-gradient(145deg, #f8faf9 0%, var(--mist) 100%); font-family: var(--body); font-size: 18px; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.grain { position: fixed; z-index: -1; inset: 0; opacity: .14; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E"); }

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(18, 50, 74, .14); }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 600 22px var(--display); letter-spacing: -.06em; }
.brand-mark { width: 31px; height: 31px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: skewY(-13deg); }
.brand-mark i { display: block; background: var(--ink); }
.brand-mark i:nth-child(2) { background: var(--amber); }
.brand-mark i:nth-child(3) { grid-column: span 2; background: var(--ink); }
.header-status { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }
.header-status span { display: inline-block; width: 7px; height: 7px; background: var(--mint); border-radius: 50%; margin-right: 6px; }
.install-button { border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: transparent; padding: 8px 14px; font: 500 12px var(--display); }
.install-button:hover { background: var(--ink); color: var(--paper); }

.departure { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 7vw, 110px); padding: clamp(64px, 10vw, 140px) 0 56px; align-items: end; }
.eyebrow, .ticket-label, .tag-row > span, .card-topline, .feed-heading p { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.eyebrow { color: var(--ink-soft); margin: 0 0 20px; }
.departure h1 { max-width: 750px; margin: 0; letter-spacing: -.065em; font: 500 clamp(50px, 7vw, 92px)/.91 var(--display); }
.lede { max-width: 650px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(20px, 2.2vw, 27px); line-height: 1.23; }
.queue-summary { margin-top: 28px; display: flex; gap: 9px; flex-wrap: wrap; }
.queue-summary span { padding: 8px 11px; border: 1px solid var(--line); background: rgba(255,255,255,.45); border-radius: 999px; font: 12px var(--mono); }
.now-boarding { background: var(--ink); color: var(--paper); padding: 27px; min-height: 250px; transform: rotate(2.1deg); box-shadow: var(--shadow); }
.ticket-label { margin: 0; color: rgba(255,255,255,.6); }
.ticket-time { margin: 52px 0 0; font: 500 61px/.9 var(--display); letter-spacing: -.08em; color: var(--amber); }
.ticket-route { margin: 7px 0 0; font: 13px var(--mono); color: rgba(255,255,255,.72); }
.route-line { display: flex; align-items: center; margin-top: 39px; }
.route-line::before { content: ""; height: 1px; background: rgba(255,255,255,.35); flex: 1; }
.route-line b { width: 10px; height: 10px; border-radius: 50%; background: var(--paper); margin-left: 9px; }
.route-line b:nth-child(2) { background: var(--amber); }

.controls { display: grid; grid-template-columns: minmax(240px, 1.2fr) 2fr; gap: 24px; align-items: center; padding: 19px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-icon { width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--ink); transform: rotate(45deg); right: -6px; bottom: -3px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font: 500 16px var(--display); }
.search-box input::placeholder { color: #718692; }
kbd { border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; font: 11px var(--mono); color: var(--ink-soft); }
.category-rail, .tag-row > div, .card-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.category-button, .tag-button { background: rgba(255,255,255,.52); border: 1px solid var(--line); color: var(--ink-soft); border-radius: 999px; padding: 7px 10px; font: 500 12px var(--display); transition: .18s ease; }
.category-button:hover, .tag-button:hover, .category-button.active, .tag-button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag-row { display: flex; gap: 16px; padding: 20px 0 0; align-items: start; }
.tag-row > span { min-width: 119px; padding-top: 8px; color: var(--ink-soft); }

.feed { padding: 60px 0 115px; }
.feed-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.feed-heading .eyebrow { color: var(--ink); }
#result-count { margin: 0; color: var(--ink-soft); font: 13px var(--mono); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.idea-card { position: relative; min-height: 320px; padding: 22px; background: rgba(249,250,248,.82); border: 1px solid rgba(18, 50, 74, .15); display: flex; flex-direction: column; box-shadow: 0 3px 0 rgba(18,50,74,.04); transition: transform .25s ease, box-shadow .25s ease; }
.idea-card:nth-child(3n+2) { transform: translateY(24px); }
.idea-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); z-index: 1; }
.idea-card:nth-child(3n+2):hover { transform: translateY(18px); }
.card-topline { display: flex; justify-content: space-between; color: var(--ink-soft); }
.card-category::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--amber); }
.idea-card[data-category="Coding & AI"] .card-category::before { background: var(--violet); }
.idea-card[data-category="Markets & Finance"] .card-category::before { background: var(--mint); }
.idea-card[data-category="Creative AI & Media"] .card-category::before { background: var(--rose); }
.card-link { display: block; margin-top: 29px; }
.card-link h2 { margin: 0; font: 500 30px/1.03 var(--display); letter-spacing: -.055em; }
.card-link:hover h2 { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.card-dek { margin: 15px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.25; }
.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: end; padding-top: 20px; }
.card-tags { max-width: calc(100% - 38px); }
.card-tags button { font: 10px var(--mono); color: var(--ink-soft); padding: 0; background: none; border: 0; }
.card-tags button:hover { color: var(--ink); text-decoration: underline; }
.save-button { width: 29px; height: 29px; border: 1px solid var(--ink); background: transparent; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); position: relative; }
.save-button::after { content: "+"; position: absolute; inset: 3px 0 0 0; transform: rotate(45deg); font: 18px var(--display); }
.save-button.saved { background: var(--amber); }
.empty-state { padding: 75px 0; text-align: center; border: 1px dashed var(--line); }
.empty-state h2 { font: 500 38px var(--display); letter-spacing: -.05em; margin: 0; }
.empty-state p { color: var(--ink-soft); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 36px; border-top: 1px solid var(--line); color: var(--ink-soft); font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 820px) {
  .site-header, main, footer { width: min(100% - 30px, 620px); }
  .header-status { display: none; }
  .departure { grid-template-columns: 1fr; gap: 42px; padding-top: 60px; }
  .now-boarding { width: min(270px, 90%); justify-self: end; }
  .controls { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .idea-card:nth-child(3n+2) { transform: none; }
  .idea-card:nth-child(3n+2):hover { transform: translateY(-5px); }
  .feed { padding-top: 45px; }
}
@media (max-width: 500px) {
  body { font-size: 17px; }
  .departure h1 { font-size: 50px; }
  .lede { font-size: 21px; }
  .tag-row { display: block; }
  .tag-row > span { display: block; margin-bottom: 10px; }
  footer { display: block; line-height: 1.7; }
}
@media (prefers-reduced-motion: no-preference) {
  .departure-copy, .now-boarding, .controls, .feed { animation: arrive .65s both ease-out; }
  .now-boarding { animation-delay: .12s; }
  .controls { animation-delay: .2s; }
  .feed { animation-delay: .3s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
}
