/* Explo blog. Cream page, navy ink, Satoshi (max Medium 500). No pure white anywhere. */
@font-face { font-family: "Satoshi"; src: url("/fonts/Satoshi-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/Satoshi-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #f7f7f2;
  --fg: #041122;
  --muted: #465260;
  --line: rgba(2, 13, 27, 0.16);
  --soft: rgba(2, 13, 27, 0.06);
  --soft-2: rgba(2, 13, 27, 0.035);
  --link: #4a6400;
  --link-hover: #364a00;
  --night: #041122;
  --cream: #d8d8cb;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

/* ---- top bar ---- */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(238, 238, 229, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1080px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 500; font-size: 22px; line-height: 1; }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.bar nav { display: flex; align-items: center; gap: 22px; }
.bar nav a:not(.btn) { color: var(--fg); text-decoration: none; font-size: 17px; }
.bar nav a:not(.btn):hover, .bar nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; background: #c6f24e; color: var(--night); text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1; padding: 12px 20px; border-radius: 999px; transition: background .2s ease; }
.btn:hover { background: #d4f76e; color: var(--night); }

main { display: block; }
.nb { white-space: nowrap; }

/* ---- shared bits ---- */
.tag { margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meta { color: var(--muted); font-size: 15px; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.dek { font-size: 22px; line-height: 1.5; color: var(--muted); margin: 0 0 18px; text-wrap: pretty; }

/* ---- blog index ---- */
.hero { max-width: 1080px; margin: 0 auto; padding: 88px var(--gutter) 36px; }
.hero h1 { font-weight: 500; font-size: clamp(42px, 7.4vw, 88px); line-height: 1; margin: 0 0 22px; text-wrap: balance; letter-spacing: -0.02em; }
.hero .dek { max-width: 620px; font-size: 23px; }
.list { max-width: 1080px; margin: 0 auto; padding: 8px var(--gutter) 96px; }
.list [hidden] { display: none !important; }

/* topic filter */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chip { font: 500 15px/1 var(--font); color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.chip span { font-size: 13px; color: var(--muted); }
.chip:hover { background: var(--soft); border-color: rgba(2, 13, 27, 0.3); }
.chip[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--cream); }
.chip[aria-pressed="true"] span { color: rgba(216, 216, 203, 0.65); }
.chip:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* featured post */
.feature { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 460px; margin: 0 0 20px; border-radius: 32px; overflow: hidden; color: var(--cream); text-decoration: none; background: var(--night) var(--art) center / cover no-repeat; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 17, 34, 0.94) 0%, rgba(4, 17, 34, 0.74) 38%, rgba(4, 17, 34, 0) 74%); }
.feature:hover { color: var(--cream); }
.feature-body { padding: 52px; max-width: 600px; }
.feature .tag { color: rgba(216, 216, 203, 0.7); }
.feature h2 { margin: 0 0 16px; font-weight: 500; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.feature p { margin: 0 0 28px; max-width: 480px; font-size: 19px; line-height: 1.55; color: rgba(216, 216, 203, 0.82); }
.feature .go { display: inline-flex; align-items: center; gap: 12px; background: var(--cream); color: var(--night); font-weight: 500; font-size: 16px; line-height: 1; padding: 14px 20px; border-radius: 999px; transition: gap .2s ease, background .2s ease; }
.feature:hover .go { gap: 16px; background: #c9c9bb; }
.feature .go-meta { color: #4d5967; font-size: 14px; font-weight: 400; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 26px; background: var(--soft-2); color: var(--fg); text-decoration: none; overflow: hidden; transition: background .2s ease, border-color .2s ease, transform .25s ease; }
.card:hover { background: var(--soft); border-color: rgba(2, 13, 27, 0.3); color: var(--fg); transform: translateY(-3px); }
.card .art { display: block; aspect-ratio: 16 / 9; background: var(--night); overflow: hidden; }
.card .art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .art img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card .tag { margin-bottom: 10px; }
.card h3 { margin: 0 0 10px; font-weight: 500; font-size: 22px; line-height: 1.2; text-wrap: balance; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.55; flex: 1; }

/* app promo tile: fills the last slot of the grid */
.promo { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 28px 26px 26px; border-radius: 26px; background: var(--night) url("/blog/cta.svg") 70% center / cover no-repeat; color: var(--cream); }
.promo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 17, 34, 0.96) 0%, rgba(4, 17, 34, 0.8) 55%, rgba(4, 17, 34, 0.2) 100%); }
.promo .tag { color: rgba(216, 216, 203, 0.7); }
.promo h3 { margin: 0 0 10px; font-weight: 500; font-size: 28px; line-height: 1.1; text-wrap: balance; }
.promo p:not(.tag) { margin: 0 0 22px; max-width: 320px; font-size: 16px; line-height: 1.55; color: rgba(216, 216, 203, 0.8); }
.promo .btn { background: var(--cream); color: var(--night); }
.promo .btn:hover { background: #c9c9bb; color: var(--night); }

/* ---- article ---- */
.post { max-width: 720px; margin: 0 auto; padding: 36px var(--gutter) 24px; }
.crumbs { margin: 0 0 36px; font-size: 15px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.post-head h1 { font-weight: 500; font-size: clamp(34px, 5.6vw, 56px); line-height: 1.07; margin: 0 0 20px; text-wrap: balance; letter-spacing: -0.01em; }
.post-head { margin-bottom: 28px; }

/* reading progress */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--link); transform: scaleX(0); transform-origin: 0 50%; }

/* article cover: breaks out of the 720px column */
.cover { margin: 0 0 40px; width: min(960px, calc(100vw - 2 * var(--gutter))); position: relative; left: 50%; transform: translateX(-50%); border-radius: 28px; overflow: hidden; background: var(--night); }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 2.3 / 1; object-fit: cover; }

.toc { border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; margin: 0 0 36px; background: var(--soft-2); }
.toc p { margin: 0 0 8px; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 4px 0; font-size: 17px; line-height: 1.45; }

.prose { counter-reset: sec; }
.prose > p:first-child { font-size: 21px; line-height: 1.6; }
.prose h2 { font-weight: 500; font-size: clamp(26px, 3.6vw, 32px); line-height: 1.2; margin: 56px 0 14px; text-wrap: balance; counter-increment: sec; }
.prose h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; letter-spacing: .12em; color: var(--link); }
.prose h3 { font-weight: 500; font-size: 22px; line-height: 1.3; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0 0 8px; }
.prose strong { font-weight: 500; }
.prose p.note { border-left: 3px solid var(--link); background: var(--soft-2); padding: 14px 18px; border-radius: 0 14px 14px 0; font-size: 17px; line-height: 1.6; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; background: var(--soft); }
.prose tr:last-child td { border-bottom: 0; }

.cta { position: relative; isolation: isolate; overflow: hidden; margin: 56px 0 8px; padding: 44px 36px; border-radius: 28px; background: var(--night) url("/blog/cta.svg") center / cover no-repeat; color: var(--cream); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 17, 34, 0.92) 0%, rgba(4, 17, 34, 0.7) 55%, rgba(4, 17, 34, 0.1) 100%); }
.cta h2 { margin: 0 0 12px; font-weight: 500; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; text-wrap: balance; }
.cta p { margin: 0 0 22px; color: rgba(216, 216, 203, 0.78); font-size: 17px; line-height: 1.6; max-width: 560px; }
.cta .btn { background: var(--cream); color: var(--night); }
.cta .btn:hover { background: #c9c9bb; color: var(--night); }

.more { max-width: 1080px; margin: 0 auto; padding: 40px var(--gutter) 88px; }
.more h2 { font-weight: 500; font-size: 28px; margin: 0 0 18px; }
.more .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more .card-body { padding: 18px 20px 20px; }
.more .card h3 { font-size: 20px; }
.more .card p { font-size: 15.5px; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 32px var(--gutter) 48px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { margin: 0; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; max-width: 360px; }
.foot-brand .brand { font-size: 20px; color: var(--fg); }
.foot-brand .brand img { width: 28px; height: 28px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; align-content: flex-start; font-size: 16px; }
.foot nav a { color: var(--fg); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo { grid-column: 1 / -1; min-height: 260px; }
}
@media (max-width: 860px) {
  .more .grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .prose table { font-size: 15px; }
  .prose th, .prose td { padding: 10px 10px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero .dek { font-size: 20px; }
  .dek { font-size: 20px; }
  .feature { min-height: 520px; border-radius: 26px; background-position: 96% 0; }
  .feature::before { background: linear-gradient(0deg, rgba(4, 17, 34, 0.96) 0%, rgba(4, 17, 34, 0.78) 55%, rgba(4, 17, 34, 0.1) 100%); }
  .feature-body { padding: 28px 24px; }
  .feature p { font-size: 17px; }
  .cover { border-radius: 22px; margin-bottom: 32px; }
  .cover img { aspect-ratio: 16 / 9; }
  .card .art { aspect-ratio: 2 / 1; }
  .promo { min-height: 300px; }
  .prose > p:first-child { font-size: 19px; }
  .cta::before { background: rgba(4, 17, 34, 0.82); }
  .cta { padding: 28px 22px; border-radius: 24px; }
  .bar nav { gap: 14px; }
  .btn { padding: 11px 16px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

::selection { background: #c6f24e; color: #020d1b; }
