:root {
  --ink: #15211d;
  --ink-2: #25352f;
  --muted: #65716c;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --line: #d9ddd6;
  --lime: #d9f067;
  --mint: #bce5d1;
  --coral: #f1a28f;
  --sky: #a9d7ec;
  --yellow: #f4cf65;
  --focus: #126cda;
  --shadow: 0 18px 45px rgba(21, 33, 29, .09);
  --content: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.55; }
a { color: inherit; }
button, input, textarea { font: inherit; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: .7rem 1rem; z-index: 20; }
.skip:focus { left: 8px; }

.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; padding: .75rem max(1.25rem, calc((100vw - var(--content)) / 2)); background: rgba(245, 246, 241, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 190px; font-size: .95rem; font-weight: 850; text-decoration: none; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--ink); color: var(--lime); border-radius: 5px; font-size: .7rem; }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav a { display: inline-flex; align-items: center; min-height: 42px; padding: .65rem .8rem; border-radius: 5px; color: #34413c; font-size: .86rem; font-weight: 720; text-decoration: none; }
.nav a:hover, .nav a:focus-visible { background: #e7e9e3; color: var(--ink); }
.nav .nav-cta { gap: .75rem; margin-left: .55rem; padding-inline: 1rem; background: var(--ink); color: #fff; }
.nav .nav-cta:hover, .nav .nav-cta:focus-visible { background: var(--ink-2); color: var(--lime); }
.menu-button { display: none; align-items: center; gap: .45rem; min-height: 44px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); padding: 0 .9rem; font-weight: 750; }

.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); align-items: stretch; min-height: min(620px, calc(100vh - 76px)); background: var(--ink); color: #fff; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 8vw, 7rem) max(1.25rem, calc((100vw - var(--content)) / 2)); padding-right: clamp(2rem, 6vw, 5rem); }
.eyebrow { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.2rem; color: #b8c4be; font-size: .75rem; font-weight: 820; text-transform: uppercase; }
.eyebrow > span { width: 24px; height: 2px; background: var(--lime); }
.hero h1 { max-width: 820px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.15rem, 6.2vw, 6.4rem); font-weight: 500; line-height: .91; }
.hero h1 em { color: var(--lime); font-weight: 500; }
.hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 1.7rem 0 0; color: #c4cec9; font-size: clamp(1rem, 1.5vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.35rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .85rem; min-height: 48px; border: 1px solid var(--line); border-radius: 5px; padding: .74rem 1rem; background: #fff; color: var(--ink); cursor: pointer; font-weight: 780; text-decoration: none; }
.button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(21, 33, 29, .12); }
.button.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.button.secondary { background: #fff; }
.text-link { display: inline-flex; gap: .65rem; color: #fff; font-weight: 750; text-underline-offset: 5px; }
.text-link:hover { color: var(--lime); }

.signal-panel { align-self: center; width: min(100%, 430px); margin: 2rem max(1.25rem, calc((100vw - var(--content)) / 2)) 2rem 0; background: #f2f4ec; color: var(--ink); border: 1px solid #69736e; box-shadow: 14px 14px 0 var(--lime); }
.signal-heading { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.status { display: flex; align-items: center; gap: .4rem; color: var(--ink); }
.status i, .privacy-note i { width: 7px; height: 7px; border-radius: 50%; background: #37a365; box-shadow: 0 0 0 4px rgba(55, 163, 101, .13); }
.signal-metric { display: flex; align-items: end; gap: 1.2rem; padding: 1.25rem 1rem 1.35rem; background: #fff; border-bottom: 1px solid var(--line); }
.signal-metric strong { font-family: Georgia, "Times New Roman", serif; font-size: 5.5rem; font-weight: 500; line-height: .75; }
.signal-metric span { font-size: .8rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.signal-row { display: flex; justify-content: space-between; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font-size: .84rem; }
.signal-row b { color: var(--muted); font-size: .72rem; }
.signal-panel > p { margin: 0; padding: .75rem 1rem; color: var(--muted); font-size: .75rem; }

.category-rail { display: flex; align-items: center; gap: 1.5rem; min-height: 60px; padding: .7rem max(1.25rem, calc((100vw - var(--content)) / 2)); overflow-x: auto; background: var(--yellow); border-bottom: 1px solid rgba(21, 33, 29, .2); white-space: nowrap; }
.category-rail span { color: rgba(21, 33, 29, .6); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.category-rail a { font-size: .84rem; font-weight: 780; text-underline-offset: 4px; }

.marketplace-strip { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(2.8rem, 5vw, 4.5rem) max(1.25rem, calc((100vw - var(--content)) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.marketplace-strip h2 { max-width: 540px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.5vw, 3.5rem); font-weight: 500; line-height: 1; }
.marketplace-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.marketplace-links a { display: grid; grid-template-columns: 1fr auto; min-height: 150px; padding: 1.1rem; background: var(--paper); text-decoration: none; }
.marketplace-links a:hover, .marketplace-links a:focus-visible { background: var(--lime); }
.marketplace-links span { grid-column: 1 / -1; color: var(--muted); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.marketplace-links b { align-self: end; max-width: 120px; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 500; line-height: 1.05; }
.marketplace-links i { align-self: end; font-style: normal; font-size: 1.25rem; }
.tool-card.category-marketplace { border-top-color: var(--lime); }

.section { padding: clamp(3.5rem, 7vw, 6.5rem) max(1.25rem, calc((100vw - var(--content)) / 2)); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 480px); gap: 3rem; align-items: end; margin-bottom: 2.3rem; }
.section-index { margin: 0 0 .7rem; color: #718078; font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.section-head h2, .details-intro h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 4vw, 4rem); font-weight: 500; line-height: .98; }
.section-head > p, .details-intro > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tool-card { position: relative; display: flex; flex-direction: column; min-height: 285px; padding: 1.25rem; background: var(--surface); border-top: 5px solid var(--mint); }
.tool-card.category-finance { border-top-color: var(--sky); }
.tool-card.category-advertising { border-top-color: var(--coral); }
.tool-card.category-inventory { border-top-color: var(--yellow); }
.tool-card.category-logistics { border-top-color: #b7b8e8; }
.tool-card.category-e-commerce { border-top-color: #e9b9da; }
.tool-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.tool-meta span { font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.tool-meta b { font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 500; }
.tool-card h3 { margin: 1.65rem 0 .75rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.08; }
.tool-card h3 a { text-decoration: none; }
.tool-card h3 a::after { position: absolute; inset: 0; content: ""; }
.tool-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.card-action { display: flex; justify-content: space-between; margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .78rem; font-weight: 820; text-decoration: none; }
.tool-card:hover { z-index: 1; background: #fbfcf8; box-shadow: var(--shadow); transform: translateY(-3px); }

.band { background: var(--ink); color: #fff; }
.band .section-index, .band .section-head > p { color: #9caaa3; }
.band .section-head h2 { color: var(--lime); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #46534e; border-bottom: 1px solid #46534e; }
.trust-grid article { padding: 2rem; border-right: 1px solid #46534e; }
.trust-grid article:last-child { border-right: 0; }
.trust-grid b { color: var(--lime); font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 500; }
.trust-grid h3 { margin: 2.8rem 0 .65rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.trust-grid p { margin: 0; color: #aebbb5; font-size: .9rem; }

.guide-list { border-top: 1px solid var(--ink); }
.guide-row { display: grid; grid-template-columns: 130px minmax(220px, .9fr) minmax(300px, 1.2fr) 32px; gap: 1.25rem; align-items: center; padding: 1.25rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-row > span { color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.guide-row strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; line-height: 1.15; }
.guide-row small { color: var(--muted); }
.guide-row > b { font-size: 1.2rem; text-align: right; }
.guide-row:hover { padding-inline: .75rem; background: #fff; }

.page-title { padding: clamp(3rem, 6vw, 5.5rem) max(1.25rem, calc((100vw - var(--content)) / 2)); background: var(--ink); color: #fff; }
.breadcrumbs { display: flex; gap: .6rem; margin: 0 0 2.5rem; color: #96a59e; font-size: .76rem; }
.breadcrumbs a { color: #fff; }
.page-title h1 { max-width: 980px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 5.6vw, 5.5rem); font-weight: 500; line-height: .95; }
.page-title > p:not(.eyebrow):not(.breadcrumbs) { max-width: 690px; margin: 1.3rem 0 0; color: #b7c3bd; font-size: 1.08rem; }
.privacy-note { display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.5rem; color: #b7c3bd; font-size: .76rem; font-weight: 720; }

.calc-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 1px; max-width: var(--content); margin: -1.5rem auto 0; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calculator-form, .result-panel { background: #fff; padding: clamp(1.25rem, 3vw, 2.2rem); }
.panel-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
.panel-heading > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; background: var(--ink); color: var(--lime); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; }
.panel-heading p { margin: 0 0 .1rem; color: var(--muted); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.panel-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 500; }
.calculator-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.calculator-form .panel-heading, .form-actions { grid-column: 1 / -1; }
.calculator-form label { display: grid; gap: .38rem; min-width: 0; font-size: .82rem; font-weight: 780; }
.calculator-form input, .calculator-form select, .installer input, textarea { width: 100%; min-height: 50px; border: 1px solid #b8c0bb; border-radius: 4px; padding: .75rem .85rem; background: #fafbf8; color: var(--ink); }
.calculator-form input:hover, .calculator-form select:hover { border-color: #7c8881; }
.calculator-form input:focus, .calculator-form select:focus { border-color: var(--ink); background: #fff; outline: 3px solid rgba(18, 108, 218, .14); }
.calculator-form small { color: var(--muted); font-size: .68rem; font-weight: 450; line-height: 1.35; }
.form-actions { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: .8rem; }
.result-panel { display: flex; flex-direction: column; min-height: 385px; background: #eef1e9; }
.result-panel output { display: block; margin: auto 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 500; line-height: .94; overflow-wrap: anywhere; }
.result-panel > p { min-height: 3rem; margin: 0 0 1.5rem; color: var(--muted); font-size: .86rem; }
.result-breakdown { display: grid; grid-template-columns: 1fr auto; gap: .55rem 1rem; margin: 0 0 1.5rem; padding: 1rem 0; border-top: 1px solid rgba(21, 33, 29, .18); border-bottom: 1px solid rgba(21, 33, 29, .18); font-size: .78rem; }
.result-breakdown[hidden] { display: none; }
.result-breakdown dt { color: var(--ink-2); }
.result-breakdown dd { margin: 0; font-weight: 820; text-align: right; }
.calc-layout[data-state="success"] .result-panel { background: var(--lime); }
.calc-layout[data-state="error"] .result-panel output { color: #9c3423; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.result-baseline { display: flex; justify-content: space-between; gap: 1rem; padding-top: .8rem; border-top: 1px solid rgba(21, 33, 29, .2); color: var(--muted); font-size: .62rem; font-weight: 780; text-transform: uppercase; }

.details { padding-top: clamp(4rem, 8vw, 7rem); }
.details-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 2rem; align-items: end; margin-bottom: 2rem; }
.details-intro .section-index { grid-column: 1 / -1; margin-bottom: -1rem; }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.details-grid article { min-width: 0; padding: 1.5rem; background: #fff; }
.details-grid article > span { color: var(--muted); font-size: .69rem; font-weight: 850; text-transform: uppercase; }
.details pre { margin: 2rem 0 0; overflow: auto; white-space: pre-wrap; color: var(--ink); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1rem; }
.details dl { display: grid; grid-template-columns: minmax(110px, .45fr) 1fr; gap: .8rem 1rem; margin: 2rem 0 0; }
.details dt { font-weight: 780; }
.details dd { margin: 0; color: var(--muted); }
.details > h2 { margin-top: 3rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chips a { padding: .6rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: .82rem; font-weight: 720; text-decoration: none; }
.source-list { display: grid; gap: .6rem; padding-left: 1.15rem; }
.source-list a { font-weight: 720; text-underline-offset: 4px; }
details { padding: 1rem 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 780; }

.article { max-width: 900px; padding: clamp(3rem, 7vw, 6rem) max(1.25rem, calc((100vw - var(--content)) / 2)); }
.article h1 { margin: 0 0 1.5rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 5vw, 5rem); font-weight: 500; line-height: .98; }
.article h2 { margin-top: 2.5rem; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.article p { color: #53605a; }
.lead { font-size: 1.2rem; }

.footer { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 2.5rem max(1.25rem, calc((100vw - var(--content)) / 2)); background: #0e1714; color: #f5f7f3; }
.footer strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 500; }
.footer p { color: #8f9e97; font-size: .8rem; }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 1rem; }
.footer a { color: #bdc8c2; font-size: .76rem; text-underline-offset: 4px; }

.consent-bar { position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; padding: 1.15rem max(1.25rem, calc((100vw - var(--content)) / 2)); background: #f5f6f1; border-top: 4px solid var(--lime); box-shadow: 0 -18px 45px rgba(14, 23, 20, .18); }
.consent-bar[hidden] { display: none; }
.consent-copy { display: grid; grid-template-columns: 110px minmax(0, 680px); align-items: start; gap: 1rem; }
.consent-copy > span { color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.consent-copy p { margin: 0; color: var(--ink-2); font-size: .84rem; }
.consent-actions { display: flex; align-items: center; gap: .8rem; }
.consent-actions .button { min-height: 42px; background: var(--ink); border-color: var(--ink); color: #fff; font-size: .78rem; }
.consent-decline { min-height: 42px; padding: .55rem .7rem; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: .76rem; font-weight: 760; text-decoration: underline; text-underline-offset: 4px; }
.consent-actions a { color: var(--muted); font-size: .72rem; }

.admin-shell { display: grid; grid-template-columns: 260px 1fr; background: #f4f7f5; }
.admin-nav { min-height: 100vh; background: var(--ink); color: #fff; padding: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.admin-nav a { padding: .65rem; border-radius: 5px; text-decoration: none; }
.admin-nav a:hover, .admin-nav a:focus-visible { background: var(--ink-2); }
.admin-main { padding: 2rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.metric-grid div, .admin-section, .installer form { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1rem; }
.metric-grid strong { display: block; font-size: 2rem; }
.admin-section { margin-top: 1rem; }
.installer { max-width: 760px; margin: auto; padding: 2rem; }
.installer form, .installer label { display: grid; gap: 1rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tool-card, .guide-row, .button { transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, padding .18s ease; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-bottom: 2rem; }
  .signal-panel { width: auto; margin: 0 1.25rem 3.5rem; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-row { grid-template-columns: 100px 1fr 28px; }
  .guide-row small { grid-column: 2 / 3; }
}

@media (max-width: 760px) {
  .site-header { min-height: 66px; }
  .menu-button { display: inline-flex; }
  .nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 58px; flex-direction: column; align-items: stretch; padding: .5rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav .nav-cta { margin: .3rem 0 0; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .signal-panel { box-shadow: 8px 8px 0 var(--lime); }
  .category-rail { gap: 1.1rem; }
  .section-head, .details-intro { grid-template-columns: 1fr; gap: 1rem; }
  .marketplace-strip, .marketplace-links { grid-template-columns: 1fr; }
  .marketplace-links a { min-height: 110px; }
  .tool-grid, .trust-grid, .calc-layout, .details-grid, .admin-shell { grid-template-columns: 1fr; }
  .tool-card { min-height: 245px; }
  .trust-grid article { border-right: 0; border-bottom: 1px solid #46534e; }
  .trust-grid article:last-child { border-bottom: 0; }
  .trust-grid h3 { margin-top: 1.4rem; }
  .guide-row { grid-template-columns: 1fr 30px; gap: .5rem; }
  .guide-row > span, .guide-row small { grid-column: 1 / -1; }
  .guide-row > b { grid-column: 2; grid-row: 2; }
  .calculator-form { grid-template-columns: 1fr; }
  .calc-layout { margin: 0; border-inline: 0; }
  .result-panel { min-height: 320px; }
  .details-intro .section-index { margin-bottom: 0; }
  .details dl { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; }
  .footer nav { justify-content: start; }
  .consent-bar, .consent-copy { grid-template-columns: 1fr; gap: .7rem; }
  .consent-actions { align-items: stretch; flex-direction: column; }
  .consent-actions .button, .consent-decline { width: 100%; }
  .admin-nav { min-height: auto; }
}

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