/* Vitals — shared styles for individual icon pages + the icon hub.
   Mirrors the design tokens used on the homepage. */
:root {
  --ink: #14181c; --paper: #ffffff; --bg: #f3f5f6; --line: #e2e7ea; --line-2: #eef1f3;
  --muted: #5d6973; --muted-2: #9aa4ac; --accent: #0f7480; --accent-d: #0b5963; --accent-t: #e9f2f3;
  --code-bg: #11171b; --code-fg: #d6e2e6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sw: 2; --maxw: 1120px;
}
@font-face { font-family:'Source Serif 4'; src:url('/fonts/SourceSerif4-Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Source Serif 4'; src:url('/fonts/SourceSerif4-SemiBold.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'IBM Plex Sans'; src:url('/fonts/IBMPlexSans-Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'IBM Plex Sans'; src:url('/fonts/IBMPlexSans-Medium.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'IBM Plex Sans'; src:url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'IBM Plex Mono'; src:url('/fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition-duration: .001ms !important; animation-duration: .001ms !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.ic { fill: none; stroke: currentColor; stroke-width: var(--sw); stroke-linejoin: miter; stroke-linecap: butt; display: block; }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; }
.mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; flex: none; }
.mark svg { width: 18px; height: 18px; }
.brand .word { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.brand .word small { color: var(--muted-2); font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.02em; margin-left: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }

.btn { appearance: none; cursor: pointer; font: inherit; font-weight: 500; font-size: 14px; border-radius: 7px; padding: 9px 16px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }

/* Breadcrumb */
.crumb { font-size: 13px; color: var(--muted-2); padding: 22px 0 0; }
.crumb a:hover { color: var(--ink); }
.crumb span { color: var(--ink); }

/* Detail layout */
.detail { padding: 22px 0 64px; }
.detail .grid2 { display: grid; grid-template-columns: 360px 1fr; gap: 44px; align-items: start; }
.preview { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); display: grid; place-items: center; padding: 48px; color: var(--ink);
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 24px 24px; background-position: center; }
.preview svg { width: 168px; height: 168px; }
.cat-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.detail h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.1; letter-spacing: -0.018em; margin: 0 0 8px; }
.detail .aka { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.detail .aka b { color: var(--ink); font-weight: 600; }
.detail .aka .mono { font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.detail .blurb { font-size: 16.5px; line-height: 1.6; color: var(--ink); margin: 0 0 22px; max-width: 56ch; }
.uses { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.uses span { font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }

/* Weight + actions */
.weight { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.weight > span { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { appearance: none; border: none; background: var(--paper); font: inherit; font-size: 13px; color: var(--muted); padding: 8px 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--paper); }
.actions, .dl { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { margin-bottom: 10px; }
.actions button, .dl button { appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; padding: 9px 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); transition: background .12s, border-color .12s, color .12s; }
.actions button:hover, .dl button:hover { border-color: var(--accent); color: var(--accent); }
.dl-size { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.dl-size .lbl { font-size: 12px; color: var(--muted); }
.dl-size .px { font-size: 12px; color: var(--muted-2); }
.dl-size .seg button { padding: 6px 11px; font-size: 12px; min-width: 40px; }
.hint { font-size: 12px; color: var(--muted-2); margin: 16px 0 0; }

/* Code blocks */
.codeblock { position: relative; background: var(--code-bg); border-radius: 11px; padding: 16px 18px; margin: 0 0 14px; overflow-x: auto; }
.codeblock .cb-label { font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #7f8f96; margin-bottom: 10px; }
.codeblock pre { margin: 0; }
.codeblock code { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--code-fg); white-space: pre; }
.cb-copy { position: absolute; top: 12px; right: 12px; font: inherit; font-size: 11.5px; font-weight: 500; color: var(--code-fg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.cb-copy:hover { background: rgba(255,255,255,.16); }

/* Related + hub grids */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.section p.note { color: var(--muted); font-size: 14.5px; margin: 0 0 24px; max-width: 60ch; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.icard { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); display: flex; flex-direction: column; align-items: center; padding: 24px 12px 14px; transition: border-color .15s, box-shadow .15s; }
.icard:hover { border-color: var(--muted-2); box-shadow: 0 14px 30px -22px rgba(8,12,16,.5); }
.icard .ic-box { color: var(--ink); height: 52px; display: grid; place-items: center; }
.icard .ic-box svg { width: 44px; height: 44px; }
.icard .nm { font-size: 13px; font-weight: 500; margin-top: 14px; color: var(--ink); text-align: center; }

/* Footer */
footer { background: #0c1014; color: #c9d0d4; padding: 46px 0; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer .brand .word { color: #fff; }
footer .f-meta { font-size: 13px; color: #8b969d; max-width: 40ch; }
footer a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.3); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; padding: 11px 18px; border-radius: 9px; box-shadow: 0 12px 34px rgba(8,12,16,.4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .detail .grid2 { grid-template-columns: 1fr; gap: 28px; }
  .preview { padding: 36px; }
  .preview svg { width: 132px; height: 132px; }
  .detail h1 { font-size: 32px; }
  .nav-links a:not(.btn) { display: none; }
}
