:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #e6f4f1;
  --accent: #f59e0b;
  --text: #1f2933;
  --muted: #5b6773;
  --bg: #f8faf9;
  --card: #ffffff;
  --border: #dfe7e4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 42, 38, .06), 0 4px 16px rgba(16, 42, 38, .05);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.25; color: #0e1f1c; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); margin: .25em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: #0e1f1c; text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; padding: 6px 10px; border-radius: 999px; }
.main-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.main-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }

main { padding-block: 20px 56px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: #9aa7a3; }
.breadcrumb a { color: var(--muted); }

.page-head { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--primary); margin: 16px 0 0; }
.lead { font-size: 1.15rem; color: #3d4a55; margin-top: 0; }
.meta { color: var(--muted); font-size: .9rem; margin: 0; }

/* Hero */
.hero { background: linear-gradient(135deg, #e6f4f1 0%, #fdf6e7 100%); border: 1px solid var(--border); border-radius: 22px; padding: clamp(24px, 5vw, 56px); margin-top: 12px; }
.hero h1 { max-width: 700px; }
.hero .lead { max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }

/* Buttons */
.btn { display: inline-block; background: var(--primary); color: #fff; font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 11px 22px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Cards & grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tools-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.tool-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--text); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.card-title { font-weight: 700; color: #0e1f1c; }
.card-desc { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.article-card h3 { margin: .3em 0; font-size: 1.1rem; }
.article-card h3 a { color: #0e1f1c; text-decoration: none; }
.article-card h3 a:hover { color: var(--primary); }
.article-card p:last-child { margin-bottom: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.intro-author { margin-top: 40px; }
.intro-author h2 { margin-top: 0; }

/* Kalkulator */
.calc { max-width: 760px; margin-top: 8px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.field small { color: var(--muted); font-size: .83rem; line-height: 1.45; }
.input-unit { display: flex; align-items: stretch; border: 1px solid #c9d6d2; border-radius: 10px; background: #fff; overflow: hidden; }
.input-unit:focus-within { border-color: var(--primary); }
.input-unit input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; font: inherit; background: transparent; }
.input-unit input:focus-visible { outline: none; }
.input-unit span { display: flex; align-items: center; padding: 0 12px; background: #f1f5f4; color: var(--muted); font-size: .9rem; border-left: 1px solid #c9d6d2; }
select, input[type="date"] { font: inherit; padding: 10px 12px; border: 1px solid #c9d6d2; border-radius: 10px; background: #fff; width: 100%; min-width: 0; color: var(--text); }
.radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-weight: 500 !important; }
.radio input { accent-color: var(--primary); width: 18px; height: 18px; }
.result { margin-top: 20px; padding: 18px 20px; border-radius: 12px; background: var(--primary-soft); border: 1px solid #b6ddd5; }
.result:focus { outline: none; }
.result.error { background: #fdecec; border-color: #f3b9b9; color: #8a1c1c; }
.result p { margin: .3em 0; }
.result .big { font-size: 2rem; font-weight: 800; color: var(--primary-dark); line-height: 1.2; margin: 0 0 .2em; }
.result .tag { display: inline-block; background: #fff; border: 1px solid #b6ddd5; border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: .92rem; }
.result table { margin-top: 8px; }

/* Konten */
.prose { max-width: 760px; }
.prose p, .prose li { color: #27333d; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; }
.prose code, .formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.formula { display: block; background: #fff; border: 1px dashed #b6ddd5; border-radius: 10px; padding: 12px 16px; overflow-x: auto; white-space: pre-wrap; }
.table-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f1f5f4; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.note { max-width: 760px; border-radius: 12px; padding: 14px 18px; margin: 20px 0; font-size: .96rem; line-height: 1.6; }
.note.warn { background: #fff8e6; border: 1px solid #f5d98c; }
.tools-note { background: var(--primary-soft); border: 1px solid #b6ddd5; }
.sources { max-width: 760px; font-size: .93rem; }
.sources li { margin: .3em 0; color: var(--muted); }
.author-box { max-width: 760px; margin-top: 28px; }
.author-box p { margin: 0; }
.related { margin-top: 12px; }

/* Footer */
.site-footer { background: #0e2a26; color: #c9dcd8; padding-top: 40px; font-size: .95rem; }
.site-footer a { color: #e6f4f1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.brand-foot { font-weight: 800; font-size: 1.15rem; color: #fff; margin-top: 0; }
.foot-title { font-weight: 700; color: #fff; margin-top: 0; }
.small { font-size: .85rem; color: #9fbab5; }
.copyright { border-top: 1px solid #1f4540; margin-top: 28px; padding-block: 18px; font-size: .85rem; color: #9fbab5; }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding-inline: 16px; }
  .header-inner { justify-content: center; }
  .main-nav { justify-content: center; }
  .main-nav a { padding: 4px 9px; font-size: .9rem; }
  .card { padding: 16px; }
  .site-header { position: static; }
}
