:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --ink: #121a27;
  --muted: #647184;
  --line: #dde4ec;
  --accent: #5b57f4;
  --accent-dark: #4642d5;
  --accent-soft: #ecebff;
  --success: #159a68;
  --success-soft: #e8f7f1;
  --shadow: 0 18px 50px rgba(19, 30, 52, 0.10);
  --shadow-soft: 0 8px 24px rgba(19, 30, 52, 0.07);
  --radius: 20px;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(246,248,251,.9); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(221,228,236,.8); }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #6c67ff, #8a87ff); position: relative; box-shadow: 0 6px 15px rgba(91,87,244,.24); overflow: hidden; }
.brand-mark span { position: absolute; left: 6px; right: 6px; height: 4px; border-radius: 6px; background: #fff; transform: rotate(-27deg); }
.brand-mark span:nth-child(1){ top: 9px; }
.brand-mark span:nth-child(2){ top: 15px; opacity: .84; }
.brand-mark span:nth-child(3){ top: 21px; opacity: .68; }
.main-nav { display: flex; gap: 26px; color: #526072; font-size: 14px; font-weight: 700; }
.main-nav a:hover { color: var(--ink); }

.hero { padding: 72px 0 44px; background: radial-gradient(circle at 82% 35%, rgba(91,87,244,.13), transparent 32%), linear-gradient(180deg,#fbfcfe 0%, #f6f8fb 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 72px; align-items: center; }
.hero-grid.hero-solo { grid-template-columns: minmax(0, 1fr); max-width: 880px; margin: 0 auto; text-align: center; gap: 0; }
.hero-solo h1 { margin-left: auto; margin-right: auto; }
.hero-solo .hero-text { margin-left: auto; margin-right: auto; }
.hero-solo .hero-points, .hero-solo .hero-actions { justify-content: center; }
.eyebrow, .section-kicker { color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { display: inline-flex; gap: 9px; align-items: center; margin-bottom: 18px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(91,87,244,.12); }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 75px); line-height: .99; letter-spacing: -.06em; max-width: 760px; }
.hero h1 span { color: var(--accent); }
.hero-text { max-width: 690px; margin: 24px 0 0; font-size: 19px; color: var(--muted); }
.hero-points { display: flex; flex-wrap: wrap; gap: 16px 22px; margin-top: 26px; color: #4e5b6d; font-size: 14px; font-weight: 700; }
.hero-points > div { display: flex; align-items: center; gap: 8px; }
.check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--success); background: var(--success-soft); font-size: 12px; }
.hero-card { background: #111827; color: #fff; border-radius: 26px; padding: 28px; box-shadow: 0 24px 80px rgba(16,24,39,.28); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -40px; bottom: -48px; }
.mini-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mini-label, .remaining-label { display: block; font-size: 10px; letter-spacing: .14em; font-weight: 800; color: #9aa6b8; }
.mini-card-head strong { display: block; margin-top: 4px; font-size: 18px; }
.status-pill { font-size: 10px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #b9f2d9; background: rgba(21,154,104,.12); font-weight: 800; }
.mini-value { font-size: 58px; font-weight: 850; letter-spacing: -.05em; margin-top: 36px; }
.mini-value small { color: #9aa6b8; font-size: 19px; font-weight: 700; letter-spacing: 0; }
.mini-bar, .progress-track { height: 9px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.mini-bar { margin: 20px 0 28px; }
.mini-bar span { display:block; height:100%; border-radius:inherit; background: linear-gradient(90deg,#8a87ff,#68d9ae); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-stats div { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.09); }
.mini-stats span { display:block; color:#9aa6b8; font-size:11px; }
.mini-stats b { display:block; margin-top:3px; font-size:14px; }

.ad-wrap { display: flex; justify-content: center; }
.ad-placeholder { width: 100%; min-height: 76px; border: 1px dashed #cad2dc; border-radius: 14px; display: grid; place-items: center; color: #98a4b4; font-size: 10px; letter-spacing: .16em; font-weight: 800; background: rgba(255,255,255,.35); }
.top-ad { padding: 18px 0 8px; }
.mid-ad, .bottom-ad { margin-top: 52px; }

.calculator-section { padding-top: 72px; }
.section-heading { max-width: 720px; }
.center-heading { margin: 0 auto 28px; text-align: center; }
.section-heading h2 { margin: 10px 0 10px; font-size: clamp(31px, 4vw, 48px); line-height: 1.06; letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 16px; }
.calculator-shell { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.form-pane { padding: 36px; }
.results-pane { background: linear-gradient(180deg,#121927 0%, #0f1520 100%); color: #fff; padding: 34px; min-height: 100%; position: relative; }
.form-topline, .section-minihead, .results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.weight-unit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.weight-unit-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.form-topline h3, .section-minihead h3, .results-head h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.form-topline p, .section-minihead p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.link-button { border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 800; padding: 5px 0; }
.field-grid { display: grid; gap: 14px; margin-top: 20px; }
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: repeat(3, 1fr); }
.one-col { grid-template-columns: 1fr; }
.field { display: grid; gap: 8px; }
.field span { font-size: 12px; font-weight: 800; color: #111111; }
.field em { color: #333333; font-style: normal; font-weight: 600; }
.field input, .field select { width: 100%; height: 49px; padding: 0 14px; border: 1px solid #d6dee8; border-radius: 12px; background: #ffffff; color: var(--ink); outline: none; transition: .18s ease; }
.field input:focus, .field select:focus { border-color: rgba(91,87,244,.7); box-shadow: 0 0 0 4px rgba(91,87,244,.10); background:#fff; }
.form-divider { height:1px; background: var(--line); margin: 26px 0; }
.direct-mode-wrap { margin-top: 22px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.secondary-toggle { width: 100%; display:flex; justify-content:space-between; align-items:center; gap:16px; padding: 15px 16px; border: 0; background: #f8fafc; color: #3f4b5c; font-weight: 800; text-align: left; }
.toggle-arrow { font-size: 22px; color: var(--accent); line-height:1; transition: transform .18s ease; }
.secondary-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(45deg); }
.direct-mode { padding: 16px; background: #fff; }
.direct-mode p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.primary-button { width:100%; margin-top: 24px; border:0; border-radius: 14px; height: 56px; display:flex; align-items:center; justify-content:space-between; padding: 0 18px 0 20px; background: linear-gradient(135deg,var(--accent),#7a75ff); color:#fff; font-weight:850; box-shadow: 0 14px 30px rgba(91,87,244,.25); transition: transform .18s ease, box-shadow .18s ease; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(91,87,244,.31); }
.primary-button:active { transform: translateY(0); }
.privacy-note { display:flex; justify-content:center; gap:7px; margin: 13px 0 0; color:#8994a2; font-size:11px; }
.form-error { margin-top: 14px; border-radius: 12px; padding: 12px 14px; background: #fff0ef; border: 1px solid #f3cbc7; color:#a63d35; font-size: 13px; font-weight: 700; }
.hidden { display: none !important; }

.results-empty { min-height: 100%; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding: 50px 24px; }
.spool-illustration { width: 110px; height:110px; border-radius:50%; border: 12px solid rgba(255,255,255,.09); position:relative; margin-bottom: 22px; box-shadow: inset 0 0 0 16px rgba(255,255,255,.035); }
.spool-illustration::before, .spool-illustration::after { content:""; position:absolute; border-radius:50%; }
.spool-illustration::before { inset:23px; border:9px solid rgba(138,135,255,.55); }
.spool-illustration::after { width:26px;height:26px;left:30px;top:30px;background:#111827;border:4px solid rgba(255,255,255,.13); }
.results-empty h3 { margin:0; font-size: 23px; }
.results-empty p { max-width: 290px; margin: 9px 0 0; color:#98a5b7; font-size: 14px; }
.results-head h3 { margin-top:5px; color:#fff; }
.copy-button { border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.04); color:#d6dde8; border-radius:10px; height:38px; padding:0 12px; font-size:12px; font-weight:800; }
.copy-button:hover { background:rgba(255,255,255,.08); }
.remaining-hero { margin-top: 28px; display:flex; align-items:end; justify-content:space-between; gap:18px; }
.remaining-number { margin-top:3px; font-size: 62px; line-height: .95; letter-spacing:-.06em; font-weight: 900; }
.remaining-number small { margin-left:8px; font-size:17px; letter-spacing:0; color:#a8b3c4; }
.percent-circle { width:78px; height:78px; border-radius:50%; display:grid; place-items:center; border:5px solid rgba(255,255,255,.08); background: radial-gradient(circle at center, #121927 58%, transparent 59%), conic-gradient(#72e0b8 0 32.7%, rgba(255,255,255,.11) 32.7% 100%); font-weight:850; font-size:12px; }
.progress-track { margin-top: 22px; background: rgba(255,255,255,.08); }
.progress-track span { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#8a87ff,#68d9ae); transition:width .45s ease; }
.result-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.result-card { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.045); border-radius:15px; padding:15px; min-height: 108px; }
.result-card span { display:block; font-size:11px; color:#8d99ab; }
.result-card strong { display:block; margin-top:6px; color:#fff; font-size:20px; letter-spacing:-.03em; }
.result-card small { display:block; margin-top:2px; color:#a5b1c0; font-size:11px; }
.accuracy-note { margin-top: 14px; border:1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 13px; display:flex; gap:10px; color:#a5b1c0; font-size: 11px; line-height:1.45; }
.accuracy-note strong { color:#fff; }
.info-icon { flex:0 0 18px; width:18px; height:18px; border-radius:50%; display:grid; place-items:center; font-weight:900; font-size:11px; color:#c4c0ff; background:rgba(91,87,244,.25); }
.copy-confirm { position:absolute; right: 34px; top: 84px; background:#fff; color:#182232; padding:8px 11px; border-radius:9px; font-size:11px; font-weight:850; box-shadow: 0 10px 25px rgba(0,0,0,.18); }

.info-section { margin-top: 82px; padding: 82px 0; background:#eef2f7; }
.steps-grid { margin-top:34px; display:grid; grid-template-columns: repeat(3,1fr); gap:18px; }
.step-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:25px; box-shadow: var(--shadow-soft); }
.step-number { color:var(--accent); font-weight:900; letter-spacing:.08em; font-size:12px; }
.step-card h3 { margin:9px 0 7px; font-size:20px; }
.step-card p { margin:0; color:var(--muted); font-size:14px; }

.content-section { padding-top:82px; }
.content-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:60px; align-items:start; }
.article-copy { max-width:740px; }
.article-copy h2 { margin: 34px 0 11px; font-size:31px; line-height:1.08; letter-spacing:-.04em; }
.article-copy h2:first-of-type { margin-top:10px; }
.article-copy p { color:#5c697a; font-size:16px; }
.formula-box { margin: 25px 0; display:flex; flex-wrap:wrap; align-items:center; gap:11px; padding:18px; border:1px solid var(--line); border-radius:16px; background:#fff; font-size:14px; }
.formula-box span, .formula-box strong { padding:10px 12px; border-radius:10px; background:#f2f5f8; }
.formula-box b { color:#8490a0; }
.sidebar-card { position:sticky; top:100px; background:#111827; color:#fff; border-radius:20px; padding:24px; box-shadow:var(--shadow); }
.sidebar-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:rgba(138,135,255,.16); color:#aca9ff; font-size:24px; }
.sidebar-card h3 { margin:16px 0 8px; font-size:22px; letter-spacing:-.03em; }
.sidebar-card p { margin:0; color:#a5b1c0; font-size:14px; }
.text-link { display:inline-block; margin-top:18px; color:#c1beff; font-weight:850; font-size:13px; }

.faq-section { margin-top: 86px; padding:84px 0; background:#fff; border-top:1px solid var(--line); }
.faq-wrap { max-width: 900px; }
.faq-list { margin-top:34px; border-top:1px solid var(--line); }
details { border-bottom:1px solid var(--line); }
summary { list-style:none; cursor:pointer; padding:20px 0; font-size:16px; font-weight:800; display:flex; align-items:center; justify-content:space-between; gap:22px; }
summary::-webkit-details-marker { display:none; }
summary::after { content:'+'; font-size:24px; font-weight:400; color:#8894a3; }
details[open] summary::after { content:'−'; }
details p { margin: -4px 0 20px; max-width:760px; color:var(--muted); font-size:14px; }

.site-footer { margin-top: 80px; padding:42px 0 24px; background:#0f1520; color:#fff; }
.footer-grid { display:flex; justify-content:space-between; align-items:flex-start; gap:30px; }
.footer-brand { color:#fff; }
.site-footer p { margin:10px 0 0; color:#8d9aab; font-size:13px; }
.footer-links { display:flex; flex-wrap:wrap; gap:22px; color:#b5bfcc; font-size:13px; font-weight:700; }
.footer-links a:hover { color:#fff; }
.footer-bottom { margin-top:28px; padding-top:18px; border-top:1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; gap:20px; color:#718093; font-size:11px; }

.simple-page { min-height: 65vh; padding: 72px 0; }
.simple-page .content { max-width: 780px; }
.simple-page h1 { margin:0 0 12px; font-size:clamp(40px,5vw,58px); line-height:1; letter-spacing:-.055em; }
.simple-page .lead { color:var(--muted); font-size:18px; }
.simple-page h2 { margin:40px 0 10px; font-size:28px; letter-spacing:-.03em; }
.simple-page p, .simple-page li { color:#5c697a; font-size:16px; }
.simple-page a { color:var(--accent); font-weight:800; }

@media (max-width: 980px) {
  .hero-grid, .calculator-shell, .content-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 35px; }
  .hero-card { max-width: 620px; width:100%; }
  .sidebar-card { position:static; max-width:620px; }
  .results-pane { min-height: 560px; }
}
@media (max-width: 720px) {
  .container { width:min(var(--max), calc(100% - 28px)); }
  .main-nav { display:none; }
  .hero { padding-top:46px; }
  .hero h1 { font-size:clamp(40px,13vw,62px); }
  .hero-text { font-size:17px; }
  .hero-points { display:grid; grid-template-columns:1fr; gap:10px; }
  .form-pane, .results-pane { padding:22px; }
  .two-col, .three-col, .steps-grid { grid-template-columns:1fr; }
  .calculator-shell { border-radius:22px; }
  .result-grid { grid-template-columns:1fr; }
  .remaining-number { font-size:52px; }
  .content-layout { gap:35px; }
  .formula-box { align-items:stretch; flex-direction:column; }
  .footer-grid, .footer-bottom { flex-direction:column; }
  .footer-links { gap:14px 18px; }
}

/* Desktop side-rail ad space: intentionally kept outside the main content column.
   Two tiers so the rails NEVER overlap content:
   - 1520px and wider: full 160x600 skyscrapers, clear of the 1160px content column.
   - 1420-1519px (e.g. 1440px laptops): narrower 120x600 skyscrapers tucked just
     outside the content column.
   - Below 1420px: rails hidden (not enough room for a standard skyscraper). */
.desktop-rail {
  display: none;
}
@media (min-width: 1520px) {
  .desktop-rail {
    display: block;
    position: absolute;
    top: 220px;
    width: 160px;
    min-height: 600px;
    z-index: 1;
    pointer-events: none;
  }
  .rail-left { left: max(18px, calc(50% - 760px)); }
  .rail-right { right: max(18px, calc(50% - 760px)); }
  .rail-ad-placeholder {
    width: 160px;
    min-height: 600px;
    border: 1px dashed #d4dbe4;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #a2acb9;
    font-size: 9px;
    letter-spacing: .16em;
    font-weight: 800;
    background: rgba(255,255,255,.18);
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }
}
@media (min-width: 1420px) and (max-width: 1519px) {
  .desktop-rail {
    display: block;
    position: absolute;
    top: 220px;
    width: 120px;
    min-height: 600px;
    z-index: 1;
    pointer-events: none;
  }
  .rail-left { left: calc(50% - 710px); }
  .rail-right { right: calc(50% - 710px); }
  .rail-ad-placeholder {
    width: 120px;
    min-height: 600px;
    border: 1px dashed #d4dbe4;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #a2acb9;
    font-size: 9px;
    letter-spacing: .16em;
    font-weight: 800;
    background: rgba(255,255,255,.18);
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }
}
/* The rail wrapper is click-through (pointer-events: none) so empty rail space never
   blocks the page — but real AdSense ads inside it must stay clickable. */
.desktop-rail ins,
.desktop-rail iframe {
  pointer-events: auto;
}

/* Ultimate tracker additions */
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:30px; align-items:center; }
.hero-button { width:auto; min-width:180px; margin-top:0; text-decoration:none; }
.ghost-button { height:56px; display:inline-flex; align-items:center; justify-content:center; padding:0 20px; border-radius:14px; border:1px solid var(--line); background:#fff; color:#334055; font-weight:850; box-shadow: var(--shadow-soft); }
.ghost-button:hover { border-color:#bcc6d3; transform:translateY(-1px); }
.hero-card-foot { margin-top:20px; padding-top:16px; border-top:1px solid rgba(255,255,255,.09); color:#9aa6b8; font-size:11px; display:flex; align-items:center; gap:7px; }
.status-dot { width:8px; height:8px; border-radius:50%; display:inline-block; flex:0 0 8px; }
.status-dot.green { background:#67ddb1; box-shadow:0 0 0 4px rgba(103,221,177,.10); }
.status-dot.amber { background:#f2be5d; box-shadow:0 0 0 4px rgba(242,190,93,.10); }
.status-dot.red { background:#ef766d; box-shadow:0 0 0 4px rgba(239,118,109,.10); }
.inventory-section { padding-top:84px; }
.inventory-heading { display:flex; justify-content:space-between; gap:30px; align-items:end; max-width:none; }
.inventory-heading h2 { margin-bottom:8px; }
.inventory-actions-top { display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.small-button { width:auto; min-width:130px; height:46px; padding:0 16px; margin-top:0; }
.secondary-outline-button, .filter-status, .save-button, .outline-button { height:44px; padding:0 14px; border-radius:11px; border:1px solid var(--line); background:#fff; color:#4a5769; font-size:12px; font-weight:850; display:inline-flex; align-items:center; justify-content:center; }
.secondary-outline-button:hover, .filter-status:hover, .outline-button:hover { border-color:#bcc6d3; background:#fbfcfe; }
.file-button { cursor:pointer; }
.file-button input { display:none; }
.inventory-summary { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-top:28px; }
.summary-card { background:#fff; border:1px solid var(--line); border-radius:17px; padding:18px; box-shadow:var(--shadow-soft); }
.summary-card span { display:block; color:#778496; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.summary-card strong { display:block; margin-top:7px; font-size:26px; letter-spacing:-.04em; }
.summary-card small { display:block; margin-top:2px; color:#8b96a5; font-size:11px; }
.inventory-toolbar { display:flex; justify-content:space-between; gap:14px; margin:22px 0 18px; padding:12px; border:1px solid var(--line); border-radius:16px; background:#f9fbfd; }
.search-wrap { flex:1 1 auto; position:relative; max-width:620px; }
.search-wrap > span { position:absolute; left:13px; top:8px; color:#8e9aaa; font-size:20px; pointer-events:none; }
.search-wrap input { width:100%; height:42px; padding:0 14px 0 36px; border:1px solid #d6dee8; border-radius:11px; background:#fff; outline:none; }
.search-wrap input:focus { border-color:rgba(91,87,244,.7); box-shadow:0 0 0 4px rgba(91,87,244,.10); }
.filter-wrap { display:flex; gap:8px; align-items:center; }
.filter-wrap select { height:42px; min-width:160px; padding:0 12px; border:1px solid #d6dee8; border-radius:11px; background:#fff; color:#465367; font-weight:700; }
.filter-status[aria-pressed="true"], .filter-status.active { border-color:#eccd8a; background:#fff8e7; color:#9a6c14; }
.inventory-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.spool-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px; box-shadow:var(--shadow-soft); }
.spool-card-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.spool-material-label { color:#7c8796; font-size:10px; font-weight:850; letter-spacing:.09em; text-transform:uppercase; }
.spool-card h3 { margin:5px 0 0; font-size:21px; letter-spacing:-.03em; }
.dot-sep { color:#a5afbb; padding:0 5px; }
.spool-meta { min-height:18px; margin-top:5px; color:#7b8797; font-size:11px; }
.status-badge { display:inline-flex; align-items:center; gap:7px; border-radius:999px; padding:7px 9px; white-space:nowrap; font-size:10px; font-weight:850; }
.status-badge.green { background:#eaf8f2; color:#167654; }
.status-badge.amber { background:#fff6df; color:#976d17; }
.status-badge.red { background:#fff0ee; color:#a2453d; }
.spool-progress-wrap { display:grid; grid-template-columns:1fr auto; align-items:center; gap:11px; margin-top:18px; }
.spool-progress { height:8px; border-radius:99px; background:#eef2f6; overflow:hidden; }
.spool-progress span { height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#7a76ff,#64d7aa); }
.spool-progress-wrap > strong { font-size:11px; color:#647184; }
.spool-primary { display:grid; grid-template-columns:1fr 1.25fr; gap:12px; margin-top:18px; padding-top:18px; border-top:1px solid #edf1f4; }
.spool-primary span, .spool-stat-grid span { display:block; color:#111111; font-size:10px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.spool-primary strong { display:block; margin-top:5px; font-size:21px; letter-spacing:-.04em; }
.spool-stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:15px; }
.spool-stat-grid > div { padding:12px; background:#f7f9fb; border-radius:12px; }
.spool-stat-grid strong { display:block; margin-top:4px; font-size:14px; }
.spool-card-actions { display:flex; gap:8px; margin-top:16px; padding-top:15px; border-top:1px solid #edf1f4; }
.spool-card-actions button { border:0; background:transparent; color:#5f6b7c; font-size:12px; font-weight:850; padding:0; }
.spool-card-actions button:hover { color:var(--accent); }
.spool-card-actions .danger-action:hover { color:#b24e46; }
.no-match { grid-column:1/-1; padding:50px 20px; text-align:center; border:1px dashed #cbd4df; border-radius:18px; color:#718094; }
.no-match h3 { margin:0 0 4px; color:#263246; }
.no-match p { margin:0; font-size:13px; }
.inventory-empty { padding:58px 20px; text-align:center; border:1px dashed #cbd4df; border-radius:20px; background:rgba(255,255,255,.55); }
.empty-icon { width:58px; height:58px; margin:0 auto 14px; border-radius:18px; display:grid; place-items:center; background:#ecebff; color:var(--accent); font-size:32px; }
.inventory-empty h3 { margin:0; font-size:22px; }
.inventory-empty p { max-width:460px; margin:7px auto 18px; color:var(--muted); font-size:14px; }
.inventory-note { margin:18px 2px 0; color:#7d8997; font-size:11px; }
.inventory-note strong { color:#4a5668; }
.result-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; position:relative; }
.save-button { border-color:rgba(103,221,177,.25); background:rgba(103,221,177,.10); color:#bdf1dc; }
.save-button:hover { background:rgba(103,221,177,.15); }
.result-footer-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px; }
.outline-button { border-color:rgba(255,255,255,.14); background:transparent; color:#e0e6ee; }
.outline-button:hover { background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.22); }
.light-link { margin-top:0; color:#aaa7ff; }
.muted-result { color:#6f7a8d; }
.spool-dialog { border:0; padding:0; max-width:min(760px, calc(100% - 28px)); width:760px; border-radius:24px; background:transparent; box-shadow:0 30px 100px rgba(15,21,32,.35); }
.spool-dialog::backdrop { background:rgba(12,18,28,.58); backdrop-filter:blur(4px); }
.spool-dialog-card { background:#fff; border:1px solid var(--line); border-radius:24px; padding:26px; box-shadow:var(--shadow); }
.dialog-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.dialog-head h2 { margin:7px 0 4px; font-size:29px; letter-spacing:-.04em; }
.dialog-head p { margin:0; color:var(--muted); font-size:13px; }
.icon-close { border:0; width:38px; height:38px; border-radius:10px; background:#f2f5f8; color:#667386; font-size:24px; line-height:1; }
.dialog-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:22px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }
.dialog-error { margin-top:14px; border-radius:12px; padding:11px 13px; background:#fff0ef; border:1px solid #f3cbc7; color:#a63d35; font-size:12px; font-weight:700; }
.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; }
.compact-gap { margin-top:12px; }

@media (max-width: 980px) {
  .inventory-heading { display:block; }
  .inventory-actions-top { margin-top:18px; justify-content:flex-start; }
  .inventory-summary { grid-template-columns:repeat(3,1fr); }
  .inventory-grid { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .hero-actions { display:grid; grid-template-columns:1fr; }
  .hero-button, .ghost-button { width:100%; }
  .inventory-summary { grid-template-columns:1fr 1fr; }
  .inventory-toolbar { flex-direction:column; }
  .search-wrap { max-width:none; }
  .filter-wrap { display:grid; grid-template-columns:1fr 1fr; }
  .filter-wrap select { min-width:0; width:100%; }
  .inventory-actions-top { display:grid; grid-template-columns:1fr 1fr; }
  .inventory-actions-top .small-button { grid-column:1/-1; width:100%; }
  .dialog-grid { grid-template-columns:1fr; }
  .spool-dialog-card { padding:20px; }
  .spool-primary { grid-template-columns:1fr; }
  .spool-stat-grid { grid-template-columns:1fr 1fr; }
  .result-actions { justify-content:flex-start; margin-top:10px; }
}

/* ============================================================
   HERO MACHINE ANIMATION — replaces the old static demo numbers
   in the hero card with an animated scene: a spool feeds filament
   up into a heated 3D-printer hotend, and molten drops fall from
   the nozzle into a clock gauge whose hands show printing time
   results display. script.js drives it through window.FilamentGauge
   (see assets/gauge-results.js). Does not affect the AdSense
   rail/slot placeholders elsewhere on the page.
   ============================================================ */
.hero-card--machine { padding-bottom: 20px; }
.gauge-sub { margin: 8px 0 0; color: #9aa6b8; font-size: 13px; }
.gauge-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.09); }
.gauge-results .machine-layout { margin-top: 14px; }

/* machine visual left, readouts + weigh-in right — panels line up side by side */
.machine-layout { margin-top: 18px; }
.machine-scene { margin-top: 0; }
.machine-side { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.machine-side .machine-readout { margin-top: 0; }
.machine-side .spool-weigh-in { margin-top: 0; }
.machine-svg { width: 100%; height: auto; display: block; }

/* extruder / hotend assembly */
.inlet-tube { fill: #0f172a; stroke: #475569; stroke-width: 2; }
.heater-block { fill: #1c2536; stroke: #f0a13c; stroke-opacity: .55; stroke-width: 2; }
.heater-temp { fill: #f0a13c; font-size: 12px; font-weight: 800; font-family: Inter, sans-serif; }
.nozzle { fill: url(#brass); }
.nozzle-tip { fill: #f0a13c; }
.scene-label { fill: #7d8da8; font-size: 10px; letter-spacing: 2px; font-weight: 700; font-family: Inter, sans-serif; }

/* heat glow flicker behind the heater block */
.heat-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: heat-flicker 1.7s ease-in-out infinite;
}
@keyframes heat-flicker { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }

/* heat waves rising off the block */
.heat-wave {
  opacity: 0;
  transform-box: fill-box;
  animation: heat-rise 2.2s ease-in-out infinite;
}
.heat-wave.hw2 { animation-delay: 1.1s; }
@keyframes heat-rise {
  0% { transform: translateY(6px); opacity: 0; }
  35% { opacity: .9; }
  100% { transform: translateY(-8px); opacity: 0; }
}

/* molten drops falling from the nozzle into the clock gauge */
.drop {
  opacity: 0;
  transform-box: fill-box;
  animation: drop-fall 2.4s cubic-bezier(.45, 0, .7, .4) infinite;
}
.drop.d2 { animation-delay: .8s; }
.drop.d3 { animation-delay: 1.6s; }
@keyframes drop-fall {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: translateY(22px) scale(1); opacity: 1; }
  100% { transform: translateY(28px) scale(1.7, .55); opacity: 0; }
}

/* filament path from spool up into the extruder (dashed, animated so it looks like it's feeding) */
.feed-path {
  fill: none;
  stroke: #2f7bf6;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  animation: feed-flow 0.8s linear infinite;
}
@keyframes feed-flow { to { stroke-dashoffset: -18; } }
/* red neon clock hand: slow clockwise sweep behind the boxes, LED glow */
#clockNeedle {
  transform-origin: 195px 282px;
  animation: needle-spin 60s linear infinite;
  filter: drop-shadow(0 0 3px #ff6a00) drop-shadow(0 0 10px #ff2d00) drop-shadow(0 0 22px rgba(255,45,0,.75));
}
@keyframes needle-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .feed-path, .heat-glow, .heat-wave, .drop, #clockNeedle { animation: none; }
  .drop { opacity: 0; }
}

/* calculating state: the machine "thinks" ~10s before revealing weigh-in results */
.calculating #clockNeedle { animation-duration: 1.5s; }
.calculating .spool-spin { animation-duration: 0.9s; }
.calculating #digiBars { animation: calc-pulse .7s ease-in-out infinite; }
@keyframes calc-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .calculating #digiBars { animation: none; } }

/* spool, top-left of the scene */
.spool-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: spool-spin 7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .spool-spin { animation: none; } }
@keyframes spool-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.spool-flange { fill: #cba876; }
.spool-ticks line { stroke: #a9803f; stroke-width: 2.5; stroke-linecap: round; opacity: .55; }
.spool-coil { fill: #2f7bf6; transition: r 0.6s linear; }
.spool-rim { fill: none; stroke: #9c7a49; stroke-width: 3; }
.spool-core { fill: #cba876; stroke: #a9803f; stroke-width: 2; }
.spool-hole { fill: #5b4326; }

/* luxury LED round gauge — metallic bezel, dark glass face, amber digits, rising bar meter */
.gauge-body { stroke: none; }
.gauge-ring { stroke: #00d5ff; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(0, 213, 255, .9)); }
.gauge-bezel { stroke: #ffa02e; stroke-opacity: .95; stroke-width: 1.5; filter: drop-shadow(0 0 3px rgba(255, 160, 46, .65)); }
.gauge-scale { fill: none; stroke: #00d5ff; stroke-opacity: .8; stroke-width: 2; filter: drop-shadow(0 0 3px rgba(0, 213, 255, .8)); }
.gauge-ticks line { stroke: #00d5ff; stroke-opacity: .65; stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(0, 213, 255, .7)); }
/* photo-style mini readout boxes — numbers tick up/down with the demo */
.mini-box {
  fill: #ffffff;
  stroke: #ffa02e;
  stroke-opacity: .95;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 3px rgba(255, 160, 46, .65));
}
.mini-label {
  fill: #000000; font-size: 8px; letter-spacing: .5px; font-weight: 700;
  font-family: Inter, sans-serif;
}
.mini-num {
  fill: #000000; font-size: 12px; font-weight: 800; letter-spacing: .5px;
  font-family: 'Courier New', ui-monospace, monospace;
}
.digi-bars rect {
  fill: url(#barGrad);
  filter: drop-shadow(0 0 3px rgba(255, 182, 72, .7));
}
.gauge-screen {
  fill: #232e42;
  stroke: #ffa02e;
  stroke-opacity: .95;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 3px rgba(255, 160, 46, .65));
}
.scale-tick { stroke: #9aa6b8; stroke-width: 1; opacity: .85; }
.scale-label {
  fill: #dbe2ec; font-size: 5.5px; font-weight: 700;
  font-family: 'Courier New', ui-monospace, monospace;
}
/* hot nozzle: red-hot tip breathing */
.tip-glow {
  opacity: .35;
  filter: blur(4px);
  animation: tip-pulse 1.6s ease-in-out infinite;
}
@keyframes tip-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .6; }
}

/* big digital time readout under the clock — hours/minutes + feet/inches and metres */
.clock-digital { margin: 8px auto 0; text-align: center; font-family: 'Courier New', ui-monospace, monospace; }
.clock-digital b { display: block; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.clock-digital span { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #c6cfdb; margin-top: 2px; }
.clock-digital em { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: #ffd98a; margin-top: 4px; }

/* boxed digital readout beneath the scene — hours, feet/inches and metres */
.machine-readout {
  margin-top: 10px;
  background: #fffdf7;
  border: 1px solid #e8ddc2;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.readout-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-family: 'Courier New', ui-monospace, monospace; }
.readout-row span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #111111; white-space: nowrap; font-weight: 700; }
.readout-row b { font-size: 13px; color: #0d1420; font-weight: 800; text-align: right; }

/* weigh-your-spool panel inside the dark hero card (cream to match the readout box) */
.spool-weigh-in {
  margin-top: 14px;
  background: #fffdf7;
  border: 1px solid #e8ddc2;
  border-radius: 12px;
  padding: 14px 16px;
}
.weigh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.weigh-head h4 { margin: 0 !important; }
.weigh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.weigh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.weigh-field > span { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #111111; white-space: nowrap; }
.weigh-field > span em { font-style: normal; color: #333333; }
.weigh-field input {
  width: 100%; height: 46px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid #d9cba6; border-radius: 10px; background: #fff;
  color: #0d1420; font-size: 16px; font-weight: 700;
  font-family: 'Courier New', ui-monospace, monospace;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.weigh-field input:focus { border-color: #b89b5e; box-shadow: 0 0 0 3px rgba(184, 155, 94, .18); }
.weigh-field input::placeholder { color: #b3a789; font-weight: 400; }
.spool-weigh-in .preset-chips { margin-top: 10px; }
.unit-toggle { display: inline-flex; background: #efe7d0; border: 1px solid #e8ddc2; border-radius: 999px; padding: 2px; flex: none; }
.unit-toggle button {
  border: 0; background: transparent; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; color: #4a3a20; cursor: pointer;
}
.unit-toggle button.active { background: #0d1420; color: #fff; }
.spool-weigh-in h4 { margin: 0 0 4px; font-size: 15px; color: #0d1420; }
.spool-weigh-in > p { margin: 0 0 10px; font-size: 12px; color: #111111; }
.spool-weigh-in > p b { color: #0d1420; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset-chips button {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  border: 1px solid #e8ddc2; background: #ffffff; color: #4a3a20; cursor: pointer;
}
.preset-chips button:hover { background: #f6efdc; }
.live-note { margin: 10px 0 0 !important; font-size: 12px; color: #111111; }
.live-note b { color: #0d1420; }
