/*
Theme Name: WorldCalculate Theme
Theme URI: https://worldcalculate.com
Author: Hassan ALRowaie
Author URI: https://www.instagram.com/hassan_alrowaie/
Description: Custom WordPress theme for advanced calculators built without plugins.
Version: 4.159.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: worldcalculate-theme
Tags: custom-theme, calculator, responsive, modern, no-plugins
*/

/* Brand-new editorial identity: warm paper, pine green, amber accents,
   serif display type. Fast by construction: system stacks only. */
:root {
  color-scheme: light;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --paper: #faf7f1;
  --card: #fffdf8;
  --ink: #1a2433;
  --muted: #5f6c80;
  --line: #e4dac6;
  --pine: #0d5c46;
  --pine-dark: #083f30;
  --amber: #e9a13b;
  --link: #0b4f3c;
  --radius: 10px;
  --danger-bg: #fbeeee;
  --danger-line: #e3a9a9;
  --danger-ink: #7c1d12;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-height: 100vh; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--pine-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 12px; top: 12px; width: auto; height: auto; padding: 10px 16px; background: #000; color: #fff; z-index: 999; border-radius: 8px; }
:focus-visible { outline: 3px solid rgba(13, 92, 70, 0.5); outline-offset: 2px; }

.site-wrap { max-width: 1180px; min-width: 0; margin: 0 auto; padding: 0 22px 56px; }

/* Top utility bar */
.topbar { background: var(--pine-dark); color: #f3ecdd; font-size: 0.85rem; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 7px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { color: var(--amber); }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a { text-decoration: none; }

/* Masthead */
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0 16px; flex-wrap: wrap; }
.brand, .brand-link, .brand-text, .masthead, .masthead-side { min-width: 0; }
.brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { display: block; width: min(238px, 48vw); height: auto; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-tag { max-width: 270px; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
/* Let the brand header scroll naturally. Only calculator result panels and
   table headings use sticky positioning where it directly aids the task. */
.masthead { position: static; z-index: auto; background: var(--paper); }
.masthead-side { display: flex; align-items: center; gap: 10px; }
.brand-cta { background: var(--pine); color: #fff; font-weight: 700; text-decoration: none; padding: 11px 22px; border-radius: 999px; }
.brand-cta:hover { background: var(--pine-dark); color: #fff; }
.primary-nav-shell { margin-bottom: 22px; }
.menu-toggle { display: none; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; background: var(--card); color: var(--pine-dark); border: 1.5px solid var(--line); font-weight: 800; cursor: pointer; }
.menu-toggle:hover, .menu-toggle:focus-visible { border-color: var(--pine); background: #e3efe8; }
.menu-toggle-icon { display: grid; gap: 3px; width: 17px; }
.menu-toggle-icon span { display: block; height: 2px; border-radius: 2px; background: currentColor; }

/* Primary navigation */
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.nav-links a { color: var(--ink); text-decoration: none; padding: 8px 13px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.nav-links a:hover { background: #f0e9d8; color: var(--pine-dark); }
.nav-links a[aria-current="page"] { background: #e3efe8; color: var(--pine-dark); font-weight: 800; }
.nav-links.open { display: flex; }

/* Breadcrumb */
.breadcrumb { font-size: 0.86rem; color: var(--muted); margin: 0 0 12px; padding: 0; list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "→"; margin-right: 8px; color: #a89a7d; }
.breadcrumb a { text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Hero */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: 28px; align-items: start; padding: 30px 0 8px; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pine); background: #e3efe8; border-radius: 999px; padding: 5px 14px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.05; margin: 0 0 12px; }
.hero h1 em { font-style: italic; color: var(--pine); }
.hero p { color: var(--muted); font-size: 1.06rem; margin: 0 0 16px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-cta { display: inline-block; padding: 13px 26px; border-radius: 999px; background: var(--pine); color: #fff; font-weight: 700; text-decoration: none; }
.hero-cta:hover { background: var(--pine-dark); color: #fff; }
.hero-cta-secondary { background: transparent; color: var(--pine-dark); border: 1.5px solid var(--pine); }
.hero-cta-secondary:hover { background: #e3efe8; color: var(--pine-dark); }
.hero-side { background: var(--pine-dark); color: #f3ecdd; border-radius: 16px; padding: 22px; }
.hero-side h2 { font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 10px; color: var(--amber); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; }
.hero-stats div { border-top: 2px solid var(--amber); padding-top: 8px; }
.hero-stats dt { font-size: 0.78rem; color: #cdbfa4; }
.hero-stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-family: var(--serif); }
.hero-side-note { margin: 18px 0 0 !important; color: #d9e8de !important; font-size: 0.92rem !important; line-height: 1.5; }
.side-label { margin: 18px 0 8px !important; color: #f3ecdd !important; font-size: 0.78rem !important; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.chip:hover { border-color: var(--pine); color: var(--pine-dark); }

/* Trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.trust-strip li { border-left: 3px solid var(--amber); padding: 2px 0 2px 12px; font-size: 0.92rem; color: var(--muted); }
.trust-strip strong { color: var(--ink); }

/* Category cards */
.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; counter-reset: cat; }
.category-directory-grid { margin-top: 24px; }
.feature-card { display: flex; flex-direction: column; min-height: 196px; padding: 18px 18px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--pine); text-decoration: none; color: var(--ink); counter-increment: cat; box-shadow: 0 5px 14px rgba(26, 36, 51, 0.04); transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
.feature-card:hover { border-color: var(--pine); }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(26, 36, 51, 0.08); }
.feature-card h2, .feature-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.feature-card h2::before, .feature-card h3::before { content: counter(cat, decimal-leading-zero); display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 800; color: var(--amber); letter-spacing: 0.1em; margin-bottom: 4px; }
.category-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border: 1px solid #cfe1d6; border-radius: 16px; background: linear-gradient(145deg, #edf6ef 0%, #f8f0df 100%); color: var(--pine-dark); font-size: 1.75rem; line-height: 1; font-family: var(--sans); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 10px rgba(13, 92, 70, 0.08); transition: transform 140ms ease, background 140ms ease, border-color 140ms ease; }
.feature-card:hover .category-icon, .feature-card:focus-visible .category-icon { transform: translateY(-1px) rotate(-2deg); border-color: #a9c9b6; background: linear-gradient(145deg, #e2f0e6 0%, #f8e9cf 100%); }
.category-hero-icon { margin-bottom: 14px; }
.category-icon-svg svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.category-icon-svg svg .icon-fill { fill: currentColor; stroke: none; opacity: 0.12; }
.category-icon-svg svg text { fill: currentColor; stroke: none; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.feature-card .card-count { font-weight: 800; color: var(--pine); margin-top: auto; padding-top: 14px; }
.feature-card .card-link { color: var(--link); font-weight: 800; margin-top: 6px; }
.feature-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.highlight-card, .faq-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.highlight-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.highlight-card p { margin: 0; color: var(--muted); }

/* Anonymous usage reporting: dynamic values stay out of crawlable snippets. */
.usage-analytics { margin-top: 42px; padding: 26px; border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: 14px; background: #f0e9d8; }
.usage-analytics .section-heading { max-width: 900px; }
.usage-analytics-status, .usage-analytics-loading { margin: 16px 0 0; }
.usage-analytics-summary { margin-top: 18px; }
.usage-analytics-summary[hidden], .usage-analytics-details[hidden] { display: none; }
.usage-analytics-value { color: var(--pine-dark) !important; font-weight: 800; }
.usage-analytics-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.usage-analytics-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.usage-analytics-panel h3 { margin: 0 0 10px; font-size: 1.1rem; }
.usage-analytics-list { margin: 0; padding-left: 24px; color: #33405a; }
.usage-analytics-list li { padding: 5px 0; }
.usage-analytics-list a { font-weight: 700; }
.usage-analytics-noscript { margin: 16px 0 0; color: var(--muted); }

/* Homepage section hierarchy */
.home-section { margin-top: 42px; scroll-margin-top: 24px; }
.section-heading { max-width: 820px; }
.section-heading h2 { margin: 0 0 8px; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.section-heading p:last-child { margin: 0; color: var(--muted); }
.section-kicker { margin: 0 0 6px !important; color: var(--pine) !important; font-size: 0.78rem !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.section-heading-compact h2 { font-size: 1.55rem; }
/* Homepage flow */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 32px; align-items: stretch; min-width: 0; padding: 28px 0 24px; border-bottom: 1px solid var(--line); }
.home-hero-copy, .home-hero-proof { min-width: 0; }
.home-hero-copy { display: flex; flex-direction: column; justify-content: center; }
.home-hero-copy h1 { max-width: 760px; margin: 0 0 14px; font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.02; }
.home-hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 0 0 20px; color: var(--muted); font-size: 1.08rem; }
.home-hero-proof { display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid #b9d2c3; border-radius: 18px; background: linear-gradient(145deg, var(--pine-dark) 0%, var(--pine) 100%); color: #f3ecdd; box-shadow: 0 12px 26px rgba(8, 63, 48, 0.12); }
.home-proof-kicker { margin: 0 0 8px; color: var(--amber); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.home-hero-proof h2 { margin: 0 0 20px; color: #fff; font-size: clamp(1.55rem, 2.6vw, 2.1rem); line-height: 1.08; }
.home-proof-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.home-proof-list li { display: grid; min-width: 0; gap: 2px; border-top: 2px solid var(--amber); padding-top: 8px; }
.home-proof-list strong { color: #fff; font-family: var(--serif); font-size: 1.55rem; line-height: 1; }
.home-proof-list span { color: #cfe1d6; font-size: 0.75rem; line-height: 1.3; overflow-wrap: anywhere; }
.home-hero-proof > p:last-child { margin: 20px 0 0; color: #d9e8de; font-size: 0.9rem; line-height: 1.5; }
.popular-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.popular-tool-card { display: flex; min-height: 194px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(26, 36, 51, 0.04); transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
.popular-tool-card:hover { border-color: var(--pine); color: var(--ink); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(26, 36, 51, 0.08); }
.popular-tool-category { color: var(--pine); font-size: 0.73rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.popular-tool-card h3 { margin: 6px 0 8px; color: var(--pine-dark); font-size: 1.2rem; line-height: 1.15; }
.popular-tool-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.popular-tool-link { margin-top: auto; padding-top: 16px; color: var(--link); font-size: 0.86rem; font-weight: 800; }
.home-collections { margin-top: 30px; padding: 24px; border: 1px solid #b9d2c3; border-radius: 18px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 78%); }
.home-collections-heading { max-width: 860px; margin-bottom: 18px; }
.home-collections-heading h2 { margin-bottom: 8px; }
.home-collections-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.home-collections-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.home-collection-card { display: flex; min-width: 0; min-height: 184px; flex-direction: column; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .82); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(26, 36, 51, .04); }
.home-collection-card:hover, .home-collection-card:focus-visible { border-color: var(--pine); color: var(--ink); transform: translateY(-1px); }
.home-collection-eyebrow { color: var(--pine); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.home-collection-card h3 { margin: 0; color: var(--pine-dark); font-size: 1.08rem; line-height: 1.18; }
.home-collection-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.42; }
.home-collection-topics { color: var(--pine); font-size: .73rem; font-weight: 800; line-height: 1.35; }
.home-collection-link { margin-top: auto; color: var(--link); font-size: .8rem; font-weight: 800; }
.home-collections-more { margin: 17px 0 0; color: var(--muted); font-size: .9rem; }
.home-collections-more a { color: var(--link); font-weight: 800; }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.process-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #f1f7f2; }
.process-step { color: var(--amber); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; }
.process-card h3 { margin: 8px 0 6px; color: var(--pine-dark); font-size: 1.2rem; }
.process-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.home-seo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.home-seo-card { display: flex; min-width: 0; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--amber); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(26, 36, 51, 0.04); transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
.home-seo-card:hover { border-color: var(--pine); color: var(--ink); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(26, 36, 51, 0.08); }
.home-seo-label { color: var(--pine); font-size: 0.73rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.home-seo-card h3 { margin: 7px 0 8px; color: var(--pine-dark); font-size: 1.16rem; line-height: 1.18; }
.home-seo-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.home-seo-note { max-width: 820px; margin: 16px 0 0; color: var(--muted); font-size: 0.87rem; line-height: 1.5; }
.home-next-step { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 46px; padding: 28px 30px; border-radius: 18px; background: var(--pine-dark); color: #f3ecdd; }
.home-next-step .section-kicker { margin-bottom: 6px !important; color: var(--amber) !important; }
.home-next-step h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.home-next-step p:last-child { margin: 0; color: #d9e8de; }
.home-next-step .hero-cta { flex: 0 0 auto; background: #fff; color: var(--pine-dark); }
.home-next-step .hero-cta:hover { background: #e3efe8; color: var(--pine-dark); }

/* Search */
.wc-search { display: grid; gap: 8px; margin: 20px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--pine-dark); color: #f3ecdd; }
.wc-search label { font-weight: 800; font-family: var(--serif); font-size: 1.1rem; }
.wc-search input[type="search"] { border-radius: 8px; border: 1px solid #cdbfa4; background: #fff; color: var(--ink); padding: 13px 15px; width: 100%; font-size: 1rem; }
.wc-search-count { margin: 0; color: #cdbfa4; font-size: 0.9rem; }

/* WorldCalculate discovery: one friendly front door on every page. */
.discovery-box { display: grid; grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.6fr); gap: 22px; align-items: center; margin: 0 0 18px; padding: 20px 22px; border: 1px solid #b9d2c3; border-radius: 16px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 68%); box-shadow: 0 8px 22px rgba(26, 36, 51, 0.05); }
.discovery-copy h2 { margin: 0 0 6px; color: var(--pine-dark); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.1; }
.discovery-copy p:last-child { margin: 0; color: var(--muted); font-size: 0.94rem; }
.discovery-kicker, .world-context-kicker { margin: 0 0 5px !important; color: var(--pine) !important; font-size: 0.74rem !important; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.discovery-form { display: grid; gap: 8px; }
.discovery-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.discovery-input-row input { min-width: 0; padding: 13px 14px; border: 1.5px solid #a9bfaf; border-radius: 9px; background: #fff; color: var(--ink); }
.discovery-input-row input:focus { border-color: var(--pine); }
.discovery-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 0.84rem; }
.discovery-results { display: grid; gap: 8px; max-height: 430px; overflow: auto; padding: 2px; }
.discovery-result { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; background: rgba(255, 255, 255, 0.94); color: var(--ink); text-decoration: none; }
.discovery-result:hover { border-color: var(--pine); color: var(--pine-dark); }
.discovery-result strong { font-size: 0.97rem; line-height: 1.25; }
.discovery-result span { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.discovery-result-badge { justify-self: start; padding: 3px 7px; border-radius: 999px; background: #f7e3af; color: #6d4a00 !important; font-size: 0.68rem !important; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.discovery-result-reason { color: var(--pine-dark) !important; font-weight: 800; }
.discovery-result-meta { color: var(--muted); }
.discovery-result-inputs { color: #536276 !important; font-size: 0.75rem !important; }
.discovery-result-action { justify-self: start; margin-top: 2px; color: var(--pine) !important; font-size: 0.76rem !important; font-weight: 900; }
.discovery-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.discovery-prompt { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: var(--pine-dark); font-size: 0.77rem; font-weight: 700; }
.discovery-prompt:hover { border-color: var(--pine); background: #e3efe8; }
.world-context { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: end; margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.world-context-head h2 { margin: 0; color: var(--ink); font-size: 1.1rem; }
.world-context-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.world-context-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 0.73rem; font-weight: 800; }
.world-context-controls select { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 0.82rem; }
.world-context-note, .world-context-status { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.35; }
.world-context-status { color: var(--pine-dark); font-weight: 700; }
.header-context { position: relative; display: block; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.world-context-summary { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--pine-dark); cursor: pointer; list-style: none; font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.world-context-summary::-webkit-details-marker { display: none; }
.world-context-summary::after { content: "⌄"; color: var(--amber); font-size: 1rem; line-height: 1; }
.header-context[open] .world-context-summary { border-color: var(--pine); background: #e3efe8; }
.world-context-summary-value { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.world-context-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; display: grid; gap: 12px; width: min(520px, calc(100vw - 44px)); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 16px 34px rgba(26, 36, 51, 0.16); }
.world-context-head h2 { margin: 0; color: var(--ink); font-size: 1.1rem; }
.world-context-help { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.header-context .world-context-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.header-context .world-context-note { padding-top: 10px; border-top: 1px solid var(--line); }
.calculator-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.calculator-context-block { min-width: 0; padding: 16px 18px; border: 1px solid #b9d2c3; border-radius: 12px; background: #f1f7f2; }
.calculator-context-title { margin: 0 0 4px; color: var(--pine-dark); font-size: 1.05rem; }
.calculator-context-block > p:last-child { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.calculator-context-action { margin-top: 8px !important; color: var(--pine-dark) !important; font-weight: 700; }
.country-tax-context { border-color: #e8c991; background: #fff8e9; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Goal-to-result framing on every dedicated calculator page. */
.answer-path { margin: 20px 0 24px; padding: 22px; border: 1px solid #b9d2c3; border-radius: 14px; background: linear-gradient(135deg, #fffdf8 0%, #f0e9d8 100%); }
.answer-path-head { max-width: 820px; }
.answer-path-head h2 { margin: 0 0 7px; color: var(--pine-dark); font-size: clamp(1.45rem, 3vw, 2rem); }
.answer-path-head p:last-child { margin: 0; color: var(--muted); }
.answer-path-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.answer-path-grid article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 253, 248, 0.88); }
.answer-path-grid article > span { color: var(--amber); font-size: 0.73rem; font-weight: 900; letter-spacing: 0.1em; }
.answer-path-grid h3 { margin: 4px 0 5px; color: var(--ink); font-family: var(--sans); font-size: 0.95rem; }
.answer-path-grid p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.answer-path-grid code { overflow-wrap: anywhere; }

html[dir="rtl"] .discovery-result { border-left: 1px solid var(--line); border-right: 4px solid var(--amber); }
html[dir="rtl"] .answer-path, html[dir="rtl"] .world-context, html[dir="rtl"] .discovery-box { text-align: right; }

/* Category hero */
.category-hero { padding: 12px 0 4px; border-bottom: 2px solid var(--line); margin-bottom: 6px; }
.category-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.category-hero p { margin: 0 0 8px; color: var(--muted); max-width: 880px; }
.category-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #fffdf8 0%, #f0f7f2 100%); }
.category-context h2 { margin: 0 0 8px; color: var(--pine-dark); font-size: 1.35rem; }
.category-context p { color: #33405a; }
.category-context p:last-child { margin-bottom: 0; }
.hero-details { margin-top: 6px; }

/* Numbered anchor nav */
.anchor-menu { margin: 16px 0 22px; }
.anchor-menu ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; margin: 0; padding: 0; list-style: none; counter-reset: tool; }
.anchor-menu li { counter-increment: tool; border-bottom: 1px dotted var(--line); padding: 7px 0; }
.anchor-menu li::before { content: counter(tool, decimal-leading-zero); font-weight: 800; color: var(--amber); margin-right: 10px; font-size: 0.85rem; }
.anchor-menu a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.anchor-menu a:hover { color: var(--pine); }
.category-subcategory-toc { padding: 14px 16px; border: 1px solid #b9d2c3; border-radius: 14px; background: linear-gradient(135deg, #f1f7f2 0%, #fffdf8 100%); }
.anchor-menu-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 0 0 8px; color: var(--muted); font-size: 0.88rem; }
.anchor-menu-label strong { color: var(--pine-dark); font-size: 1rem; }
.anchor-menu-count { margin-left: 8px; color: var(--muted); font-size: 0.76rem; }
.category-subcategory-preview { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.category-subcategory-preview li { padding: 4px 7px; border-radius: 999px; background: #f1f7f2; color: var(--pine-dark); font-size: 0.72rem; line-height: 1.2; }
.category-subcategory-preview .category-subcategory-more { background: #fff3d9; color: #76531b; font-weight: 800; }
.category-tool-groups { margin-top: 28px; }
.category-tool-groups-heading { margin-bottom: 18px; }
.category-tool-group { scroll-margin-top: 18px; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 253, 248, 0.72); }
.category-tool-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.category-tool-group-head h3 { margin: 0 0 5px; color: var(--pine-dark); font-size: 1.35rem; }
.category-tool-group-head p { margin: 0; max-width: 780px; color: var(--muted); }
.category-tool-group-head a { flex: 0 0 auto; color: var(--link); font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.category-tool-group-head a:hover { color: var(--pine-dark); }
.category-tool-group .calculator-list { margin-top: 0; }

/* Calculator cards: form left, sticky results right on desktop */
.calculator-list { display: grid; gap: 26px; counter-reset: wctool; }
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; counter-increment: wctool; }
.calc-card-content { display: grid; gap: 12px; padding: 26px; grid-template-columns: 7fr 5fr; grid-template-areas: "head head" "links links" "form result" "visual visual" "error error" "copy copy" "dl dl" "history history" "details details"; align-items: start; }
.calc-head { grid-area: head; }
.calc-head h2 { margin: 0; font-size: 1.45rem; }
.calc-head h2::before { content: counter(wctool, decimal-leading-zero) " — "; color: var(--amber); font-size: 1rem; font-family: var(--sans); font-weight: 800; }
.calc-summary { margin: 6px 0 0; color: var(--muted); }
.calc-card-content .calc-form { grid-area: form; }
.calc-links { margin: 0; font-size: 0.85rem; color: var(--muted); grid-area: links; }
.calculator-grid { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field-unit { color: var(--muted); font-weight: 400; }
.field input, .field select { border-radius: 8px; border: 1.5px solid #c9bda3; background: #fff; color: var(--ink); padding: 11px 12px; width: 100%; }
.field input:focus, .field select:focus { border-color: var(--pine); }
.field-hint { margin: 0; color: var(--muted); font-size: 0.84rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.button-primary { color: #fff; background: var(--pine); padding: 12px 26px; border-radius: 8px; font-weight: 800; border: 1px solid var(--pine); }
.button-primary:hover { background: var(--pine-dark); }
.button-secondary { color: var(--ink); background: transparent; padding: 12px 22px; border-radius: 8px; border: 1.5px solid #c9bda3; font-weight: 700; }
.button-secondary:hover { border-color: var(--pine); color: var(--pine-dark); }
.calc-error { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); grid-area: error; }
.result-panel { margin: 0; padding: 20px; border-radius: 10px; background: var(--pine-dark); color: #f3ecdd; grid-area: result; position: sticky; top: 76px; }
.result-panel h3 { margin: 0 0 8px; font-size: 0.85rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber); }
.result-panel p { margin: 5px 0; }
.result-panel strong { color: #fff; }
.result-empty { color: #cdbfa4; margin: 0; }
.result-breakdown, .result-steps { margin: 10px 0 0; padding-left: 20px; }
.result-section-heading { margin: 14px 0 0; color: inherit; font-size: 0.92rem; }
.result-note { color: #cdbfa4; font-size: 0.88rem; }
.result-visual { margin-top: 14px; padding-top: 14px; border-top: 1px solid #3c5a4e; }
.result-visual[hidden] { display: none; }
.result-visual-title { margin: 0 0 10px; color: var(--amber); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.result-composition { display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: center; }
.result-donut { width: 104px; height: 104px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 16px var(--pine-dark); }
.result-donut::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: var(--pine-dark); }
.result-legend, .result-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.result-legend li, .result-bar-label { display: flex; justify-content: space-between; gap: 8px; color: #f3ecdd; font-size: 0.78rem; }
.result-legend li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-swatch { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.result-bars { margin-top: 12px; }
.result-bar-label { margin-bottom: 3px; color: #cdbfa4; }
.result-bar-track { position: relative; height: 8px; overflow: hidden; border-radius: 999px; background: #0a2e24; }
.result-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--amber); }
.result-bar-fill.negative { background: #d77a67; }
.result-trend { margin-top: 12px; }
.result-trend svg { display: block; width: 100%; height: 76px; overflow: visible; }
.result-trend polyline { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.result-trend p { margin: 5px 0 0; color: #cdbfa4; font-size: 0.78rem; }
.wc-result-chart-panel { margin-top: 2px; color: #f3ecdd; }
.wc-chart-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.wc-chart-header .result-visual-title { margin-bottom: 0; }
.wc-chart-switcher { display: inline-flex; align-items: center; gap: 6px; color: #cdbfa4; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.wc-chart-switcher select { min-width: 118px; padding: 6px 8px; border: 1px solid #557467; border-radius: 7px; background: #0a2e24; color: #f3ecdd; font: inherit; }
.wc-chart-switcher select:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
.wc-chart-graphic { margin: 2px -4px 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.wc-result-chart { display: block; width: 100%; min-width: 540px; height: auto; min-height: 214px; overflow: visible; }
.wc-chart-grid { stroke: #3c5a4e; stroke-width: 1; opacity: .82; }
.wc-chart-axis { stroke: #cdbfa4; stroke-width: 1; opacity: .85; }
.wc-chart-axis-label, .wc-chart-legend-label { fill: #cdbfa4; font-size: 11px; }
.wc-chart-line { stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.wc-chart-area { pointer-events: none; }
.wc-chart-mark, .wc-chart-point { transition: filter .15s ease, opacity .15s ease; }
.wc-chart-mark:hover, .wc-chart-mark:focus, .wc-chart-point:hover, .wc-chart-point:focus { filter: brightness(1.18); outline: none; }
.wc-chart-center-label { fill: #fffdf8; font-size: 16px; font-weight: 800; }
.wc-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 1px 0 8px; padding: 0; list-style: none; color: #cdbfa4; font-size: 0.76rem; }
.wc-chart-legend li { display: inline-flex; align-items: center; gap: 5px; }
.wc-chart-legend-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.wc-chart-data { margin-top: 3px; color: #cdbfa4; font-size: 0.76rem; }
.wc-chart-data summary { cursor: pointer; color: #f3ecdd; font-weight: 700; }
.wc-chart-data table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.wc-chart-data caption { margin-bottom: 5px; text-align: left; color: #cdbfa4; }
.wc-chart-data th, .wc-chart-data td { padding: 5px 6px; border: 1px solid #3c5a4e; text-align: left; }
.wc-chart-data th { color: #f3ecdd; background: #0a2e24; }
.wc-chart-note { margin: 8px 0 0; color: #cdbfa4; font-size: 0.76rem; }
.calc-visual { grid-area: visual; margin: 2px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, #f0e9d8 0%, #fffdf8 58%, #e3efe8 100%); }
.calc-visual-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.calc-visual-kicker { margin: 0 0 3px; color: var(--pine); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.calc-visual-head h3 { margin: 0; color: var(--ink); font-size: 1.28rem; }
.calc-visual-state { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #fffdf8; border: 1px solid var(--line); color: var(--pine-dark); font-size: 0.78rem; font-weight: 800; }
.calc-visual-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.calc-visual-node { min-width: 0; min-height: 148px; padding: 14px; border: 1px solid rgba(13, 92, 70, 0.18); border-radius: 12px; background: rgba(255, 253, 248, 0.86); box-shadow: 0 8px 18px rgba(26, 36, 51, 0.06); }
.calc-visual-node h4 { margin: 3px 0 10px; color: var(--ink); font-family: var(--sans); font-size: 0.95rem; }
.calc-visual-node h4 span { color: var(--muted); font-weight: 500; }
.calc-visual-step { display: inline-block; color: var(--amber); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; }
.calc-visual-node ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.calc-visual-node li { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.calc-visual-node li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-visual-node li strong { flex: 0 0 auto; color: var(--pine-dark); font-weight: 800; text-align: right; }
.calc-visual-formula { display: flex; flex-direction: column; }
.calc-visual-formula code { display: block; max-height: 72px; overflow: auto; padding: 9px 10px; border-radius: 8px; background: var(--pine-dark); color: #f3ecdd; font-size: 0.78rem; line-height: 1.45; overflow-wrap: anywhere; }
.calc-visual-formula p { margin: auto 0 0; color: var(--muted); font-size: 0.78rem; }
.calc-visual-arrow { align-self: center; color: var(--pine); font-size: 1.7rem; font-weight: 900; }
.calc-visual-empty, .calc-visual-more { color: var(--muted) !important; font-style: italic; }
.calc-visual-more { display: block !important; padding-top: 2px; font-size: 0.76rem !important; }
.calc-visual figcaption { margin-top: 14px; color: var(--muted); font-size: 0.8rem; }
.calc-copy { grid-area: copy; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.copy-button { padding: 8px 18px; border-radius: 999px; color: var(--pine-dark); background: transparent; border: 1.5px solid var(--pine); font-weight: 700; }
.copy-status { margin: 0; color: var(--muted); font-size: 0.86rem; }
.copy-attribution-notice { position: fixed; inset-inline: 16px; bottom: 18px; z-index: 80; max-width: 620px; margin: 0 auto; padding: 11px 14px; border: 1px solid #b9d2c3; border-radius: 10px; background: #fffdf8; box-shadow: 0 10px 28px rgba(8, 63, 48, 0.18); color: var(--pine-dark); font-size: 0.84rem; line-height: 1.4; }
.copy-attribution-notice[hidden] { display: none; }
.share-button { padding: 8px 18px; border-radius: 999px; color: #fff; background: var(--pine); border: 1.5px solid var(--pine); font-weight: 700; }
.share-button:hover { background: var(--pine-dark); }
.share-options { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; padding-top: 2px; }
.share-options button { padding: 6px 11px; border-radius: 999px; color: var(--ink); background: var(--card); border: 1px solid var(--line); font-size: 0.83rem; font-weight: 700; }
.share-options button:hover { border-color: var(--pine); color: var(--pine-dark); }
.share-label, .share-status { color: var(--muted); font-size: 0.86rem; }
.share-status { margin: 0; }
.calc-history { grid-area: history; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.calc-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-history h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.history-clear { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.history-clear:hover { border-color: var(--pine); color: var(--pine-dark); }
.calc-history-empty { margin: 6px 0 0; color: var(--muted); font-size: 0.84rem; }
.calc-history-list { display: grid; gap: 7px; margin: 8px 0 0; padding-left: 20px; }
.calc-history-item { padding-left: 4px; color: var(--muted); font-size: 0.84rem; }
.calc-history-item strong { color: var(--ink); }
.calc-history-item time { display: block; color: var(--muted); font-size: 0.76rem; }
.history-use { margin-top: 4px; padding: 4px 9px; border: 1px solid var(--pine); border-radius: 999px; background: transparent; color: var(--pine-dark); font-size: 0.75rem; font-weight: 700; }
.history-use:hover { background: #e3efe8; }
.mining-specs { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.mining-specs:empty { display: none; }
.download-links { margin: 0; font-size: 0.9rem; grid-area: dl; border-top: 1px dashed var(--line); padding-top: 10px; }
.download-links a { font-weight: 700; }
.calc-details { border-top: 2px solid var(--line); padding-top: 12px; font-size: 0.94rem; grid-area: details; }
.calc-details summary { cursor: pointer; font-weight: 800; font-family: var(--serif); font-size: 1.02rem; }
.calc-details ul { padding-left: 20px; color: var(--muted); }
.calc-details h4 { margin: 18px 0 6px; color: var(--ink); font-size: 1rem; }
.calc-input-contract { columns: 2; column-gap: 28px; }
.calc-input-contract li { break-inside: avoid; }
.calc-validation-note { color: var(--muted); font-size: 0.88rem; }
.calc-sources { overflow-wrap: anywhere; }

/* Teaser cards (category/home listings link out to dedicated tool pages) */
.teaser-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; counter-increment: wctool; }
.teaser-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.teaser-card h2::before { content: counter(wctool, decimal-leading-zero) " — "; color: var(--amber); font-size: 0.9rem; font-family: var(--sans); font-weight: 800; }
.teaser-card h2 a { color: var(--ink); text-decoration: none; }
.teaser-card h2 a:hover { color: var(--pine-dark); text-decoration: underline; }
.teaser-brief { margin: 0 0 8px; color: var(--muted); }
.teaser-needs { margin: 0 0 8px; font-size: 0.9rem; color: #33405a; }
.teaser-example { margin: 0 0 12px; font-size: 0.9rem; color: var(--muted); }
.teaser-cta { display: inline-block; padding: 11px 22px; border-radius: 8px; background: var(--pine); color: #fff; font-weight: 800; text-decoration: none; }
.teaser-cta:hover { background: var(--pine-dark); color: #fff; }
.teaser-card p:last-child { margin-bottom: 0; }
.article-archive-card { display: flex; flex-direction: column; }
.article-archive-image { display: block; width: 100%; height: 150px; margin: -20px -22px 16px; width: calc(100% + 44px); max-width: none; object-fit: cover; border-bottom: 1px solid var(--line); }
.article-archive-card h2 { margin-top: 0; }
.teaser-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* Tables */
.result-table-details summary { cursor: pointer; font-weight: 700; margin-top: 10px; color: #fff; }
.table-wrap { overflow: auto; max-height: 420px; border-radius: 8px; border: 1px solid #3c5a4e; margin-top: 10px; background: #0a2e24; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
.table-wrap th, .table-wrap td { padding: 7px 10px; border-bottom: 1px solid #3c5a4e; text-align: right; white-space: nowrap; color: #f3ecdd; }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: left; }
.table-wrap thead th { background: #083f30; position: sticky; top: 0; }

/* Key facts (quotable GEO block) */
.key-facts { background: var(--pine-dark); color: #f3ecdd; border-radius: var(--radius); padding: 22px 24px; margin: 18px 0 22px; }
.key-facts h2 { margin: 0 0 10px; font-size: 0.85rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber); }
.key-facts dl { margin: 0; display: grid; gap: 10px; }
.key-facts dl div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.key-facts dt { font-weight: 800; color: var(--amber); font-size: 0.9rem; }
.key-facts dd { margin: 0; }
.key-facts code { background: #0a2e24; padding: 2px 8px; border-radius: 6px; font-size: 0.88em; }
.calc-meta { font-size: 0.88rem; color: var(--muted); }

/* Article sections */
.calc-article { display: grid; gap: 16px; margin-top: 22px; }
.calc-article section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.calc-longform-header { border-top: 4px solid var(--pine) !important; }
.calc-longform-header h2 { margin-bottom: 8px; }
.calc-longform-header p { max-width: 880px; }
.calc-longform-header p:last-child { margin-bottom: 0; }
.calc-article-visual { margin: 20px 0 24px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf8; }
.calc-article-visual img { display: block; width: 100%; height: auto; }
.calc-article-visual figcaption { padding: 10px 14px 12px; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.wc-article-hero { margin-top: 22px; }
.calc-article-supporting-visual { display: grid; grid-template-columns: minmax(0, 250px) 1fr; gap: 16px; align-items: center; margin: 22px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf8; }
.calc-article-supporting-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.calc-article-supporting-visual figcaption { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.calc-byline-date { color: var(--pine-dark) !important; font-weight: 700; }
.calc-article h2 { margin: 0 0 10px; font-size: 1.35rem; }
.calc-article p, .calc-article li { color: #33405a; }
.calc-article ol, .calc-article ul { padding-left: 22px; margin: 8px 0; }
.calc-article code { background: #f0e9d8; padding: 2px 8px; border-radius: 6px; font-size: 0.92em; }
.toc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.pager a { text-decoration: none; font-weight: 700; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.related-card { display: block; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.94rem; }
.related-card:hover { border-color: var(--pine); color: var(--pine-dark); }
.related-intro { margin: -2px 0 4px; color: var(--muted); }
.related-card span { display: block; font-weight: 400; color: var(--muted); font-size: 0.84rem; }
.calc-reader-guide { display: grid; gap: 16px; margin: 22px 0; padding: 24px; border: 1px solid #b9d2c3; border-radius: 16px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 78%); }
.calc-reader-guide-head h2 { margin: 0 0 8px; color: var(--pine-dark); }
.calc-reader-guide-head p:last-child { margin-bottom: 0; color: #33405a; }
.calc-reader-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calc-reader-guide-grid article { padding: 18px; border: 1px solid rgba(13, 92, 70, 0.18); border-radius: 12px; background: rgba(255, 255, 255, 0.7); }
.calc-reader-guide-grid h3, .calc-reader-guide-checks h3 { margin: 0 0 6px; color: var(--pine-dark); font-size: 1.05rem; }
.calc-reader-guide-grid p { margin: 0; color: #33405a; font-size: 0.92rem; }
.calc-reader-guide-checks { padding: 18px; border-radius: 12px; background: var(--pine-dark); color: #f3ecdd; }
.calc-reader-guide-checks h3 { color: var(--amber); }
.calc-reader-guide-checks ol { margin: 0; padding-left: 22px; }
.calc-reader-guide-checks li { color: #f3ecdd; font-size: 0.92rem; }
.calc-reader-guide-next { margin: 0; color: #33405a; font-size: 0.9rem; }
.wc-article-links { margin: 26px 0; }
.wc-article-links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wc-article-link-card { display: flex; min-width: 0; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: 12px; background: var(--card); }
.wc-article-link-card h3 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.2; }
.wc-article-link-card h3 a { color: var(--pine-dark); text-decoration: none; }
.wc-article-link-card h3 a:hover { text-decoration: underline; }
.wc-article-link-card p:not(.wc-article-link-date) { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.wc-article-link-card .teaser-cta { align-self: flex-start; margin-top: auto; padding: 8px 12px; font-size: 0.82rem; }
.wc-article-link-date { margin: 0 0 6px; color: var(--pine); font-size: 0.76rem; font-weight: 800; }
.article-answer-path { margin: 22px 0; padding: 22px 24px; border: 1px solid #b9d2c3; border-radius: 15px; background: #f1f7f2; }
.article-answer-path h2 { margin: 0 0 8px; color: var(--pine-dark); }
.article-answer-path p { max-width: 900px; color: #33405a; }
.article-answer-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.article-answer-links a:not(.hero-cta) { padding: 9px 14px; border: 1px solid var(--pine); border-radius: 999px; color: var(--pine-dark); font-weight: 800; text-decoration: none; }
.article-answer-links a:not(.hero-cta):hover { background: #e3efe8; }
.calc-single-cat { color: var(--muted); }
.calc-page-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc-page-nav a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--pine-dark); background: #fffdf8; font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.calc-page-nav a:hover { border-color: var(--pine); background: #e3efe8; }

/* Long-form editorial reading system. The generic .hero and .calc-article
   rules serve other page types; these scoped rules keep articles calm,
   compact, and easy to scan on both wide and narrow screens. */
.wc-editorial-article { max-width: 980px; margin: 0 auto; }
.wc-editorial-article > .hero { display: block; max-width: 880px; padding: 28px 0 10px; }
.wc-editorial-article > .hero h1 { max-width: 880px; margin: 0 0 12px; }
.wc-editorial-article > .hero > p:not(.section-kicker):not(.calc-byline-date) { max-width: 760px; margin-bottom: 12px; }
.wc-editorial-article > .hero .section-kicker { margin-bottom: 8px !important; }
.wc-editorial-article .calc-longform { max-width: 860px; margin: 28px auto 0; }
.wc-editorial-article .calc-longform > * { min-width: 0; }
.wc-editorial-article .calc-longform > section { margin: 0; padding: 28px 0; border: 0; border-top: 1px solid var(--line); background: transparent; border-radius: 0; }
.wc-editorial-article .calc-longform > section:first-child { padding-top: 30px; border-top: 4px solid var(--pine); }
.wc-editorial-article .calc-longform > section > h2 { margin: 0 0 12px; color: var(--pine-dark); font-size: clamp(1.5rem, 2.7vw, 2.05rem); line-height: 1.15; }
.wc-editorial-article .calc-longform section section { margin: 18px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 253, 248, 0.82); }
.wc-editorial-article .calc-longform h3 { margin: 22px 0 8px; color: var(--pine-dark); font-size: 1.25rem; line-height: 1.2; }
.wc-editorial-article .calc-longform h4 { margin: 18px 0 6px; color: var(--pine-dark); font-family: var(--sans); font-size: 1rem; line-height: 1.35; }
.wc-editorial-article .calc-longform p { max-width: 75ch; margin: 0 0 1.05rem; color: #33405a; line-height: 1.78; }
.wc-editorial-article .calc-longform p:last-child { margin-bottom: 0; }
.wc-editorial-article .calc-longform strong { color: var(--pine-dark); }
.wc-editorial-article .calc-longform a { font-weight: 700; text-decoration-thickness: 1px; }
.wc-editorial-article .calc-longform ul, .wc-editorial-article .calc-longform ol { max-width: 75ch; margin: 10px 0 18px; padding-left: 1.45rem; color: #33405a; }
.wc-editorial-article .calc-longform li { margin: 0.48rem 0; line-height: 1.6; }
.wc-editorial-article .calc-longform code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.wc-editorial-article .calc-longform table { display: block; width: 100%; max-width: 100%; margin: 18px 0 22px; overflow-x: auto; border-collapse: collapse; border: 1px solid var(--line); background: #fff; font-size: 0.94rem; }
.wc-editorial-article .calc-longform caption { padding: 0 0 8px; color: var(--pine-dark); font-weight: 800; text-align: left; }
.wc-editorial-article .calc-longform th, .wc-editorial-article .calc-longform td { min-width: 150px; padding: 11px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.wc-editorial-article .calc-longform thead th { background: #e3efe8; color: var(--pine-dark); font-weight: 800; }
.wc-editorial-article .calc-longform tbody th { background: #faf7f1; color: var(--ink); font-weight: 800; }
.wc-editorial-article .calc-longform dl { display: grid; grid-template-columns: minmax(9rem, 0.45fr) minmax(0, 1fr); margin: 18px 0; border-top: 1px solid var(--line); }
.wc-editorial-article .calc-longform dt, .wc-editorial-article .calc-longform dd { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.wc-editorial-article .calc-longform dt { color: var(--pine-dark); font-weight: 800; }
.wc-editorial-article .calc-longform dd { overflow-wrap: anywhere; }
.article-persona-note { max-width: 860px; margin: 18px auto 16px; padding: 14px 18px; border-left: 4px solid var(--amber); border-radius: 0 10px 10px 0; background: #f0e9d8; color: #33405a; line-height: 1.6; }
.article-persona-note strong { color: var(--pine-dark); }
.article-scene-setter { max-width: 75ch; margin: 16px auto 18px !important; color: var(--pine-dark) !important; font-family: var(--serif); font-size: 1.17rem; line-height: 1.55 !important; }
.article-flow { max-width: 860px; margin: 20px auto 10px; padding: 20px; border: 1px solid #b9d2c3; border-radius: 15px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 78%); }
.article-flow .section-kicker { margin-bottom: 5px !important; }
.article-flow h2 { margin: 0 0 14px; color: var(--pine-dark); font-size: 1.45rem; line-height: 1.15; }
.article-flow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: article-step; }
.article-flow-steps li { display: grid; gap: 5px; min-width: 0; padding: 14px; border: 1px solid rgba(13, 92, 70, 0.2); border-radius: 11px; background: rgba(255, 255, 255, 0.72); counter-increment: article-step; }
.article-flow-steps li::before { content: "0" counter(article-step); color: var(--amber); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.08em; }
.article-flow-steps strong { color: var(--pine-dark); }
.article-flow-steps span { color: #33405a; font-size: 0.9rem; line-height: 1.45; }
.article-flow-link a { color: var(--link); }
.article-related-path { max-width: 860px; margin: 18px auto 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 253, 248, 0.9); }
.article-related-path h2 { margin: 0 0 7px; color: var(--pine-dark); font-size: 1.35rem; line-height: 1.2; }
.article-related-path > p:not(.section-kicker) { margin: 0 0 12px; color: var(--muted); }
.article-related-path-links { display: grid; gap: 7px; margin: 0; padding: 0 0 0 20px; color: #33405a; }
.article-related-path-links li { padding-left: 3px; line-height: 1.5; }
.article-related-path-links li > span { color: var(--pine-dark); font-weight: 800; }
.article-related-path-links small { color: var(--muted); font-size: 0.9em; }
.article-inline-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-top: 18px !important; padding: 10px 13px; border-left: 3px solid var(--amber); background: rgba(240, 233, 216, 0.55); color: var(--muted) !important; font-size: 0.91rem; line-height: 1.55 !important; }
.article-inline-links span { color: var(--pine-dark); font-weight: 800; }
.article-inline-link { white-space: normal; }
.wc-editorial-article .wc-article-mid-visual { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 16px; align-items: center; max-width: 860px; margin: 24px 0 6px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fffdf8; }
.wc-editorial-article .wc-article-mid-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.wc-editorial-article .wc-article-mid-visual figcaption { color: var(--muted); font-size: 0.87rem; line-height: 1.6; }
.wc-editorial-article .wc-article-mid-visual figcaption strong { display: block; margin-bottom: 4px; color: var(--pine-dark); }
.wc-article-share { max-width: 860px; margin: 34px auto 0; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--pine); border-radius: 14px; background: linear-gradient(135deg, #fffdf8 0%, #f0e9d8 100%); }
.wc-article-share__heading h2 { margin: 0 0 8px; color: var(--pine-dark); font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.15; }
.wc-article-share__heading p:not(.section-kicker) { max-width: 70ch; margin: 0 0 16px; color: var(--muted); }
.wc-article-share__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wc-share-action { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 0.86rem; font-weight: 800; line-height: 1.2; text-decoration: none; transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease; }
.wc-share-action:hover { border-color: var(--pine); background: #e3efe8; color: var(--pine-dark); transform: translateY(-1px); }
.wc-share-action--native { border-color: var(--pine); background: var(--pine); color: #fff; }
.wc-share-action--native:hover { background: var(--pine-dark); color: #fff; }
.wc-share-action--copy { border-color: var(--amber); }
.wc-share-action--whatsapp { border-color: #25d366; }
.wc-share-action--telegram { border-color: #229ed9; }
.wc-share-action--facebook { border-color: #1877f2; }
.wc-share-action--linkedin { border-color: #0a66c2; }
.wc-share-action--reddit { border-color: #ff4500; }
.wc-share-action--pinterest { border-color: #bd081c; }
.wc-share-action--bluesky { border-color: #1185fe; }
.wc-article-share__status { min-height: 1.4em; margin: 12px 0 0; color: var(--muted); font-size: 0.86rem; }

/* Collection pages turn the full catalog into readable decision paths. */
.collection-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.7fr); gap: 22px; align-items: stretch; margin: 8px 0 20px; padding: 28px; border: 1px solid #b9d2c3; border-radius: 18px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 72%); }
.collection-hero h1 { margin: 0 0 10px; color: var(--pine-dark); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.04; }
.collection-hero p { max-width: 850px; color: var(--muted); }
.collection-hero-side { display: grid; align-content: center; gap: 8px; padding: 18px; border: 1px solid rgba(13, 92, 70, 0.2); border-radius: 14px; background: rgba(255, 255, 255, 0.66); }
.collection-hero-side p { margin: 0; }
.collection-count { color: var(--pine-dark) !important; font-size: 1.2rem; }
.collection-count strong { display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.collection-directory, .collection-section { margin: 24px 0; }
.collection-directory { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 248, 0.76); }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.collection-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-card { display: grid; align-content: start; gap: 7px; min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(26, 36, 51, 0.04); }
.collection-card:hover { border-color: var(--pine); transform: translateY(-1px); }
.collection-card .section-kicker { margin: 0; }
.collection-card h3 { margin: 0; color: var(--pine-dark); font-size: 1.14rem; }
.collection-card p:not(.section-kicker) { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.collection-card .collection-card-meta { margin-top: 3px; color: var(--pine) !important; font-size: 0.76rem !important; font-weight: 800; line-height: 1.35; }
.collection-card span { margin-top: auto; color: var(--link); font-size: 0.82rem; font-weight: 800; }
.collection-directory-callout { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 24px 0; padding: 20px 24px; border: 1px solid #b9d2c3; border-radius: 15px; background: #f1f7f2; }
.collection-directory-callout h2 { margin: 0 0 5px; color: var(--pine-dark); font-size: 1.35rem; }
.collection-directory-callout p:last-child { margin: 0; color: var(--muted); }
.collection-directory-callout .hero-cta { flex: 0 0 auto; }
.collection-start { margin: 26px 0; padding: 24px; border: 1px solid #b9d2c3; border-radius: 16px; background: linear-gradient(135deg, #e3efe8 0%, #fffdf8 78%); }
.collection-featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.collection-featured-card { display: flex; min-width: 0; min-height: 190px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(26, 36, 51, 0.04); }
.collection-featured-card:hover { border-color: var(--pine); color: var(--ink); transform: translateY(-1px); }
.collection-featured-category { color: var(--pine); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.collection-featured-card h3 { margin: 6px 0 8px; color: var(--pine-dark); font-size: 1.12rem; line-height: 1.2; }
.collection-featured-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.collection-featured-link { margin-top: auto; padding-top: 14px; color: var(--link); font-size: 0.82rem; font-weight: 800; }
.collection-toc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collection-toc strong { margin-right: 4px; color: var(--pine-dark); }
.collection-toc a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--link); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.collection-toc a:hover { border-color: var(--pine); background: #e3efe8; }
.collection-overview, .collection-next-step { padding: 24px; border-radius: 16px; background: var(--pine-dark); color: #f9fff9; }
.collection-overview h2, .collection-next-step h2 { margin: 0 0 10px; color: #fff; }
.collection-overview p, .collection-next-step p { max-width: 900px; color: #dbeee4; }
.collection-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.collection-context-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.collection-context-grid h2 { margin: 0 0 8px; color: var(--pine-dark); font-size: 1.35rem; }
.collection-context-grid p:last-child { margin-bottom: 0; color: #33405a; }
.collection-workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: wc-workflow; }
.collection-workflow li { position: relative; min-height: 104px; padding: 40px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: #33405a; counter-increment: wc-workflow; }
.collection-workflow li::before { content: counter(wc-workflow, decimal-leading-zero); position: absolute; top: 14px; left: 16px; color: var(--amber); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; }
.collection-tool-group { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 253, 248, 0.7); }
.collection-tool-group-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 14px; }
.collection-tool-group-head h3 { margin: 0 0 5px; color: var(--pine-dark); font-size: 1.25rem; }
.collection-tool-group-head p { margin: 0; color: var(--muted); }
.collection-tool-group-head a { flex: 0 0 auto; color: var(--link); font-weight: 800; text-decoration: none; }
.collection-tool-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.collection-tool-link { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; }
.collection-tool-link:hover { border-color: var(--pine); }
.collection-tool-link strong { color: var(--pine-dark); font-size: 0.92rem; line-height: 1.25; }
.collection-tool-link span { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.collection-next-step { margin: 28px 0 0; }
.collection-next-step .hero-cta { display: inline-block; margin-top: 5px; background: #fff; color: var(--pine-dark); }
.collection-next-step .hero-cta:hover { background: #e3efe8; }

/* Index + home sections */
.calculator-index { margin-top: 28px; display: grid; gap: 6px; }
.calculator-index p { margin: 0; }
.index-cat { color: var(--muted); font-size: 0.85rem; margin-left: 8px; }
.home-category { margin-top: 40px; display: grid; gap: 20px; border-top: 3px solid var(--pine-dark); padding-top: 18px; }
.home-category-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.home-category-head h3 { margin: 0 0 6px; font-size: 1.8rem; }
.home-category-head p { margin: 0 0 6px; color: var(--muted); max-width: 880px; }
.home-category-action { flex: 0 0 auto; margin: 0 !important; }
.home-category-action a { display: inline-block; padding: 9px 14px; border: 1px solid var(--pine); border-radius: 999px; color: var(--pine-dark); font-weight: 800; text-decoration: none; white-space: nowrap; }
.home-category-action a:hover { background: #e3efe8; }
.empty-category { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* FAQ */
.faq-section { display: grid; gap: 12px; margin-top: 26px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; font-family: var(--sans); }
.faq-item p { margin: 0; color: var(--muted); }
.faq-summary h2 { margin: 0 0 8px; }
.faq-summary p { margin: 0; color: var(--muted); }

/* Ads collapse until configured — zero weight, zero layout shift */
.ad-slot { margin: 20px 0; text-align: center; }
.ad-slot:empty { display: none; margin: 0; }
/* In-feed units span the full list width on any grid */
.calculator-list > .ad-slot { grid-column: 1 / -1; margin: 6px 0; }
/* Sticky bottom anchor bar (gate page, mobile-first). Renders only when set. */
.gate-anchor:empty { display: none; }
.gate-anchor .ad-slot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; margin: 0; padding: 8px 10px 10px; background: var(--card); border-top: 1px solid var(--line); }
.gate-anchor .ad-slot:empty { display: none; }
@media print {
  .gate-anchor { display: none !important; }
}

/* Download gate */
.gate-wrap { display: grid; gap: 16px; max-width: 760px; }
.gate-box { background: var(--pine-dark); color: #f3ecdd; border-radius: 14px; padding: 26px; text-align: center; }
.gate-timer { font-size: 3rem; font-weight: 800; margin: 6px 0; font-family: var(--serif); color: var(--amber); }
.gate-note { color: var(--muted); font-size: 0.9rem; }
.gate-box .gate-note { color: #cdbfa4; }
.gate-button { padding: 14px 32px; border-radius: 10px; font-weight: 800; font-size: 1.05rem; border: none; background: var(--amber); color: #231a06; }
.gate-button[disabled] { background: #6b7a5e; color: #e8e2d2; cursor: not-allowed; }
.gate-sponsor { margin: 10px 0; font-size: 0.92rem; color: #cdbfa4; }
.gate-sponsor a { color: var(--amber); font-weight: 700; }
.sheet { position: relative; overflow: hidden; background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: 0 12px 30px rgba(26, 36, 51, 0.08); }
.sheet > :not(.sheet-watermark) { position: relative; z-index: 1; }
.sheet-watermark { position: absolute; top: 40%; left: 12%; z-index: 0; display: grid; gap: 6px; color: #0d5c46; font-family: var(--serif); font-size: clamp(0.75rem, 2vw, 1.1rem); font-weight: 800; letter-spacing: 0.12em; opacity: .10; pointer-events: none; transform: rotate(-28deg); white-space: nowrap; text-transform: uppercase; }
.sheet-watermark img { display: block; width: clamp(220px, 42vw, 326px); height: auto; }
.sheet-watermark span { padding-left: 30px; }
.sheet-header { border-bottom: 3px solid var(--amber); padding-bottom: 18px; }
.sheet-brandline { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.sheet-brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sheet-logo { display: block; width: 56px; height: auto; flex: 0 0 auto; }
.sheet-kicker { margin: 0; color: var(--pine); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.sheet-brand { margin: 2px 0 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.sheet-brand a { color: var(--pine-dark); text-decoration: none; }
.sheet-format { flex: 0 0 auto; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--pine-dark); background: #f0e9d8; font-size: 0.78rem; font-weight: 800; }
.sheet h2 { margin: 22px 0 6px; color: var(--pine-dark); font-size: clamp(1.8rem, 4vw, 2.55rem); line-height: 1.08; }
.sheet-description { margin: 0; color: var(--muted); }
.sheet-meta { display: grid; gap: 2px; margin-top: 14px; color: var(--muted); font-size: 0.84rem; }
.sheet-meta p { margin: 0; overflow-wrap: anywhere; }
.sheet-attribution { font-weight: 700; }
.sheet-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); break-inside: avoid; page-break-inside: avoid; }
.sheet-section[hidden] { display: none; }
.sheet-section h3 { margin: 0 0 8px; color: var(--pine-dark); font-family: var(--serif); font-size: 1.25rem; }
.sheet-section p { margin: 6px 0; }
.sheet table { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin: 10px 0 0; }
.sheet caption { margin-bottom: 6px; color: var(--muted); text-align: left; font-size: 0.8rem; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.sheet thead th { background: #f0e9d8; color: var(--pine-dark); font-weight: 800; }
.sheet tbody th { background: #faf7f1; font-weight: 700; }
.sheet-list { margin: 8px 0 0; padding-left: 22px; }
.sheet-list li { margin: 4px 0; }
.sheet code { padding: 2px 6px; border-radius: 5px; background: #f0e9d8; color: var(--pine-dark); overflow-wrap: anywhere; }
.wc-chart-export-graphic { margin-top: 8px; }
.wc-chart-export-graphic svg { display: block; width: 100%; max-height: 300px; height: auto; font-family: var(--sans); }
.wc-chart-export-graphic .wc-chart-grid { stroke: #e4dac6; opacity: 1; }
.wc-chart-export-graphic .wc-chart-axis { stroke: #5f6c80; }
.wc-chart-export-graphic .wc-chart-axis-label, .wc-chart-export-graphic .wc-chart-legend-label { fill: #5f6c80; }
.wc-chart-export-graphic .wc-chart-center-label { fill: var(--pine-dark); }
.wc-chart-export-graphic p { margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; }
.wc-chart-export-graphic { break-inside: avoid; page-break-inside: avoid; }
.wc-chart-export-graphic svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.sheet-methodology { border-left: 4px solid var(--pine); padding-left: 16px; background: #f5f1e7; }
.sheet .sheet-foot { color: var(--muted); font-size: 0.85rem; }
.sheet-foot { margin: 24px 0 0; padding-top: 14px; border-top: 2px solid var(--pine-dark); overflow-wrap: anywhere; }

/* Long methodology pages stay easy to scan and easy to revisit. */
.methodology-toc { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 18px 0 24px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f1f7f2; }
.methodology-toc strong { margin-right: 4px; color: var(--pine-dark); }
.methodology-toc a { padding: 6px 9px; border: 1px solid #b9d2c3; border-radius: 999px; background: #fff; color: var(--link); font-size: .8rem; font-weight: 700; text-decoration: none; }
.methodology-toc a:hover, .methodology-toc a:focus-visible { border-color: var(--pine); background: #e3efe8; color: var(--pine-dark); }

/* Footer */
.site-footer { margin-top: 44px; background: var(--pine-dark); color: #d9cfb8; border-radius: 18px 18px 0 0; padding: 30px 28px 18px; }
.foot-grid { display: grid; grid-template-columns: 1.35fr 1.45fr .9fr .95fr; gap: 22px; }
.foot-logo { display: inline-block; margin: 0 0 8px; }
.foot-logo img { display: block; width: min(238px, 100%); height: auto; }
.foot-brand p { font-size: 0.88rem; line-height: 1.5; }
.foot-count { color: var(--amber); font-weight: 700; }
.foot-owner { margin-top: 10px; color: #f1eadb; }
.foot-head { font-weight: 800; color: #fff; margin: 0 0 10px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.foot-col a { color: #d9cfb8; text-decoration: none; font-size: 0.84rem; line-height: 1.35; }
.foot-col a:hover, .foot-col a:focus-visible { color: #fff; text-decoration: underline; }
.foot-owner-link { color: #ffd27e !important; font-weight: 800; }
.foot-network-link { color: #8fe0bc !important; font-weight: 800; }
.foot-base { border-top: 1px solid #2c4a3f; margin-top: 24px; padding-top: 14px; font-size: 0.84rem; }
.foot-base p { margin: 4px 0; }
.foot-base a { color: #d9cfb8; }
.foot-identity { color: #f1eadb; }
.foot-copy-note { color: #a9cabc; font-size: .78rem; }

/* Legacy bits */
.page-content { margin-top: 20px; color: var(--muted); max-width: 880px; }
.section-group { display: grid; gap: 16px; }
.aside-notes { margin-top: 6px; font-size: 0.93rem; color: var(--muted); }
.tab-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); }
.tab-button.active { background: var(--pine); border-color: var(--pine); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .calc-card-content { grid-template-columns: 1fr; grid-template-areas: "head" "links" "form" "result" "visual" "error" "copy" "dl" "history" "details"; }
  .result-panel { position: static; }
  .calculator-list .calc-card-content { padding: 18px; }
}
@media (max-width: 980px) {
  .calculator-grid, .feature-highlights, .usage-analytics-details, .form-grid, .related-grid, .calc-reader-guide-grid, .wc-article-links-grid, .trust-strip, .foot-grid, .teaser-list, .discovery-box, .world-context, .answer-path-grid, .collection-hero, .collection-context-grid, .category-context { grid-template-columns: 1fr; }
  .calculator-context { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid, .collection-grid-home, .collection-tool-list, .collection-workflow, .collection-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-context-controls { grid-template-columns: 1fr 1fr; }
  .anchor-menu ul { grid-template-columns: 1fr; }
  .masthead { flex-direction: column; align-items: stretch; }
  .masthead-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .header-context .world-context-panel { position: absolute; left: 0; right: auto; width: min(520px, calc(100vw - 44px)); }
  .menu-toggle { display: inline-flex; }
  .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .nav-links a { text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-cta { text-align: center; }
  .home-category-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .calc-visual-head { flex-direction: column; gap: 8px; }
  .calc-visual-state { align-self: flex-start; }
  .calc-visual-flow { grid-template-columns: 1fr; }
  .article-flow-steps { grid-template-columns: 1fr; }
  .calc-visual-arrow { justify-self: center; transform: rotate(90deg); }
  .calc-history-head { align-items: flex-start; flex-direction: column; }
  .calc-input-contract { columns: 1; }
  .result-composition { grid-template-columns: 92px 1fr; }
  .result-donut { width: 88px; height: 88px; }
  .home-hero { grid-template-columns: 1fr; gap: 20px; }
  .popular-tools-grid, .process-grid, .home-seo-grid, .home-collections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-next-step { align-items: flex-start; flex-direction: column; }
  .collection-directory-callout { align-items: flex-start; flex-direction: column; }
  .primary-nav-shell { display: grid; gap: 8px; }
  .menu-toggle { display: inline-flex; justify-self: end; }
  .nav-links { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
  .nav-links.open { display: grid; }
}

@media (max-width: 560px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; gap: 3px; }
  .topbar-links { gap: 14px; }
  .discovery-input-row, .world-context-controls, .featured-grid { grid-template-columns: 1fr; }
  .nav-links { grid-template-columns: 1fr; }
  .masthead-side { grid-template-columns: 1fr; align-items: stretch; }
  .brand-link { align-items: flex-start; flex-wrap: wrap; }
  .brand-text { flex: 1 1 100%; }
  .brand-logo { width: min(238px, 82vw); }
  .world-context-summary { justify-content: space-between; }
  .header-context .world-context-panel { position: static; width: auto; margin-top: 8px; }
  .header-context .world-context-controls { grid-template-columns: 1fr; }
  .popular-tools-grid, .process-grid, .home-seo-grid, .home-collections-grid { grid-template-columns: 1fr; }
  .home-collections { padding: 18px 16px; }
  .home-hero { padding-top: 18px; }
  .home-hero-copy h1 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .home-hero-proof { padding: 20px; }
  .discovery-input-row .button-primary { width: 100%; }
      .collection-grid, .collection-grid-home, .collection-tool-list, .collection-workflow, .collection-featured-grid { grid-template-columns: 1fr; }
      .collection-hero, .collection-directory, .collection-section { padding-left: 16px; padding-right: 16px; }
      .collection-tool-group-head { display: grid; }
      .calc-article-supporting-visual, .wc-editorial-article .wc-article-mid-visual { grid-template-columns: 1fr; }
      .wc-editorial-article .calc-longform { margin-top: 20px; }
      .wc-editorial-article .calc-longform > section { padding: 22px 0; }
      .wc-editorial-article .calc-longform th, .wc-editorial-article .calc-longform td { min-width: 125px; }
      .wc-editorial-article .calc-longform dl { grid-template-columns: 1fr; }
    }

/* Public market snapshot and read-only wallet viewer */
.wc-market-panel { margin: 28px 0; padding: 24px; border: 1px solid var(--line, #d9e2ec); border-radius: 20px; background: linear-gradient(135deg, #f8fbff, #fffdf8); }
.wc-market-panel-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.wc-market-panel-head h2 { margin: 0 0 8px; }
.wc-market-panel-head p { max-width: 760px; margin-bottom: 0; }
.wc-market-freshness { flex: 0 0 auto; padding: 10px 12px; border-radius: 12px; background: #fff; color: var(--muted, #526273); font-size: .82rem; }
.wc-market-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.wc-market-column { min-width: 0; padding: 14px; border: 1px solid var(--line, #d9e2ec); border-radius: 14px; background: #fff; }
.wc-market-column summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; color: var(--ink, #142033); font-weight: 700; }
.wc-market-expand { color: var(--muted, #526273); font-size: .78rem; font-weight: 500; }
.wc-market-table-wrap { overflow-x: auto; margin-top: 10px; }
.wc-market-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.wc-market-table th, .wc-market-table td { padding: 8px 4px; border-bottom: 1px solid #edf1f5; text-align: right; white-space: nowrap; }
.wc-market-table th:first-child, .wc-market-table td:first-child { text-align: left; }
.wc-market-table th small { display: block; color: var(--muted, #526273); font-weight: 500; }
.wc-market-empty, .wc-market-panel-foot, .wallet-form-note, .wallet-result-note { color: var(--muted, #526273); font-size: .9rem; }
.wc-market-all-rows { margin-top: 10px; border-top: 1px solid #edf1f5; padding-top: 8px; }
.wc-market-all-rows[hidden] { display: none; }
.wc-market-all-rows p { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0; font-size: .8rem; }
.wc-market-panel-foot { margin: 18px 0 0; }
.wallet-page { max-width: 1120px; margin: 0 auto; padding: 0 20px 56px; }
.wallet-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: stretch; margin: 24px 0; }
.wallet-hero h1 { margin-top: 0; }
.wallet-safety-card { padding: 20px; border: 1px solid #f0d3a0; border-radius: 18px; background: #fff7e8; color: #513818; }
.wallet-safety-card p { margin-bottom: 0; }
.wallet-tool { padding: 24px; }
.wallet-form { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 10px 14px; align-items: end; }
.wallet-form label { font-weight: 700; }
.wallet-form label:nth-of-type(2) { grid-column: 2; }
.wallet-form select, .wallet-form input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line, #d9e2ec); border-radius: 10px; background: #fff; }
.wallet-form input { grid-column: 2; }
.wallet-form button { grid-column: 3; grid-row: 2; min-height: 44px; }
.wallet-form-note { margin: 14px 0 0; }
.wallet-status { min-height: 24px; margin-top: 16px; color: var(--muted, #526273); }
.wallet-status.is-error { color: #a32626; }
.wallet-status.is-success { color: #176b46; }
.wallet-result { margin-top: 18px; padding: 20px; border: 1px solid var(--line, #d9e2ec); border-radius: 16px; background: #fbfdff; }
.wallet-result[hidden] { display: none; }
.wallet-result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.wallet-result-head h3 { margin: 0; }
.wallet-address-result { margin: 0; color: var(--muted, #526273); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.wallet-balance { display: grid; gap: 4px; margin: 16px 0; padding: 14px; border-radius: 12px; background: #edf7f2; }
.wallet-result-label { color: var(--muted, #526273); font-size: .84rem; }
.wallet-transactions { display: grid; gap: 8px; padding-left: 24px; }
.wallet-transactions a { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.wallet-tx-time, .wallet-tx-state { color: var(--muted, #526273); font-size: .84rem; }
.wallet-watchlist { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line, #d9e2ec); }
.wallet-watchlist ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.wallet-watch-button { padding: 8px 10px; border: 1px solid var(--line, #d9e2ec); border-radius: 999px; background: #fff; cursor: pointer; }
.wallet-explainer { margin-top: 28px; }
.wallet-explainer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.wallet-explainer-grid > div { padding: 18px; border: 1px solid var(--line, #d9e2ec); border-radius: 14px; }
.wallet-explainer-grid h3 { margin-top: 0; }

@media (max-width: 980px) {
  .topbar-links { display: none; }
  .wc-market-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-hero { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wc-market-panel-head, .wallet-result-head { display: grid; }
  .wc-market-columns, .wallet-explainer-grid { grid-template-columns: 1fr; }
  .wallet-form { grid-template-columns: 1fr; }
  .wallet-form label:nth-of-type(2), .wallet-form input, .wallet-form button { grid-column: 1; grid-row: auto; }
}

/* Compact mobile discovery: keep every category crawlable while reducing
   vertical scanning. The descriptions remain in the HTML for accessibility
   and search, but the visual card rhythm is intentionally compact. */
@media (max-width: 560px) {
  .site-wrap { padding-right: 14px; padding-left: 14px; }
  .masthead { padding-top: 14px; padding-bottom: 10px; }
  .nav-links { display: none; grid-template-columns: 1fr; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .nav-links.open { display: grid; }
  .nav-links a { flex: 0 0 auto; }
  .trust-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .trust-strip li { flex: 0 0 min(78vw, 250px); }
  .home-section { margin-top: 28px; }
  .category-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-directory-grid .feature-card { min-height: 0; padding: 13px 12px 12px; border-top-width: 3px; }
  .category-directory-grid .category-icon { width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px; }
  .category-directory-grid .category-icon-svg svg { width: 27px; height: 27px; }
  .category-directory-grid .feature-card h3 { margin-bottom: 5px; font-size: 1rem; line-height: 1.2; }
  .category-directory-grid .feature-card > p:not(.card-count):not(.card-link) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .category-subcategory-preview { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .category-subcategory-preview li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .category-subcategory-preview .category-subcategory-more { display: none; }
  .category-directory-grid .feature-card .card-count { padding-top: 8px; font-size: .82rem; }
  .category-directory-grid .feature-card .card-link { font-size: .84rem; }
  .category-subcategory-toc { margin-top: 14px; padding: 12px; }
  .anchor-menu-label { display: grid; gap: 3px; }
  .anchor-menu ul { grid-template-columns: 1fr; gap: 0; }
  .anchor-menu li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .anchor-menu-count { flex: 0 0 auto; margin-left: auto; }
  .category-tool-groups { margin-top: 22px; }
  .category-tool-group { margin: 18px 0; padding: 13px; }
  .category-tool-group-head { display: grid; gap: 8px; margin-bottom: 12px; }
  .category-tool-group-head h3 { font-size: 1.15rem; }
  .category-tool-group-head a { justify-self: start; }
}

/* Print: only the result sheet */
@media print {
  @page { margin: 14mm; }
  .topbar, .masthead, .nav-links, .site-footer, .breadcrumb, .ad-slot,
  .gate-box, .actions, .copy-button, .download-links, .wc-search, .hero-cta,
  .discovery-box, .world-context, .answer-path, .calc-details, .anchor-menu,
  .related-grid, .no-print, .menu-toggle, .skip-link { display: none !important; }
  .download-main > :not(.gate-wrap), .download-main .gate-wrap > :not(.sheet) { display: none !important; }
  .download-main .gate-wrap { display: block; max-width: none; }
  .site-wrap { max-width: 100%; padding: 0; }
  .sheet { display: block !important; border: none; border-radius: 0; box-shadow: none; padding: 0; }
  .sheet-section { break-inside: avoid; page-break-inside: avoid; }
  .sheet thead { display: table-header-group; }
  .sheet tr { break-inside: avoid; page-break-inside: avoid; }
  .sheet-watermark { position: fixed; }
  .sheet-logo { width: 52px; }
  body { font-size: 11pt; color: #1a2433; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
