/* ═══════════════════════════════════════════════════════════════
   smartfinance.ee — shared design system (light · teal + cyan)
   Brand: #005571 deep teal · #20BAD1 cyan · Nunito Sans
═══════════════════════════════════════════════════════════════ */
:root {
  --bg:           #FFFFFF;
  --bg-2:         #F4F6F8;
  --bg-3:         #E9EEF2;
  --panel:        #0A2E3D;   /* deep teal panel (footer / dark bands) */
  --panel-2:      #063040;
  --line:         rgba(9,40,54,0.10);
  --line-2:       rgba(9,40,54,0.18);
  --ink:          #0C2530;   /* near-black teal */
  --ink-2:        #52646E;   /* muted body */
  --ink-3:        #86959D;
  --teal:         #005571;   /* primary brand */
  --teal-2:       #00728F;
  --teal-deep:    #013C50;
  --cyan:         #20BAD1;   /* accent */
  --cyan-2:       #16A6BD;
  --cyan-soft:    rgba(32,186,209,0.14);
  --teal-soft:    rgba(0,85,113,0.08);
  --gold:         #C79A3E;   /* warm accent for highlights */
  --gold-soft:    rgba(199,154,62,0.14);
  --ok:           #1FA97A;

  --display: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
  --serif:   "Playfair Display", Georgia, "Times New Roman", serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --max:    1280px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(9,40,54,0.06), 0 1px 2px rgba(9,40,54,0.04);
  --shadow:    0 12px 40px rgba(9,40,54,0.10), 0 2px 8px rgba(9,40,54,0.05);
  --shadow-lg: 0 30px 70px rgba(9,40,54,0.14);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.mono { font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

h1,h2,h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h2 { font-size: clamp(30px, 4vw, 52px); font-weight: 800; }
h3 { font-size: clamp(19px, 2vw, 24px); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

.accent { color: var(--teal); }
.accent-cyan { color: var(--cyan); }
em.accent { font-style: normal; color: var(--teal); }
.serif { font-family: var(--serif); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-family: var(--mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--cyan); border-radius: 2px; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; border-radius: 9px; background: var(--teal); color: #fff; display: grid; place-items: center; flex: 0 0 40px; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; box-shadow: var(--shadow-sm); overflow: hidden; }
.brand-mark img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.brand small { display: block; font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; margin-top: 1px; }
.nav-meta { display: flex; align-items: center; gap: 28px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav-meta a { transition: color .2s; }
.nav-meta a:hover, .nav-meta a.active { color: var(--teal); }
.nav-cta { margin-left: 4px; padding: 11px 20px; border-radius: 8px; background: var(--teal); color: #fff !important; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; transition: all .25s ease; box-shadow: var(--shadow-sm); }
.nav-cta:hover { background: var(--teal-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-meta { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow); }
  .nav-meta.open { transform: translateY(0); }
  .nav-meta a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-cta { margin: 14px 0 0; justify-content: center; padding: 15px; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 8px; }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 9px; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; white-space: nowrap; }
.btn-primary { background: var(--teal); color: #fff; border: 1px solid var(--teal); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-deep); box-shadow: 0 10px 26px rgba(0,85,113,0.28); transform: translateY(-2px); }
.btn-ghost { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.btn-cyan { background: var(--cyan); border: 1px solid var(--cyan); color: #04252b; }
.btn-cyan:hover { background: var(--cyan-2); box-shadow: 0 10px 26px rgba(32,186,209,0.3); transform: translateY(-2px); }
.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Section chrome ──────────────────────────────────────────── */
section { position: relative; z-index: 2; }
.section-head { display: flex; align-items: baseline; gap: 16px; color: var(--ink-2); margin-bottom: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.section-num { color: var(--cyan); }
.section-rule { flex: 1; height: 1px; background: var(--line); }

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(32px, 4vw, 56px); position: relative; }
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero h1 { font-size: clamp(38px, 6vw, 78px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.page-hero h1 em { color: var(--teal); font-style: normal; }
.page-hero .lede { color: var(--ink-2); font-size: clamp(17px, 1.4vw, 21px); max-width: 60ch; margin-top: 22px; line-height: 1.6; }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: var(--ink-3); margin-bottom: 24px; font-size: 14px; font-weight: 600; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { opacity: 0.5; }

/* ── Footer ──────────────────────────────────────────────────── */
footer { padding-block: 64px 40px; color: rgba(255,255,255,0.72); background: var(--panel); margin-top: clamp(64px, 8vw, 120px); position: relative; z-index: 2; }
footer .brand { color: #fff; }
footer .brand small { color: rgba(255,255,255,0.5); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-grid h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin: 0 0 18px 0; font-weight: 600; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.foot-grid a { transition: color .2s; color: rgba(255,255,255,0.72); }
.foot-grid a:hover { color: var(--cyan); }
.foot-lede { color: rgba(255,255,255,0.6); font-size: 15px; margin-top: 16px; max-width: 34ch; line-height: 1.6; }
.foot-end { margin-top: 48px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,0.5); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Reveal ──────────────────────────────────────────────────── */
.reveal { opacity: 1; transform: none; }
html.js-anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
html.js-anim .reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Service / feature cards ─────────────────────────────────── */
.card-grid { display: grid; gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; position: relative; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; box-shadow: var(--shadow-sm); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .c-ico { width: 52px; height: 52px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.card .c-ico svg { width: 26px; height: 26px; }
.card .c-num { font-family: var(--mono); color: var(--ink-3); font-size: 11px; letter-spacing: 0.08em; }
.card h3 { color: var(--ink); }
.card p { color: var(--ink-2); font-size: 15.5px; }
.card ul { list-style: none; padding: 0; margin: 4px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.card li:last-child { border-bottom: 0; }
.card li::before { content: ""; width: 7px; height: 7px; margin-top: 7px; border-radius: 2px; background: var(--cyan); flex: 0 0 7px; }
.card .svc-link { color: var(--teal); font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card.featured { background: linear-gradient(160deg, var(--teal), var(--teal-deep)); border-color: transparent; color: #fff; }
.card.featured h3, .card.featured p { color: #fff; }
.card.featured .c-ico { background: rgba(255,255,255,0.14); color: #fff; }
.card.featured li { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.14); }
.card.featured li::before { background: var(--cyan); }
.card.featured .svc-link { color: var(--cyan); }
.svc-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px){ .svc-3 { grid-template-columns: 1fr; } }

/* ── Stats module (hero + analytics-style tiles) ─────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
@media (max-width:760px){ .stat-row { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: clamp(32px,3.4vw,46px); font-weight: 800; letter-spacing: -0.03em; color: var(--teal); line-height: 1; font-variant-numeric: tabular-nums; }
.stat b .u { color: var(--cyan); }
.stat > span { color: var(--ink-2); font-size: 14px; display: block; margin-top: 10px; font-weight: 600; }
.stat.on-dark { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.stat.on-dark b { color: #fff; }
.stat.on-dark span { color: rgba(255,255,255,0.7); }

/* ── Pricing ─────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline:auto; } }
.price { border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; background: #fff; display: flex; flex-direction: column; gap: 18px; position: relative; box-shadow: var(--shadow-sm); }
.price.highlight { border-color: var(--teal); box-shadow: var(--shadow); }
.price .badge { position: absolute; top: 22px; right: 22px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: #fff; background: var(--teal); padding: 5px 11px; border-radius: 100px; text-transform: uppercase; }
.price .tier { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.price .amount { font-size: clamp(38px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.price .amount .per { color: var(--ink-3); font-size: 15px; font-weight: 600; margin-left: 4px; }
.price .desc { color: var(--ink-2); font-size: 15px; }
.price ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink); font-size: 15px; }
.price li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.price li .ok { color: var(--cyan); font-weight: 800; }
.price .btn { margin-top: auto; justify-content: center; }

/* ── Content blocks (split / about / roadmap) ────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 84px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.checklist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.checklist li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 26px 1fr; gap: 16px; align-items: start; color: var(--ink); font-size: 16.5px; }
.checklist .ck { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-soft); border: 1px solid var(--teal); display: grid; place-items: center; color: var(--teal); font-size: 12px; font-weight: 800; margin-top: 2px; }
.checklist b { display:block; }
.checklist small { color: var(--ink-2); font-weight: 400; font-size: 14.5px; }

.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); background: var(--bg-2); }
.callout.teal { background: linear-gradient(160deg, var(--teal), var(--teal-deep)); border-color: transparent; color: #fff; }
.callout.teal h2, .callout.teal h3 { color: #fff; }
.callout.teal p { color: rgba(255,255,255,0.82); }

.media-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; background: var(--bg-2); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* section tints */
.tint { background: var(--bg-2); }
.dark-band { background: var(--panel); color: #fff; }
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band p { color: rgba(255,255,255,0.78); }
.home-section { padding-block: clamp(64px, 8vw, 112px); }

/* ── CTA band ────────────────────────────────────────────────── */
.cta-band { padding-block: clamp(72px, 9vw, 128px); text-align: center; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--teal), var(--teal-deep)); color: #fff; }
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(32,186,209,0.28), transparent 60%); pointer-events:none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(34px, 6vw, 72px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch; margin: 0 auto; color: #fff; }
.cta-band h2 em { font-style: normal; color: var(--cyan); }
.cta-band .lede { color: rgba(255,255,255,0.8); margin-top: 22px; font-size: clamp(16px,1.4vw,20px); max-width: 56ch; margin-inline: auto; }
.cta-band .actions { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ── Blog list ───────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }
.post { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; box-shadow: var(--shadow-sm); }
.post:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.post-img { aspect-ratio: 16/10; position: relative; container-type: inline-size; overflow: hidden; background: linear-gradient(150deg, var(--teal), var(--teal-deep)); }
.post-img[data-pat="a"] { background-image: linear-gradient(135deg, transparent 48%, rgba(32,186,209,0.35) 49%, rgba(32,186,209,0.35) 51%, transparent 52%), linear-gradient(150deg, var(--teal), var(--teal-deep)); background-size: 26px 26px, 100% 100%; }
.post-img[data-pat="b"] { background-image: radial-gradient(circle at 28% 38%, rgba(32,186,209,0.42) 0%, transparent 34%), radial-gradient(circle at 74% 72%, rgba(255,255,255,0.16) 0%, transparent 32%), linear-gradient(150deg, var(--teal), var(--teal-deep)); }
.post-img[data-pat="c"] { background-image: linear-gradient(0deg, rgba(255,255,255,0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px), linear-gradient(150deg, var(--teal), var(--teal-deep)); background-size: 18px 18px, 18px 18px, 100% 100%; }
.post-img[data-pat="d"] { background-image: radial-gradient(circle at 50% 45%, rgba(32,186,209,0.4) 0%, transparent 46%), repeating-linear-gradient(90deg, transparent 0 20px, rgba(255,255,255,0.06) 20px 21px), linear-gradient(150deg, var(--teal), var(--teal-deep)); }
.post-glyph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 76px; letter-spacing: -0.02em; color: rgba(255,255,255,0.94); }
.post-glyph--word { font-size: clamp(26px, 11cqw, 52px); padding: 0 6%; text-align: center; line-height: 1.05; }
.post-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-meta { padding: 18px 22px 0 22px; display: flex; justify-content: space-between; color: var(--ink-3); gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.post-meta .cat { color: var(--teal); font-weight: 700; }
.post h3 { padding: 12px 22px 14px 22px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.post-foot { padding: 14px 22px 18px 22px; margin-top: auto; color: var(--ink-2); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.post-foot .arrow { transition: transform .2s ease; color: var(--teal); }
.post:hover .arrow { transform: translateX(3px); }
.empty-state { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 56px; text-align: center; color: var(--ink-2); }

/* filter pills */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filter-pill { font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--ink-2); background: #fff; transition: .2s; }
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── Article ─────────────────────────────────────────────────── */
.article { max-width: 760px; margin: 0 auto; }
.article-cover { aspect-ratio: 21/9; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 40px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.article-body { font-size: 18.5px; line-height: 1.75; color: #33424B; }
.article-body h2 { font-size: clamp(26px, 3vw, 36px); margin: 46px 0 16px; color: var(--ink); }
.article-body h3 { font-size: 22px; margin: 34px 0 12px; color: var(--ink); }
.article-body h4 { font-size: 18px; margin: 28px 0 10px; color: var(--teal); font-weight: 800; }
.article-body p { margin: 0 0 22px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; color: #3B4A53; }
.article-body li { margin-bottom: 9px; }
.article-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.article-body blockquote { margin: 28px 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--cyan); color: var(--ink); font-style: italic; }
.article-body code { font-family: var(--mono); font-size: 0.85em; background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
.article-body pre { background: var(--panel); color: #E6F1F4; padding: 18px 20px; border-radius: 10px; overflow-x: auto; margin: 0 0 22px; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body img { border-radius: 10px; border: 1px solid var(--line); margin: 24px 0; }
.article-body strong { color: var(--ink); font-weight: 800; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.article-body th { background: var(--bg-2); font-weight: 800; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* ── Forms / Admin ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.field .hint { color: var(--ink-3); font-size: 12px; }
.input, .textarea, .select { width: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); font-family: var(--display); font-size: 15px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.textarea.body { min-height: 360px; font-family: var(--mono); font-size: 13px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px){ .row-2 { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar button { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-2); transition: .2s; background:#fff; }
.toolbar button:hover { color: var(--teal); border-color: var(--teal); }

.admin-shell { display: grid; grid-template-columns: 340px 1fr; gap: 22px; min-height: 600px; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.admin-editor { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow-sm); }
.admin-item { padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer; transition: .2s; display: flex; flex-direction: column; gap: 6px; }
.admin-item:hover { border-color: var(--teal); background: var(--teal-soft); }
.admin-item.active { border-color: var(--teal); background: var(--teal-soft); }
.admin-item .t { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.admin-item .m { color: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; display: flex; gap: 8px; }
.badge-status { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 600; }
.badge-status.pub { color: var(--ok); background: rgba(31,169,122,0.12); }
.badge-status.draft { color: var(--gold); background: var(--gold-soft); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--teal); color: #fff; padding: 14px 22px; border-radius: 8px; font-weight: 700; font-size: 14px; z-index: 200; transition: transform .3s ease; box-shadow: var(--shadow); }
.toast.show { transform: translateX(-50%) translateY(0); }
.tag-pill { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); border: 1px solid var(--line-2); border-radius: 100px; padding: 5px 12px; font-weight: 600; }

/* ── Analytics dashboard (Statistika) ────────────────────────── */
.dash-tiles { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width:760px){ .dash-tiles { grid-template-columns: 1fr 1fr; } }
.dash-tile { background:#fff; border:1px solid var(--line); border-radius:10px; padding:20px; box-shadow: var(--shadow-sm); }
.dash-tile .k { font-family: var(--mono); font-size:10px; letter-spacing:0.1em; text-transform:uppercase; color: var(--ink-3); }
.dash-tile .v { font-size: 34px; font-weight:800; letter-spacing:-0.03em; color: var(--teal); line-height:1.1; margin-top:8px; font-variant-numeric: tabular-nums; }
.dash-tile .d { font-size:12px; color: var(--ink-2); margin-top:4px; }
.card-box { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.chart { display:flex; align-items:flex-end; gap: 5px; height: 200px; padding: 22px 0 8px; }
.chart .bar { flex:1; background: linear-gradient(180deg, var(--cyan), var(--teal)); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; transition: opacity .2s; }
.chart .bar:hover { opacity: 0.75; }
.chart .bar span { position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:10px; font-family:var(--mono); color: var(--ink-2); opacity:0; transition:.2s; white-space:nowrap; }
.chart .bar:hover span { opacity:1; }
.chart-x { display:flex; justify-content:space-between; font-family:var(--mono); font-size:10px; color:var(--ink-3); border-top:1px solid var(--line); padding-top:8px; }
.dash-list { list-style:none; padding:0; margin:0; }
.dash-list li { display:grid; grid-template-columns: 1fr auto; gap:12px 12px; padding: 11px 0; border-bottom:1px solid var(--line); font-size:14px; align-items:center; }
.dash-list li:last-child { border-bottom:0; }
.dash-list li .lbl { color: var(--ink); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-list li .val { font-family: var(--mono); color: var(--teal); font-weight:700; }
.dash-bar-bg { grid-column: 1/-1; height:5px; background: var(--bg-2); border-radius:3px; overflow:hidden; }
.dash-bar-bg i { display:block; height:100%; background: var(--cyan); border-radius:3px; }
.dash-2col { display:grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width:760px){ .dash-2col { grid-template-columns:1fr; } }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:28px; flex-wrap:wrap; }
.tab-btn { padding: 12px 20px; font-weight:700; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom:-1px; transition:.2s; }
.tab-btn:hover { color: var(--teal); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── Image slots (fillable placeholders) ─────────────────────── */
.img-slot { position: relative; }
.img-slot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; z-index: 3; }
.img-slot.img-slot-filled .img-slot-img { display: block; }
.img-slot.img-slot-drag { outline: 2px dashed var(--teal); outline-offset: -6px; }
.img-slot-ctrl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 8px; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.img-slot:hover .img-slot-ctrl, .img-slot.img-slot-drag .img-slot-ctrl { opacity: 1; pointer-events: auto; }
.img-slot-add, .img-slot-remove { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 14px; border-radius: 100px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); color: var(--ink); transition: .2s; }
.img-slot-add:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.img-slot-remove { display: none; width: 34px; padding: 9px 0; }
.img-slot.img-slot-filled .img-slot-remove { display: inline-block; }
.img-slot.img-slot-filled .img-slot-remove:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ── KKK (details/summary — sisu on HTML-is nähtav ka ilma JS-ita) ── */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 800; font-size: 17px; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--teal); font-size: 22px; line-height: 1; flex: 0 0 auto; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
