/* METRIA danışan uygulaması — Tasarım A · Clinical Minimal (21.11 seçildi; kaynak: design/metria_ui/tasarim_A).
   Yazı: sistem yazı tipi yığını (font dosyası YOK: sw.js statik allowlist'i yalnız html/js/css/webmanifest + icons/icon-N.png).
   Renkler: creative/metria/logo/renkler.json (#363F35 yeşil, #1F241D derin, #A6865A altın, #EFE5DB krem — krem yalnız TASLAK bandında). */
:root {
  color-scheme: light;
  --m-yesil: #363F35; --m-derin: #1F241D; --m-altin: #A6865A; --m-krem: #EFE5DB;
  --g-800: #2B3329; --g-700: #363F35; --g-600: #4A5748; --g-500: #647262; --g-300: #B9C4B6; --g-200: #D9E0D6; --g-100: #ECF0EA; --g-50: #F5F7F4;
  --zemin: #FFFFFF; --zemin-2: #F7F8F6; --cizgi: #E3E7E1; --cizgi-2: #EEF1EC;
  --metin: #1F241D; --metin-2: #4F574D; --metin-3: #6B7369;
  --kritik: #A61B1B; --kritik-z: #FCEDEC; --kritik-c: #F1C4C1;
  --uyari: #7A4E00; --uyari-z: #FFF5DE; --uyari-c: #EED9A6;
  --iyi: #2A6340; --iyi-z: #E8F3EC; --iyi-c: #BFDCC9;
  --odak: #1D5FD1;
  --alt: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--zemin-2); color: var(--metin);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--metin); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
h4 { font-size: 12.5px; font-weight: 600; color: var(--metin-3); margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 8px; }
a { color: var(--g-700); }
:focus-visible { outline: 3px solid var(--odak); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.skip { position: absolute; left: -999px; top: 0; z-index: 60; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 10px 14px; border: 2px solid var(--odak); border-radius: 8px; }

/* ---------- Kabuk ---------- */
.taslak-bant { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; min-height: 24px; padding: 2px 12px; background: var(--m-krem); color: #5B4A30; font-size: 12px; font-weight: 500; text-align: center; }
.taslak-bant b { font-weight: 700; letter-spacing: .06em; }
.ust { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--cizgi); }
.ust .sayfa-adi { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* METRIA marka bandı: onaylı sembol (icon-192) + ad */
.marka-bant { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .12em; color: var(--m-yesil); margin: 0; font-size: 14px; }
.marka-bant img { border-radius: 7px; display: block; }
.ust .marka-bant { padding-right: 12px; border-right: 1px solid var(--cizgi); }

main.icerik { display: block; max-width: 560px; margin: 0 auto; padding: 16px 16px calc(var(--alt) + 28px + env(safe-area-inset-bottom)); }
main.icerik > * + * { margin-top: 16px; }

/* Alt sekme çubuğu */
.sekmeler { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--alt) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--cizgi); max-width: 560px; margin: 0 auto; }
.sekme { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; color: var(--metin-3); font-size: 11.5px; font-weight: 500; text-decoration: none; position: relative; }
.sekme svg { width: 22px; height: 22px; }
.sekme[aria-current="page"] { color: var(--g-700); font-weight: 700; }
.sekme[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--g-700); border-radius: 0 0 2px 2px; }
@media (min-width: 600px) { .sekmeler { border: 1px solid var(--cizgi); border-bottom: 0; border-radius: 14px 14px 0 0; } }
svg.ik { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Sayfa ---------- */
.sayfa-bas p { color: var(--metin-3); font-size: 13.5px; margin: 4px 0 0; }
.etiket-ust { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--metin-3); margin: 0 0 6px; }
.dolu { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.dolu .cubuk { flex: 1; height: 6px; border-radius: 3px; background: var(--g-100); overflow: hidden; }
.dolu .cubuk i { display: block; height: 100%; background: var(--g-600); border-radius: 3px; }
.dolu .n { font-weight: 600; font-size: 13px; white-space: nowrap; }

.bolum { background: #fff; border: 1px solid var(--cizgi); border-radius: 14px; overflow: hidden; }
.bolum-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 4px; min-height: 44px; }
.bolum-bas h2 { font-size: 14px; }
.bolum-ic { padding: 4px 16px 16px; }
.bolum-ic p:not(.ince) { font-size: 15px; }
.metin-dugme { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--g-700); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.ince { color: var(--metin-3); font-size: 13px; }

/* 112 sabit metni + belirti satırı */
.app-112 { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--kritik-c); background: var(--kritik-z); color: #5E1A16; border-radius: 10px; font-size: 13.5px; line-height: 1.45; margin: 0; }
.app-112 svg { width: 18px; height: 18px; flex: none; color: var(--kritik); margin-top: 1px; }
.satir { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; color: inherit; text-decoration: none; background: #fff; }
.satir + .satir { border-top: 1px solid var(--cizgi-2); }
.satir .ana { flex: 1; min-width: 0; }
.satir .b1 { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.satir .b2 { display: block; color: var(--metin-3); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.satir .ok { width: 16px; height: 16px; color: var(--g-500); flex: none; }
a.satir:hover { background: var(--g-50); }
.belirti-satir { border: 1px solid var(--kritik-c); border-radius: 14px; }
.simge { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--g-50); color: var(--g-700); }
.simge svg { width: 18px; height: 18px; }
.simge.k { background: var(--kritik-z); color: var(--kritik); }

/* Öğün satırları (ana sayfa özeti) */
.ogun { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--cizgi-2); }
.ogun:first-child { border-top: 0; }
.ogun .saat { width: 76px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--metin-3); padding-top: 2px; }
.ogun ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.ogun li { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 2px 0; overflow-wrap: anywhere; }
.ogun li span + span { color: var(--metin-3); font-size: 13.5px; }

/* ---------- Düğmeler ve form ---------- */
button, .dugme { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--g-700); background: var(--g-700); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
button:hover, .dugme:hover { background: var(--g-800); }
.dugme.ikincil, button.ikincil { background: #fff; color: var(--g-800); border-color: var(--g-300); }
.dugme.ikincil:hover, button.ikincil:hover { background: var(--g-50); }
.dugme.tam, form > button[type="submit"] { width: 100%; }
.dugme svg { width: 18px; height: 18px; }

form { margin: 0; }
.field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label, legend { font-weight: 600; font-size: 14px; color: var(--metin-2); }
small { font-weight: 400; color: var(--metin-3); font-size: 12.5px; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #8F9A8C; border-radius: 10px; background: #fff; }
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--odak); }
[aria-invalid="true"] { border-color: var(--kritik); border-width: 2px; }
.err { color: var(--kritik); font-size: 13.5px; }
fieldset { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
fieldset > legend { padding: 0; margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--metin); }
.iki { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.iki .genis { grid-column: 1 / -1; }

/* Onay / seçim kutuları (belirti, rıza) */
.secim { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--cizgi); border-radius: 10px; background: #fff; margin: 0 0 8px; flex-wrap: wrap; }
.secim input[type="checkbox"] { width: 24px; height: 24px; min-height: 24px; margin: 0; padding: 0; flex: none; accent-color: var(--g-700); }
.secim label { flex: 1; min-width: 0; font-weight: 500; color: var(--metin); font-size: 15px; cursor: pointer; }
.secim .err { flex-basis: 100%; }
.secim:has(input:checked) { border-color: var(--g-600); background: var(--g-50); }

/* Bant / kutu durumları */
.kutu { background: var(--zemin-2); border: 1px solid var(--cizgi); border-radius: 10px; padding: 12px 14px; color: var(--metin-2); font-size: 14px; margin: 0; }
#offline { background: var(--uyari-z); border: 1px solid var(--uyari-c); color: #4E3300; border-radius: 10px; padding: 12px 14px; }
.acil, #yasak, #sonuc { background: var(--kritik-z); border: 1px solid var(--kritik-c); border-left: 4px solid var(--kritik); color: #5E1A16; border-radius: 10px; padding: 12px 14px; }
#sonuc:not(.acil) { background: var(--iyi-z); border-color: var(--iyi-c); border-left-color: var(--iyi); color: #1C4A2E; }
#sonuc { outline-offset: 2px; }
[role="status"] { color: var(--metin-2); font-size: 14px; }
[role="status"]:empty { display: none; }
main.icerik > [role="status"]:not(:empty) { background: #fff; border: 1px solid var(--cizgi); border-radius: 10px; padding: 10px 14px; }
[hidden] { display: none !important; }

/* Plan / dersler akışı */
details.gun { background: #fff; border: 1px solid var(--cizgi); border-radius: 12px; margin: 0 0 8px; padding: 0 14px; }
details.gun.bugun { border: 2px solid var(--g-700); }
details.gun[open] { padding-bottom: 12px; }
summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
#bugun_icerik ul, details.gun ul { padding-left: 20px; margin: 4px 0 8px; }
#bugun_icerik li, details.gun li { margin: 2px 0; overflow-wrap: anywhere; }
ul.degisim { color: var(--metin-2); font-size: 14px; }
p.degisim, p.alt { color: var(--metin-3); font-size: 13px; margin: 2px 0; }
p.icerik { white-space: pre-wrap; overflow-wrap: anywhere; }
.ipucu { color: var(--metin-3); font-size: 13px; }
#liste:focus, #bugun:focus { outline: none; }

/* Oturum kutusu (ortak.js ekler) */
#oturum_kutusu { background: #fff; border: 1px solid var(--cizgi); border-radius: 14px; padding: 14px 16px; }
#oturum_kutusu p { font-size: 14px; color: var(--metin-2); }
#oturum_kutusu #cikis { background: #fff; color: var(--g-800); border-color: var(--g-300); }
#giris_form button { width: 100%; }

/* Risk listesi */
ul.liste-kutu { list-style: none; padding: 0; margin: 0; }
.liste-kutu li { background: #fff; border: 1px solid var(--cizgi); border-radius: 10px; padding: 12px 14px; margin: 0 0 8px; overflow-wrap: anywhere; }
