/* XVision site styles: shared by every page. The home page adds home.css. */

@font-face { font-family: Geomini; src: url('fonts/Geomini_latin-s.p.2j58wcs7_aiaj.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: Familjen; src: url('fonts/f5edcc6a132fb1ad-s.p.3ii__yurxaf4q.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

/* Grayscale tokens. --ink is the dark panel colour used by the CTA band and footer. */
:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --card: var(--surface);
  --soft: #f0f0f2;
  --fg: #0b0b0c;
  --muted: #64646c;
  --faint: #9a9aa3;
  --line: #e6e6e9;
  --line-strong: #d6d6db;
  --accent: #0b0b0c;
  --accent-soft: rgba(11, 11, 12, .05);
  --ink: #0d0d0f;
  --ink-fg: #f4f4f5;
  --ink-muted: #9b9ba4;
  --ink-line: rgba(255, 255, 255, .1);
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --link: #1d64d8;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, .05);
  --shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 12px 32px -12px rgba(16, 16, 20, .14);
  --shadow-lg: 0 2px 4px rgba(16, 16, 20, .04), 0 40px 80px -24px rgba(16, 16, 20, .28);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
/* theme.js sets data-theme from the saved choice or the system setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090a;
  --surface: #121214;
  --soft: #18181b;
  --fg: #f3f3f4;
  --muted: #a0a0a8;
  --faint: #6e6e76;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --accent: #f3f3f4;
  --accent-soft: rgba(255, 255, 255, .06);
  --ink: #151518;
  --ink-line: rgba(255, 255, 255, .09);
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --link: #6ea8ff;
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 16px 40px -16px rgba(0, 0, 0, .8);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 80px -24px rgba(0, 0, 0, .9);
}
.theme-switching, .theme-switching * { transition: none !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 Familjen, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
h1, h2, h3, .wordmark { font-family: Geomini, Familjen, sans-serif; letter-spacing: -.03em; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------------------
   Navigation: sticky, translucent, same on every page
   ------------------------------------------------------------------------ */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.site-nav .nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 3px; font-size: 21px; font-weight: 650; text-decoration: none; }
.wordmark img { width: 26px; height: 26px; }
.navlinks { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.navlinks a { padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.navlinks a[aria-current="page"] { color: var(--fg); background: var(--surface); box-shadow: var(--shadow-sm); }
@media (hover: hover) { .navlinks a:hover { color: var(--fg); } }
.nav-cta { display: flex; align-items: center; gap: 8px; }

/* Light/dark switch: the icon shows the current theme and rotates into the other. */
.theme-toggle {
  position: relative; display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.theme-toggle:active { transform: scale(.94); }
@media (hover: hover) { .theme-toggle:hover { background: var(--soft); } }
.theme-toggle svg {
  grid-area: 1 / 1;
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out), filter 200ms ease;
}
.theme-toggle .moon, [data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(.6); filter: blur(2px); }
[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: opacity 150ms ease; transform: none !important; } }
@media (max-width: 900px) { .navlinks .opt { display: none; } }
/* Hamburger: two bars that cross into an X while the menu is open */
.menu-toggle { display: none; }
@media (max-width: 640px) {
  .site-nav .nav-in { position: relative; height: 60px; gap: 8px; }
  .nav-cta .ghost { display: none; }
  .menu-toggle {
    display: grid; place-content: center; gap: 5px; flex: none;
    width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px;
    background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); cursor: pointer;
    transition: transform 160ms var(--ease-out);
  }
  .menu-toggle:active { transform: scale(.94); }
  .menu-toggle span { display: block; width: 16px; height: 1.75px; border-radius: 2px; background: currentColor; transition: transform 220ms var(--ease-out); }
  .menu-open .menu-toggle span:first-child { transform: translateY(3.4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-3.4px) rotate(-45deg); }
  /* The nav links become a panel under the bar */
  .navlinks {
    position: absolute; top: calc(100% + 4px); left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
    border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg);
    font-size: 16px; transform-origin: top right;
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
    transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .menu-open .navlinks { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms ease, transform 200ms var(--ease-out); }
  .navlinks a, .navlinks .opt { display: flex; align-items: center; height: 46px; padding: 0 14px; border-radius: 11px; color: var(--fg); font-weight: 500; }
  .navlinks a:active { background: var(--soft); }
  .navlinks a[aria-current="page"] { background: var(--soft); box-shadow: none; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .navlinks, .menu-open .navlinks { transform: none; }
}

/* ---------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: 12px;
  font: inherit; font-size: 15.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}
.btn:active { transform: scale(.97); }
.btn svg { flex: none; }
.btn.primary { color: #fff; background: #0b0b0c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 16px -6px rgba(0, 0, 0, .45); }
@media (hover: hover) { .btn.primary:hover { background: #26262a; } }
[data-theme="dark"] .btn.primary { color: #0b0b0c; background: #f3f3f4; box-shadow: none; }
@media (hover: hover) { [data-theme="dark"] .btn.primary:hover { background: #ffffff; } }
.btn.ghost { border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
@media (hover: hover) { .btn.ghost:hover { background: var(--soft); } }
.btn.small { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14.5px; }
.btn.light { color: #0b0b0c; background: #fff; }
@media (hover: hover) { .btn.light:hover { background: #ececee; } }
.btn.outline-dark { border: 1px solid var(--ink-line); color: var(--ink-fg); background: rgba(255, 255, 255, .04); }
@media (hover: hover) { .btn.outline-dark:hover { background: rgba(255, 255, 255, .1); } }

/* ---------------------------------------------------------------------------
   Section headings: eyebrow pill, big title, muted lead
   ------------------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.eyebrow.green::before { background: var(--green); }
.kicker { color: var(--muted); font-size: 13.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Page header for guides and tools */
.page-head { padding: 48px 0 32px; }
.page-head h1 { margin: 16px 0 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.04; font-weight: 650; }
.page-head p { margin: 16px 0 0; max-width: 640px; color: var(--muted); font-size: 19px; }
.page-head.center { text-align: center; }
.page-head.center p { margin-left: auto; margin-right: auto; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { color: var(--fg); } }

/* ---------------------------------------------------------------------------
   Cards and lists
   ------------------------------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-bottom: 80px; }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }
.card {
  display: block; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform 160ms var(--ease-out), border-color 150ms ease, box-shadow 150ms ease;
}
a.card:active { transform: scale(.985); }
@media (hover: hover) { a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); } }
.card h2, .card h3 { margin: 14px 0 6px; font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.meta { color: var(--muted); font-size: 13.5px; }
.icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--fg); background: var(--soft); }

/* ---------------------------------------------------------------------------
   Articles
   ------------------------------------------------------------------------ */
article { padding-bottom: 48px; }
article h2 { margin: 48px 0 12px; font-size: 29px; line-height: 1.2; font-weight: 600; }
article h3 { margin: 30px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
article p, article li { font-size: 18px; }
article ul, article ol { padding-left: 22px; }
article li { margin: 6px 0; }
/* Links inside running text are blue so they read as links */
article a, .tool-article a, .faq p a, .faq-foot a {
  color: var(--link); text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) { article a:hover, .tool-article a:hover, .faq p a:hover, .faq-foot a:hover { text-decoration-color: var(--link); } }
article blockquote { margin: 22px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
article blockquote p { margin: 0; }
/* The answer-first block right under the title */
article > h3:first-child { margin-top: 8px; }
article > h3:first-child + p { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
article table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 16px; }
article th, article td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
article th { font-weight: 600; background: var(--soft); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table-scroll table { margin: 0; }
.table-scroll tr:last-child td { border-bottom: 0; }
.tip { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tip b { color: var(--fg); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }
.compare div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 16px; }
.compare .bad b { color: var(--red); }
.compare .good b { color: var(--green); }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.next a { text-decoration: none; font-weight: 600; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.related { padding: 8px 0 28px; border-top: 1px solid var(--line); }
.related h2 { margin: 28px 0 14px; font-size: 22px; font-weight: 600; }
.related ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 640px) { .related ul { grid-template-columns: 1fr; } }
.related a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 500; text-decoration: none; transition: border-color 150ms ease; }
@media (hover: hover) { .related a:hover { border-color: var(--line-strong); } }

/* Dark call-to-action panel at the end of guides and tools */
.cta {
  position: relative; display: grid; gap: 8px; justify-items: start; overflow: hidden;
  margin: 8px 0 80px; padding: 28px; border-radius: 24px;
  background: var(--ink); color: var(--ink-fg);
}
.cta b { font-family: Geomini, Familjen, sans-serif; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.cta span { max-width: 520px; color: var(--ink-muted); font-size: 15.5px; }
.cta .btn { margin-top: 10px; }

/* Guides index: topic chips and compact lists */
.topics { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.topics a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color 150ms ease; }
@media (hover: hover) { .topics a:hover { border-color: var(--line-strong); } }
.topic { padding: 32px 0 8px; scroll-margin-top: 80px; }
.topic h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 28px; font-weight: 650; }
.topic .count { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 600 13px Familjen, sans-serif; letter-spacing: 0; }
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.topic:last-of-type { padding-bottom: 80px; }
@media (max-width: 760px) { .guide-list { grid-template-columns: 1fr; } }
.guide-list a { display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; transition: border-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out); }
.guide-list a:active { transform: scale(.985); }
@media (hover: hover) { .guide-list a:hover { border-color: var(--line-strong); box-shadow: var(--shadow); } }
.guide-list b { display: block; font-family: Geomini, Familjen, sans-serif; font-size: 17.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.guide-list span { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 14.5px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------------------------------------------------------------------------
   Guide cards: soft tinted gradient, label, title, excerpt, read link and a
   decorative shape. Six tones repeat down the grid; each sets two colours and
   a shape, and the card derives its background and label colour from them.
   ------------------------------------------------------------------------ */
.gcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.gcards > * { --tone-a: #f6c3a1; --tone-b: #e5865a; --shape: circle(50%); }
.gcards > :nth-child(6n+2) { --tone-a: #dcd2f3; --tone-b: #9d82d8; --shape: inset(0 round 50% 50% 0 0); }
.gcards > :nth-child(6n+3) { --tone-a: #b9e3b1; --tone-b: #5fae55; --shape: polygon(50% 0, 72% 30%, 62% 30%, 86% 60%, 72% 60%, 98% 90%, 56% 90%, 56% 100%, 44% 100%, 44% 90%, 2% 90%, 28% 60%, 14% 60%, 38% 30%, 28% 30%); }
.gcards > :nth-child(6n+4) { --tone-a: #f6c8ef; --tone-b: #cf7fe0; --shape: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.gcards > :nth-child(6n+5) { --tone-a: #bcd8f7; --tone-b: #4f8fdc; --shape: inset(8% round 30%); }
.gcards > :nth-child(6n+6) { --tone-a: #f6e09a; --tone-b: #d9a52c; --shape: polygon(50% 0, 100% 100%, 0 100%); }
.gcard {
  --tone-mix: 34%;
  --tone-ink: color-mix(in srgb, var(--tone-b) 62%, #000);
  --glow: rgba(255, 255, 255, .6);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; height: 100%; min-height: 268px;
  padding: 22px 24px; border-radius: 18px;
  background:
    radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--tone-a) 55%, transparent), transparent 60%),
    color-mix(in srgb, var(--tone-a) var(--tone-mix), var(--surface));
  color: var(--fg); text-decoration: none;
  transition: border-radius 240ms var(--ease-out), transform 160ms var(--ease-out);
}
[data-theme="dark"] .gcard {
  --tone-mix: 14%;
  --tone-ink: color-mix(in srgb, var(--tone-a) 80%, #fff);
  --glow: rgba(255, 255, 255, .06);
  background:
    radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--tone-b) 22%, transparent), transparent 60%),
    color-mix(in srgb, var(--tone-b) var(--tone-mix), var(--surface));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
/* Glass circle behind the shape, then the shape itself */
.gcard::before, .gcard::after { content: ''; position: absolute; z-index: -1; pointer-events: none; transition: transform 320ms var(--ease-out); }
.gcard::before { right: -44px; bottom: 14px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--glow), transparent 70%); }
.gcard::after {
  right: 26px; bottom: -22px; width: 132px; height: 132px; clip-path: var(--shape);
  background: linear-gradient(170deg, color-mix(in srgb, var(--tone-a) 70%, transparent), var(--tone-b));
  opacity: .9;
}
[data-theme="dark"] .gcard::after { opacity: .55; }
.gcard .glabel {
  padding: 6px 11px; border-radius: 7px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--tone-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; line-height: 1; text-transform: uppercase;
}
.gcard h3 {
  max-width: 88%; margin: 22px 0 8px; font-size: 21px; font-weight: 650; line-height: 1.22; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.gcard p {
  display: -webkit-box; max-width: 80%; margin: 0; overflow: hidden; color: var(--muted);
  font-size: 14.5px; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.gcard .gmore { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 20px; font-size: 14.5px; font-weight: 600; }
.gcard .gmore span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.gcard .gmore svg { transition: transform 200ms var(--ease-out); }
.gcard:active { transform: scale(.985); }
/* Hover squares the corners and lifts the shape */
@media (hover: hover) and (pointer: fine) {
  .gcard:hover { border-radius: 0; }
  .gcard:hover::after { transform: translateY(-8px) rotate(-4deg); }
  .gcard:hover::before { transform: scale(1.08); }
  .gcard:hover .gmore svg { transform: translateX(3px); }
}
@media (max-width: 960px) { .gcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .gcards { gap: 10px; }
  .gcard { min-height: 224px; padding: 14px; border-radius: 14px; }
  .gcard .glabel { padding: 5px 8px; font-size: 9.5px; letter-spacing: .07em; }
  .gcard h3 { max-width: none; margin: 14px 0 6px; font-size: 15.5px; line-height: 1.25; }
  .gcard p { max-width: none; font-size: 12.5px; line-height: 1.45; }
  .gcard .gmore { padding-top: 14px; font-size: 13px; }
  .gcard::before { right: -30px; bottom: 6px; width: 110px; height: 110px; }
  .gcard::after { right: 10px; bottom: -14px; width: 72px; height: 72px; opacity: .55; }
  [data-theme="dark"] .gcard::after { opacity: .35; }
}

/* ---------------------------------------------------------------------------
   Tools
   ------------------------------------------------------------------------ */
.tool { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
label.field { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
textarea, input[type="number"], input[type="text"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
textarea:focus, input:focus { border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--fg); width: 16px; height: 16px; }
.posts { display: grid; gap: 10px; margin-top: 20px; }
.post { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.post p { margin: 0; white-space: pre-wrap; font-size: 16px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.stat b { display: block; font-family: Geomini, sans-serif; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.ok { color: var(--green); }
.warn { color: var(--amber); }
.over { color: var(--red); }
.bar { height: 8px; margin-top: 16px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--fg); transition: width 200ms var(--ease-out); }
.bar.full > i { background: var(--red); }
.note { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 680px) { .inputs { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------------------
   Footer: dark, multi-column, same on every page
   ------------------------------------------------------------------------ */
.site-footer { position: relative; overflow: hidden; padding: 64px 0 28px; background: var(--ink); color: var(--ink-muted); font-size: 14.5px; }
.site-footer a { color: var(--ink-muted); text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) { .site-footer a:hover { color: var(--ink-fg); } }
.foot-top { position: relative; display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; }
.foot-brand .wordmark { color: var(--ink-fg); }
.foot-brand .wordmark img { filter: invert(1); }
.foot-brand p { max-width: 300px; margin: 14px 0 18px; line-height: 1.55; }
.foot-social { display: flex; gap: 8px; }
.foot-social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ink-line); border-radius: 10px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot-cols h3 { margin: 0 0 14px; color: var(--ink-fg); font: 600 14px Familjen, sans-serif; letter-spacing: 0; }
.foot-cols ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.foot-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--ink-line); font-size: 13.5px; }
.foot-mark { position: absolute; right: -40px; bottom: -70px; width: 320px; height: 320px; opacity: .05; filter: invert(1); pointer-events: none; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 560px) {
  .site-footer { padding-top: 48px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-bottom { flex-direction: column; margin-top: 40px; }
}
[data-theme="dark"] .site-footer { border-top: 1px solid var(--ink-line); }

/* Phones: tighter rhythm */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .page-head { padding: 28px 0 22px; }
  .page-head h1 { font-size: 34px; }
  .page-head p { font-size: 17px; }
  .grid { gap: 10px; padding-bottom: 56px; }
  .card { padding: 18px; border-radius: 16px; }
  .card h2, .card h3 { margin: 10px 0 4px; font-size: 18px; }
  .card p { font-size: 15px; }
  article h2 { margin-top: 38px; font-size: 24px; }
  article p, article li { font-size: 17px; }
  .tool { padding: 16px; border-radius: 18px; }
  .row .btn { flex: 1 1 auto; }
  .cta { padding: 22px; margin-bottom: 56px; }
}
.page-head.center + .topics { justify-content: center; padding-bottom: 8px; }
.muted { color: var(--muted); }
article hr { margin: 36px 0 24px; border: 0; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------------------
   Tool UI kit: shared building blocks for every tool page
   ------------------------------------------------------------------------ */
.tool-page { max-width: 920px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.tool-grid > * { min-width: 0; }
@media (max-width: 760px) { .tool-grid { grid-template-columns: 1fr; } }
.fields { display: grid; gap: 14px; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .fields-2 { grid-template-columns: 1fr; } }
.field-group { display: grid; gap: 6px; }
.field-group label, .field-label { font-size: 14px; font-weight: 600; }
.hint { color: var(--muted); font-size: 13.5px; }
select, input[type="url"], input[type="date"], input[type="time"], input[type="email"], input[type="search"] {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 18px top 21px, right 13px top 21px; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus, input[type="url"]:focus, input[type="date"]:focus, input[type="time"]:focus { border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="text"], input[type="number"] { height: 46px; }
input[type="range"] { width: 100%; accent-color: var(--fg); }
input[type="color"] { width: 46px; height: 46px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); cursor: pointer; }
.drop { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 20px; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--bg); color: var(--muted); text-align: center; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.drop.over, .drop:focus-within { border-color: var(--fg); background: var(--soft); }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { color: var(--fg); }
.out { min-height: 120px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.out:empty::before { content: attr(data-empty); color: var(--faint); }
.results { display: grid; gap: 10px; }
.result { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.result p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.result-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--fg); font: 500 14px Familjen, sans-serif; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 14px Familjen, sans-serif; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.canvas-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: repeating-conic-gradient(var(--soft) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; }
.canvas-wrap canvas, .canvas-wrap img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.kv { width: 100%; border-collapse: collapse; font-size: 15px; }
.kv td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.big-number { font-family: Geomini, sans-serif; font-size: 44px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.tool-title { margin: 0 0 12px; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.tool hr { margin: 20px 0; border: 0; border-top: 1px solid var(--line); }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.privacy-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tool-article { margin-top: 56px; }
.tool-article > h2:first-child { margin-top: 0; }
