/* BreathVault arayüz stilleri. Değerler docs/tasarim/T-*.dc.html ve sözleşme §4 ile birebir. */
:root {
  /* Palet No. 1: 1D2639, 465975, 8293B1, E0E1DD. Ara tonlar bu dördünden türetildi; --danger yalnız uyarı ve hata içindir. */
  --bg: #1D2639;
  --surface: #2A364D;
  --lock-bg: #465975;
  --line: #465975;
  --text: #E0E1DD;
  --muted: #A3AEC2;
  --muted-on-surface: #C5CCD9;
  --accent-text: #A9B7D1;
  --primary: #8293B1;
  --on-primary: #1D2639;
  --label: #465975;
  --danger: #A8443C;

  --gutter: 20px;
  --row: 56px;
  --btn: 48px;
  --btn-lg: 52px;
  --target: 44px;
  --radius: 12px;
  --icon: 18px;
  --column: 480px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
html[data-screen="lock"], html[data-screen="lock"] body { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}
#app { min-height: 100vh; min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-text); }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Düzen: telefonda tek sütun; 720 px ve üstünde ortalanmış, en çok 480 px */
.screen { width: 100%; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen--fixed { height: 100vh; height: 100dvh; }
@media (min-width: 720px) {
  .screen { max-width: var(--column); margin: 0 auto; }
}
.screen--lock { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, var(--lock-bg) 0%, var(--surface) 38%, var(--bg) 78%); }
.lock-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Ortak parçalar */
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { letter-spacing: -0.02em; line-height: 1; color: var(--text); }
.wordmark--sm { font-size: 18px; }
.wordmark--lg { font-size: 30px; }
.wm-light { font-weight: 400; }
.wm-bold { font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .composer__label { font-size: 13px; line-height: 16px; color: var(--muted); }
.input {
  width: 100%; height: var(--btn);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg); color: var(--text);
  padding: 0 16px; font-size: 15px;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input--mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.textarea { height: auto; min-height: 112px; padding: 12px 16px; line-height: 22px; resize: vertical; }
@media (pointer: coarse) { .input { font-size: 16px; } .input--mono { font-size: 14px; } }

.btn {
  width: 100%; border: none; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 600; height: var(--btn); padding: 0 16px;
}
.btn--lg { height: var(--btn-lg); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:disabled { opacity: 0.45; }
.btn--outline { background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 15px; }
.btn--outline:disabled { opacity: 0.45; }
.btn--text { height: var(--target); background: none; font-size: 14px; font-weight: 500; gap: 8px; color: var(--text); }
.soon { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 10px; background: var(--label); color: var(--text); }

.error { margin: 0; font-size: 13px; line-height: 20px; color: var(--text); background: var(--danger); border-radius: var(--radius); padding: 10px 14px; }
.notice { margin: 0; font-size: 13px; line-height: 20px; color: var(--accent-text); text-align: center; }
.muted { margin: 0; font-size: 15px; line-height: 24px; color: var(--muted); }
.spacer { flex: 1; }

/* Kurulum */
.setup-head { padding: 56px var(--gutter) 0; display: flex; flex-direction: column; gap: 24px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps__seg { height: 4px; border-radius: 2px; background: var(--line); }
.steps__seg.is-on { background: var(--text); }
.setup-main { flex: 1; min-height: 0; padding: 32px var(--gutter) 16px; display: flex; flex-direction: column; gap: 24px; }
.setup-main--tight { gap: 20px; }
.setup-form { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.setup-main--tight .setup-form { gap: 20px; }
.intro { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { margin: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.title { margin: 0; font-size: 28px; line-height: 32px; font-weight: 700; }
.lead { margin: 0; font-size: 15px; line-height: 24px; color: var(--muted); }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.meter { display: flex; align-items: center; gap: 12px; }
.meter__track { flex: 1; height: 6px; border-radius: 3px; background: var(--bg); }
.meter__fill { width: 0; height: 6px; border-radius: 3px; background: var(--text); transition: width 0.15s ease; }
.meter__label { min-width: 64px; text-align: right; font-size: 13px; color: var(--muted); }
.meter__label.is-good { color: var(--accent-text); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 20px; color: var(--muted); }
.check.is-ok { color: var(--text); }
.check.is-ok svg { color: var(--accent-text); }
.keybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.keygrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.keycell { height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg); font-size: 14px; }
.mono { font-family: var(--mono); font-weight: 600; letter-spacing: 0.04em; user-select: all; }
.warn { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--danger); font-size: 13px; line-height: 20px; }
.check-row { display: flex; align-items: center; gap: 12px; min-height: var(--target); font-size: 15px; cursor: pointer; }
.check-row input, .todo input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; margin: 0; }

/* Kilit */
.lock-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 32px; padding: 0 32px; }
.lock-brand { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.lock-lead { margin: 0; font-size: 15px; line-height: 24px; color: var(--muted-on-surface); text-align: center; }
.lock-actions { display: flex; flex-direction: column; gap: 16px; }
.lock-form { display: flex; flex-direction: column; gap: 16px; }
.lock-foot { margin: 0; padding: 0 32px 32px; font-size: 12px; line-height: 18px; color: var(--muted-on-surface); text-align: center; }

/* Bugün ve alt menü */
.app-head { padding: 56px var(--gutter) 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.app-head--back { justify-content: flex-start; align-items: center; }
.app-head__text { min-width: 0; }
.app-head__actions { display: flex; gap: 8px; }
.app-date { font-size: 13px; line-height: 16px; color: var(--muted); }
.app-title { margin: 4px 0 0; font-size: 28px; line-height: 32px; font-weight: 700; }
.app-title--sm { margin: 0; }
.icon-btn { width: var(--target); height: var(--target); flex: none; padding: 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; }
.app-main { flex: 1; min-height: 0; padding: 8px var(--gutter) 16px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.quick { height: var(--btn); flex: none; border-radius: var(--radius); border: 1px dashed var(--line); background: none; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.composer { flex: none; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.composer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.section { flex: none; display: flex; flex-direction: column; gap: 8px; }
.section__head { display: flex; justify-content: space-between; align-items: center; height: 16px; }
.section__title { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.section__count { font-size: 12px; line-height: 16px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { width: 100%; min-height: var(--row); padding: 10px 16px; display: flex; align-items: center; gap: 12px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; color: var(--text); }
.card > .row:first-child { border-top: 0; }
.row__text { flex: 1; min-width: 0; display: block; }
.row__title, .row__meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__title { font-size: 15px; line-height: 20px; font-weight: 600; }
.row__meta { margin-top: 2px; font-size: 13px; line-height: 16px; color: var(--muted); }
.row--todo { padding: 0 16px; }
.todo { flex: 1; min-height: var(--row); display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 20px; cursor: pointer; }
.todo__text.is-done { color: var(--muted); text-decoration: line-through; }
.nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--surface); padding: 8px 8px 24px; }
.nav__btn { height: var(--btn); min-width: var(--target); background: none; border: none; padding: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; line-height: 12px; font-weight: 500; }
.nav__btn.is-on { color: var(--text); font-weight: 600; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 32px 0; }
.empty__icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent-text); margin-bottom: 8px; }
.empty__title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.empty__text { margin: 0; font-size: 15px; line-height: 24px; color: var(--muted); max-width: 280px; }

@media (prefers-reduced-motion: reduce) { .meter__fill { transition: none; } }

/* Aşama 2 */
svg { flex: none; }
.help { margin: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.help strong { color: var(--text); font-weight: 600; }
.lock-unlink { align-self: center; height: 32px; padding: 0 8px; background: none; border: 0; font: inherit; font-size: 12px; color: var(--muted-on-surface); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.app-title--grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 20px; line-height: 28px; }
.app-head--back { gap: 12px; }
.todo-add { flex: none; display: flex; gap: 8px; align-items: center; }
.todo-add .input { flex: 1; min-width: 0; }
.icon-btn:disabled { opacity: 0.5; cursor: default; }
.app-main { position: relative; }
