/* Reskill. ShopOS group design system (designsystem001.vercel.app):
   cream page, white paper, ink text and 2px ink outlines, hard offset shadows that press in, green as the one action colour,
   Instrument Sans + JetBrains Mono, 24px radius, a sticker shape and an accent colour per company.
   Rules: shadows only on things you press or that lead a section (company cards, starters, search, panels).
   The 115 skill cards stay flat (outline only) so the page reads, and lift on hover.
   No side stripes, glows, gradient text or uppercase tracked labels. */
:root {
  --cream: #fcf5eb; --paper: #ffffff; --ink: #111b21; --ink-soft: #3b4a54; --muted: #56656f;
  --green: #25d366; --mint: #e6ffda; --rule: #ece2d3;
  --line: 2px; --lift: 6px; --radius: 24px; --r-md: 16px; --gutter: 40px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --time: 0.32s;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.02em; }
code, .mono { font-family: var(--mono); font-size: 0.86em; font-weight: 500; }
kbd { font: 500 11px/1 var(--mono); border: var(--line) solid var(--ink); border-radius: 6px; padding: 3px 6px; background: var(--paper); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--green); padding: 8px 14px; border: var(--line) solid var(--ink); border-radius: 999px; }
.i { flex: none; width: 18px; height: 18px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- the shared surface: ink outline, hard shadow, presses in ---------- */
.raised { border: var(--line) solid var(--ink); box-shadow: var(--lift) var(--lift) 0 var(--ink); transition: transform var(--time) var(--ease), box-shadow var(--time) var(--ease); }
a.raised:hover, button.raised:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--lift) + 2px) calc(var(--lift) + 2px) 0 var(--ink); }
a.raised:active, button.raised:active { transform: translate(var(--lift), var(--lift)); box-shadow: 0 0 0 var(--ink); transition-duration: 0.08s; }

.btn { --lift: 3px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.green { background: var(--green); border: var(--line) solid var(--ink); }
.btn.done { background: var(--mint); }
.btn kbd { border-width: 1.5px; }

.pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
a.pill:hover { background: var(--mint); }
.pill.st-active { background: var(--green); }
.pill.st-draft, .pill.st-proposed { background: var(--paper); }
.pill.st-deprecated, .pill.st-archived { background: var(--rule); color: var(--ink-soft); }

/* sticker shapes: a paper face over an ink shadow */
.shape path, .mini path { fill-rule: evenodd; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sh-back { fill: var(--ink); stroke: var(--ink); }
.sh-face { fill: var(--paper); stroke: var(--ink); }
.on-dark .sh-back { fill: var(--green); stroke: var(--green); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 10; background: var(--cream); border-bottom: var(--line) solid transparent; transition: border-color var(--time) var(--ease); }
.bar.scrolled { border-bottom-color: var(--ink); }
.bar .wrap { display: flex; align-items: center; gap: 12px; height: 76px; }
.mark { display: inline-flex; align-items: center; gap: 10px; margin-right: 20px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; text-decoration: none; }
.mark i { width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: var(--line) solid var(--ink); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 var(--line) var(--ink); }
.spacer { flex: 1; }

/* ---------- headings ---------- */
main { padding-bottom: 24px; }
section + section { margin-top: 72px; }
.h2row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.h2-note { margin: 0; color: var(--muted); font-size: 15px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.lede { margin: 16px 0 0; font-size: 19px; line-height: 1.5; color: var(--ink-soft); max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 16px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--ink); text-decoration: none; font-weight: 500; } .crumbs a:hover { text-decoration: underline; }

/* ---------- home intro ---------- */
.intro { padding: 56px 0 8px; }
.intro h1 { margin: 0; max-width: 16ch; font-size: clamp(44px, 6.4vw, 84px); font-weight: 500; line-height: 0.98; letter-spacing: -0.04em; }
.bigsearch { --lift: 5px; display: flex; align-items: center; gap: 12px; max-width: 720px; height: 64px; margin: 32px 0 0; padding: 0 16px 0 22px; border-radius: 999px; background: var(--paper); cursor: text; }
.bigsearch:focus-within { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: 500 18px var(--sans); }
.bigsearch input::placeholder { color: var(--muted); font-weight: 400; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 32px 0 0; padding: 0; list-style: none; }
.stats li { display: flex; align-items: baseline; gap: 8px; color: var(--ink-soft); }
.stats strong { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }

/* ---------- companies: bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 260px; grid-auto-flow: dense; gap: 24px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--paper); text-decoration: none; min-width: 0; }
.card.xl { grid-column: span 2; grid-row: span 2; }
.card.wide { grid-column: span 2; flex-direction: row; }
.card-art { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--accent); color: var(--accent-ink); border-bottom: var(--line) solid var(--ink); }
.card-art .shape { position: absolute; left: 20px; bottom: -30px; width: 130px; height: 130px; rotate: -8deg; transition: transform 0.5s var(--ease), rotate 0.5s var(--ease); }
.card:hover .shape { transform: translateY(-14px); rotate: 0deg; }
.card-art .pill { position: absolute; top: 16px; right: 16px; }
.card-body { display: flex; align-items: flex-end; gap: 12px; padding: 14px 16px 16px 20px; }
.txt { flex: 1; min-width: 0; }
.kicker { display: block; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h3 { margin: 2px 0 0; font-size: 24px; font-weight: 600; line-height: 1.05; }
.blurb { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }
.go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--cream); transition: background var(--time) var(--ease), transform var(--time) var(--ease); }
.card:hover .go { background: var(--green); transform: rotate(-45deg); }
.card.xl .card-art .shape { width: 280px; height: 280px; left: 36px; bottom: -56px; }
.card.xl h3 { font-size: clamp(36px, 4vw, 52px); }
.card.xl .card-body { padding: 22px 24px 24px 28px; }
.card.xl .blurb { font-size: 17px; max-width: 40ch; }
.card.wide .card-art { flex: none; width: 44%; border-bottom: 0; border-right: var(--line) solid var(--ink); }
.card.wide .card-art .shape { width: 160px; height: 160px; left: 24px; bottom: -34px; }
.card.wide .card-body { flex: 1; padding: 20px 20px 20px 24px; }
.card.wide h3 { font-size: clamp(28px, 2.6vw, 36px); }

/* ---------- home: what just happened (radio chips + one panel; works without JS) ---------- */
.sits { border-radius: var(--radius); background: var(--paper); padding: 20px; }
.sit-radio { position: absolute; opacity: 0; pointer-events: none; }
.sit-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sit-chips label { padding: 8px 14px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 14.5px; font-weight: 500; cursor: pointer; user-select: none; transition: background 0.15s; }
.sit-chips label:hover { background: var(--mint); }
.sit-panel { display: none; list-style: none; margin: 20px 0 0; padding: 20px 4px 4px; border-top: var(--line) solid var(--rule); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 28px; }
.sit-panel li { display: grid; gap: 2px; min-width: 0; }
.sit-panel .when { color: var(--muted); font-size: 14px; }
.sit-panel .when:empty { display: none; }
.sit-panel .then { font-weight: 600; }
.sit-panel .then a { text-decoration: none; }
.sit-panel .then a:first-child::before { content: "\2192\00a0"; color: var(--muted); }
.sit-panel .then a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* the checked chip is solid ink; its panel shows */
#sit-0:checked ~ .sit-chips label[for="sit-0"], #sit-1:checked ~ .sit-chips label[for="sit-1"], #sit-2:checked ~ .sit-chips label[for="sit-2"],
#sit-3:checked ~ .sit-chips label[for="sit-3"], #sit-4:checked ~ .sit-chips label[for="sit-4"], #sit-5:checked ~ .sit-chips label[for="sit-5"],
#sit-6:checked ~ .sit-chips label[for="sit-6"], #sit-7:checked ~ .sit-chips label[for="sit-7"] { background: var(--ink); color: var(--cream); }
#sit-0:focus-visible ~ .sit-chips label[for="sit-0"], #sit-1:focus-visible ~ .sit-chips label[for="sit-1"], #sit-2:focus-visible ~ .sit-chips label[for="sit-2"],
#sit-3:focus-visible ~ .sit-chips label[for="sit-3"], #sit-4:focus-visible ~ .sit-chips label[for="sit-4"], #sit-5:focus-visible ~ .sit-chips label[for="sit-5"],
#sit-6:focus-visible ~ .sit-chips label[for="sit-6"], #sit-7:focus-visible ~ .sit-chips label[for="sit-7"] { outline: 3px solid var(--ink); outline-offset: 3px; }
#sit-0:checked ~ .sit-panels > :nth-child(1), #sit-1:checked ~ .sit-panels > :nth-child(2), #sit-2:checked ~ .sit-panels > :nth-child(3),
#sit-3:checked ~ .sit-panels > :nth-child(4), #sit-4:checked ~ .sit-panels > :nth-child(5), #sit-5:checked ~ .sit-panels > :nth-child(6),
#sit-6:checked ~ .sit-panels > :nth-child(7), #sit-7:checked ~ .sit-panels > :nth-child(8) { display: grid; }

/* ---------- skills: cards (grid) and rows (list) from one markup ---------- */
.files[data-view="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.file { --lift: 4px; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--paper); text-decoration: none; transition: transform var(--time) var(--ease), box-shadow var(--time) var(--ease); }
.file:hover { transform: translate(-2px, -2px); box-shadow: var(--lift) var(--lift) 0 var(--ink); }
.file[hidden] { display: none !important; }
.file-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: var(--line) solid var(--ink); border-radius: 10px; background: var(--accent); }
.mini { width: 22px; height: 22px; }
.mini path { stroke-width: 2; }
.file-team { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-name { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; overflow-wrap: anywhere; }
.file-desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.file-meta { display: flex; gap: 12px; margin-top: auto; padding-top: 10px; border-top: var(--line) solid var(--rule); font-size: 13px; color: var(--muted); }
/* starters lead the page: bigger, raised, accent band on top */
.starters[data-view="grid"] { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.starters .file { --lift: 6px; box-shadow: var(--lift) var(--lift) 0 var(--ink); padding: 0; overflow: hidden; border-radius: var(--radius); }
.starters .file:hover { box-shadow: calc(var(--lift) + 2px) calc(var(--lift) + 2px) 0 var(--ink); }
.starters .file-top { padding: 16px 16px 14px; background: var(--accent); border-bottom: var(--line) solid var(--ink); }
.starters .ico { background: var(--paper); }
.starters .file-team { color: var(--accent-ink); }
.starters .file-name, .starters .file-desc { padding: 0 18px; }
.starters .file-meta { margin: auto 18px 0; padding: 10px 0 16px; }
/* list view */
.files[data-view="list"] { display: grid; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.files[data-view="list"] .file { display: grid; grid-template-columns: 36px minmax(160px, 1.1fr) minmax(0, 2.4fr) auto; grid-template-areas: "ico name desc meta"; align-items: center; gap: 4px 20px; padding: 12px 18px; border: 0; border-radius: 0; border-top: var(--line) solid var(--rule); }
.files[data-view="list"] .file:first-child { border-top: 0; }
.files[data-view="list"] .file:hover { transform: none; box-shadow: none; background: var(--mint); }
.files[data-view="list"] .file-top { display: contents; }
.files[data-view="list"] .ico { grid-area: ico; width: 32px; height: 32px; }
.files[data-view="list"] .file-team { display: none; }
.files[data-view="list"] .file-top .pill { grid-area: meta; justify-self: end; }
.files[data-view="list"] .file-name { grid-area: name; font-size: 16px; }
.files[data-view="list"] .file-desc { grid-area: desc; -webkit-line-clamp: 1; font-size: 14px; }
.files[data-view="list"] .file-meta { display: none; }
.tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.f, .v { height: 36px; padding: 0 14px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; text-transform: capitalize; }
.f span { color: var(--muted); margin-left: 2px; }
.f:hover, .v:hover { background: var(--mint); }
.f.on, .v.on { background: var(--ink); color: var(--cream); } .f.on span { color: var(--cream); opacity: 0.7; }
.views { display: flex; gap: 6px; }
.v { width: 36px; padding: 0; display: grid; place-items: center; }

/* ---------- agents band ---------- */
.band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px; padding: 40px; border-radius: var(--radius); background: var(--mint); border: var(--line) solid var(--ink); }
.band h2 { margin: 0; font-size: clamp(32px, 4.4vw, 56px); font-weight: 500; line-height: 1; letter-spacing: -0.035em; }
.band p { margin: 12px 0 0; color: var(--ink-soft); max-width: 52ch; }
.cmd { display: flex; align-items: center; gap: 12px; min-width: 0; height: 56px; padding: 0 8px 0 20px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--cream); }
.band .cmd { background: var(--paper); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 13.5px; }
.cmd .btn { --lift: 0px; height: 40px; }

/* ---------- accent hero: company, skill, routine ---------- */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; margin: 0 0 32px; padding: 40px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }
.hero .shape { position: absolute; right: 40px; bottom: -56px; width: clamp(180px, 26vw, 340px); height: auto; aspect-ratio: 1; rotate: -8deg; pointer-events: none; }
.hero-text { position: relative; z-index: 1; max-width: min(760px, 68%); }
.hero .kicker { color: inherit; opacity: 0.85; font-size: 15px; white-space: normal; }
.hero h1 { margin: 6px 0 0; font-size: clamp(52px, 8vw, 104px); font-weight: 500; line-height: 0.95; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.hero-lede { margin: 16px 0 0; font-size: 18px; line-height: 1.5; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.hero.sm { min-height: 0; padding: 36px 40px; }
.hero.sm h1 { font-size: clamp(40px, 5.6vw, 72px); }
.hero.sm .shape { width: clamp(140px, 18vw, 240px); bottom: -40px; }
.page-head { padding: 8px 0 32px; }
.page-head h1 { margin: 0; font-size: clamp(48px, 7vw, 88px); font-weight: 500; line-height: 0.95; letter-spacing: -0.04em; }

/* ---------- skill page ---------- */
.get { --lift: 5px; display: grid; gap: 14px; margin: 0 0 32px; padding: 20px; border-radius: var(--radius); background: var(--paper); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.note { margin: 0; font-size: 14px; color: var(--muted); }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.skill > * { min-width: 0; }
.rail { position: sticky; top: 100px; display: grid; gap: 16px; padding: 20px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.rail dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14.5px; }
.rail dt { color: var(--muted); }
.rail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.rail-note { margin: 0; padding-top: 14px; border-top: var(--line) solid var(--rule); font-size: 13.5px; color: var(--muted); }
.rail .links .btn { flex: 1; }

/* ---------- rendered markdown: the document ---------- */
.doc { padding: 40px 48px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.doc.wide { margin-top: 8px; }
.md { font-size: 16.5px; line-height: 1.7; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { font-weight: 600; line-height: 1.15; }
.md h1 { font-size: 44px; letter-spacing: -0.03em; margin: 0 0 16px; }
.md h2 { font-size: 28px; margin: 48px 0 12px; padding-top: 24px; border-top: var(--line) solid var(--rule); }
.md h3 { font-size: 21px; margin: 32px 0 8px; }
.md h4 { font-size: 17px; margin: 24px 0 6px; }
.md p, .md li { max-width: 72ch; }
.md ul, .md ol { padding-left: 24px; }
.md li { margin: 4px 0; }
.md a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.md a:hover { background: var(--mint); }
.md strong { font-weight: 600; }
.md code { background: var(--cream); padding: 2px 6px; border-radius: 6px; }
.md a.ref { text-decoration: none; } .md a.ref code { background: var(--mint); border: 1.5px solid var(--ink); }
.md pre { margin: 20px 0; padding: 20px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--cream); overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.md pre code { padding: 0; background: none; font-size: inherit; }
.md pre a { color: inherit; text-decoration-thickness: 1.5px; }
.md blockquote { margin: 20px 0; padding: 16px 20px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--mint); font-size: 17px; }
.md blockquote > :first-child { margin-top: 0; } .md blockquote > :last-child { margin-bottom: 0; }
.md table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; line-height: 1.5; }
.md th, .md td { text-align: left; vertical-align: top; padding: 10px 14px; border: var(--line) solid var(--ink); }
.md th { background: var(--mint); font-weight: 600; }
.md hr { border: 0; border-top: var(--line) solid var(--rule); margin: 32px 0; }

/* ---------- routines table ---------- */
.table { border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 90px; gap: 16px; align-items: center; padding: 14px 20px; border-top: var(--line) solid var(--rule); text-decoration: none; }
.row.head { border-top: 0; background: var(--mint); font-size: 14px; font-weight: 600; border-bottom: var(--line) solid var(--ink); }
.row.head + .row { border-top: 0; }
a.row:hover { background: var(--cream); }
.c-name { display: grid; gap: 2px; min-width: 0; } .c-name strong { font-weight: 600; } .c-name .mono { color: var(--muted); font-size: 12.5px; }
.c-cad, .c-owner, .c-runs { color: var(--ink-soft); font-size: 14.5px; }

/* ---------- footer ---------- */
.foot { margin-top: 96px; border-top: var(--line) solid var(--ink); }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 40px; }
.foot-line { margin: 0; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; font-size: 14px; color: var(--ink-soft); }
.foot-links a { text-decoration: none; font-weight: 500; } .foot-links a:hover { text-decoration: underline; }

/* ---------- search palette ---------- */
.palette { width: min(680px, calc(100vw - 32px)); max-height: min(620px, 80vh); margin: 10vh auto auto; padding: 0; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: rgba(17, 27, 33, 0.45); }
#q { flex: none; height: 64px; padding: 0 22px; border: 0; border-bottom: var(--line) solid var(--ink); outline: 0; background: var(--paper); color: var(--ink); font: 500 18px var(--sans); }
#results { flex: 1; margin: 0; padding: 8px; list-style: none; overflow-y: auto; }
#results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; }
#results [aria-selected="true"] a, #results a:hover { background: var(--mint); box-shadow: inset 0 0 0 var(--line) var(--ink); }
.rn { font-weight: 600; } .rt { font-size: 13px; color: var(--muted); } .rd { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#results mark { background: var(--green); color: var(--ink); border-radius: 3px; padding: 0 1px; }
#results .empty { padding: 20px; color: var(--muted); }
.hint { flex: none; margin: 0; padding: 10px 18px; border-top: var(--line) solid var(--rule); font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 20px; }
  .skill { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .nav-links a { padding: 8px 10px; }
}
@media (max-width: 860px) {
  .bar .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; gap: 10px; }
  .nav-links { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; }
  .nav-links a { white-space: nowrap; }
  .hero-text { max-width: 100%; }
  .hero .shape { opacity: 0.35; }
  .files[data-view="list"] .file { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "ico name meta" "ico desc desc"; }
  .row { grid-template-columns: minmax(0, 1fr) auto; } .row .c-owner, .row .c-cad { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; --radius: 20px; }
  .hide-sm { display: none; }
  .mark { margin-right: 0; }
  section + section { margin-top: 56px; }
  .intro { padding: 28px 0 0; }
  .lede { font-size: 17px; }
  .bigsearch { height: 56px; margin-top: 24px; }
  .bigsearch kbd { display: none; }
  .stats { gap: 8px 20px; } .stats strong { font-size: 26px; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .card, .card.xl, .card.wide { grid-column: auto; grid-row: auto; flex-direction: column; }
  .card-art, .card.wide .card-art { flex: none; width: auto; height: 150px; border-right: 0; border-bottom: var(--line) solid var(--ink); }
  .card.xl .card-art { height: 200px; }
  .card.xl .card-art .shape, .card.wide .card-art .shape { width: 140px; height: 140px; left: 20px; bottom: -28px; }
  .card.xl .card-body, .card.wide .card-body { padding: 14px 16px 16px 20px; }
  .card.xl h3, .card.wide h3 { font-size: 30px; }
  .sits { padding: 14px; }
  .sit-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 4px; }
  .sit-chips label { white-space: nowrap; }
  .sit-panel { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .sit-panel .then { overflow-wrap: anywhere; }
  .band { padding: 24px 20px; }
  .hero, .hero.sm { min-height: 0; padding: 28px 20px; }
  .hero .shape, .hero.sm .shape { width: 120px; right: -16px; bottom: auto; top: -16px; }
  .hero-lede { font-size: 16px; }
  .get { padding: 14px; }
  .doc { padding: 22px 18px; }
  .md { font-size: 16px; }
  .md h1 { font-size: 32px; } .md h2 { font-size: 24px; }
  .h2row .tools { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
