/* ============================================================
   CalcQube Design System — "Precision Instrument"
   Light, grid-paper background. Single ink accent. No gradients,
   no card shadows — structure comes from thin rules, not blur.
   Uses fast system font stacks to avoid third-party font requests and CLS.
   ============================================================ */

:root {
  --bg: #F6F4EE;
  --grid-line: rgba(26,29,30,0.05);
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card2: #FBFAF6;
  --border: #DEDACD;
  --border-strong: #C7C2B0;
  --text: #1A1D1E;
  --muted: #6B6F66;
  --accent: #1F5C4C;
  --accent-tint: rgba(31,92,76,0.08);
  --accent-tint-strong: rgba(31,92,76,0.16);
  --good: #1F5C4C;
  --warn: #8F5817;
  --bad: #A8341F;
  --border-light: rgba(26,29,30,0.1);
  --blue: #2B5F8C;
  --purple: #5B4E8C;
  --green: #1F5C4C;
  --orange: #A8621B;
  --yellow: #8C7A1F;
  --red: #A8341F;
  --radius-sm: 4px;
  --radius-md: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

h1, h2, h3, h4, .nav-logo, .page-header h1, .card h2, .footer-logo {
  font-family: var(--font-mono);
}

a { color: inherit; }

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  background: rgba(246,244,238,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1250px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.nav-logo {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo::before { content: "#/ "; color: var(--accent); }
.nav-sep { color: var(--border-strong); }
.nav-crumb { color: var(--muted); font-size: 0.83rem; }
.nav-crumb span { color: var(--accent); font-weight: 600; }
.nav-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nav-inner .nav-links {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.nav-inner .nav-links::-webkit-scrollbar { display: none; }
.nav-more { position: relative; flex-shrink: 0; }
.nav-more-btn { background: none; border: none; font-family: var(--font-sans); color: var(--muted); font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 0; white-space: nowrap; }
.nav-more-btn:hover { color: var(--accent); }
.nav-more-menu { display: none; position: absolute; top: 140%; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.4rem; min-width: 200px; box-shadow: 0 10px 30px rgba(26,29,30,0.12); z-index: 60; list-style: none; }
.nav-more.open .nav-more-menu { display: block; }
.nav-more-menu li { display: block; }
.nav-more-menu a { display: block; padding: 0.5rem 0.7rem; white-space: nowrap; color: var(--text); text-decoration: none; font-size: 0.85rem; border-radius: var(--radius-sm); }
.nav-more-menu a:hover { background: var(--accent-tint); color: var(--accent); }
.nav-inner .nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.15s;
}
.nav-inner .nav-links a:hover { color: var(--accent); }
.nav-more-mobile { display: none; }
@media(max-width: 700px) {
  nav { background: var(--bg); backdrop-filter: none; }
  .nav-inner .nav-links { display: none; }
  .nav-more-desktop { display: none; }
  .nav-more-mobile { display: block; }
  .nav-logo { font-size: 1.15rem; white-space: nowrap; }
  .nav-inner { gap: 0.5rem; padding: 0 1rem; }
  .nav-btn { padding: 0.6rem 0.8rem; font-size: 0.8rem; min-height: 40px; display: inline-flex; align-items: center; }
  .nav-more-btn { font-size: 0.85rem; padding: 0.6rem 0.4rem; min-height: 40px; display: inline-flex; align-items: center; }
}
.nav-btn:hover { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }
.breadcrumb-center { text-align: center; margin-top: 20px; }

/* LAYOUT */
.page-wrap { max-width: 1250px; margin: 0 auto; padding: 2.5rem 2rem 6rem; display: grid; grid-template-columns: 1fr 290px; gap: 2rem; align-items: start; }
@media(max-width:900px){ .page-wrap{grid-template-columns:1fr;} .sidebar{display:none;} .page-wrap .contact-sidebar{display:block;} }
@media(max-width:600px){ .page-wrap{padding:1.5rem 1rem 4rem;} }

/* PAGE HEADER */
.page-header { grid-column:1/-1; margin-bottom: 0.5rem; }
.tag-row { display:flex; gap:0.5rem; flex-wrap:wrap; margin-bottom:0.8rem; }
.tag { background:var(--accent-tint); border:1px solid var(--accent-tint-strong); color:var(--accent); font-size:0.7rem; font-weight:700; padding:0.2rem 0.7rem; border-radius:20px; letter-spacing:0.3px; font-family:var(--font-sans); }
.page-header h1 { font-size:clamp(1.6rem,4vw,2.4rem); font-weight:700; letter-spacing:-0.5px; line-height:1.15; margin-bottom:0.6rem; }
.page-header h1 .grad { color: var(--accent); }
.page-header p { color:var(--muted); font-size:0.97rem; line-height:1.65; max-width:864px; }

/* TABS */
.tab-nav { grid-column:1/-1; display:flex; gap:0.2rem; border-bottom:1px solid var(--border); margin-bottom:1.5rem; overflow-x:auto; }
.tab-btn { background:transparent; border:none; border-bottom:2px solid transparent; color:var(--muted); padding:0.7rem 1.1rem; font-family:var(--font-sans); font-size:0.86rem; font-weight:600; cursor:pointer; white-space:nowrap; transition:color 0.15s, border-color 0.15s; margin-bottom:-1px; display:flex; align-items:center; gap:0.4rem; }
.tab-btn:hover { color:var(--text); }
.tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); }
.tab-content { display:none; }
.tab-content.active { display:block; }

/* CARD */
.card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.8rem; margin-bottom:1.5rem; }
.card h2 { font-size:1rem; font-weight:600; margin-bottom:1.2rem; display:flex; align-items:center; gap:0.5rem; }

/* INPUTS */
.input-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:0.8rem; margin-bottom:1rem; }
@media(max-width:500px){ .input-row{grid-template-columns:1fr 1fr;} }
.field-group { display:flex; flex-direction:column; gap:0.4rem; }
.field-group label { font-size:0.7rem; font-weight:700; color:var(--muted); letter-spacing:0.8px; text-transform:uppercase; }
.field-group select, .field-group input { background:var(--surface); border:1.5px solid var(--border-strong); color:var(--text); padding:0.75rem 0.9rem; border-radius:var(--radius-sm); font-family:var(--font-sans); font-size:0.95rem; outline:none; transition:border-color 0.15s; width:100%; }
.field-group select:focus, .field-group input:focus { border-color:var(--accent); }
.calc-btn { width:100%; background:var(--accent); color:#fff; border:none; padding:0.95rem; border-radius:var(--radius-sm); font-family:var(--font-sans); font-size:1rem; font-weight:700; cursor:pointer; transition:opacity 0.15s; margin-top:0.4rem; }
.calc-btn:hover { opacity:0.88; }

/* RESULTS */
.result-section { display:none; }
.result-section.show { display:block; }
.result-top { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1.2rem; }
.result-stat { background:var(--card2); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.4rem 1rem; text-align:center; border-top:2px solid var(--accent); }
.result-stat .big { font-family:var(--font-mono); font-size:1.9rem; font-weight:700; color:var(--accent); line-height:1; }
.result-stat .unit { font-size:0.75rem; color:var(--muted); font-weight:600; margin-top:4px; text-transform:uppercase; letter-spacing:0.5px; }
.result-summary { background:var(--accent-tint); border:1px solid var(--accent-tint-strong); border-radius:var(--radius-md); padding:1rem 1.2rem; font-size:0.95rem; line-height:1.6; margin-bottom:1.2rem; }

/* COUNTDOWN */
.countdown-title { font-size:0.75rem; font-weight:700; color:var(--muted); letter-spacing:1.2px; text-transform:uppercase; margin-bottom:1rem; }
.countdown-circles { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.circle { width:86px; height:86px; border-radius:50%; border:2px solid var(--border-strong); background:var(--card2); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.c-num { font-family:var(--font-mono); font-size:1.5rem; font-weight:700; color:var(--text); line-height:1; }
.c-lbl { font-size:0.6rem; color:var(--muted); font-weight:600; text-transform:uppercase; margin-top:2px; letter-spacing:0.5px; }

/* PILLS */
.pills { display:flex; flex-wrap:wrap; gap:0.6rem; }
.pill { background:var(--card2); border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:0.55rem 1rem; font-size:0.88rem; font-weight:500; }
.pill b { color:var(--accent); }

/* BIRTH INFO */
.birth-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.5rem; }
@media(max-width:500px){ .birth-info-grid{grid-template-columns:1fr;} }
.info-row { display:flex; justify-content:space-between; align-items:center; padding:0.65rem 0.9rem; background:var(--card2); border-radius:var(--radius-sm); gap:0.5rem; }
.info-row .lbl { font-size:0.76rem; color:var(--muted); flex-shrink:0; }
.info-row .val { font-size:0.86rem; font-weight:600; color:var(--text); text-align:right; font-family:var(--font-mono); }

/* MILESTONES */
.milestone-table { width:100%; border-collapse:collapse; font-size:0.87rem; }
.milestone-table thead tr { background:var(--accent-tint); }
.milestone-table th { padding:0.7rem 1rem; text-align:left; font-weight:700; color:var(--accent); font-size:0.72rem; letter-spacing:0.5px; text-transform:uppercase; }
.milestone-table td { padding:0.65rem 1rem; border-bottom:1px solid var(--border); }
.milestone-table tr:last-child td { border-bottom:none; }
.milestone-table tr:hover td { background:var(--card2); }
.passed { color:var(--good) !important; font-weight:600; }
.future { color:var(--muted); }

/* FUN FACTS */
.facts-section { margin-bottom:1.5rem; }
.facts-section-title { font-size:1rem; font-weight:600; margin-bottom:1rem; display:flex; align-items:center; gap:0.5rem; padding-bottom:0.6rem; border-bottom:1px solid var(--border); }
.fact-card { background:var(--card2); border:1px solid var(--border); border-radius:var(--radius-md); padding:1rem 1.2rem; margin-bottom:0.7rem; display:flex; align-items:flex-start; gap:0.9rem; transition:border-color 0.15s; }
.fact-card:hover { border-color:var(--border-strong); }
.fact-icon { font-size:1.4rem; flex-shrink:0; margin-top:1px; }
.fact-body { flex:1; }
.fact-label { font-size:0.7rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.6px; margin-bottom:0.3rem; }
.fact-text { font-size:0.9rem; line-height:1.6; color:var(--text); }
.fact-text b { color:var(--accent); }
.fact-text .highlight { color:var(--warn); font-weight:700; }
.fact-text .green { color:var(--good); font-weight:700; }
.fact-text .pink { color:var(--accent); font-weight:700; }

/* COMING SOON TAB */
.coming-soon-box { background:var(--card2); border:1px dashed var(--border-strong); border-radius:var(--radius-md); padding:3rem 2rem; text-align:center; }
/* FORMULA */
.formula-block { background:var(--card2); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.2rem 1.4rem; margin-bottom:1rem; }
.formula-block h4 { color:var(--accent); font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; margin-bottom:0.5rem; font-family:var(--font-sans); }
.formula-block p { color:var(--muted); font-size:0.87rem; line-height:1.7; }
.formula-code { font-family:var(--font-mono); background:var(--accent-tint); border:1px solid var(--accent-tint-strong); border-radius:var(--radius-sm); padding:0.8rem 1rem; color:var(--accent); font-size:0.85rem; margin-top:0.5rem; overflow-x:auto; line-height:1.7; }

/* FAQ */
.faq-item { border-bottom:1px solid var(--border); }
.faq-item:last-child { border-bottom:none; }
.faq-q { width:100%; background:transparent; border:none; color:var(--text); font-family:var(--font-sans); font-size:0.93rem; font-weight:600; padding:1rem 0; text-align:left; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:1rem; transition:color 0.15s; }
.faq-q:hover { color:var(--accent); }
.faq-icon { font-size:1.1rem; flex-shrink:0; transition:transform 0.25s; color:var(--muted); }
.faq-item.open .faq-icon { transform:rotate(45deg); color:var(--accent); }
.faq-a { color:var(--muted); font-size:0.88rem; line-height:1.7; max-height:0; overflow:hidden; transition:max-height 0.3s ease, padding 0.25s; }
.faq-item.open .faq-a { max-height:400px; padding-bottom:1rem; }

/* EXAMPLES */
.example-card { background:var(--card2); border:1px solid var(--border); border-radius:var(--radius-md); padding:1rem 1.2rem; margin-bottom:0.7rem; cursor:pointer; transition:border-color 0.15s, background 0.15s; display:flex; justify-content:space-between; align-items:center; }
.example-card:hover { border-color:var(--accent); background:var(--accent-tint); }
.ex-label { font-size:0.9rem; font-weight:600; }
.ex-sub { font-size:0.76rem; color:var(--muted); margin-top:2px; }
.ex-arrow { color:var(--accent); font-size:1.1rem; flex-shrink:0; }

/* SIDEBAR */
.sidebar { position:sticky; top:75px; }
.sidebar-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.2rem; margin-bottom:1rem; }
.sidebar-card h4 { font-size:0.72rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:0.8rem; font-family:var(--font-sans); }
.related-link { display:flex; align-items:center; gap:0.6rem; padding:0.5rem 0.6rem; border-radius:var(--radius-sm); text-decoration:none; color:var(--text); font-size:0.87rem; transition:background 0.15s; margin-bottom:0.1rem; }
.related-link:hover { background:var(--accent-tint); color:var(--accent); }
.share-mini { display:flex; gap:0.5rem; flex-wrap:wrap; }
.share-mini button { flex:1; padding:0.5rem; border-radius:var(--radius-sm); border:1px solid var(--border-strong); font-size:0.76rem; font-weight:700; cursor:pointer; transition:background 0.15s; color:#ffffff; background:var(--surface); font-family:var(--font-sans); }
.share-mini button:hover { background:var(--accent-tint); border-color:var(--accent); }

/* PROGRESS BAR */
.progress-wrap { margin:1rem 0 0.3rem; }
.progress-label { display:flex; justify-content:space-between; font-size:0.78rem; color:var(--muted); margin-bottom:0.4rem; }
.progress-bar { height:8px; background:var(--border); border-radius:4px; overflow:hidden; }
.progress-fill { height:100%; border-radius:4px; background:var(--accent); transition:width 1s ease; }

/* PLANET TABLE */
.planet-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:0.6rem; }
.planet-card { background:var(--card2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:0.8rem; text-align:center; }
.planet-card .p-icon { font-size:1.5rem; margin-bottom:0.3rem; }
.planet-card .p-name { font-size:0.72rem; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }
.planet-card .p-age { font-size:1rem; font-weight:700; color:var(--accent); margin-top:0.2rem; font-family:var(--font-mono); }
.planet-card .p-unit { font-size:0.68rem; color:var(--muted); }

/* FOOTER */
footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; position: relative; z-index: 1; background: var(--card2); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 3.5rem 2rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; text-align: left; }
.footer-logo { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 0.7rem; }
.footer-logo::before { content: "#/ "; color: var(--accent); }
.footer-tagline { color: var(--muted); font-size: 0.85rem; line-height: 1.6; max-width: 320px; margin-bottom: 1.3rem; }
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: all 0.15s; }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title { color: var(--text); font-size: 0.92rem; font-weight: 700; margin-bottom: 1.1rem; font-family:var(--font-sans); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 1.5rem 2rem 2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-copyright { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* HOMEPAGE - CATEGORY PREVIEW SECTIONS */
.home-intro { text-align:center; max-width:680px; margin:0 auto 2.5rem; }
.home-cat-section { margin-bottom:2.8rem; }
.home-cat-header { display:flex; align-items:center; gap:0.9rem; margin-bottom:0.6rem; flex-wrap:wrap; }
.home-cat-icon { width:44px; height:44px; border-radius:var(--radius-md); background:var(--accent-tint); border:1px solid var(--accent-tint-strong); display:flex; align-items:center; justify-content:center; font-size:1.4rem; flex-shrink:0; }
.home-cat-title-wrap { display:flex; align-items:baseline; gap:0.7rem; flex-wrap:wrap; }
.home-cat-title { font-size:1.25rem; font-weight:700; letter-spacing:-0.3px; text-decoration:none; color:var(--text); }
.home-cat-title:hover { color:var(--accent); }
.home-cat-count { color:var(--muted); font-size:0.78rem; }
.home-cat-viewall { border:1px solid var(--border-strong); border-radius:20px; padding:0.4rem 1rem; font-size:0.8rem; font-weight:600; text-decoration:none; color:var(--text); white-space:nowrap; transition:border-color 0.15s, color 0.15s; }
.home-cat-viewall:hover { border-color:var(--accent); color:var(--accent); }
.home-cat-desc { color:var(--muted); font-size:0.88rem; line-height:1.6; margin-bottom:1rem; max-width:800px; }
.home-tool-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:0.9rem; }
@media(max-width:600px){ .home-tool-grid{grid-template-columns:repeat(2,1fr);gap:0.6rem;} }

/* HOMEPAGE NAV */
main#mainContent { max-width:1250px; margin:0 auto; padding:2rem 2rem 4rem; }
.logo { font-family:var(--font-mono); font-size:1.5rem; font-weight:700; color:var(--text); }
.logo::before { content: "#/ "; color: var(--accent); }
.nav-links { display:flex; list-style:none; gap:1.6rem; margin:0 auto 0 2.2rem; overflow-x:auto; white-space:nowrap; scrollbar-width:none; flex:1; min-width:0; }
.nav-links::-webkit-scrollbar { display:none; }
.nav-links li { display:inline; }
.nav-links a { color:var(--muted); text-decoration:none; font-size:0.88rem; font-weight:600; transition:color 0.15s; }
.nav-links a:hover { color:var(--accent); }
.nav-search { display:flex; align-items:center; gap:0.5rem; background:var(--surface); border:1px solid var(--border-strong); border-radius:20px; padding:0.45rem 1rem; width:220px; }
.nav-search input { border:none; outline:none; background:transparent; font-family:var(--font-sans); font-size:0.85rem; color:var(--text); width:100%; }
.nav-search .search-icon { font-size:0.85rem; opacity:0.6; }
@media(max-width:800px){
  .nav-links{display:none;}
  .nav-more-desktop{display:none;}
  .nav-more-mobile{display:block;}
  .nav-search{width:auto;flex:1;margin-left:0.6rem;}
  .logo{font-size:1.15rem;white-space:nowrap;}
}

/* HOMEPAGE HERO */
.hero { max-width:1250px; margin:0 auto; padding:3.5rem 2rem 2rem; text-align:center; position:relative; }
.hero-glow { display:none; }
.hero h1 { font-family:var(--font-mono); font-size:clamp(1.6rem,4vw,2.4rem); font-weight:700; letter-spacing:-1px; line-height:1.15; margin-bottom:1rem; }
.hero .gradient-text { color:var(--accent); }
.hero > p { color:var(--muted); font-size:1.05rem; max-width:600px; margin:0 auto 2rem; line-height:1.6; }
.hero-search { position:relative; max-width:520px; margin:0 auto 2.5rem; display:flex; align-items:center; gap:0.6rem; background:var(--surface); border:1.5px solid var(--border-strong); border-radius:var(--radius-md); padding:0.9rem 1.2rem; }
.hero-search .search-ico { opacity:0.6; }
.hero-search input { flex:1; border:none; outline:none; background:transparent; font-family:var(--font-sans); font-size:1rem; color:var(--text); }
.search-results-drop { position:absolute; top:105%; left:0; right:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); text-align:left; max-height:340px; overflow-y:auto; z-index:50; display:none; }
.search-results-drop:not(:empty) { display:block; }
.search-result-item { display:flex; align-items:center; gap:0.7rem; padding:0.7rem 1rem; text-decoration:none; color:var(--text); font-size:0.9rem; border-bottom:1px solid var(--border); }
.search-result-item:last-child { border-bottom:none; }
.search-result-item:hover { background:var(--accent-tint); }
.stats-bar { display:flex; justify-content:center; gap:2.5rem; flex-wrap:wrap; }
.stat-item { text-align:center; }
.stat-num { font-family:var(--font-mono); font-size:1.6rem; font-weight:700; color:var(--accent); line-height:1; }
.stat-label { font-size:0.68rem; color:var(--muted); font-weight:700; letter-spacing:0.8px; margin-top:0.3rem; }
@media(max-width:500px){ .stats-bar{gap:1.4rem;} }

/* CATEGORY PAGE */
.cat-hero { grid-column:1/-1; display:flex; align-items:flex-start; gap:1.2rem; margin-bottom:0.5rem; }
.cat-hero-icon { width:56px; height:56px; border-radius:var(--radius-md); background:var(--accent-tint); border:1px solid var(--accent-tint-strong); display:flex; align-items:center; justify-content:center; font-size:1.8rem; flex-shrink:0; }
.cat-hero h1 { font-size:clamp(1.6rem,4vw,2.2rem); font-weight:700; letter-spacing:-0.5px; margin-bottom:0.4rem; }
.cat-hero p { color:var(--muted); font-size:0.95rem; line-height:1.65; max-width:1200px; }
.cat-count { color:var(--muted); font-size:0.8rem; margin-top:0.4rem; }
.tool-grid { grid-column:1/-1; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1rem; }
.tool-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:1.1rem 1.2rem; text-decoration:none; color:var(--text); display:flex; flex-direction:column; gap:0.4rem; transition:border-color 0.15s, transform 0.15s; position:relative; }
.tool-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.tool-card-top { display:flex; align-items:center; gap:0.6rem; }
.tool-card-emoji { font-size:1.4rem; }
.tool-card-name { font-weight:600; font-size:0.95rem; }
.tool-card-desc { color:var(--muted); font-size:0.82rem; line-height:1.5; }
.tool-card-hot { position:absolute; top:0.7rem; right:0.7rem; font-size:0.6rem; font-weight:800; text-transform:uppercase; letter-spacing:0.5px; color:var(--warn); background:var(--accent-tint); border:1px solid var(--accent-tint-strong); padding:0.1rem 0.4rem; border-radius:10px; }
.cat-nav-list { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:0.5rem; margin:1.5rem 0 0.5rem; padding-top:1.5rem; border-top:1px solid var(--border); }
.cat-nav-pill { border:1px solid var(--border-strong); border-radius:20px; padding:0.4rem 0.9rem; font-size:0.8rem; text-decoration:none; color:var(--muted); transition:border-color 0.15s, color 0.15s; }
.cat-nav-pill:hover, .cat-nav-pill.active { border-color:var(--accent); color:var(--accent); }

/* SEO CONTENT */
.seo-section{margin-top:2rem;grid-column:1/-1;}
.seo-section h2{font-size:1.25rem;font-weight:700;margin-bottom:0.9rem;color:var(--text);letter-spacing:-0.3px;}
.seo-section h3{font-size:1rem;font-weight:600;margin:1.5rem 0 0.6rem;color:var(--text);font-family:var(--font-sans);}
.seo-section p{color:var(--muted);font-size:0.95rem;line-height:1.75;margin-bottom:0.85rem;}
.seo-section ul,.seo-section ol{color:var(--muted);font-size:0.95rem;line-height:1.75;padding-left:1.4rem;margin-bottom:0.85rem;}
.seo-section li{margin-bottom:0.35rem;}
.seo-section strong{color:var(--text);}
.seo-highlight{background:var(--card2);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:0 var(--radius-md) var(--radius-md) 0;padding:1rem 1.2rem;margin:1rem 0 1.2rem;font-size:0.91rem;color:var(--muted);line-height:1.7;}
.seo-highlight strong{color:var(--text);}
.seo-two-col{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;margin:1rem 0 1.4rem;}
@media(max-width:600px){.seo-two-col{grid-template-columns:1fr;}}
.seo-info-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-md);padding:1.1rem 1.2rem;}
.seo-info-card h4{font-size:0.75rem;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:0.6rem;font-family:var(--font-sans);}
.seo-info-card ul{padding-left:1.1rem;margin:0;}

/* TEXTAREA - opt-in styling */
textarea.app-textarea {
  width: 100%;
  min-height: 220px;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}
textarea.app-textarea:focus {
  border-color: var(--accent);
}
textarea.app-textarea::placeholder {
  color: var(--muted);
}
@media(max-width:600px){
  textarea.app-textarea{ min-height: 160px; }
}
.seo-info-card li{font-size:0.85rem;color:var(--muted);margin-bottom:0.3rem;}
/* ==========================================================================
   Icon system — replaces emoji throughout the site with SVG icons
   (sprite at /assets/icons.svg, referenced via <use>).
   ========================================================================== */
.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  color: currentColor;
  flex-shrink: 0;
}
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-sm { width: 0.9em; height: 0.9em; }
.icon-accent { color: var(--accent); }
.icon-muted { color: var(--muted); }

/* ========================================================================== 
   Cookie consent banner and preference dialog
   ========================================================================== */
html.cookie-modal-open { overflow: hidden; }
.cq-cookie-banner[hidden], .cq-cookie-modal[hidden] { display: none !important; }
.cq-cookie-banner {
  position: fixed;
  z-index: 10000;
  left: 18px;
  right: 18px;
  bottom: 18px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.cq-cookie-banner.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cq-cookie-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
}
.cq-cookie-banner__copy { flex: 1; min-width: 0; }
.cq-cookie-banner__copy strong { display: block; font-size: 1rem; margin-bottom: .3rem; }
.cq-cookie-banner__copy p { margin: 0 0 .35rem; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.cq-cookie-banner__copy a { color: var(--accent); font-weight: 700; font-size: .82rem; }
.cq-cookie-banner__actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; max-width: 430px; }
.cq-cookie-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  min-height: 42px;
  padding: .65rem .9rem;
  font: 700 .82rem/1.2 var(--font-sans);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.cq-cookie-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.cq-cookie-btn:focus-visible, .cq-cookie-close:focus-visible, .cq-cookie-regional button:focus-visible { outline: 3px solid var(--accent-tint-strong); outline-offset: 2px; }
.cq-cookie-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cq-cookie-btn--link { border-color: transparent; background: transparent; color: var(--accent); }
.cq-cookie-modal {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 15, 25, .62);
  backdrop-filter: blur(4px);
}
.cq-cookie-modal__panel {
  width: min(680px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.30);
  padding: 1.25rem;
}
.cq-cookie-modal__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.cq-cookie-modal__head h2 { margin: .15rem 0 0; font-size: 1.45rem; }
.cq-cookie-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; font-weight: 800; }
.cq-cookie-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.8rem; line-height: 1; padding: .15rem .35rem; }
.cq-cookie-intro { margin: .85rem 0 1rem; color: var(--muted); line-height: 1.6; font-size: .9rem; }
.cq-cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem 0;
  border-top: 1px solid var(--border);
}
.cq-cookie-option strong { display: block; font-size: .92rem; }
.cq-cookie-option p { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.cq-cookie-always { flex-shrink: 0; color: var(--accent); font-size: .72rem; font-weight: 800; }
.cq-cookie-option--toggle { cursor: pointer; }
.cq-cookie-switch { position: relative; flex: 0 0 48px; width: 48px; height: 26px; }
.cq-cookie-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cq-cookie-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s ease; }
.cq-cookie-switch span::after { content: ''; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .15s ease; }
.cq-cookie-switch input:checked + span { background: var(--accent); }
.cq-cookie-switch input:checked + span::after { transform: translateX(22px); }
.cq-cookie-switch input:focus-visible + span { outline: 3px solid var(--accent-tint-strong); outline-offset: 2px; }
.cq-cookie-regional { margin-top: .35rem; padding: .8rem .9rem; border-radius: 10px; background: var(--card2); color: var(--muted); font-size: .77rem; line-height: 1.5; }
.cq-cookie-regional button { display: inline; border: 0; padding: 0; margin-left: .2rem; background: none; color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
.cq-cookie-modal__actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (max-width: 760px) {
  .cq-cookie-banner { left: 10px; right: 10px; bottom: 10px; }
  .cq-cookie-banner__inner { display: block; padding: 1rem; border-radius: 14px; }
  .cq-cookie-banner__actions { max-width: none; justify-content: stretch; margin-top: .9rem; display: grid; grid-template-columns: 1fr 1fr; }
  .cq-cookie-btn--link { grid-column: 1 / -1; }
  .cq-cookie-modal { padding: .6rem; align-items: end; }
  .cq-cookie-modal__panel { border-radius: 16px 16px 10px 10px; max-height: 92vh; }
  .cq-cookie-option { align-items: flex-start; }
  .cq-cookie-modal__actions { display: grid; grid-template-columns: 1fr; }
}

/* Render long homepage sections on demand while reserving stable space. */
@supports (content-visibility: auto) {
  .home-cat-section { content-visibility: auto; contain-intrinsic-size: auto 360px; }
  .seo-section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
}

/* ===== Guides, editorial pages and trust block ===== */
.guide-wrap{max-width:820px;margin:0 auto;padding:2rem 1.25rem 5rem;}
.guide-crumbs{font-size:.82rem;color:var(--muted);margin-bottom:1.2rem;}
.guide-crumbs a{color:var(--accent);}
.guide-meta{font-size:.82rem;color:var(--muted);margin-bottom:.6rem;text-transform:uppercase;letter-spacing:.04em;}
.guide-article h1,.guide-index-title{font-size:clamp(1.7rem,4.5vw,2.4rem);line-height:1.2;letter-spacing:-.5px;margin-bottom:.6rem;}
.guide-by{font-size:.88rem;color:var(--muted);margin-bottom:1.6rem;}
.guide-by a{color:var(--accent);}
.guide-body{font-size:1.02rem;line-height:1.8;color:var(--text);}
.guide-body h2{font-size:1.4rem;margin:2.2rem 0 .8rem;letter-spacing:-.3px;}
.guide-body h3{font-size:1.1rem;margin:1.6rem 0 .5rem;}
.guide-body p{margin-bottom:1rem;color:var(--text);}
.guide-body ul,.guide-body ol{padding-left:1.4rem;margin-bottom:1rem;}
.guide-body li{margin-bottom:.4rem;}
.guide-body a,.trust-block a,.guide-sources a,.guide-related a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;}
.guide-body table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:.92rem;display:block;overflow-x:auto;}
.guide-body th,.guide-body td{border:1px solid var(--border);padding:.55rem .8rem;text-align:left;}
.guide-body th{background:var(--card2);}
.guide-body blockquote{border-left:3px solid var(--accent);padding:.2rem 1rem;margin:1.2rem 0;color:var(--muted);}
.guide-try,.guide-sources,.guide-related{margin-top:2.4rem;}
.guide-try h2,.guide-sources h2,.guide-related h2{font-size:1.2rem;margin-bottom:.8rem;}
.guide-sources ul,.guide-related ul{padding-left:1.3rem;line-height:1.8;}
.guide-disclaimer{margin-top:2rem;font-size:.85rem;color:var(--muted);border-top:1px solid var(--border);padding-top:1rem;}
.guide-index-sub{color:var(--muted);line-height:1.7;margin-bottom:2rem;}
.guide-list{display:grid;gap:1rem;}
.guide-card{display:flex;flex-direction:column;gap:.35rem;background:var(--card);border:1px solid var(--border);border-radius:var(--radius-md);padding:1.1rem 1.2rem;}
.guide-card:hover{border-color:var(--accent);}
.guide-card-cat{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);}
.guide-card-title{font-weight:700;font-size:1.08rem;}
.guide-card-desc{color:var(--muted);font-size:.9rem;line-height:1.6;}
.trust-block{border-top:1px solid var(--border);padding-top:1.5rem;}
.trust-block .trust-note{background:var(--card2);border:1px solid var(--border);border-radius:var(--radius-md);padding:.8rem 1rem;}
.trust-block .trust-sources{padding-left:1.3rem;}
.trust-block .trust-meta{font-size:.85rem;margin-top:1rem;}
.cat-picker{width:100%;border-collapse:collapse;font-size:.92rem;margin:.5rem 0 1rem;display:block;overflow-x:auto;}
.cat-picker th,.cat-picker td{border-bottom:1px solid var(--border);padding:.6rem .7rem;text-align:left;vertical-align:top;}
.cat-picker a{color:var(--accent);font-weight:600;}
