/* Upblock News: visual identity mirrored from upblock.co (stone/paper/ink palette, pink accent,
   Inter Tight / Neue Haas Unica, JetBrains Mono, DIN-style logo, framed ruled column). */
:root {
  --stone: #d7d9d2; --paper: #f4f4ef; --ink: #17191a; --ink-2: #3d403f; --muted: #6f736a;
  --rule: #b9bcb2; --chip: #c3c6bc; --accent: #ff99c2; --accent-2: #ff7fb2; --live: #e5484d;
  --logo: "DIN Alternate", Bahnschrift, "Roboto Condensed", system-ui, sans-serif;
  --sans: "Neue Haas Unica", "Neue Haas Unica Pro", "NeueHaasUnica", "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--stone); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; }
.frame { max-width: 1240px; margin: 0 auto; border-inline: 1px solid var(--rule); min-height: 100vh; }
.pad { padding-inline: clamp(20px, 3vw, 40px); }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(215,217,210,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--logo); font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.brand-tag { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); padding: 3px 7px; }
.links { display: flex; gap: 6px; font-size: 15px; }
.links a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--chip); transition: background .2s; white-space: nowrap; }
.links a:hover { background: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 16px; border: 1px solid var(--accent); white-space: nowrap; transition: background .2s, border-color .2s; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: var(--ink); }
.btn.ghost:hover { background: var(--accent); border-color: var(--accent); }

/* headings */
section.s { padding-block: 48px 64px; border-top: 1px solid var(--rule); }
section.s.head { border-top: 0; }
.title { font-style: italic; font-weight: 300; font-size: clamp(56px, 9vw, 120px); line-height: 1; margin: 12px 0 0; letter-spacing: -.02em; }
.title.small { font-size: clamp(40px, 6vw, 72px); margin: 0; }
.lead { font-style: italic; font-size: clamp(16px, 1.6vw, 20px); margin: 14px 0 0; max-width: 58ch; color: var(--ink-2); }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.tabs a { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); font-size: 15px; transition: background .2s, border-color .2s; }
.tabs a:hover { background: var(--accent); border-color: var(--accent); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* cards */
.grid-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 28px; }
.grid-news.three { margin-top: 32px; }
.cell { background: var(--stone); min-width: 0; }
.card { display: flex; flex-direction: column; transition: background .2s; }
.card:hover { background: #dcded7; }
.card.big { grid-column: 1 / -1; background: var(--ink); color: var(--paper); }
.card.big:hover { background: #1e2122; }
.card .cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card.big .card-body { padding: clamp(28px, 4vw, 48px); gap: 14px; }
.meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; background: var(--accent); color: var(--ink); }
.card h3 { margin: 6px 0 0; font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.card.big h3 { font-size: clamp(30px, 4vw, 52px); font-weight: 500; line-height: 1.05; max-width: 22ch; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card p { margin: 0; color: var(--ink-2); }
.card.big p { color: var(--rule); font-size: 18px; max-width: 60ch; }
.card.big .mono { color: #8b8f86; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; }
.empty { border: 1px solid var(--rule); padding: 40px 24px; margin-top: 28px; }

/* article */
.post-head { padding-block: 40px 36px; border-bottom: 1px solid var(--rule); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.post-head h1 { font-weight: 700; font-size: clamp(34px, 5vw, 60px); line-height: 1.05; letter-spacing: -.015em; margin: 18px 0 0; max-width: 22ch; }
.dek { font-style: italic; font-weight: 300; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; color: var(--ink-2); margin: 18px 0 0; max-width: 46ch; }
.byline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.who { display: flex; align-items: center; gap: 12px; }
.who img, .avatar-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent); }
.avatar-logo svg { width: 20px; height: 20px; color: var(--ink); }
.who > span { display: flex; flex-direction: column; line-height: 1.25; }
.who b { font-weight: 500; }
.when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-cover { margin: 0; border-bottom: 1px solid var(--rule); }
.post-cover img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); padding-block: 40px 56px; }
.prose { font-size: 19px; line-height: 1.65; max-width: 68ch; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-style: italic; font-weight: 300; font-size: 34px; line-height: 1.1; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
.prose h3 { font-weight: 500; font-size: 22px; margin: 1.4em 0 .4em; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent-2); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--accent); }
.prose strong { font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--paper); padding: 2px 5px; }
.prose img { display: block; margin: 1.4em 0; border: 1px solid var(--rule); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.side { display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 88px; }
.box { border: 1px solid var(--rule); background: var(--stone); padding: 18px; }
.box h4 { margin: 0 0 12px; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sources { margin: 0; padding-left: 1.2em; font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; gap: 10px; }
.sources li::marker { font-family: var(--mono); color: var(--muted); }
.sources a:hover { text-decoration: underline; }
.cta { padding-bottom: 56px; }
.cta-in { background: var(--accent); padding: clamp(24px, 4vw, 40px); display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.cta-in h3 { margin: 10px 0 0; font-weight: 500; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; max-width: 24ch; }
.cta-in p { margin: 8px 0 0; color: var(--ink-2); }
.cta-in .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-in .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cta-in .btn:hover { background: #2c2f30; }
.cta-in .btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.cta-in .btn.ghost:hover { background: rgba(23,25,26,.08); }

/* end */
.jet { background: var(--ink); color: var(--paper); padding: clamp(40px, 6vw, 72px) clamp(20px, 3vw, 40px); }
.jet .title { color: var(--accent); font-size: clamp(44px, 7vw, 96px); margin: 0; }
.jet p { color: var(--rule); max-width: 54ch; font-size: 18px; margin: 0; }
.jet .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding-block: 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); }
.foot a:hover { color: var(--ink); }

/* below 1100px the nav links move to a second, swipeable row instead of disappearing */
@media (max-width: 1100px) {
  .nav { flex-wrap: wrap; height: auto; padding-block: 12px; row-gap: 10px; }
  .links { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .links::-webkit-scrollbar { display: none; }
  .links a { height: 34px; padding: 0 14px; font-size: 14px; flex: none; }
}
@media (max-width: 900px) {
  .filler { display: none; }
  .grid-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .prose { font-size: 18px; }
}
@media (max-width: 600px) { .grid-news { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .nav .btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } }

/* index cards with covers */
.card .cover { aspect-ratio: 1200 / 630; border-bottom: 1px solid var(--rule); }
.card.big.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.card.big.has-cover .cover { order: 2; border-bottom: 0; align-self: center; margin: clamp(20px, 3vw, 40px); margin-left: 0; outline: 1px solid #2f3233; }
.card.big.has-cover h3 { font-size: clamp(28px, 3.2vw, 44px); }
@media (max-width: 900px) { .card.big.has-cover { grid-template-columns: minmax(0, 1fr); } .card.big.has-cover .cover { order: 0; margin: 0; outline: 0; } }

/* ---------- infographics (```stat / bars / donut / flow / timeline / compare) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prose .ig { margin: 2em 0; padding: 0; border: 1px solid var(--rule); background: var(--stone); font-size: 16px; line-height: 1.4; }
.ig-title { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 12px 16px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 8px; }
.ig-title::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.ig-src { margin: 0 !important; padding: 9px 16px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--muted); }
.prose .ig-src a { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; }
.prose .ig-src a:hover { background: none; color: var(--ink); }
.prose .ig strong { font-weight: 600; }

/* stat cards */
.ig-stats { display: grid; gap: 1px; background: var(--rule); }
.ig-stats.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-stats.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ig-stats.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ig-stat { background: var(--stone); padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ig-stat b { font-family: var(--sans); font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.ig-stat span { font-style: italic; color: var(--ink-2); font-size: 15px; }
.ig-stat small { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: auto; padding-top: 6px; }
.ig-stat.accent { background: var(--ink); color: var(--paper); }
.ig-stat.accent b { color: var(--accent); }
.ig-stat.accent span { color: var(--rule); }
.ig-stat.accent small { color: #8b8f86; }

/* bars */
.ig-bars { padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 16px; }
.ig-bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; margin-bottom: 6px; }
.ig-bar-label b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.ig-bar-track { height: 28px; background: var(--paper); border: 1px solid var(--rule); }
.ig-bar-track i { display: block; height: 100%; min-width: 3px; background: var(--ink-2); }
.ig-bar.accent .ig-bar-track i { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-2); }
.ig-bar small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ig-bars:last-child { padding-bottom: 18px; }

/* donut */
.ig-donut-wrap { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 24px; padding: 20px; }
.ig-ring { width: 100%; height: auto; transform: rotate(0deg); }
.ig-ring-num { font-family: var(--sans); font-weight: 700; font-size: 7.4px; letter-spacing: -.3px; fill: var(--ink); }
.ig-donut-legend p { margin: 0 0 10px !important; display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.ig-donut-legend .sw { width: 14px; height: 14px; flex: none; margin-top: 3px; background: var(--rule); }
.ig-donut-legend .sw.accent { background: var(--accent); }
.ig-donut-legend b { font-weight: 700; }
.ig-note { font-family: var(--mono); font-size: 11px !important; color: var(--muted); }

/* flow */
.ig-flow { list-style: none; margin: 0 !important; padding: 18px 16px !important; display: flex; align-items: stretch; gap: 0; }
.ig-flow li { margin: 0 !important; }
.ig-step { flex: 1 1 0; min-width: 0; background: var(--paper); border: 1px solid var(--rule); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ig-step-n { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.ig-step b { font-weight: 500; font-size: 18px; line-height: 1.15; }
.ig-step-t { font-size: 14px; color: var(--ink-2); }
.ig-step.accent { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ig-step.accent .ig-step-n { color: var(--accent); }
.ig-step.accent .ig-step-t { color: var(--rule); }
.ig-arrow { flex: none; width: 34px; display: grid; place-items: center; color: var(--ink); }
.ig-arrow svg, .ig-vs svg { width: 22px; height: 22px; }

/* timeline */
.ig-timeline { list-style: none; margin: 0 !important; padding: 20px 16px 6px 16px !important; position: relative; }
.ig-tl { position: relative; margin: 0 !important; padding: 0 0 18px 30px; display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; }
.ig-tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 1px; background: var(--rule); }
.ig-tl:last-child::before { display: none; }
.ig-tl::after { content: ""; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
.ig-tl.now::after { background: var(--accent); box-shadow: 0 0 0 3px var(--stone), 0 0 0 4px var(--accent-2); }
.ig-tl.next::after { background: var(--stone); border: 1px dashed var(--ink-2); box-sizing: border-box; }
.ig-tl.next { color: var(--ink-2); }
.ig-tl-date { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; grid-row: span 2; }
.ig-tl b { font-weight: 500; font-size: 17px; line-height: 1.25; }
.ig-tl.now b { background: var(--accent); padding: 0 4px; justify-self: start; }
.ig-tl-t { font-size: 14px; color: var(--ink-2); }

/* compare */
.ig-compare { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; padding: 18px 16px; }
.ig-side { border: 1px solid var(--rule); padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.ig-side.after { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ig-side-label { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ig-side.after .ig-side-label { color: var(--accent); }
.ig-side b { font-weight: 700; font-size: clamp(30px, 3.6vw, 42px); line-height: 1; letter-spacing: -.03em; }
.ig-side.before b { color: var(--ink-2); }
.ig-side.after b { color: var(--accent); }
.ig-side-t { font-size: 14px; }
.ig-side ul { margin: 6px 0 0 !important; padding-left: 1.1em !important; font-size: 14px; }
.ig-side li { margin: 4px 0 !important; }
.ig-side.after li::marker { color: var(--accent); }
.ig-vs { display: grid; place-items: center; color: var(--ink); }

@media (max-width: 640px) {
  .ig-stats.n3, .ig-stats.n4 { grid-template-columns: minmax(0, 1fr); }
  .ig-stats.n2 { grid-template-columns: minmax(0, 1fr); }
  .ig-stat { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
  .ig-stat small { flex-basis: 100%; padding-top: 0; }
  .ig-flow { flex-direction: column; }
  .ig-arrow { width: auto; height: 30px; }
  .ig-arrow svg { transform: rotate(90deg); }
  .ig-compare { grid-template-columns: minmax(0, 1fr); }
  .ig-vs { height: 36px; } .ig-vs svg { transform: rotate(90deg); }
  .ig-donut-wrap { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .ig-tl { grid-template-columns: minmax(0, 1fr); }
  .ig-tl-date { grid-row: auto; }
}
@media print { .ig { break-inside: avoid; } }

/* ---------- byline, AI note, author box ---------- */
.who img.avatar, .avatar-logo { width: 44px; height: 44px; border: 1px solid var(--rule); }
.by-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; background: var(--accent); color: var(--ink); line-height: 1.4; }
.post-main { min-width: 0; max-width: 68ch; }
.ai-note { display: flex; gap: 14px; align-items: baseline; margin: 36px 0 0; padding: 14px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: rgba(244,244,239,.55); }
.ai-note p { margin: 0; font-size: 14px; line-height: 1.55; font-style: italic; color: var(--ink-2); }
.ai-note-k { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; flex: none; }
.author-box { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 18px; border: 1px solid var(--rule); }
.author-box img.avatar, .author-box .avatar-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--rule); }
.author-box > div { display: flex; flex-direction: column; line-height: 1.3; gap: 2px; }
.author-box > div > .mono:first-child { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.author-box b { font-weight: 500; font-size: 20px; }
.author-box .ab-role { color: var(--ink-2); font-size: 15px; }
.author-box .ab-x { margin-top: 4px; }
.author-box .ab-x:hover { color: var(--ink); text-decoration: underline; }
.card-by { display: inline-flex; align-items: center; gap: 8px; }
.card-by img.avatar, .card-by .avatar-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.card-by .avatar-logo svg { width: 11px; height: 11px; }
