/* illbebackend.dev. Colors and type from the I'll Be Backend design system; dark only, like the reels. */
:root {
  --ink: #0d1316; --panel: #121a1e; --raised: #172227; --rule: #23323a; --rule-2: #2e414b;
  --fg: #d5dde1; --fg-2: #a9b6bc; --muted: #80939c; --accent: #f2a24a; --warn: #ef7462; --ok: #74cf9b;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --code: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--fg); font: 16px/1.5 var(--body); }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
kbd { font: 12px var(--code); padding: 1px 6px; border: 1px solid var(--rule-2); border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 9; padding: 8px 12px; background: var(--accent); color: var(--ink); border-radius: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.eyebrow { font: 500 12px var(--code); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); font-size: 15px; }
.accent { color: var(--accent); font-size: 14px; }
.warn { color: var(--warn); } .ok { color: var(--ok); }
.lede { max-width: 36em; font-size: 18px; line-height: 1.6; color: var(--fg-2); }
.h-sec { font: 700 40px/1.1 var(--display); letter-spacing: -.01em; }
.h-2 { font: 700 28px var(--display); }
.h-3 { font: 700 24px var(--display); }
.plain { padding-left: 20px; }

/* header and footer */
.top { border-bottom: 1px solid var(--rule); }
.top .bar { padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 44px; height: 22px; color: var(--fg); flex-shrink: 0; }
.mark .eye { fill: var(--accent); }
.word { font: 700 20px var(--display); letter-spacing: -.02em; }
.word span { color: var(--accent); }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a + a { color: var(--muted); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.search-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--panel); color: var(--muted); font-size: 15px; }
.handle { font: 13px var(--code); color: var(--muted); }
.foot { border-top: 1px solid var(--rule); margin-top: 40px; }
.foot .bar { justify-content: space-between; padding-top: 36px; padding-bottom: 48px; }
.foot-tag { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.foot-tag .mark { width: 36px; height: 18px; }

/* buttons, chips, segments */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 8px; border: 1px solid var(--rule-2); background: transparent; color: var(--fg); font-size: 16px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 500; }
.btn.primary:hover { color: var(--ink); filter: brightness(1.08); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule-2); background: transparent;
  font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip .n { font: 12px var(--code); opacity: .75; }
.chip.code { font: 13px var(--code); }
.chip[aria-pressed="true"], .seg[aria-pressed="true"], .seg[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--ink); }
.chip:disabled { opacity: .45; cursor: default; }
.tag-chip { min-height: 34px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--rule-2); background: transparent;
  color: var(--fg-2); font: 12px var(--code); cursor: pointer; }
.tag-chip[aria-pressed="true"] { border-color: var(--accent); background: #2a2016; color: var(--accent); }
.seg { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule-2);
  background: transparent; font: 13px var(--code); color: var(--fg); cursor: pointer; }
.seg.off { opacity: .4; cursor: default; }
.seg.sm { min-height: 32px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--fg-2); }
.seg.sm[aria-pressed="true"] { color: var(--ink); }

/* screenshots and the player */
.shot { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule);
  background: var(--panel); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.shot img, .shot iframe { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; display: block; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  background: rgba(13, 19, 22, .78); border: 1.5px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.pill { position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(13, 19, 22, .85);
  border: 1px solid var(--rule); font: 12px var(--code); color: var(--fg); }

/* home */
.hero { padding-top: 72px; padding-bottom: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font: 700 64px/1.02 var(--display); letter-spacing: -.02em; }
.ink { position: relative; display: inline-block; color: var(--accent); }
.ink svg { position: absolute; left: -3%; width: 108%; bottom: -10px; height: auto; overflow: visible; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-shot { flex: 1 1 520px; min-width: 0; }
.how { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--panel); }
.how-grid { padding-top: 48px; padding-bottom: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.how-grid > div { display: flex; flex-direction: column; gap: 8px; }
.how .num { font: 13px var(--code); color: var(--accent); }
.how h2 { font: 700 21px var(--display); }
.how p { font-size: 15px; color: var(--fg-2); }
.lessons { padding-top: 72px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; scroll-margin-top: 16px; }
.finder { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 12px; border: 1px solid var(--rule);
  background: var(--panel); scroll-margin-top: 16px; }
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; height: 56px; padding: 0 16px 0 46px; border-radius: 10px; border: 1px solid var(--rule-2);
  background: var(--ink); color: var(--fg); font: 17px var(--body); }
.search input::placeholder { color: #6f8189; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.examples > span:last-child, .chips > span:last-child { display: contents; }
.example { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--rule-2); background: transparent;
  color: var(--fg-2); font-size: 13px; cursor: pointer; }
.filters { display: flex; flex-wrap: wrap; gap: 20px 40px; padding-top: 14px; border-top: 1px solid var(--rule); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips.full { flex-basis: 100%; }
.chips .eyebrow { font-size: 11px; margin-right: 4px; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
#result { font-size: 15px; color: var(--fg-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 24px; }
.lcard { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--panel); }
.lcard .thumb { position: relative; display: block; border-bottom: 1px solid var(--rule); }
.lcard .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.start { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--ink);
  font: 11px var(--code); letter-spacing: .08em; text-transform: uppercase; }
.lcard .in { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.lcard .eyebrow { font-size: 11px; }
.lcard h3 { font: 700 24px var(--display); letter-spacing: -.01em; }
.lcard p { font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.lcard .why { font-size: 13px; color: var(--accent); }
.lcard .tags { display: flex; flex-wrap: wrap; gap: 6px; flex-grow: 1; align-content: flex-start; }
.lcard .tags .tag-chip { min-height: 30px; padding: 0 9px; }
.lcard .foot-row { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); }
.lcard .counts { display: flex; justify-content: space-between; font: 12px var(--code); color: var(--muted); }
.lcard .vers { display: flex; flex-wrap: wrap; gap: 6px; }
.soon { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 340px; padding: 22px;
  border-radius: 12px; border: 1px dashed var(--rule-2); }
.soon h3 { font: 700 24px var(--display); }
.soon p { color: var(--fg-2); font-size: 15px; }
.empty { padding: 40px; border-radius: 12px; border: 1px dashed var(--rule-2); display: flex; flex-direction: column; gap: 8px; }
.empty h3 { font: 700 22px var(--display); }
.empty p { color: var(--fg-2); font-size: 15px; }

/* lesson */
.lesson { padding-top: 28px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--fg); }
.lesson-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lesson-title { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lesson-title h1 { font: 700 52px/1.04 var(--display); letter-spacing: -.02em; }
.lesson-title .lede { font-size: 19px; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 13px var(--code); color: var(--muted); }
.langs { display: flex; flex-direction: column; gap: 8px; }
.langs .eyebrow { font-size: 11px; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; max-width: 520px; }
.player { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.player figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.player .cap { flex: 1 1 320px; }
.player .btn { min-height: 44px; padding: 0 16px; font-size: 15px; background: var(--panel); }
.lesson-body { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.steps { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.chapter { display: flex; flex-direction: column; gap: 4px; }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.ch-head h3 { font: 500 12px var(--code); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ch-head h3.warn { color: var(--warn); } .ch-head h3.ok { color: var(--ok); }
.ch-head span { font: 12px var(--code); color: var(--muted); }
.step { display: flex; align-items: baseline; gap: 16px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; cursor: pointer; }
.step:hover { background: var(--raised); }
.step[aria-current="step"] { background: var(--raised); }
.step .no { width: 24px; font: 12px var(--code); color: var(--muted); }
.step[aria-current="step"] .no { color: var(--accent); }
.step .st { flex: 1; font-size: 15px; }
.step .tag { font: 11px var(--code); color: var(--muted); text-align: right; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.problem { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); }
.problem p { line-height: 1.6; }
.problem .btn { align-self: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); }
.card .eyebrow { font-size: 11px; }
.card p { font-size: 15px; }
.snippet { display: block; margin-top: 2px; padding: 10px 12px; border-radius: 6px; background: var(--ink); border: 1px solid var(--rule);
  font: 12.5px var(--code); color: #c6cfd4; overflow-x: auto; white-space: pre; }
.more { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); }
.more img { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.more > span { display: flex; flex-direction: column; gap: 2px; }
.more .eyebrow { font-size: 11px; }
.more strong { font: 700 17px var(--display); color: var(--fg); }

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top .bar { padding-top: 14px; padding-bottom: 14px; }
  .nav, .handle, .search-link kbd, .step .tag { display: none; }
  .search-link { font-size: 0; gap: 0; width: 44px; justify-content: center; padding: 0; }
  .search-link svg { width: 17px; height: 17px; }
  .mark { width: 36px; height: 18px; }
  .word { font-size: 17px; }
  .hero { padding-top: 40px; gap: 32px; }
  .hero h1 { font-size: 42px; }
  .h-sec { font-size: 32px; }
  .finder { padding: 16px; }
  .lesson-title h1 { font-size: 34px; }
  .lesson-title .lede { font-size: 16px; }
  .player { margin: 0 -16px; }
  .player .shot { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .player figcaption { padding: 0 16px; }
  .player .cap { display: none; }
  .player .btn { flex: 1 1 100%; min-height: 48px; }
  /* the reel stacks code over caption on a phone, so it needs a tall frame instead of 16:9 */
  .player iframe { aspect-ratio: auto; height: min(860px, calc(100svh - 24px)); }
  .foot .handle { display: inline; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* privacy, terms */
.legal { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 14px; }
.legal a { color: var(--muted); }
.legal .handle { display: inline; }
.prose { max-width: 760px; padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 14px; line-height: 1.65; }
.prose h1 { font: 700 44px/1.1 var(--display); letter-spacing: -.02em; }
.prose h2 { font: 700 22px var(--display); margin-top: 18px; }
.prose p, .prose li { color: var(--fg-2); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--fg); font-weight: 500; }
.prose .updated { font: 13px var(--code); color: var(--muted); }
