/* Tabby — warm terminal editorial.
   Espresso ground, ginger tabby stripes, cream type; serif display over monospace detail.
   No web-font CDN on purpose: Google Fonts is unreachable from much of the audience. */

:root {
  --ink: #14100c;
  --ink-2: #1c1712;
  --ink-3: #251f18;
  --line: #352c22;
  --cream: #f2e8d5;
  --cream-2: #d9ccb5;
  --muted: #9c8d78;
  --ginger: #e8892c;
  --ginger-2: #f5b660;
  --rust: #b8551c;
  --moss: #9cb87e;
  --code: #0e0b08;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif SC",
           "Source Han Serif SC", "Songti SC", "STSong", serif;
  --text: Charter, "Sitka Text", "Bitstream Charter", Georgia, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Consolas,
          "Noto Sans Mono CJK SC", "Microsoft YaHei", monospace;

  --wrap: 1120px;
  --r: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 17px/1.7 var(--text);
  overflow-x: hidden;
}
/* film grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--ginger-2); text-decoration: none; }
a:hover { color: var(--cream); }
::selection { background: var(--ginger); color: var(--ink); }
code, pre, kbd, .mono { font-family: var(--mono); }
:not(pre) > code { font-size: .86em; background: var(--ink-3); border: 1px solid var(--line); padding: .05em .4em; border-radius: 3px; color: var(--ginger-2); }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 16, 12, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 22px/1 var(--serif); color: var(--cream); letter-spacing: .01em; }
.mark {
  width: 20px; height: 20px; border-radius: 5px; flex: none;
  background: repeating-linear-gradient(118deg, var(--ginger) 0 3px, var(--rust) 3px 5px, var(--ink-3) 5px 8px);
  box-shadow: inset 0 0 0 1px rgba(245,182,96,.35);
}
.brand:hover { color: var(--cream); }
.nav nav { display: flex; gap: 22px; margin-left: auto; font: 14px var(--mono); }
.nav nav a { color: var(--cream-2); padding: 4px 0; border-bottom: 1px solid transparent; }
.nav nav a:hover, .nav nav a.on { color: var(--ginger-2); border-bottom-color: var(--ginger); }
.ver-badge { font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

/* ------------------------------------------------------------- hero */
.hero { position: relative; padding: 108px 0 96px; overflow: hidden; border-bottom: 1px solid var(--line); }
.stripes {
  position: absolute; inset: -40% -10%; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(118deg,
      transparent 0 34px, rgba(232, 137, 44, .10) 34px 52px, transparent 52px 80px,
      rgba(184, 85, 28, .12) 80px 92px, transparent 92px 150px);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 78% 38%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 55% at 78% 38%, #000 0%, transparent 70%);
  animation: drift 38s linear infinite;
}
@keyframes drift { to { transform: translate3d(-150px, 0, 0); } }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.eyebrow { font: 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ginger); margin-bottom: 26px; }
.eyebrow::before { content: "//"; color: var(--muted); margin-right: 10px; letter-spacing: 0; }
h1.title { font: 600 clamp(64px, 10vw, 128px)/.9 var(--serif); margin: 0 0 30px; letter-spacing: -.02em; }
h1.title .stop { color: var(--ginger); }
.lede { font-size: 21px; line-height: 1.6; color: var(--cream-2); max-width: 30em; margin: 0 0 34px; }
.lede em { font-style: normal; color: var(--cream); border-bottom: 1px solid var(--rust); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1 var(--mono);
  padding: 14px 20px; border-radius: var(--r); border: 1px solid var(--line); color: var(--cream);
  background: var(--ink-2); cursor: pointer; transition: transform .15s, border-color .15s, background .15s;
}
.btn:hover { border-color: var(--ginger); color: var(--cream); transform: translateY(-1px); }
.btn.primary { background: var(--ginger); border-color: var(--ginger); color: var(--ink); font-weight: 600; }
.btn.primary:hover { background: var(--ginger-2); color: var(--ink); }

/* ------------------------------------------------------------- terminal / install */
.term { background: var(--code); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(232,137,44,.05); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--line); background: var(--ink-2); padding-right: 8px; }
.term-bar .dots { display: flex; gap: 7px; padding: 0 16px; }
.term-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.tabs { display: flex; flex-wrap: wrap; }
.tabs button {
  font: 13px var(--mono); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 13px 14px 11px; cursor: pointer;
}
.tabs button:hover { color: var(--cream); }
.tabs button.on { color: var(--ginger-2); border-bottom-color: var(--ginger); }
.term-body { position: relative; padding: 22px 22px 20px; font: 14px/1.75 var(--mono); }
.term-body .cmd { white-space: pre-wrap; word-break: break-all; color: var(--cream); padding-right: 64px; }
.term-body .cmd::before { content: attr(data-prompt); color: var(--ginger); margin-right: 10px; }
.term-body .note { color: var(--muted); font-size: 12.5px; margin-top: 14px; line-height: 1.6; }
.term-body .note a { color: var(--cream-2); border-bottom: 1px dotted var(--muted); }
.copy {
  position: absolute; top: 16px; right: 14px; font: 12px var(--mono); color: var(--cream-2);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: 5px 10px; cursor: pointer;
}
.copy:hover { border-color: var(--ginger); color: var(--cream); }
.copy.done { color: var(--moss); border-color: var(--moss); }
.term-out { margin-top: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.term-out b { color: var(--moss); font-weight: 400; }
.term-out span { color: var(--ginger-2); }

/* ------------------------------------------------------------- sections */
section.band { padding: 104px 0; border-bottom: 1px solid var(--line); position: relative; }
.kicker { font: 13px var(--mono); color: var(--ginger); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
h2.head { font: 600 clamp(34px, 4.6vw, 54px)/1.08 var(--serif); margin: 0 0 22px; letter-spacing: -.01em; max-width: 16em; }
h2.head i { font-style: italic; color: var(--ginger-2); font-weight: 500; }
.sub { color: var(--cream-2); max-width: 40em; margin: 0 0 56px; font-size: 18px; }

/* three pillars right under the hero: the page's argument in one glance */
.pillars { border-bottom: 1px solid var(--line); background: var(--ink-2); }
.pillars .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pillar { display: flex; flex-direction: column; padding: 36px 24px 30px; color: var(--cream); border-left: 1px solid var(--line); transition: background .25s; }
.pillar:last-child { border-right: 1px solid var(--line); }
.pillar:hover { background: var(--ink-3); color: var(--cream); }
.pillar .kicker { margin-bottom: 12px; font-size: 12px; }
.pillar h3 { font: 600 21px/1.3 var(--serif); margin: 0 0 12px; }
.pillar p { margin: 0 0 20px; color: var(--cream-2); font-size: 14.5px; line-height: 1.7; flex: 1; }
.pillar code { white-space: nowrap; }
/* four across down to ~1100px, then two by two; one column on phones (below) */
@media (max-width: 1100px) {
  .pillars .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar { border-bottom: 1px solid var(--line); }
  .pillar:nth-child(2n) { border-right: 1px solid var(--line); }
  .pillar:nth-last-child(-n+2) { border-bottom: 0; }
}
.pillar .num { font: 600 1.15em var(--mono); color: var(--ginger-2); }
.pillar .go { font: 13px var(--mono); color: var(--ginger-2); }
.pillar:hover .go { color: var(--cream); }

/* features: numbered editorial grid */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feat { padding: 34px 30px 38px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background .25s; }
.feat:hover { background: var(--ink-2); }
.feat .n { font: 13px var(--mono); color: var(--rust); }
.feat h3 { font: 600 24px/1.25 var(--serif); margin: 14px 0 12px; }
.feat p { margin: 0; color: var(--cream-2); font-size: 15.5px; line-height: 1.7; }
.feat code { font-size: .85em; }


/* two-column feature sections: argument on one side, evidence on the other */
.split { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 56px; align-items: start; }
.points { list-style: none; margin: 0; padding: 0; counter-reset: pt; }
.points li { position: relative; padding: 0 0 26px 46px; counter-increment: pt; }
.points li::before {
  content: counter(pt, decimal-leading-zero); position: absolute; left: 0; top: 4px;
  font: 12px var(--mono); color: var(--rust); border-top: 1px solid var(--rust); padding-top: 4px; width: 28px;
}
.points h3 { font: 600 21px/1.3 var(--serif); margin: 0 0 6px; }
.points p { margin: 0; color: var(--cream-2); font-size: 15.5px; line-height: 1.7; }
.fine { font-size: 14px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; margin-top: 4px; }
.split > * { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stack .cap { margin-top: -4px; }
.tag { justify-self: start; display: inline-block; font: 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
       background: var(--ginger-2); padding: 4px 7px; border-radius: 3px; margin-bottom: 10px; }
.tag.alt { background: var(--line); color: var(--cream-2); }
.code .out { color: var(--moss); }

.feats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* code showcase */
.show { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.show ul { list-style: none; padding: 0; margin: 0; }
.show li { padding: 18px 0 18px 22px; border-left: 2px solid var(--line); cursor: pointer; transition: border-color .2s; }
.show li h4 { margin: 0 0 4px; font: 600 20px var(--serif); color: var(--cream-2); }
.show li p { margin: 0; color: var(--muted); font-size: 15px; }
.show li.on { border-left-color: var(--ginger); }
.show li.on h4 { color: var(--cream); }
pre.code {
  margin: 0; background: var(--code); border: 1px solid var(--line); border-radius: 6px;
  padding: 24px 26px; overflow-x: auto; font: 13.5px/1.75 var(--mono); color: var(--cream-2); tab-size: 4;
}
.code .k { color: var(--ginger); }
.code .s { color: var(--moss); }
.code .c { color: #6f6352; font-style: italic; }
/* hero: a short tour of the language beside the pitch */
pre.hero-code { margin: 0; font-size: 13px; line-height: 1.7; padding: 22px 24px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
/* the skill install sits under the example: same width, a little tighter than the hero install box */
.hero-skill { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr); scroll-margin-top: 80px; }
.hero-skill .term-body { padding: 18px 20px 16px; font-size: 13px; }
.term-body .cmd.links { padding-right: 0; line-height: 1.9; }
.term-body .cmd.plain::before { display: none; }
.term-body .cmd.plain:not(.links) { font-family: var(--text); font-size: 14px; line-height: 1.75; color: var(--cream); }
.term-body .cmd.links .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.code .d { color: var(--ginger-2); }
.code .n { color: #d7a7e0; }
.code .f { color: var(--cream); }
.code .ip { color: var(--ginger-2); }
.cap { font: 12px var(--mono); color: var(--muted); margin: 10px 2px 0; }

/* downloads */
table.dl { width: 100%; border-collapse: collapse; font-size: 15px; }
.dl th { text-align: left; font: 12px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 12px 0; border-bottom: 1px solid var(--line); }
.dl td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dl td.f a { font: 14px var(--mono); }
.dl td.h { font: 11.5px var(--mono); color: var(--muted); word-break: break-all; max-width: 320px; }
.dl td.sz { font: 13px var(--mono); color: var(--cream-2); white-space: nowrap; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 42px; }
.steps .term-body { padding-top: 18px; }

/* footer */
footer { padding: 48px 0 60px; color: var(--muted); font: 13px var(--mono); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
footer a { color: var(--cream-2); }
footer .icp { flex-basis: 100%; font-size: 12px; }
footer .icp a { color: var(--muted); }

/* load-in */
.rise { opacity: 0; transform: translateY(16px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .44s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 64px; padding: 56px 0 96px; }
.toc { position: sticky; top: 92px; align-self: start; font: 13.5px/1.9 var(--mono); }
.toc a { display: block; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; }
.toc a:hover, .toc a.on { color: var(--ginger-2); border-left-color: var(--ginger); }
.toc .grp { color: var(--cream-2); margin: 18px 0 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.toc .grp:first-child { margin-top: 0; }
.prose { min-width: 0; max-width: 780px; }
.prose h1 { font: 600 52px/1.05 var(--serif); margin: 0 0 18px; }
.prose h2 { font: 600 32px/1.2 var(--serif); margin: 72px 0 16px; padding-top: 12px; scroll-margin-top: 80px; }
.prose h2::before { content: attr(data-n); display: block; font: 13px var(--mono); color: var(--rust); margin-bottom: 8px; }
.prose h3 { font: 600 21px var(--serif); margin: 36px 0 10px; color: var(--cream); scroll-margin-top: 80px; }
.prose p, .prose li { color: var(--cream-2); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose pre.code { margin: 18px 0 22px; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15px; }
.prose th { text-align: left; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose td { padding: 10px; border-bottom: 1px solid var(--line); color: var(--cream-2); vertical-align: top; }
.prose td:first-child { white-space: nowrap; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--ginger); background: var(--ink-2); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 20px 0; }
.callout p { margin: 0; font-size: 15.5px; }
.os-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 6px 0 4px; }
.os-switch button { font: 13px var(--mono); background: none; border: 0; color: var(--muted); padding: 8px 14px; cursor: pointer; }
.os-switch button.on { background: var(--ginger); color: var(--ink); }
[data-os-only] { display: none; }
[data-os-only].show-os { display: block; }

.empty { color: var(--muted); font: 14px var(--mono); padding: 22px 0; }

/* links to the package registry: plain text when its address is not configured */
a:not([href]) { color: inherit; }
.next-step { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 16px 0 0; }
#ecosystem .cta { margin-top: 18px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero { padding: 72px 0 64px; }
  /* minmax(0, 1fr), not 1fr: a bare 1fr track never shrinks below its widest unbreakable
     content (a long install command), which pushes the whole page sideways on phones */
  .hero .wrap, .show, .steps, .docs { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feats, .feats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .pillars .wrap { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .pillar { border-left: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 30px 28px; }
  .pillar:nth-child(2n) { border-right: 0; }
  .pillar:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: 0; }
  .toc { position: static; display: none; }
  section.band { padding: 76px 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav nav { gap: 14px; }
  .nav .ver-badge { display: none; }
  .feats, .feats.four { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 18px; }
  .pillar { padding: 28px 16px; }
  .nav .wrap { gap: 14px; }
  .hero .wrap > *, .show > *, .steps > * { min-width: 0; }
  .dl td.h { display: none; }
  .prose h1 { font-size: 40px; }
  .prose table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .stripes { animation: none; }
  .rise, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
}
