:root {
  color-scheme: light;
  --bg: #f7faf6;
  --bg-deep: #edf5ea;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: rgba(248, 252, 247, 0.96);
  --text: #203127;
  --muted: #657564;
  --line: rgba(32, 49, 39, 0.12);
  --primary: #63b66d;
  --primary-dark: #4f9458;
  --accent: #e16b2e;
  --ink-strong: #1a1a2e;
  --shadow: 0 20px 50px rgba(56, 91, 58, 0.12);
  --shadow-soft: 0 12px 30px rgba(56, 91, 58, 0.08);
  --radius: 22px;
  --radius-small: 16px;
  --max: 1180px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16211c;
  --bg-deep: #101813;
  --surface: rgba(30, 42, 35, 0.92);
  --surface-strong: rgba(28, 39, 33, 0.98);
  --surface-soft: rgba(34, 48, 40, 0.96);
  --text: #eef7f0;
  --muted: #b9c9bb;
  --line: rgba(238, 247, 240, 0.12);
  --primary: #8fd49a;
  --primary-dark: #74c381;
  --accent: #f3a86b;
  --ink-strong: #eef7f0;
  --shadow: 0 24px 58px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 26%),
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 22%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 28%, var(--bg) 100%);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.wrap { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.site-header { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand--portal { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink-strong); }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; display: block; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.08; }
.brand-text small { font-size: 12px; font-weight: 500; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.theme-switch,.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--surface) 82%, white 18%); box-shadow: var(--shadow-soft); }
.theme-toggle,.lang-switch button { appearance: none; border: 0; background: transparent; color: var(--muted); min-height: 38px; padding: 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.theme-toggle.is-active,.lang-switch button.is-active { background: var(--text); color: #fff; }
html[data-theme="dark"] .theme-toggle.is-active,html[data-theme="dark"] .lang-switch button.is-active { background: #eef7f0; color: #16211c; }
.calc-header { padding: 18px 0 12px; }
.calc-header .back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.calc-header .back:hover { color: var(--accent); }
.calc-header h1,.section-heading h2,.tool-header h3,.faq-panel h2,.hero-side-meta h2,.legal-teaser h2 { margin: 0; line-height: 1.08; letter-spacing: -.03em; }
.calc-header h1 { display: flex; align-items: center; gap: 12px; font-size: clamp(28px, 4vw, 44px); color: var(--ink-strong); }
.calc-header p { margin: 12px 0 0; max-width: 720px; color: var(--muted); font-size: 15px; }
.hero-icon { width: 52px; height: 52px; border-radius: 14px; display: inline-grid; place-items: center; background: #eff4ff; flex-shrink: 0; }
.hero-icon--doc { background: #fff5f0; }
.calc-main { padding: 6px 0 42px; }
.calc-intro { background: var(--surface-strong); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin: 0 0 24px; box-shadow: var(--shadow-soft); }
.calc-intro p { margin: 0 0 10px; color: var(--ink-strong); }
.calc-intro p:last-child { margin-bottom: 0; }
.calc-intro strong { color: var(--accent); }
.section { padding: 10px 0 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(20px); padding: 28px; }
.panel-compact { padding: 22px 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.eyebrow,.preview-chip { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 14%, white); color: var(--primary-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.hero-actions,.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 999px; border: 1px solid transparent; padding: 0 18px; font-weight: 700; cursor: pointer; transition: transform .16s ease, filter .16s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.03); }
.button.primary { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, white), var(--primary)); color: #fff; }
.button.secondary { background: color-mix(in srgb, var(--surface-strong) 92%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink-strong); }
.tools-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.tool-panel { display: flex; flex-direction: column; gap: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.tool-panel:hover { transform: translateY(-3px); box-shadow: 0 24px 48px rgba(0,0,0,.08); }
.tool-header p { margin: 10px 0 0; color: var(--muted); }
.tool-form { display: grid; gap: 14px; }
.upload-box,.field { display: grid; gap: 8px; }
.upload-box span,.field span { font-size: 14px; font-weight: 700; }
.upload-box input,.field input,.field select { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 92%, transparent); padding: 12px 14px; color: var(--text); }
.upload-box input:focus,.field input:focus,.field select:focus { outline: 3px solid color-mix(in srgb, var(--primary) 20%, transparent); border-color: var(--primary); }
.upload-box input[type="file"] { padding: 8px 10px; }
.upload-box input[type="file"]::file-selector-button,.upload-box input[type="file"]::-webkit-file-upload-button { appearance: none; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); margin-right: 12px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface-strong) 94%, white); color: var(--ink-strong); font: inherit; font-weight: 700; cursor: pointer; }
.preview-area { min-height: 180px; border: 1px dashed var(--line); border-radius: 18px; padding: 18px; background: color-mix(in srgb, var(--surface-soft) 96%, transparent); display: grid; gap: 14px; }
.preview-empty,.preview-loading,.panel-note,.footer-copy,.footer-disclaimer,.preview-meta,.status-line { color: var(--muted); }
.preview-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-meta span { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface-strong) 95%, transparent); border: 1px solid var(--line); font-size: 12px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 12px; }
.preview-grid img,.pdf-page-card img,.preview-doc { width: 100%; border-radius: 14px; display: block; }
.preview-doc { min-height: 320px; border: 1px solid var(--line); background: #fff; }
.pdf-pages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.pdf-page-card { display: grid; gap: 8px; }
.pdf-page-card strong { font-size: 13px; }
.result-box { display: grid; gap: 14px; }
.result-box a { font-weight: 700; color: var(--accent); }
.status-line.success { color: #12824a; }
.status-line.error { color: #c44646; }
.info-stack { display: grid; gap: 18px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.check-list { margin: 16px 0 0; padding-left: 18px; }
.check-list li + li { margin-top: 8px; }
.mini-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mini-pages span { display: block; aspect-ratio: .75; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.9), color-mix(in srgb, var(--accent) 15%, transparent)); border: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 16px; }
.faq-grid article p { color: var(--muted); }
.legal-panel { max-width: 860px; margin: 0 auto; }
.legal-copy { display: grid; gap: 14px; margin-top: 18px; }
.legal-copy p { margin: 0; }
.site-footer { margin-top: 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.footer-inner { display: grid; gap: 14px; padding: 24px 0 34px; }
.footer-copy,.footer-disclaimer { margin: 0; }
.footer-disclaimer { font-size: 14px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .header-inner,.section-heading { flex-direction: column; align-items: stretch; } .header-actions { justify-content: stretch; } .theme-switch,.lang-switch { width: 100%; } .theme-toggle,.lang-switch button { flex: 1; } .calc-header h1 { align-items: flex-start; } }

