/* ==========================================================================
   Calculator Den — "Instrument" design system
   Hanken Grotesk + JetBrains Mono · graphite · signal-orange · bento · mono numerals
   Theme-aware (light + dark share one identity). All numbers are tabular mono.
   ========================================================================== */

:root {
  --bg: #eceff3;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --text: #111722;
  --muted: #586173;
  --border: #e0e4ea;
  --brand: #e8590c;          /* accent for text + links (AA on light) */
  --brand-2: #ff7a18;        /* vivid signal orange for fills + glyphs */
  --brand-600: #c94d05;      /* stronger accent */
  --brand-tint: #fff1e7;
  --on-brand: #12161c;       /* text on an orange fill */
  --ok: #0e9f6e;
  --warn: #d98a00;
  --grid-line: rgba(17,23,34,.05);
  --ring: color-mix(in srgb, var(--brand-2) 45%, transparent);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,20,40,.05), 0 2px 8px rgba(16,20,40,.05);
  --shadow: 0 6px 18px rgba(16,20,40,.08), 0 20px 44px rgba(16,20,40,.10);
  --maxw: 1120px;
  --font: 'Hanken Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tx: 200ms;
  --ease: cubic-bezier(.2, .6, .3, 1);   /* crisp ease-out for interactive motion */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1117;
    --surface: #161b22;
    --surface-2: #1c222c;
    --text: #e6edf3;
    --muted: #8b95a1;
    --border: #232a33;
    --brand: #ff7a18;
    --brand-2: #ff8a34;
    --brand-600: #ffa257;
    --brand-tint: rgba(255,122,24,.13);
    --on-brand: #12161c;
    --grid-line: rgba(255,255,255,.045);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.4);
    --shadow: 0 8px 24px rgba(0,0,0,.55), 0 22px 54px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3 { letter-spacing: -.02em; text-wrap: balance; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.ico-svg { width: 24px; height: 24px; display: block; }
.brand-ico { width: 22px; height: 22px; display: block; }
.muted { color: var(--muted); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- eyebrow (mono uppercase label) ---- */
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand);
}

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 18px; height: 64px; position: relative; }
.nav-toggle { display: none; margin-left: 10px; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.03em; color: var(--text); white-space: nowrap; flex: none; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 32px; height: 32px; display: block; flex: none; }
.brand .logo svg { width: 32px; height: 32px; display: block; }
.site-nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 9px; transition: color var(--tx), background var(--tx); }
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* ---- hero ---- */
.hero {
  position: relative; padding: 56px 0 30px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: -20px -40px 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px; background-position: center;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 20%, #000 40%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 30% 20%, #000 40%, transparent 78%);
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.04; letter-spacing: -.035em; margin: 14px 0 14px; font-weight: 800; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 46ch; margin: 0; }
.hero .accent { color: var(--brand); }
.hero-stats { display: flex; gap: 26px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hero-stats span { font-size: .8rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); background: var(--brand-tint); border: 1px solid color-mix(in srgb, var(--brand-2) 30%, var(--border)); padding: 6px 12px; border-radius: 999px; }

/* hero readout panel (an "instrument" preview) */
.hero-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.hero-panel .hp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-panel .hp-tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-panel .hp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-tint); }
.hero-panel .hp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px dashed var(--border); }
.hero-panel .hp-row:first-of-type { border-top: 0; }
.hero-panel .hp-row span { color: var(--muted); font-size: .9rem; }
.hero-panel .hp-row b { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--text); }
.hero-panel .hp-row b.up { color: var(--brand); }
.hero-panel .hp-big { font-family: var(--mono); font-weight: 700; font-size: 2.1rem; letter-spacing: -.03em; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ---- search ---- */
.search-box { max-width: 460px; margin: 22px 0 0; }
.search-box input {
  font-size: 1rem; box-shadow: var(--shadow-sm); border-radius: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); width: 100%;
}

/* ---- mobile menu ---- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .hero-panel { order: 2; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 2px; margin-left: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 10px 16px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; border-radius: 10px; }
}

/* ---- section headings ---- */
.section-title { font-size: 1.3rem; margin: 44px 0 16px; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.section-title .pill { font-family: var(--mono); font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); background: var(--brand-tint); padding: 5px 11px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--brand-2) 24%, var(--border)); }

/* ---- category bento ---- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 6px; }
.bento .tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px; min-height: 150px; transition: transform var(--tx) var(--ease), border-color var(--tx), box-shadow var(--tx);
}
.bento .tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand-2) 50%, var(--border)); box-shadow: var(--shadow); text-decoration: none; }
.bento .tile .ico { width: 48px; height: 48px; border-radius: 14px; color: #fff; display: grid; place-items: center; margin-bottom: 6px;
  background: linear-gradient(145deg, #ff9a4d 0%, #ff7a18 52%, #e8590c 100%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(120,40,0,.32), 0 8px 16px rgba(232,89,12,.30);
  transition: transform var(--tx) var(--ease); }
.bento .tile:hover .ico { transform: translateY(-2px) scale(1.03); }
.bento .tile .ico svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(120,40,0,.45)); }
.bento .tile h3 { margin: 0; font-size: 1.08rem; font-weight: 700; color: var(--text); }
.bento .tile p { margin: 0; color: var(--muted); font-size: .88rem; }
.bento .tile .go { margin-top: auto; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); padding-top: 10px; }
@media (max-width: 720px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .bento { grid-template-columns: 1fr; } }

/* ---- who it's for band ---- */
.people-band { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 52px 0; }
.people-copy h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; margin: 12px 0 12px; }
.people-copy p { color: var(--muted); font-size: 1.08rem; max-width: 46ch; margin: 0; }
.people-photo { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.people-photo::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--brand-2), transparent 62%); z-index: 2; }
.people-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14,17,23,.22)); pointer-events: none; }
.people-photo img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .people-band { grid-template-columns: 1fr; gap: 22px; } }

/* ---- category header illustration ---- */
.cat-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; margin: 8px 0 30px; }
.cat-hero-txt h1 { margin: 0 0 10px; }
.cat-hero-img { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.cat-hero-img::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--brand-2), transparent 62%); z-index: 2; }
.cat-hero-img img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .cat-hero { grid-template-columns: 1fr; gap: 18px; } }

/* ---- calculator cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.calc-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform var(--tx) var(--ease), box-shadow var(--tx) var(--ease), border-color var(--tx) var(--ease);
}
.calc-card::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--brand-2); border-radius: 3px 3px 0 0; transition: width var(--tx) var(--ease); }
.calc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-2) 45%, var(--border)); text-decoration: none; }
.calc-card:hover::after { width: 44px; }
.calc-card .ico {
  width: 50px; height: 50px; border-radius: 15px; color: #fff; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(145deg, #ff9a4d 0%, #ff7a18 52%, #e8590c 100%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(120,40,0,.32), 0 8px 16px rgba(232,89,12,.34);
  transition: transform var(--tx) var(--ease);
}
.calc-card:hover .ico { transform: translateY(-2px) scale(1.03); }
.calc-card .ico svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(120,40,0,.45)); }
.calc-card h3 { margin: 0 0 5px; font-size: 1.04rem; color: var(--text); font-weight: 700; }
.calc-card p { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.card-go { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; font-family: var(--mono); font-weight: 500; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.card-go .ico-arrow { width: 15px; height: 15px; transition: transform var(--tx); }
.calc-card:hover .card-go .ico-arrow { transform: translateX(4px); }

/* ---- breadcrumb ---- */
.breadcrumb { color: var(--muted); font-size: .85rem; margin: 24px 0 6px; overflow-wrap: anywhere; font-family: var(--mono); letter-spacing: .01em; }
.breadcrumb a { color: var(--muted); }

/* ---- calculator page ---- */
.calc-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 6px 0 8px; font-weight: 800; }
.calc-head .intro { color: var(--muted); font-size: 1.05rem; margin: 0 0 8px; max-width: 720px; }
.calc-shell {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 20px 0;
}
@media (max-width: 760px) { .calc-shell { grid-template-columns: 1fr; } }

.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-weight: 400; }
.control { position: relative; display: flex; align-items: center; }
.control .unit { position: absolute; right: 14px; color: var(--muted); font-size: .85rem; pointer-events: none; font-family: var(--mono); }
input, select {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px;
  transition: border-color var(--tx), box-shadow var(--tx);
}
input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--ring); }
select { appearance: none; cursor: pointer; }

/* results panel */
.results {
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; align-self: start;
  position: relative;
}
.results::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--brand-2); }
.result-primary { margin-bottom: 14px; padding-left: 12px; }
.result-primary .label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-family: var(--mono); }
.result-primary .value {
  font-family: var(--mono); font-size: clamp(2rem, 5.5vw, 2.7rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--brand);
}
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--border); min-width: 0; padding-left: 12px; }
.result-row .label { color: var(--muted); }
.result-row .value { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---- calculator diagram ---- */
.calc-diagram { margin: 22px 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.calc-diagram figcaption { color: var(--muted); font-size: .85rem; margin-top: 12px; font-family: var(--mono); letter-spacing: .01em; }
.calc-diagram svg { width: 100%; height: auto; display: block; }

/* content / article */
.article { max-width: 760px; overflow-wrap: break-word; }
.article h2 { font-size: 1.42rem; margin: 34px 0 10px; font-weight: 800; }
.article h3 { font-size: 1.1rem; margin: 22px 0 8px; font-weight: 700; }
.article p, .article li { color: var(--text); }
.article ul { padding-left: 1.2em; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 16px; margin: 10px 0; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq details[open] summary { color: var(--brand); }

/* related */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-grid a { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; font-weight: 700; color: var(--text); transition: border-color var(--tx), transform var(--tx); }
.related-grid a:hover { border-color: var(--brand-2); transform: translateY(-2px); text-decoration: none; }

/* ad slots */
.ad-slot { border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); text-align: center; padding: 18px; margin: 24px 0; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 32px 0; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer .spacer { margin-left: auto; }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .calc-card:hover, .related-grid a:hover, .bento .tile:hover { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- scientific calculator widget ---- */
.sci-calc { max-width: 460px; margin: 0 auto; }
.sci-display {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px; text-align: right; min-height: 92px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.sci-expr { color: var(--muted); font-size: 1rem; min-height: 1.3em; word-break: break-all; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sci-result { font-family: var(--mono); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; word-break: break-all; color: var(--brand); }
.sci-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sci-key {
  font-family: var(--mono); font-size: 1.02rem; font-weight: 500; cursor: pointer;
  padding: 14px 0; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: transform .1s, background var(--tx), border-color var(--tx);
  -webkit-tap-highlight-color: transparent;
}
.sci-key:hover { border-color: color-mix(in srgb, var(--brand-2) 45%, var(--border)); }
.sci-key:active { transform: translateY(1px); }
.sci-key.fn { background: var(--surface-2); color: var(--brand); font-size: .92rem; }
.sci-key.op { background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.sci-key.equals { background: var(--brand-2); color: var(--on-brand); border: none; font-weight: 700; }
.sci-key.wide { grid-column: span 2; }
@media (max-width: 480px) { .sci-key { padding: 13px 0; font-size: 1rem; } }

/* ---------------------------------------------------------- share bar */
.share-bar { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; flex-wrap: wrap; }
.share-label { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; transition: transform var(--tx), color var(--tx), background var(--tx), border-color var(--tx); }
.share-btn svg { width: 18px; height: 18px; }
.share-btn:hover { transform: translateY(-2px); color: #fff; text-decoration: none; }
.s-facebook:hover { background: #1877f2; border-color: #1877f2; }
.s-x:hover { background: #000; border-color: #000; }
.s-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.s-whatsapp:hover { background: #25d366; border-color: #25d366; }
.s-copy { position: relative; }
.s-copy:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-brand); }
.copied { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }

/* ---------------------------------------------------------- helpful feedback */
.feedback { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fb-q { font-weight: 700; }
.fb-actions { display: flex; gap: 10px; }
.fb-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 600; font-size: .92rem; font-family: inherit; transition: color var(--tx), background var(--tx), border-color var(--tx); }
.fb-btn svg { width: 18px; height: 18px; }
.fb-btn:hover:not(:disabled) { border-color: var(--brand-2); color: var(--brand); }
.fb-btn:disabled { cursor: default; }
.fb-up.chosen { color: #0e9f6e; border-color: #0e9f6e; background: color-mix(in srgb, #0e9f6e 12%, var(--surface)); }
.fb-down.chosen { color: #e0295a; border-color: #e0295a; background: color-mix(in srgb, #e0295a 12%, var(--surface)); }
.fb-count { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.fb-count:empty { display: none; }
.fb-msg { color: var(--muted); font-size: .9rem; }
.fb-msg:empty { display: none; }
@media (max-width: 560px) { .feedback { gap: 10px; } .fb-q { width: 100%; } }

/* ---------------------------------------------------------- discovery + internal links */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 600; transition: color var(--tx), background var(--tx), border-color var(--tx); }
.chip-link:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-tint); text-decoration: none; }
.more-cat { margin: 30px 0; }
.more-cat h2 { font-size: 1.15rem; margin-bottom: 12px; }
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 10px; }
.usecase { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.usecase h3 { font-size: 1rem; margin-bottom: 12px; }

/* ---------------------------------------------------------- disclaimer */
.disclaimer { margin: 16px 0; padding: 14px 18px; border-left: 4px solid var(--warn); border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: var(--text); font-size: .92rem; }

/* ---------------------------------------------------------- embed program */
.embed-box { margin: 24px 0; padding: 8px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.embed-box summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.embed-code { overflow-x: auto; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; white-space: pre-wrap; word-break: break-all; font-family: var(--mono); }
.btn-copy-embed { margin-top: 4px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--brand-2); background: var(--brand-tint); color: var(--brand); font-weight: 700; font-family: inherit; cursor: pointer; }
.btn-copy-embed:hover { background: var(--brand-2); color: var(--on-brand); }

/* minimal page used inside iframes */
.embed-body { background: var(--surface); padding: 0; }
.embed-wrap { max-width: 480px; margin: 0 auto; padding: 16px; }
.embed-title { font-size: 1.2rem; margin-bottom: 12px; }
.embed-credit { display: inline-block; margin-top: 14px; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---------------------------------------------------------- guides */
.guide-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.guide-list li { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--tx), transform var(--tx); }
.guide-list li:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--border)); transform: translateY(-2px); }
.guide-list li a { font-size: 1.05rem; }
.guide-list .muted { display: block; margin-top: 4px; font-size: .92rem; }

/* ---------------------------------------------------------- blog / learning hub */
.post-hero { display: block; width: 100%; max-width: 820px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 10px 0 6px; box-shadow: var(--shadow-sm); background: #0e1117; border: 1px solid var(--border); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 10px; }
.post-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform var(--tx), box-shadow var(--tx), border-color var(--tx); }
.post-thumb { display: block; width: calc(100% + 44px); margin: -22px -22px 14px -22px; aspect-ratio: 16 / 9; object-fit: cover; background: #0e1117; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-2) 45%, var(--border)); text-decoration: none; }
.post-cat { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.post-card h3 { margin: 0; font-size: 1.16rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.post-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.post-meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.blog-post .dek { font-size: 1.15rem; color: var(--muted); margin: 4px 0 20px; max-width: 62ch; }
.blog-post > .post-cat { display: block; margin-bottom: 6px; }
.blog-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 24px 0; padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--brand-2) 32%, var(--border)); border-radius: var(--radius); background: var(--brand-tint); }
.blog-cta-txt { max-width: 62%; }
.blog-cta-txt strong { display: block; font-size: 1.1rem; margin: 4px 0 4px; color: var(--text); }
.blog-cta-txt p { margin: 0; color: var(--muted); font-size: .92rem; }
.blog-cta-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cta-btn { display: inline-flex; align-items: center; background: var(--brand-2); color: var(--on-brand); font-weight: 800; padding: 12px 18px; border-radius: 11px; font-size: .95rem; white-space: nowrap; transition: transform var(--tx), filter var(--tx); }
.cta-btn:hover { transform: translateY(-2px); filter: brightness(1.05); text-decoration: none; }
.cta-guide { font-family: var(--mono); font-size: .8rem; color: var(--brand); font-weight: 500; }
@media (max-width: 620px) { .blog-cta-txt { max-width: 100%; } .cta-btn { width: 100%; justify-content: center; } }

/* ---------------------------------------------------------- language switcher */
.lang-switch { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.lang-switch svg { width: 16px; height: 16px; flex: none; }
.lang-switch select { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 7px 8px; font-size: .8rem; font-weight: 700; font-family: var(--mono); cursor: pointer; }
.lang-switch select:hover { border-color: var(--brand-2); }
.lang-switch + .currency-picker { margin-left: 10px; }
@media (max-width: 560px) { .lang-switch svg { display: none; } .lang-switch select { padding: 6px 6px; } }

/* ---------------------------------------------------------- currency picker */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.currency-picker { margin-left: auto; display: flex; align-items: center; }
.currency-picker select { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 7px 10px; font-size: .82rem; font-weight: 700; cursor: pointer; font-family: var(--mono); max-width: 122px; }
.currency-picker select:hover { border-color: var(--brand-2); }
.cur-label { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
@media (max-width: 720px) { .currency-picker select { max-width: 100px; } }
@media (max-width: 520px) { .cur-label { display: none; } }

/* ---------------------------------------------------------- currency converter widget */
.cc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.cc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.cc-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 130px; }
.cc-field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.cc-field input, .cc-field select { padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--text); font-size: 1rem; font-family: inherit; }
.cc-field input { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.cc-swap { align-self: center; margin-bottom: 2px; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--border); background: var(--brand-tint); color: var(--brand); font-size: 1.1rem; cursor: pointer; }
.cc-swap:hover { background: var(--brand-2); color: var(--on-brand); }
.cc-result { margin-top: 18px; font-family: var(--mono); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.cc-rate { margin-top: 4px; font-weight: 600; color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.cc-updated { margin-top: 8px; font-size: .85rem; }
.cc-note { margin-top: 10px; font-size: .82rem; }
@media (max-width: 520px) { .cc-swap { transform: rotate(90deg); } }
