/* hybrid.rtokit.com — global stylesheet (seed) */
:root {
  --primary: #247869;
  --primary-dark: #1b5f53;
  --primary-soft: #E6F2F0;
  --text-main: #22302E;
  --text-body: #5F6B6A;
  --warn: #E8A33D;
  --danger: #D9534F;
  --bg: #FFFFFF;
  --bg-soft: #F5F8F7;
  --line: #E3EAE8;
  --card-shadow: 0 6px 24px rgba(18, 41, 37, .08);
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 62px;
  --maxw: 1180px;
}
html.dark {
  --primary: #3BA08C;
  --primary-dark: #2E8473;
  --primary-soft: #14332E;
  --text-main: #E8F1EF;
  --text-body: #A8B8B5;
  --bg: #121A19;
  --bg-soft: #172120;
  --line: #263331;
  --card-shadow: 0 6px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text-main); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--text-main); }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.12rem; }
p { color: var(--text-body); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.eyebrow { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }

/* ---------- Top navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-weight: 800; font-size: 1.15rem; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.nav-logo:hover { text-decoration: none; }
.nav-logo .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--primary); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .nav-actions a, .nav-actions button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 500; color: var(--text-main);
  border: none; background: transparent; cursor: pointer;
}
.nav-links a:hover, .nav-actions a:hover, .nav-actions button:hover { background: var(--primary-soft); text-decoration: none; }
.nav-links a.active { color: var(--primary); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 2px; }
.nav-btn { min-height: 44px; min-width: 44px; justify-content: center; }
.lang-toggle { font-weight: 700; color: var(--primary) !important; }
.fav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700;
}
.pro-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #9AA8A5; border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px;
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow); padding: 8px; z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .92rem; }
.burger { display: none; }
.drawer {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 20px;
}
.drawer.open { transform: translateX(0); }
.drawer a, .drawer button { display: block; width: 100%; text-align: left; padding: 14px; font-size: 1.05rem; color: var(--text-main); background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer; }
.drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer-close { min-width: 44px; min-height: 44px; font-size: 1.4rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 420px; display: flex; align-items: center;
  background-size: cover; background-position: center; color: #fff;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,26,23,.82) 0%, rgba(10,26,23,.45) 55%, rgba(10,26,23,.15) 100%); }
.hero .container { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { color: #fff; max-width: 720px; }
.hero p.lead { color: rgba(255,255,255,.92); max-width: 640px; margin: 14px 0 24px; font-size: 1.1rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .hero-note { margin-top: 18px; font-size: .82rem; color: rgba(255,255,255,.75); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm);
  font-size: .98rem; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: filter .15s ease, transform .05s ease; text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.55); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .88rem; }

/* ---------- Cards (photo backgrounds, no icon-only cards) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  min-height: 210px; background-size: cover; background-position: center;
  box-shadow: var(--card-shadow); isolation: isolate;
}
.card:hover { text-decoration: none; transform: translateY(-2px); }
.card-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,26,23,.28) 0%, rgba(10,26,23,.66) 62%, rgba(10,26,23,.82) 100%);
}
.card-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 210px; padding: 18px; color: #fff; }
.card-title { color: #fff; font-size: 1.15rem; margin: 2px 0 6px; }
.card-desc { color: rgba(255,255,255,.88); font-size: .9rem; margin-bottom: 10px; }
.card-cta { font-size: .86rem; font-weight: 700; color: #fff; opacity: .9; }
.card-fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10,26,23,.5); color: #fff; font-size: 1.25rem; cursor: pointer;
  border: none; transition: transform .12s ease;
}
.card-fav:hover { transform: scale(1.12); }
.card-fav.saved { color: var(--warn); }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 600;
}

/* ---------- Tool page ---------- */
.tool-layout { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 1024px) { .tool-layout { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; } }
.tool-panel, .result-panel {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.tool-actions .spacer { flex: 1; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--text-body); margin-top: 4px; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text-main); font-family: var(--font);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--primary); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { font-weight: 700; color: var(--primary); min-width: 64px; text-align: right; }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.check-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.check-row label { margin: 0; font-weight: 500; }
.seg-group { display: flex; flex-wrap: wrap; gap: 8px; }
.seg {
  min-height: 44px; padding: 8px 16px; border-radius: 24px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text-main); font-weight: 600; cursor: pointer; font-size: .92rem;
}
.seg[aria-pressed="true"], .seg.active { background: var(--primary); border-color: var(--primary); color: #fff; }
details.advanced { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
details.advanced summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.big-number { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; color: var(--primary); line-height: 1.1; }
.result-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.result-line:last-child { border-bottom: none; }
.result-line .rl-label { color: var(--text-body); font-size: .92rem; }
.result-line .rl-value { font-weight: 700; white-space: nowrap; }
.result-explain { font-size: .84rem; color: var(--text-body); margin: 3px 0 12px; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .8rem; font-weight: 700; }
.tag-good { background: #E3F4EF; color: #1B6E5C; }
.tag-mid { background: #FDF3E0; color: #9A6B16; }
.tag-bad { background: #FBE9E8; color: #B23B37; }
html.dark .tag-good { background: #14332E; color: #5FD0B8; }
html.dark .tag-mid { background: #3A2E16; color: #E8B64E; }
html.dark .tag-bad { background: #3A1C1B; color: #F08A86; }
/* bar charts */
.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.bar-label { width: 130px; font-size: .85rem; color: var(--text-body); text-align: right; flex: none; }
.bar-track { flex: 1; height: 18px; background: var(--line); border-radius: 9px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 9px; transition: width .2s ease; }
.bar-val { width: 72px; font-size: .84rem; font-weight: 700; flex: none; }
/* progress ring */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring::before { content: ""; position: absolute; }
.ring-inner { width: 84px; height: 84px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
/* heat grid */
.heat-grid { display: grid; gap: 3px; }
.heat-cell { border-radius: 4px; min-height: 18px; }
.heat-cell.hi { background: var(--primary); }
.heat-cell.mid { background: #9BC9BD; }
.heat-cell.low { background: var(--primary-soft); }
.heat-cell.none { background: var(--line); }
/* action row on result cards */
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.saved-note { font-size: .78rem; color: var(--text-body); text-align: right; margin-top: 8px; }

/* ---------- Disclaimers ---------- */
.disclaimer-tax, .disclaimer-coffee {
  border: 1px solid var(--warn); background: #FDF6E9; color: #7A5A12;
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: .86rem; margin: 14px 0;
}
html.dark .disclaimer-tax, html.dark .disclaimer-coffee { background: #2E2615; color: #E8C46E; border-color: #6E5A1E; }
.disclaimer-coffee { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
html.dark .disclaimer-coffee { color: #7FD3BE; }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center; min-height: 90px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--text-body); font-size: .78rem; text-align: center;
  margin: 18px 0; padding: 12px; letter-spacing: .04em;
}
.ad-slot.side { min-height: 320px; position: sticky; top: calc(var(--header-h) + 20px); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .84rem; color: var(--text-body); padding: 16px 0 0; }
.breadcrumb a { color: var(--text-body); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* ---------- Blog article ---------- */
.article-body { max-width: 760px; }
.article-body h2 { margin-top: 2em; }
.article-body p, .article-body li { color: var(--text-body); margin-bottom: 1em; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1em; }
.article-body blockquote { border-left: 4px solid var(--primary); background: var(--bg-soft); padding: 12px 18px; margin: 1em 0; border-radius: 0 8px 8px 0; }
.article-body blockquote p { margin: 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--text-body); margin: 10px 0 22px; }
.article-hero-img { border-radius: var(--radius); margin: 6px 0 22px; width: 100%; max-height: 420px; object-fit: cover; }
.cta-card {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: var(--radius); overflow: hidden; margin: 26px 0; padding: 22px;
  background-size: cover; background-position: center; color: #fff; min-height: 120px; isolation: isolate;
}
.cta-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10,26,23,.86), rgba(10,26,23,.5)); }
.cta-card h3 { color: #fff; margin-bottom: 4px; }
.cta-card p { color: rgba(255,255,255,.9); font-size: .92rem; }
.cta-card .btn { flex: none; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 10px; background: var(--bg-soft); }
.faq-item h3 { font-size: 1rem; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 40px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.footer-grid h4 { font-size: .9rem; margin-bottom: 10px; }
.footer-grid a { display: block; padding: 4px 0; font-size: .9rem; color: var(--text-body); }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: .82rem; color: var(--text-body); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #22302E; color: #fff; padding: 12px 22px; border-radius: 30px;
  font-size: .92rem; box-shadow: var(--card-shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 300; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */
.hide-sm { display: none; }
@media (min-width: 768px) { .hide-sm { display: initial; } }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 22px; } .mt-3 { margin-top: 34px; }
.mb-1 { margin-bottom: 12px; } .mb-2 { margin-bottom: 22px; }
.text-center { text-align: center; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 8px 14px; z-index: 500; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.fav-empty { text-align: center; padding: 70px 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links, .nav-actions .hide-m { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .bar-label { width: 96px; }
  .tool-actions .btn { flex: 1 1 46%; }
  .hero { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
