/* OpenWebToolbox shared styles. One theme modelled on Astryx (white / dark grey page, cream stage, pastel blue cards, black pills), light and dark. */
@font-face { font-family: Figtree; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/figtree-400.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/figtree-600.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 800; font-style: normal; font-display: swap; src: url(/assets/fonts/figtree-800.woff2) format("woff2"); }
/* Light values = Astryx light (white page, cream stage, pastel blue cards). Dark values = Astryx dark (#1f1f22 page, #111112 stage).
   Theme: follows the system unless the visitor picked one with the nav switch (html[data-theme], saved in localStorage "owt-theme"). */
:root {
  color-scheme: light;
  --page: #ffffff;      /* page background */
  --card: #f8f4ed;      /* tool panel, stage, quiet surfaces */
  --bg: #ffffff;        /* fields and controls inside a panel */
  --tile: #e6f0ff;      /* pastel blue feature cards */
  --shot-ring: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px -12px rgba(20,30,60,.35); /* screenshot edge on cards; dark mode adds a light outline */
  --ink: #15110c;
  --mute: #4e606f;
  --line: #e4ded3;
  --accent: #225bff;
  --accent-ink: #ffffff;
  --accent-soft: #e6f0ff;
  --chip: rgba(5, 54, 89, .098);
  --ok: #007004;
  --ok-soft: #c5e5c0;
  --bad: #a50c25;
  --r-card: 16px;
  --r-el: 12px;
  --shadow: 0 2px 4px rgba(0,0,0,.05), 0 8px 24px -8px rgba(40,30,10,.14);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #1f1f22; --card: #111112; --bg: #1f1f22; --tile: #26344f; --shot-ring: 0 0 0 1px rgba(255,255,255,.16), 0 14px 34px -12px rgba(0,0,0,.85);
    --ink: #dfe2e5; --mute: #aaafb5; --line: #34343a;
    --accent: #8fb0ff; --accent-ink: #111112; --accent-soft: #1a2333; --chip: rgba(223,226,229,.12);
    --ok: #9fe59b; --ok-soft: #2c4a2a; --bad: #ffc6c1;
    --shadow: 0 2px 4px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1f1f22; --card: #111112; --bg: #1f1f22; --tile: #26344f; --shot-ring: 0 0 0 1px rgba(255,255,255,.16), 0 14px 34px -12px rgba(0,0,0,.85);
  --ink: #dfe2e5; --mute: #aaafb5; --line: #34343a;
  --accent: #8fb0ff; --accent-ink: #111112; --accent-soft: #1a2333; --chip: rgba(223,226,229,.12);
  --ok: #9fe59b; --ok-soft: #2c4a2a; --bad: #ffc6c1;
  --shadow: 0 2px 4px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 64px; }


h1 { font: 600 clamp(2rem, 4.6vw, 2.625rem)/1.15 var(--sans); letter-spacing: -0.02em; margin: 10px 0 12px; }
.lead { font-size: 1.1rem; line-height: 1.55; color: var(--mute); max-width: 62ch; margin: 0 0 28px; }

.tool {
  background: var(--card);
  border-radius: var(--r-card);
  padding: clamp(16px, 3vw, 32px);
}

.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { font: 600 .9rem/1 var(--sans); color: var(--mute); background: transparent; border: 0; padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.btn { font: 600 .95rem/1 var(--sans); background: var(--ink); color: var(--bg); border: 0; padding: 14px 22px; border-radius: 999px; cursor: pointer; }
.btn:hover { opacity: .88; }
.btn.big { font-size: 1.3rem; padding: 20px 48px; min-width: 240px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -12px var(--accent); }
.btn.big[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled, .btn.big:disabled { background: var(--chip); color: var(--mute); box-shadow: none; cursor: not-allowed; opacity: 1; } /* looks off until files are added */
.btn:disabled:hover { opacity: 1; }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.prose { max-width: 70ch; margin-top: 56px; }
.prose h2 { font: 600 1.5rem/1.25 var(--sans); letter-spacing: -0.02em; margin: 40px 0 10px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--mute); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.prose details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.prose summary { cursor: pointer; font-weight: 600; }
.prose details p { margin: 8px 0 0; }
.prose a { color: var(--accent); }

.foot a { color: inherit; }
.foot { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); font-size: .88rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- shared page chrome: top bar, footer, breadcrumb, cards (every page except the home hero) ---------- */
body:not(.home) { padding-top: 48px; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 24px; }
.sitenav { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 48px; padding: 0 8px 0 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.logo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent); }
.logo img { display: block; width: 28px; height: 28px; } /* toolbox fills 27/32 of the box: shows 24px wide, like the Astryx mark */
.logo span { font: 400 1.18rem/1 "Bagel Fat One", Figtree, sans-serif; letter-spacing: 0; transform: translateY(1.5px); } /* letters line up with the toolbox body, not the handle (measured) */
.wm2 { font-weight: inherit; color: var(--ink); } /* logo C (owner 2026-11-18): "OpenWeb" in brand blue, "Toolbox" in text colour */
.sitenav nav { display: flex; gap: 4px; }
.sitenav nav a { padding: 9px 12px; border-radius: 999px; font: 500 14px/1 var(--sans); color: var(--ink); opacity: .8; text-decoration: none; }
.sitenav nav a:hover { opacity: 1; background: var(--chip); }
.navr { justify-self: end; display: flex; align-items: center; gap: 6px; }
.themebtn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.themebtn:hover { background: var(--chip); }
.themebtn .i-sun { display: none; }
:root[data-theme="dark"] .themebtn .i-sun { display: block; } :root[data-theme="dark"] .themebtn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .themebtn .i-sun { display: block; } :root:not([data-theme="light"]) .themebtn .i-moon { display: none; } }
.start { padding: 9px 14px; border-radius: 999px; background: var(--ink); color: var(--page); font: 600 14px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.start:hover { opacity: .88; }
@media (max-width: 760px) { .sitenav nav { display: none; } .sitenav { grid-template-columns: 1fr auto; } .logo span { font-size: 1.02rem; } }
@media (max-width: 380px) { .logo span { display: none; } }
@font-face { font-family: "Bagel Fat One"; font-weight: 400; font-display: swap; src: url(/assets/fonts/bagel-400.woff2) format("woff2"); }

.kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 36px 0 0; font: 500 .9rem/1 var(--sans); color: var(--mute); }
.kicker a { color: var(--mute); text-decoration: none; padding: 7px 12px; border-radius: 999px; background: var(--chip); }
.kicker a:hover { color: var(--ink); }
.kicker i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

/* tool card (screenshot + name + line) and post card, shared by home, /tools/, /blog/ and "more" blocks */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.tcard { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; min-width: 0; }
.tcard[hidden], .pcard[hidden] { display: none; }
.shot { display: block; position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--card); margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s; }
.shot .dk { display: none; }
.shot.art { box-shadow: none; }
.shot.art img { object-position: center; }
:root[data-theme="dark"] .shot .dk { display: block; } :root[data-theme="dark"] .shot .lt { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot .dk { display: block; } :root:not([data-theme="light"]) .shot .lt { display: none; } }
.tcard:hover .shot img, .pcard:hover .cover img { transform: scale(1.03); }
.tcard b { font: 600 1.06rem/1.3 var(--sans); }
.tcard > span:last-child { color: var(--mute); font-size: .95rem; line-height: 1.45; }
.pcard { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.pcard .cover { display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--card); margin-bottom: 6px; }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pcard b { font: 600 1.06rem/1.3 var(--sans); }
.pcard.lead b { font-size: 1.5rem; line-height: 1.25; }
.pcard .ex { color: var(--mute); font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard.lead .ex { font-size: 1.05rem; -webkit-line-clamp: 3; }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--mute); font: 500 .82rem/1.2 var(--sans); }
.byline img { border-radius: 50%; }
.byline i { width: 1px; height: 12px; background: var(--line); }

.more { margin-top: 72px; }
.more h2 { font: 600 1.6rem/1.2 var(--sans); letter-spacing: -0.02em; margin: 0 0 24px; }
.more .guide { margin: 0 0 40px; padding: 18px 22px; border-radius: var(--r-card); background: var(--tile); font-weight: 500; }
.more .guide a { color: var(--ink); }

.sitefoot { width: 100%; max-width: 1200px; margin: 96px auto 0; padding: 0 20px 40px; }
.fcols { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr .8fr; gap: 40px; padding-top: 48px; border-top: 1px solid var(--line); }
.fbrand p { color: var(--mute); max-width: 30ch; margin: 14px 0 0; line-height: 1.5; }
.sitefoot h4 { margin: 0 0 14px; font: 600 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.sitefoot nav a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; font-size: .95rem; }
.sitefoot nav a:hover { text-decoration: underline; }
.fbottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); font-size: .88rem; }
@media (max-width: 860px) { .fcols { grid-template-columns: 1fr 1fr; } }

/* motion.js (blog, posts, /tools/): reveal, tilt + glare. Only active when the script adds .mo (never with reduced motion). */
.mo .pcard, .mo .tcard { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.mo .pcard.in, .mo .tcard.in { opacity: 1; transform: none; }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .4s; will-change: transform; }
.tilt.on { transition: transform .12s linear, box-shadow .4s; box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
.tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.38), rgba(255,255,255,0) 55%); }
.tilt.on::after { opacity: 1; }
.pcard .cover, .hero-cover { position: relative; }

/* the hidden attribute always wins over display rules */
[hidden] { display: none !important; }
