:root {
  --bg: #f6f3e6;
  --bg: oklch(97.5% .018 90);
  --hero-top: oklch(98.5% .014 95);
  --hero-bottom: oklch(93% .04 115);
  --paper: #fffcf6;
  --paper: oklch(99.5% .008 90);
  --ink: #2d3a2c;
  --ink: oklch(26% .04 145);
  --ink-soft: #66786a;
  --ink-soft: oklch(48% .04 140);
  --sage: #3d6b4a;
  --sage: oklch(48% .09 150);
  --sage-d: #2f4d38;
  --sage-d: oklch(38% .08 150);
  --sage-s: #e8eedc;
  --sage-s: oklch(93% .035 120);
  --sage-glow: oklch(66% .11 145);
  --blush: #c98b5c;
  --blush: oklch(72% .13 45);
  --accent: oklch(82% .1 55);
  --clay: oklch(62% .12 45);
  --line: #ddd8c8;
  --line: oklch(89% .025 110);
  --danger: #c0453a;
  --danger: oklch(58% .2 28);
  --danger-s: #f8e8e6;
  --danger-s: oklch(96% .02 25);
  --ok: oklch(48% .09 150);
  --warn: oklch(55% .12 55);
  --warn-s: oklch(96% .03 85);
  --shadow: 0 18px 40px oklch(26% .04 145 / .08);
  --radius: .875rem;
  --font: "Inter", system-ui, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", cursive;
  --gradient-primary: linear-gradient(135deg, oklch(48% .09 150) 0%, oklch(62% .12 130) 100%);
  --gradient-hero: linear-gradient(180deg, oklch(98.5% .014 95) 0%, oklch(93% .04 115) 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(oklch(40% .08 150 / .04) 1px, transparent 1px),
    radial-gradient(oklch(72% .13 45 / .03) 1px, transparent 1px),
    var(--gradient-hero);
  background-size: 22px 22px, 28px 28px, 100% 100%;
  background-position: 0 0, 11px 14px, 0 0;
  min-height: 100dvh;
  line-height: 1.55;
  font-size: 17px;
}
body.panel-body { background-color: var(--bg); }
body.landing-mode { background-attachment: fixed; }

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 48vh;
  pointer-events: none;
  z-index: 0;
  opacity: .75;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 360' fill='none'%3E%3Cpath d='M36 360C70 270 18 210 78 92' stroke='%23c98b5c' stroke-opacity='.38' stroke-width='1.2'/%3E%3Cpath d='M78 92c18-8 28 6 22 18' stroke='%23c98b5c' stroke-opacity='.32' stroke-width='1.1'/%3E%3Ccircle cx='78' cy='92' r='5.5' fill='%23c98b5c' fill-opacity='.22'/%3E%3Ccircle cx='58' cy='168' r='4.5' fill='%23c98b5c' fill-opacity='.18'/%3E%3Ccircle cx='92' cy='210' r='3.5' fill='%23c98b5c' fill-opacity='.16'/%3E%3Cpath d='M48 250c12-10 26-6 24 8' stroke='%23c98b5c' stroke-opacity='.28' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 320' fill='none'%3E%3Cpath d='M200 320C160 230 230 180 170 70' stroke='%23c98b5c' stroke-opacity='.3' stroke-width='1.1'/%3E%3Ccircle cx='170' cy='70' r='5' fill='%23c98b5c' fill-opacity='.18'/%3E%3Ccircle cx='196' cy='140' r='4' fill='%23c98b5c' fill-opacity='.14'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: left -20px bottom, right -30px bottom 8%;
  background-size: min(280px, 70vw) auto, min(220px, 48vw) auto;
}

.app-shell, .panel-shell, .nav, .topbar, .login-wrap { position: relative; z-index: 1; }

img, svg { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sage-d); }

.app-shell { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
body.landing-mode .app-shell { padding: 28px 20px 120px; max-width: 640px; }
.panel-shell { max-width: 980px; margin: 0 auto; padding: 20px 16px 80px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  margin: -16px -16px 18px;
  padding: 14px 16px 12px;
  background: color-mix(in oklab, var(--bg) 86%, white);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
}
body.landing-mode .topbar { display: none; }
.brand-kicker {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sage); font-weight: 600; margin: 0 0 2px;
}
.brand-name {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  margin: 0; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink);
}
.brand-sub { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }

.progress-wrap { margin-top: 12px; }
.progress-meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-soft); margin-bottom: 6px;
}
.progress-bar {
  height: 6px; background: oklch(89% .025 110); border-radius: 99px; overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; width: 0;
  background: var(--gradient-primary);
  border-radius: inherit;
  transition: width .35s ease;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card + .card { margin-top: 14px; }

.logo-leaf {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, oklch(48% .09 150), oklch(72% .13 45));
  box-shadow: 0 16px 36px oklch(48% .09 150 / .18);
}
.logo-leaf svg { width: 44px; height: 44px; }
.script-name {
  font-family: var(--script);
  font-size: clamp(28px, 7vw, 42px);
  color: var(--blush);
  text-align: center;
  margin: 6px 0 4px;
  line-height: 1.2;
}
.landing { text-align: center; padding: 12px 0 24px; }
.landing-title {
  font-family: var(--serif);
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 600;
  color: var(--sage);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 8px 0 12px;
}
.landing-lede {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 auto 16px;
  max-width: 38rem;
}
.pills {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 0 auto 14px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in oklab, white 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  min-height: 36px;
}
.landing-note {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 0 auto 12px;
  max-width: 420px;
}
.landing-note .note-title {
  font-family: var(--script);
  color: var(--blush);
  font-size: 26px;
  margin: 0 0 8px;
}
.landing-note ul { margin: 0; padding-left: 18px; color: var(--ink); }
.landing-note li { margin: 0 0 6px; }
.landing-note li:last-child { margin-bottom: 0; }
.landing-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 22;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, transparent, oklch(93% .04 115) 42%);
  pointer-events: none;
}
.landing-footer .landing-cta { pointer-events: auto; }
.landing-cta {
  min-width: min(240px, 100%);
  min-height: 52px;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.landing-cta .arrow { font-size: 18px; line-height: 1; }

.welcome-mark {
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--sage-s); color: var(--sage);
  display: grid; place-items: center; margin-bottom: 14px;
}
h1, h2, .serif { font-family: var(--serif); letter-spacing: -0.02em; }
.welcome h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; color: var(--sage); }
.lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 18px; }

.notice {
  border-radius: 16px; padding: 14px 16px; margin: 0 0 12px;
  border: 1px solid var(--line); background: var(--muted, var(--sage-s));
  background: oklch(95% .022 100);
}
.notice strong { display: block; margin-bottom: 4px; }
.notice.danger { background: var(--danger-s); border-color: color-mix(in oklab, var(--danger) 28%, white); color: oklch(38% .12 28); }
.notice.warn { background: var(--warn-s); border-color: color-mix(in oklab, var(--warn) 30%, white); }

.q { margin: 0 0 22px; }
.q:last-child { margin-bottom: 0; }
.qlabel {
  display: block; font-weight: 600; margin-bottom: 8px; line-height: 1.4;
}
.qhint { display: block; color: var(--ink-soft); font-size: 14px; font-weight: 400; margin-top: 4px; }
.req { color: var(--blush); font-weight: 700; }

.field, textarea, select {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 14px; padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
.field:focus, textarea:focus, select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px oklch(55% .1 150 / .18);
}
.field.error, textarea.error { border-color: var(--danger); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 10px 14px; min-height: 44px;
}
.choice input { accent-color: var(--sage); margin-right: 8px; }
.choice.selected { border-color: var(--sage); background: var(--sage-s); }

.scale { display: flex; flex-direction: column; gap: 8px; }
.scale input { width: 100%; accent-color: var(--sage); }
.scale-end { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 13px; }
.scale-val { font-weight: 700; color: var(--sage); }

.table-rows { display: flex; flex-direction: column; gap: 10px; }
.table-row {
  display: grid; gap: 8px; padding: 12px; border-radius: 14px;
  background: oklch(95% .022 100); border: 1px solid var(--line);
}
.table-row input { width: 100%; }
.factor-grid { display: flex; flex-direction: column; gap: 8px; }
.factor {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  padding: 10px 12px; border-radius: 14px; background: oklch(95% .022 100);
  border: 1px solid var(--line);
}
.factor span { font-weight: 600; font-size: 14px; }

.linkish, .ghost, .btn, .primary, .danger-btn {
  border-radius: 999px; min-height: 46px; padding: 10px 18px; border: 0;
}
.btn, .primary {
  background: var(--sage);
  background-image: var(--gradient-primary);
  color: oklch(98.5% .012 90);
  font-weight: 600;
}
.btn:hover, .primary:hover { filter: brightness(1.05); }
.btn:disabled, .primary:disabled { opacity: .65; cursor: wait; }
.ghost {
  background: color-mix(in oklab, white 70%, transparent);
  border: 1px solid var(--line); color: var(--ink);
}
.danger-btn { background: var(--danger); color: #fff; font-weight: 700; }
.linkish { background: none; color: var(--sage-d); text-decoration: underline; padding: 0; min-height: 0; }

.nav[hidden], .progress-wrap[hidden] { display: none !important; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; justify-content: center;
}
.nav .inner { width: min(760px, 100%); display: flex; gap: 10px; }
.nav button { flex: 1; }

.voice {
  margin-top: 10px; padding: 12px; border-radius: 16px;
  background: var(--sage-s); border: 1px dashed color-mix(in oklab, var(--sage) 28%, white);
}
.voice-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mic {
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--gradient-primary); color: #fff; display: grid; place-items: center;
}
.mic.rec { background: var(--blush); animation: pulse 1.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(72% .13 45 / .35); }
  50% { box-shadow: 0 0 0 10px oklch(72% .13 45 / 0); }
}
.voice audio { width: 100%; margin-top: 8px; }
.voice-note { font-size: 13px; color: var(--ink-soft); }

.step-enter { animation: rise .35s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.review-block { margin-bottom: 18px; }
.review-block h3 { margin: 0 0 8px; font-size: 20px; color: var(--sage); }
.review-q { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-q .qlabel { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.muted { color: var(--ink-soft); }
.err { color: var(--danger); font-size: 14px; margin-top: 6px; }
.save-pill { font-size: 12px; color: var(--ok); }

.thanks { text-align: center; padding: 40px 12px; }
.thanks h1 { font-size: 34px; margin-bottom: 10px; color: var(--sage); }

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); text-align: center; }
.login-card .field { text-align: left; }
.login-card .lede { text-align: center; }
.list-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  justify-content: space-between; margin-bottom: 18px;
}
.search { min-width: min(280px, 100%); }
.sub {
  display: block; width: 100%; text-align: left; background: var(--paper);
  border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.sub:hover { border-color: var(--sage); }
.sub .row { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.badge {
  display: inline-block; border-radius: 999px; padding: 3px 9px;
  font-size: 12px; font-weight: 700;
}
.badge.new { background: var(--sage-s); color: var(--sage-d); }
.badge.read { background: oklch(95% .022 100); color: var(--ink-soft); }
.badge.acil { background: var(--danger-s); color: var(--danger); }
.preview { color: var(--ink-soft); margin: 6px 0 0; font-size: 14px; }

.summary {
  background: var(--sage-s); border: 1px solid color-mix(in oklab, var(--sage) 22%, white);
  border-radius: 18px; padding: 18px; margin-bottom: 18px;
}
.summary h2 { margin: 0 0 12px; font-size: 24px; color: var(--sage); }
.summary dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); font-weight: 700; }
.summary dd { margin: 0 0 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.audio-box { margin-top: 8px; padding: 10px; background: var(--sage-s); border-radius: 12px; }
.transcript { white-space: pre-wrap; }

@media (min-width: 720px) {
  .table-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .table-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .table-row.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .factor { grid-template-columns: 220px 1fr; align-items: center; }
  .landing { padding-top: 36px; }
}

@media print {
  .topbar, .nav, .no-print, .detail-actions, .login-wrap, body::after { display: none !important; }
  body, body.panel-body { background: #fff; }
  .app-shell, .panel-shell { padding: 0; max-width: none; }
  .card, .sub, .summary { box-shadow: none; break-inside: avoid; }
}
