/* Troy Awareness tasarım sistemi (RFC 0037): renk, yazı, boşluk ve köşe değerleri tokens.css
   içindeki belirteçlerden gelir; bu dosyada sabit renk yazılmaz (istisnalar RFC 0037 K7).
   Troy Awareness design system (RFC 0037): colours, type, spacing and radii come from the
   tokens in tokens.css; no fixed colours here (exceptions listed in RFC 0037 K7). */

/* Inter 4.1, kendi sunucumuzdan (SIL OFL 1.1, LICENSE.txt yanında) / self-hosted Inter 4.1 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/InterVariable-Italic.woff2") format("woff2");
}

:root {
  /* Kurumun vurgu rengi (/theme.css bunu ezer); yalnız grafik öğelerde kullanılır, metinde asla.
     The tenant accent (/theme.css overrides it); graphics only, never text. */
  --accent: var(--color-accent);
  /* Belirteç dosyasında olmayan yerel değerler / local values not in the token file */
  --shadow-1: 0 1px 2px rgb(11 18 32 / 6%);
  --shadow-2: 0 8px 24px rgb(11 18 32 / 6%);
  --shadow-pop: 0 10px 30px rgb(11 18 32 / 22%);
  --tint-hover: color-mix(in srgb, var(--color-text) 6%, var(--color-surface));
  --tint-accent: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface));
  --tint-accent-strong: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface));
  --primary-hover: color-mix(in srgb, var(--color-primary) 85%, var(--brand-white));
  /* Odak halkası her zaman belirteç turuncusu (kurum rengi değil): 3:1 güvencesi.
     The focus ring always uses the token orange (not the tenant colour): 3:1 guaranteed. */
  --focus-ring: 3px solid var(--color-accent);
  font-family: var(--font-family);
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-1: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-2: 0 8px 24px rgb(0 0 0 / 30%);
    --shadow-pop: 0 10px 30px rgb(0 0 0 / 60%);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-size: var(--font-size-body);
  line-height: var(--line-height-body); font-family: var(--font-family); }
.topbar { display: flex; align-items: center; gap: var(--space-m); padding: var(--space-sm) var(--space-l); background: var(--color-surface);
  border-bottom: 3px solid var(--accent); }
.brand { display: inline-flex; }
.tenant { font-weight: var(--font-weight-semibold); color: var(--color-text); padding-left: var(--space-m); border-left: 1px solid var(--color-border); }
.logout { margin-left: auto; display: flex; align-items: center; gap: var(--space-sm); }
.who { color: var(--color-text-muted); font-size: var(--font-size-body-small); }
.container { max-width: 520px; margin: var(--space-xxl) auto; padding: 0 var(--space-m); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-l); }
h1 { margin: 0 0 var(--space-s); font-size: var(--font-size-title-1); line-height: var(--line-height-title-1);
  font-weight: var(--font-weight-title-1); color: var(--color-text); }
h2, h3 { color: var(--color-text); }
p.lead { margin: 0 0 var(--space-l); color: var(--color-text-muted); }
label { display: block; font-weight: var(--font-weight-semibold); margin: var(--space-m) 0 var(--space-xs); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search],
input[type=date], input[type=tel], textarea, select {
  font: inherit; color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); }
input[type=text], input[type=email], input[type=password] { width: 100%; padding: 10px var(--space-sm); }
/* Radyo ve onay kutusu kendimiz çiziliyor: yerel çizim koyu modda dolu benek gibi görünüyordu.
   Onay işareti ::before kenarlıklarıyla (data: SVG yok, CSP img-src 'self'); işaret rengi
   --color-on-primary, yani koyu modda turuncu zeminde lacivert.
   Radios and checkboxes are drawn by us: the native rendering looked like a filled dot in dark
   mode. The tick is drawn with ::before borders (no data: SVG); its colour is on-primary. */
input[type=checkbox]:not(.nav-toggle), input[type=radio] {
  appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; flex: none;
  width: 18px; height: 18px; margin: 0; vertical-align: -3px; cursor: pointer;
  border: 2px solid var(--color-border-strong); background: var(--color-surface); }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:not(.nav-toggle) { border-radius: var(--radius-xs); }
input[type=radio]:checked { border-color: var(--color-primary); background: var(--color-primary); box-shadow: inset 0 0 0 3px var(--color-surface); }
input[type=checkbox]:not(.nav-toggle):checked { border-color: var(--color-primary); background: var(--color-primary); }
input[type=checkbox]:not(.nav-toggle)::before { content: ""; width: 5px; height: 10px; border: solid transparent; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
input[type=checkbox]:not(.nav-toggle):checked::before { border-color: var(--color-on-primary); }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
button.primary { margin-top: var(--space-l); width: 100%; min-height: var(--touch-target-min); padding: 10px var(--space-m); font: inherit;
  font-weight: var(--font-weight-label); color: var(--color-on-primary); background: var(--color-primary); border: 0;
  border-radius: var(--radius-button); cursor: pointer; }
button.primary:hover { background: var(--primary-hover); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--color-link);
  cursor: pointer; text-decoration: underline; }
a { color: var(--color-link); text-underline-offset: 2px; }
a:hover { color: var(--color-text); }
.errorlist { margin: var(--space-xs) 0 0; padding: 0; list-style: none; color: var(--color-error); font-size: var(--font-size-body-small); }
.note { margin-top: var(--space-m); font-size: var(--font-size-body-small); color: var(--color-text-muted); }
.qr { display: flex; justify-content: center; margin: var(--space-m) 0; }
/* QR kodu koyu modda da açık zeminde okunur / the QR code keeps a light plate in dark mode */
.qr svg { max-width: 220px; height: auto; background: var(--brand-white); padding: var(--space-s); border-radius: var(--radius-m); }
code.key { display: block; padding: var(--space-s) 10px; background: var(--color-bg); border-radius: var(--radius-s);
  word-break: break-all; font-size: var(--font-size-body-small); }
.codes { columns: 2; padding: 0; list-style: none; font-family: ui-monospace, monospace; }
.codes li { padding: var(--space-xs) 0; }
.notice { padding: 10px var(--space-sm); border-left: 4px solid var(--accent); background: var(--tint-accent); margin: var(--space-m) 0; }
@media (max-width: 480px) { .topbar { padding: 10px 14px; } .tenant { display: none; } .card { padding: var(--space-l) var(--space-m); } }
a.button { display: block; margin-top: var(--space-l); min-height: var(--touch-target-min); padding: 10px var(--space-m); text-align: center;
  font-weight: var(--font-weight-label); color: var(--color-on-primary); background: var(--color-primary); border-radius: var(--radius-button); text-decoration: none; }
.container.wide { max-width: 1160px; }
.nav { display: flex; gap: var(--space-m); margin-left: var(--space-sm); }
.nav a { color: var(--color-text); text-decoration: none; font-weight: var(--font-weight-semibold); }
.messages { list-style: none; margin: 0 0 var(--space-m); padding: 0; }
.messages li { padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: var(--space-s); border: 1px solid var(--color-border); background: var(--color-surface); }
.messages li.success { border-color: var(--color-success); background: var(--color-success-bg); color: var(--color-success); }
.messages li.error { border-color: var(--color-error); background: var(--color-error-bg); color: var(--color-error); }
.messages li.warning { border-color: var(--color-warning); background: var(--color-warning-bg); color: var(--color-warning); }
.messages li.info { border-color: var(--color-info); background: var(--color-info-bg); color: var(--color-info); }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-m); flex-wrap: wrap; }
.pagehead h1 { margin: 0; }
table.data { width: 100%; border-collapse: collapse; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: 10px var(--space-sm); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
table.data th { background: var(--color-bg); color: var(--color-text-muted); }
table.data tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
/* Durum rozetleri: anlamsal renk + kendi zemini (AA) / status badges: semantic colour on its own background */
.badge { display: inline-block; white-space: nowrap; padding: var(--space-xxs) var(--space-s); border-radius: var(--radius-badge);
  font-size: var(--font-size-caption); line-height: var(--line-height-caption); font-weight: var(--font-weight-semibold);
  background: var(--gray-100); color: var(--gray-900); }
.badge.ok { background: var(--color-success-bg); color: var(--color-success); }
.badge.warn { background: var(--color-warning-bg); color: var(--color-warning); }
.badge.off { background: var(--color-error-bg); color: var(--color-error); }
.badge.info { background: var(--color-info-bg); color: var(--color-info); }
@media (prefers-color-scheme: dark) { .badge { background: var(--gray-700); color: var(--color-text); }
  .badge.ok { background: var(--color-success-bg); color: var(--color-success); }
  .badge.warn { background: var(--color-warning-bg); color: var(--color-warning); }
  .badge.off { background: var(--color-error-bg); color: var(--color-error); }
  .badge.info { background: var(--color-info-bg); color: var(--color-info); } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-m); margin-bottom: var(--space-l); }
.stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-m); }
.stat strong { display: block; font-size: var(--font-size-title-1); line-height: var(--line-height-title-1); color: var(--color-text); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: var(--space-s) var(--space-m); font: inherit;
  font-size: var(--font-size-label); line-height: var(--line-height-label); font-weight: var(--font-weight-label);
  color: var(--color-on-primary); background: var(--color-primary); border: 1px solid var(--color-primary);
  border-radius: var(--radius-button); text-decoration: none; cursor: pointer; }
.btn.secondary { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border-strong); }
.btn.danger { background: var(--color-error); border-color: var(--color-error); color: var(--color-surface); }
.btn.small { min-height: 32px; padding: var(--space-xs) var(--space-sm); font-size: var(--font-size-body-small); }
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters input, .filters select { padding: var(--space-s) 10px; font: inherit; border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); background: var(--color-surface); }
select, input[type=color] { font: inherit; padding: var(--space-s) 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-text); }
input[type=color] { padding: var(--space-xxs); height: 40px; width: 70px; }
.helptext { color: var(--color-text-muted); font-size: var(--font-size-body-small); line-height: var(--line-height-body-small); }
.pager { display: flex; gap: var(--space-sm); justify-content: center; margin-top: var(--space-m); align-items: center; }
.section { margin-top: var(--space-xl); }
.section h2 { font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-title-3); color: var(--color-text); }
@media (max-width: 640px) { table.data { display: block; overflow-x: auto; } .nav { gap: 10px; } }
.tcard { display: flex; justify-content: space-between; gap: var(--space-m); margin-bottom: var(--space-m); align-items: flex-start; }
.tcard h2 { margin: 0 0 var(--space-xs); font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-title-3); }
.tcard p { margin: var(--space-xs) 0; }
.tstatus { text-align: right; white-space: nowrap; }
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: var(--space-l); color: var(--color-text); font-size: var(--font-size-title-2); line-height: var(--line-height-title-2); font-weight: var(--font-weight-title-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose img { max-width: 100%; height: auto; }
fieldset.question { margin: 0 0 var(--space-m); border: 1px solid var(--color-border); border-radius: var(--radius-card); }
fieldset.question legend { font-weight: var(--font-weight-bold); padding: 0 var(--space-xs); }
/* Seçenek kutusu tıklanabilir: kenarı border_strong / the choice box is clickable: strong border */
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: var(--font-weight-regular); margin: 10px 0; padding: 10px var(--space-sm);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); cursor: pointer; background: var(--color-surface); }
/* Hover yalnız zemini değiştirir; seçili hâl ana renk kenar + ana renk tonu (iki modda hover'dan farklı).
   Hover only changes the background; the selected state gets a primary border and primary tint. */
.choice:hover { border-color: var(--color-border-strong); background: var(--tint-hover); }
.choice:has(input:checked), .choice:has(input:checked):hover { border-color: var(--color-primary); background: var(--tint-accent); box-shadow: inset 0 0 0 1px var(--color-primary); }
.choice input { margin-top: 3px; }
.question p { margin: var(--space-xs) 0; }
@media (max-width: 560px) { .tcard { flex-direction: column; } .tstatus { text-align: left; } }
.card form select, .card form input[type=date] { width: 100%; }
.topbar { flex-wrap: wrap; row-gap: var(--space-s); }
.nav { flex-wrap: wrap; row-gap: var(--space-xs); }
.nav a { white-space: nowrap; }
.logout .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Reading pages (module text, quiz, result) get a comfortable measure on wide screens. */
.container.reading { max-width: 1000px; }
/* A <legend> normally sits on the border of its fieldset and overflows when it wraps.
   Floating it makes it an ordinary block inside the box. */
fieldset.question { padding: var(--space-l); min-inline-size: 0; background: var(--color-surface); }
fieldset.question legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-title-3); }
fieldset.question legend + * { clear: both; }
label.inline { display: inline-block; margin: 0 var(--space-xs) 0 var(--space-xs); font-weight: var(--font-weight-semibold); }

/* Deadline alerts: impossible to miss on every learner page. */
.alerts { position: sticky; top: 0; z-index: 10; }
.alert { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-m); padding: var(--space-sm) var(--space-l);
  text-decoration: none; border-bottom: 1px solid var(--color-border); }
/* Hata zemininde yüzey rengi yazı: açıkta beyaz/kırmızı 6,54:1, koyuda lacivert/pembe 8,17:1.
   Surface-coloured text on the error colour: 6.54:1 light, 8.17:1 dark. */
.alert.danger { background: var(--color-error); color: var(--color-surface); }
.alert.warning { background: var(--color-warning-bg); color: var(--color-warning); border-left: 4px solid var(--color-warning); }
.alert:hover { filter: brightness(1.08); }
.alert span { font-size: var(--font-size-body-small); }
.alert:focus-visible { outline: 3px solid var(--color-surface); outline-offset: -3px; }
/* Sarı uyarı şeridinde yüzey rengi halka görünmez (1,08:1); uyarı rengi kullanılır.
   On the yellow warning strip a surface-coloured ring is invisible; the warning colour is used. */
.alert.warning:focus-visible { outline-color: var(--color-warning); }

/* Learner overview and training cards with a cover picture. */
.overview { margin-bottom: var(--space-l); }
.overview h2 { margin: 0 0 10px; font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); color: var(--color-text); }
.overview-bar { display: flex; align-items: center; gap: var(--space-sm); }
.overview-bar strong { font-size: var(--font-size-title-2); line-height: var(--line-height-title-2); color: var(--color-text); min-width: 3.2rem; text-align: right; }
progress { flex: 1; height: 14px; border-radius: var(--radius-pill); overflow: hidden; border: 0; background: var(--gray-100); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--gray-100); border-radius: var(--radius-pill); }
progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-pill); }
progress::-moz-progress-bar { background: var(--accent); }
@media (prefers-color-scheme: dark) {
  progress { background: var(--gray-700); }
  progress::-webkit-progress-bar { background: var(--gray-700); }
}
.stats.compact { margin: 14px 0 var(--space-xs); grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stats.compact .stat { padding: var(--space-sm) var(--space-m); }
.stats.compact .stat strong { font-size: var(--font-size-title-2); line-height: var(--line-height-title-2); }
.stat.bad { border-color: var(--color-error); background: var(--color-error-bg); }
.stat.bad strong { color: var(--color-error); }
.tcard { align-items: stretch; }
.tcard .cover-link { flex: 0 0 168px; display: block; }
.tcard .cover { width: 168px; height: 100%; min-height: 96px; object-fit: cover; border-radius: var(--radius-image); display: block; }
.tcard .tbody { flex: 1; min-width: 0; }
.overdue-line { color: var(--color-error); font-weight: var(--font-weight-bold); margin: var(--space-xs) 0 0; }
.hero { display: block; width: 100%; height: auto; border-radius: var(--radius-image); margin-bottom: var(--space-m); }
td.withthumb { display: flex; align-items: center; gap: 10px; }
img.thumb { width: 56px; height: 28px; object-fit: cover; border-radius: var(--radius-xs); flex: none; }
@media (max-width: 560px) { .tcard .cover-link { flex: none; } .tcard .cover { width: 100%; height: 120px; } }

/* Lesson steps */
.stepbar { display: flex; align-items: center; gap: var(--space-sm); margin: var(--space-xs) 0 14px; color: var(--color-text-muted); font-size: var(--font-size-body-small); }
.stepbar progress { flex: 1; height: 8px; }
.steplist { list-style: none; padding: 0; margin: 0 0 var(--space-m); }
.steplist li { display: flex; align-items: center; gap: 10px; padding: 10px var(--space-sm); border: 1px solid var(--color-border); border-radius: var(--radius-m); margin-bottom: var(--space-s); }
.steplist li.step-current { border-color: var(--accent); background: var(--tint-accent); }
.steplist li.step-locked { color: var(--color-text-muted); }
.steplist .kind { margin-left: auto; color: var(--color-text-muted); font-size: var(--font-size-caption); }
.infographic { margin: 0; }
.infographic img { width: 100%; height: auto; border-radius: var(--radius-image); border: 1px solid var(--color-border); }
.infographic figcaption { margin-top: 10px; color: var(--color-text-muted); font-size: var(--font-size-body-small); }
/* Video sahnesi her iki modda da lacivert / the video stage is navy in both modes */
.video-embed .video-stage { position: relative; aspect-ratio: 16 / 9; background: var(--brand-navy); border-radius: var(--radius-image); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-gate { padding: var(--space-l); text-align: center; color: var(--brand-white); max-width: 520px; }
.video-gate .helptext { color: var(--gray-200); }
.video-gate a { color: var(--brand-orange-light); }
details.transcript { margin-top: 14px; }
.feedback { padding: var(--space-sm) 14px; border-radius: var(--radius-m); border-left: 4px solid; margin-top: var(--space-sm); }
.feedback.right { background: var(--color-success-bg); border-color: var(--color-success); }
.feedback.wrong { background: var(--color-error-bg); border-color: var(--color-error); }
.checkchoices { border: 0; padding: 0; margin: 0 0 var(--space-s); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.stepnav .actions { justify-content: space-between; }

/* Achievements */
.badge-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-sm); }
.badge-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.badge-card.earned { border-color: var(--color-success); background: var(--color-success-bg); }
.badge-card.locked { opacity: 0.75; }
.badge-card span, .badge-card em { font-size: var(--font-size-body-small); color: var(--color-text-muted); font-style: normal; }
tr.me td { background: var(--tint-accent); font-weight: var(--font-weight-semibold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.badge-card { align-items: center; text-align: center; }
.badge-icon { display: block; margin-bottom: var(--space-xs); }
.badge-card.locked .badge-icon { filter: grayscale(1) opacity(.45); }
.badge-card.earned .badge-icon { filter: drop-shadow(0 2px 4px rgb(0 0 0 / 25%)); }

.btn-cert { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-button); font-weight: var(--font-weight-semibold); font-size: var(--font-size-body-small);
  color: var(--color-text); text-decoration: none; background: var(--color-surface); border: 1px solid var(--color-border-strong); }
.btn-cert span { color: var(--color-accent-text); }
.btn-cert:hover, .btn-cert:focus-visible { background: var(--color-primary); color: var(--color-on-primary); border-color: var(--color-primary); }
.btn-cert:hover span, .btn-cert:focus-visible span { color: var(--color-on-primary); }

.tactions { margin: 10px 0 0; }

/* ---- Corporate look (overrides earlier rules) ---- */
.topbar { padding: var(--space-s) var(--space-xl); gap: var(--space-l); border-top: 4px solid var(--accent); border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-1); }
.tenant { font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); color: var(--color-text-muted); }
.nav { gap: var(--space-xs); margin-left: var(--space-s); }
.nav a { padding: var(--space-s) var(--space-sm); border-radius: var(--radius-s); font-size: var(--font-size-label); line-height: var(--line-height-label); font-weight: var(--font-weight-label); color: var(--color-text); text-decoration: none; }
.nav a:hover { background: var(--tint-hover); color: var(--color-text); }
.logout { gap: 14px; }
.logout .who { font-size: var(--font-size-body-small); color: var(--color-text-muted); }
.logout button.link { text-decoration: none; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-button); padding: var(--space-xs) 14px; min-height: 36px; font-size: var(--font-size-label); font-weight: var(--font-weight-label); cursor: pointer; }
.logout button.link:hover { border-color: var(--color-text); background: var(--tint-hover); }

.container { margin: var(--space-xl) auto; }
.card { border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
h1 { margin-bottom: var(--space-m); letter-spacing: -0.01em; }
h2 { letter-spacing: -0.005em; }
.btn:hover, a.button:hover, button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--color-on-primary); }
.btn.secondary:hover { background: var(--tint-hover); color: var(--color-text); border-color: var(--color-text); }
.btn.danger:hover { background: color-mix(in srgb, var(--color-error) 85%, var(--color-text)); border-color: transparent; color: var(--color-surface); }
table.data { border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
table.data th { font-size: var(--font-size-caption); line-height: var(--line-height-caption); text-transform: uppercase; letter-spacing: 0.05em; font-weight: var(--font-weight-bold); padding: 10px 14px; }
table.data td { padding: var(--space-sm) 14px; }
.stat { border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.stat strong { font-weight: var(--font-weight-bold); }
.tcard { box-shadow: var(--shadow-1); }
.messages li { border-radius: var(--radius-s); }
@media (max-width: 640px) { .topbar { padding: 10px 14px; } }

/* Achievements: colour */
.ach { margin-bottom: var(--space-l); border-top: 3px solid var(--accent); }
.ach h2 { margin-top: 0; color: var(--color-text); }
/* Turuncu zeminde lacivert yazı (beyaz yasak) / navy text on orange (white is forbidden) */
.stats.compact .stat.pts { background: var(--color-secondary); border-color: var(--color-secondary); color: var(--color-on-secondary); }
.stats.compact .stat.pts strong { color: var(--color-on-secondary); }
.stats.compact .stat.tot { background: var(--color-info-bg); border-color: var(--color-info-bg); }
.stats.compact .stat.tot strong { color: var(--color-info); }
.stats.compact .stat.bdg { background: var(--color-warning-bg); border-color: var(--color-warning-bg); }
.stats.compact .stat.bdg strong { color: var(--color-warning); }
.badge-card.earned { background: var(--color-success-bg); border-color: var(--color-success); }
.badge-card.earned strong { color: var(--color-success); }
.rank { display: inline-block; min-width: 26px; padding: var(--space-xxs) 0; text-align: center; border-radius: 50%; font-weight: var(--font-weight-bold); font-size: var(--font-size-body-small); background: var(--gray-100); color: var(--gray-900); }
/* Madalya renkleri: kendi zemin/yazı çiftleri, iki modda aynı (RFC 0037 K7) / medal pairs, same in both modes */
.rank.r1 { background: #f5c542; color: #4a3500; }
.rank.r2 { background: #cfd5dd; color: #2b3440; }
.rank.r3 { background: #e0a370; color: #4a2410; }
table.data tr.me td { background: var(--tint-accent); }

.brand img { display: block; height: 52px; width: auto; }
.topbar { padding-top: var(--space-s); padding-bottom: var(--space-s); }
@media (max-width: 640px) { .brand img { height: 40px; } }
/* Logolar açık zemin için çizildi: koyu modda beyaz levha üstünde gösterilir.
   Logos are drawn for light backgrounds: in dark mode they sit on a white plate. */
@media (prefers-color-scheme: dark) {
  .brand img, .login-logo img { background: var(--brand-white); border-radius: var(--radius-m); padding: var(--space-xs) var(--space-s); }
}

.page-login .topbar .brand { display: none; }
.login-logo { text-align: center; margin-bottom: var(--space-l); }
.login-logo img { height: 110px; width: auto; max-width: 100%; }
.page-login .tenant { border-left: 0; padding-left: 0; }

.imglist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.imglist li { display: flex; align-items: center; gap: 14px; padding: var(--space-s); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.imglist img { height: 64px; width: 96px; object-fit: cover; border-radius: var(--radius-xs); background: var(--color-bg); }
.imglist code { word-break: break-all; font-size: var(--font-size-caption); }
.imglist form { margin-left: auto; }

.demo-banner { background: var(--color-warning-bg); color: var(--color-warning); border-bottom: 1px solid var(--color-warning); padding: var(--space-xs) var(--space-l); font-size: var(--font-size-body-small); text-align: center; }

/* Public demo-request form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg-ok { padding: 14px var(--space-m); border: 1px solid var(--color-success); background: var(--color-success-bg); border-radius: var(--radius-m); }
.msg-ok p { margin: var(--space-xs) 0 0; }
.check-row label { display: flex; gap: 10px; align-items: flex-start; font-weight: var(--font-weight-regular); }
.check-row input { margin-top: 5px; }
.prewrap { white-space: pre-wrap; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-xs) var(--space-m); margin: 0 0 var(--space-m); }
dl.facts dt { color: var(--color-text-muted); }
dl.facts dd { margin: 0; }
.card form textarea { width: 100%; padding: 10px var(--space-sm); font: inherit; border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); }
input[type=tel] { width: 100%; padding: 10px var(--space-sm); font: inherit; border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); }

/* Dashboard: tiles and charts (overview, reports, team).
   Grafik veri renkleri (durum, düzey, seri) belirteç dosyasında yok; charts.py ve aşağıdaki
   .s-*, .m-*, .tone-* çizgileri RFC 0037 K7 istisnasıdır. / Chart data colours are not in the
   token file; they are the RFC 0037 K7 exception. */
.dash-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-m); margin-bottom: var(--space-l); }
.tile { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: var(--space-m) var(--space-l); border-radius: var(--radius-card); border: 1px solid var(--color-border); min-height: 108px; background: var(--color-surface); }
.tile .tile-title { display: block; font-size: var(--font-size-body-small); line-height: var(--line-height-body-small); color: var(--color-text-muted); font-weight: var(--font-weight-semibold); }
.tile strong { display: block; font-size: var(--font-size-display); line-height: var(--line-height-display); font-weight: var(--font-weight-display); color: var(--color-text); }
.tile-chart { width: 46%; max-width: 130px; height: auto; }
.tile-ring { width: 64px; height: 64px; flex: none; }
.tile-ring .ring-track { stroke: var(--color-border); }
.tone-green { background: var(--color-success-bg); }
.tone-purple { background: var(--color-info-bg); }
.tone-red { background: var(--color-error-bg); }
.tone-yellow { background: var(--color-warning-bg); }
.tone-green .spark-line { stroke: #2e9e6b; } .tone-green .spark-area { fill: rgb(46 158 107 / 25%); }
.tone-purple .spark-line { stroke: #6c5ce7; } .tone-purple .spark-area { fill: rgb(108 92 231 / 25%); }
.spark-line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.dash-row { display: grid; gap: var(--space-m); margin-bottom: var(--space-l); }
.dash-row.three { grid-template-columns: repeat(3, 1fr); }
.dash-row.two { grid-template-columns: 3fr 2fr; }
.dcard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-l) var(--space-l) var(--space-m); box-shadow: var(--shadow-1); min-width: 0; }
.dcard h2 { margin: 0; font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-title-3); color: var(--color-text); }
.dsub { margin: var(--space-xxs) 0 var(--space-sm); color: var(--color-text-muted); font-size: var(--font-size-body-small); line-height: var(--line-height-body-small); }
.dcard svg { width: 100%; height: auto; display: block; }
.dcard .axis { font-size: 9.5px; fill: var(--color-text-muted); }
.dcard .grid { stroke: var(--color-border); stroke-width: 1; }
.dcard .grid.dashed { stroke-dasharray: 4 4; }
.dcard .chart-track { stroke: var(--gray-100); }
.dcard .chart-dot { fill: var(--color-surface); }
.dcard .chart-accent { stroke: var(--accent); }
.dcard .bubble { stroke: var(--color-surface); }
@media (prefers-color-scheme: dark) { .dcard .chart-track { stroke: var(--gray-700); } }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-xs) 14px; margin: 10px 0 0; padding: 0; font-size: var(--font-size-caption); line-height: var(--line-height-caption); color: var(--color-text-muted); }
.legend li { display: flex; align-items: center; gap: var(--space-xs); }
.legend.vertical { flex-direction: column; flex-wrap: nowrap; gap: 10px; margin: 0; font-size: var(--font-size-body-small); line-height: var(--line-height-body-small); }
.legend.vertical li { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: var(--space-s); align-items: start; }
.legend.vertical li span { overflow-wrap: anywhere; }
.legend.vertical b { color: var(--color-text); white-space: nowrap; }
.sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.s-completed { background: #2e9e6b; } .s-in_progress { background: #4f7cff; }
.s-not_started { background: #c4cad6; } .s-expired { background: #f0a020; }
.status-donut { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--space-m); align-items: center; }
.bar-row { margin-bottom: 13px; }
.bar-label { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--font-size-body-small); margin-bottom: 5px; }
.bar-label b { color: var(--color-text); }
progress.gbar { width: 100%; height: 10px; display: block; }
progress.gbar::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-pill); }
progress.gbar::-moz-progress-bar { background: var(--accent); border-radius: var(--radius-pill); }
progress.gbar.high::-webkit-progress-value { background: var(--color-error); }
progress.gbar.high::-moz-progress-bar { background: var(--color-error); }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-l); }
@media (max-width: 1000px) { .dash-tiles { grid-template-columns: repeat(2, 1fr); } .dash-row.three, .dash-row.two { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .dash-tiles { grid-template-columns: 1fr; } .status-donut { grid-template-columns: 1fr; } }

/* ---- Visual unity: the dashboard look applied to nav, toolbars, stat boxes and tables ---- */
.nav a { position: relative; }
/* Seçili menü: açık turuncu zemin + metin turuncusu (AA) + turuncu gösterge çizgisi.
   Current menu item: light orange tint + text orange (AA) + orange indicator. */
.nav a[aria-current="page"] { background: var(--tint-accent); color: var(--color-accent-text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-sm); right: var(--space-sm); bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); }
.demo-banner { font-weight: var(--font-weight-semibold); }

.pagehead { margin-bottom: var(--space-m); }
.btn.dl::before { content: "\2193"; font-weight: 800; margin-right: var(--space-s); }
.toolbar { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-m) var(--space-l) var(--space-xs); margin-bottom: var(--space-l); box-shadow: var(--shadow-1); }
.toolbar .filters { margin-bottom: var(--space-s); align-items: center; }
.toolbar .helptext { margin: var(--space-xs) 0 10px; }

.stat { position: relative; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-m) var(--space-m) var(--space-m) var(--space-l); box-shadow: var(--shadow-1); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.stat.bad::before { background: var(--color-error); }
.stat strong { font-variant-numeric: tabular-nums; }

.metric-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: var(--space-l); }
.metric { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 14px var(--space-m) 14px var(--space-m); position: relative; overflow: hidden; box-shadow: var(--shadow-1); }
.metric::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #4f7cff; }
.metric span { display: block; font-size: var(--font-size-body-small); line-height: var(--line-height-body-small); color: var(--color-text-muted); min-height: 2.4em; }
.metric strong { display: block; font-size: var(--font-size-title-1); line-height: var(--line-height-title-1); color: var(--color-text); font-variant-numeric: tabular-nums; }
.metric em { font-style: normal; }
.m-blue::before { background: #4f7cff; } .m-amber::before { background: #f0a020; }
.m-teal::before { background: #1aa6a6; } .m-purple::before { background: #6c5ce7; }
.m-low::before { background: #2e9e6b; } .m-medium::before { background: #f0a020; } .m-high::before { background: #d6453d; }

.tablecard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-l) var(--space-l) var(--space-sm); margin-bottom: var(--space-l); box-shadow: var(--shadow-1); }
.tablecard h2 { margin: 0 0 var(--space-sm); font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-title-3); color: var(--color-text); }
.tablewrap { overflow-x: auto; }
table.data { border-radius: var(--radius-card); border-color: var(--color-border); box-shadow: none; }
table.data th { background: var(--color-bg); color: var(--color-text-muted); font-size: var(--font-size-caption); text-transform: uppercase; letter-spacing: .05em; font-weight: var(--font-weight-bold); padding: var(--space-sm) 14px; }
table.data td { padding: var(--space-sm) 14px; border-bottom: 1px solid var(--color-border); }
/* Inter'de tabular rakam tire ve noktayı da açar: yalnız sayı sütunlarında / only on number cells */
table.data td.num, table.data td.rate { font-variant-numeric: tabular-nums; }
table.data tbody tr:hover td { background: var(--tint-hover); }
td.rate { min-width: 130px; }
td.rate span { display: block; font-size: var(--font-size-body-small); margin-bottom: 3px; color: var(--color-text); font-weight: var(--font-weight-semibold); }
progress.gbar.mini { height: 6px; }
.note-card { background: var(--color-bg); box-shadow: none; }
.tablecard table.data { border: 0; }
@media (max-width: 1000px) { .metric-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .metric-strip { grid-template-columns: 1fr; } }

/* İlk sütun genişliği yalnız geniş ekranda; mobilde etiket sütunu ekranın yarısını yemesin.
   First-column width only on wide screens; on phones the label column must not take half the screen. */
@media (min-width: 641px) {
  table.data td:first-child { min-width: 190px; }
  table.data th:first-child { min-width: 190px; }
}

/* Table actions and search bars follow the same look */
table.data { box-shadow: var(--shadow-2); }
.tablecard table.data { box-shadow: none; }
table.data td.actions { gap: var(--space-xs); }
table.data td.actions a, table.data td a.act { text-decoration: none; font-weight: var(--font-weight-semibold); font-size: var(--font-size-body-small); padding: var(--space-xs) 10px; border-radius: var(--radius-s); background: var(--tint-hover); color: var(--color-link); white-space: nowrap; }
table.data td.actions a:hover, table.data td a.act:hover { background: var(--tint-accent); color: var(--color-accent-text); }
.filters { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 10px 14px; box-shadow: var(--shadow-1); }
.toolbar .filters { border: 0; padding: 0; background: transparent; box-shadow: none; }
.filters input, .filters select { background: var(--color-surface); }
/* Dar ekranda uzun seçenekli seçim kutusu kartın dışına taşmasın / long selects must not overflow on phones */
.filters input, .filters select { max-width: 100%; min-width: 0; }
table.data td.actions button.link { text-decoration: none; font-weight: var(--font-weight-semibold); font-size: var(--font-size-body-small); padding: var(--space-xs) 10px; border-radius: var(--radius-s); background: var(--tint-hover); color: var(--color-link); white-space: nowrap; }
table.data td.actions button.link:hover { background: var(--color-error-bg); color: var(--color-error); }


/* ---- Round 3: wider pages, framed tables, calmer accents, equal control heights ---- */
.container.medium { max-width: 820px; }
.prose p, .prose li { max-width: 78ch; }
table.data { border-collapse: separate; border-spacing: 0; border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-2); }
.tablecard table.data { border: 0; box-shadow: none; border-radius: var(--radius-card); }
.tablecard { padding: 14px var(--space-m) var(--space-xs); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { white-space: nowrap; }
.tablecard.tablecard-open { padding-top: 14px; }
.filters > input, .filters > select, .filters > button, .filters > .btn { min-height: 42px; }
.toolbar .filters { align-items: stretch; }
.toolbar .filters label.inline { align-self: center; }
.dash-tiles.three-tiles { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .dash-tiles.three-tiles { grid-template-columns: 1fr; } }
.ach { border-top: 0; margin-bottom: var(--space-l); }
.ach h2 { margin-bottom: var(--space-s); }

/* Coverage card */
.dcard.coverage { margin-bottom: var(--space-l); }
.cover-grid { display: grid; grid-template-columns: 150px 1.2fr 1fr; gap: 28px; align-items: center; }
.cover-ring { position: relative; width: 140px; height: 140px; }
.cover-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.cover-label strong { font-size: var(--font-size-title-2); line-height: 1; color: var(--color-text); }
.cover-label span { font-size: var(--font-size-caption); color: var(--color-text-muted); }
.cover-facts p { margin: 0 0 var(--space-s); color: var(--color-text-muted); }
.cover-facts strong { font-size: var(--font-size-title-2); color: var(--color-text); margin-right: var(--space-xs); }
.cover-facts .warn-text strong { color: var(--color-error); }
.cover-list ul { list-style: none; margin: 0; padding: 0; }
.cover-list li { padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-border); font-size: var(--font-size-body-small); }
.cover-list li span { color: var(--color-text-muted); }
@media (max-width: 1000px) { .cover-grid { grid-template-columns: 1fr; } .cover-ring { margin: 0 auto; } }

/* Phishing simulation */
.msg-warn { padding: 14px var(--space-m); border: 1px solid var(--color-warning); background: var(--color-warning-bg); border-radius: var(--radius-m); margin-bottom: var(--space-m); }
.msg-warn p { margin: var(--space-xs) 0 0; }
.muted { color: var(--color-text-muted); font-size: var(--font-size-body-small); }
td.actions .btn { white-space: nowrap; }

/* Header link next to the e-mail address: quiet like the address, not a blue text link */
.logout a.link { color: var(--color-text-muted); font-size: var(--font-size-body-small); text-decoration: none; }
.logout a.link:hover { text-decoration: underline; color: var(--color-text); }
/* Confirmation pages: two buttons side by side with a gap */
.card form .btn + .btn { margin-left: var(--space-s); }

/* Help (guide bundle) */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-l); align-items: start; }
.help-nav { display: flex; flex-direction: column; gap: var(--space-xxs); font-size: var(--font-size-body-small); }
.help-nav a { padding: var(--space-xs) 10px; border-radius: var(--radius-s); color: var(--color-text); text-decoration: none; }
.help-nav a[aria-current="page"] { background: var(--color-surface); font-weight: var(--font-weight-semibold); border: 1px solid var(--color-border); }
.help-search { display: flex; gap: var(--space-s); margin: var(--space-sm) 0 var(--space-l); }
.help-search input { flex: 1; }
.help-body { overflow-wrap: anywhere; }
.help-body table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.help-body th, .help-body td { border: 1px solid var(--color-border); padding: var(--space-xs) 10px; text-align: left; vertical-align: top; }
.help-body blockquote { margin: var(--space-m) 0; padding: var(--space-xs) var(--space-m); border-left: 4px solid var(--color-border); color: var(--color-text-muted); }
.help-body pre { overflow-x: auto; padding: var(--space-sm); background: var(--color-bg); border-radius: var(--radius-s); }
.help-version { margin-top: 28px; color: var(--color-text-muted); font-size: var(--font-size-body-small); }
.help-link { display: inline-block; margin-left: var(--space-s); width: 1.4em; height: 1.4em; line-height: 1.4em; text-align: center; border-radius: 50%; border: 1px solid var(--color-border-strong); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); color: var(--color-text-muted); text-decoration: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) { .help-layout { grid-template-columns: 1fr; } }

/* Narrow screens: the menu and account links fold behind a burger (CSS only: the CSP forbids inline scripts) */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-burger { display: none; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: var(--touch-target-min); height: var(--touch-target-min);
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-m); background: var(--color-surface); cursor: pointer; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; content: ""; position: relative; }
  .nav-burger span::before { position: absolute; top: -6px; }
  .nav-burger span::after { position: absolute; top: 6px; }
  .nav-toggle:focus-visible + .nav-burger { outline: var(--focus-ring); outline-offset: 2px; }
  .nav, .logout { display: none; width: 100%; margin-left: 0; }
  .nav-toggle:checked ~ .nav { display: flex; flex-direction: column; gap: var(--space-xxs); }
  .nav-toggle:checked ~ .nav a { padding: var(--space-sm); }
  .nav-toggle:checked ~ .logout { display: flex; flex-wrap: wrap; padding-top: var(--space-s); border-top: 1px solid var(--color-border); }
  .logout .who { max-width: 100%; flex-basis: 100%; }
}

/* Bulk change bar under the user list */
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: var(--space-m) 0 var(--space-xs); }
.bulkbar label.inline { display: inline-flex; align-items: center; gap: var(--space-xs); margin: 0; font-weight: var(--font-weight-medium); }
.bulkbar select { width: auto; }

/* Help: figures, callouts, table of contents, role cards, print */
.help-layout.has-toc { grid-template-columns: 220px minmax(0, 1fr) 220px; }
.help-toc { position: sticky; top: var(--space-m); font-size: var(--font-size-body-small); max-height: calc(100vh - 32px); overflow-y: auto; }
.help-toc ul { list-style: none; margin: var(--space-s) 0 0; padding: 0; }
.help-toc li a { display: block; padding: 3px 0; color: var(--color-text-muted); text-decoration: none; }
.help-toc li.level-3 a { padding-left: 14px; }
.help-toc li a:hover { color: var(--color-text); }
.help-body img { max-width: 100%; height: auto; }
.help-figure { margin: var(--space-m) 0 var(--space-l); }
/* Yardım ekran görüntüleri açık temada çekildi; beyaz zeminde kalır / help screenshots stay on white */
.help-figure img { display: block; border: 1px solid var(--color-border); border-radius: var(--radius-image); box-shadow: var(--shadow-2); background: var(--brand-white); }
.help-figure figcaption { margin-top: var(--space-s); color: var(--color-text-muted); font-size: var(--font-size-body-small); }
.help-zoom { display: block; cursor: zoom-in; }
.help-body blockquote.callout { margin: var(--space-m) 0; padding: 10px var(--space-m) 10px 44px; border: 1px solid var(--color-border); border-left-width: 4px; border-radius: var(--radius-s); color: inherit; position: relative; background: var(--color-surface); }
.help-body blockquote.callout::before { position: absolute; left: 14px; top: 10px; font-size: 1.1rem; }
.help-body blockquote.callout > :first-child { margin-top: 0; }
.help-body blockquote.callout > :last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--color-warning) !important; background: var(--color-warning-bg) !important; }
.callout-warn::before { content: "\26A0"; }
.callout-tip { border-left-color: var(--color-success) !important; background: var(--color-success-bg) !important; }
.callout-tip::before { content: "\1F4A1"; }
.callout-info { border-left-color: var(--color-info) !important; background: var(--color-info-bg) !important; }
.callout-info::before { content: "\2139"; }
.callout-ok { border-left-color: var(--color-success) !important; background: var(--color-success-bg) !important; }
.callout-ok::before { content: "\2705"; }
.callout-status { border-left-color: var(--color-text) !important; background: var(--color-bg) !important; }
.callout-status::before { content: "\25CF"; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-sm); margin: var(--space-s) 0 var(--space-l); }
.help-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: 14px var(--space-m); border: 1px solid var(--color-border-strong); border-radius: var(--radius-card); background: var(--color-surface); text-decoration: none; color: var(--color-text); }
.help-card span { color: var(--color-text-muted); font-size: var(--font-size-body-small); font-weight: var(--font-weight-regular); }
.help-card:hover { border-color: var(--accent); }
.help-card.step-first { border-top: 3px solid var(--accent); }
@media (max-width: 1100px) { .help-layout.has-toc { grid-template-columns: 220px minmax(0, 1fr); } .help-toc { display: none; } }
@media (max-width: 760px) { .help-layout, .help-layout.has-toc { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .topbar, .help-nav, .help-toc, .demo-banner, .help-search { display: none !important; }
  .help-layout, .help-layout.has-toc { display: block; }
  .help-figure, .help-body table, .callout { break-inside: avoid; }
  .card { border: 0; box-shadow: none; padding: 0; }
}

/* In-app tour (static/js/tour.js) */
.tour-target { outline: 3px solid var(--color-accent); outline-offset: 4px; border-radius: var(--radius-s); position: relative; z-index: 5; }
.tour-pop { position: fixed; z-index: 1000; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-dialog); padding: var(--space-m) var(--space-m); box-shadow: var(--shadow-pop); }
.tour-pop:focus { outline: 2px solid var(--color-text); }
.tour-pop .tour-count { margin: 0 0 var(--space-xs); color: var(--color-text-muted); font-size: var(--font-size-caption); }
.tour-pop .tour-title { margin: 0 0 var(--space-xs); font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); }
.tour-pop .tour-body { margin: 0 0 var(--space-s); font-size: var(--font-size-body-small); }
.tour-pop .tour-more { font-size: var(--font-size-body-small); }
.tour-actions { display: flex; flex-wrap: wrap; gap: var(--space-s); justify-content: flex-end; margin-top: var(--space-sm); }
.tour-offer { position: fixed; z-index: 999; right: var(--space-m); bottom: var(--space-m); max-width: 360px; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--accent); border-radius: var(--radius-dialog); padding: 14px var(--space-m); box-shadow: var(--shadow-pop); display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; font-size: var(--font-size-body-small); }
@media (prefers-reduced-motion: reduce) { .tour-pop, .tour-offer { transition: none; } }
@media print { .tour-pop, .tour-offer { display: none !important; } }

/* The administrator menu has 11 links: it folds behind the burger already below 1100 px; 1101–1920 px the menu is compact (email hidden); up to 1600 px it gets its own row.
   Yönetici menüsü 11 bağlantı: 1100 px altında, 1920 px'e kadar sıkıştırılır (e-posta gizli), 1600 px'e kadar kendi satırına iner. */
@media (max-width: 1100px) {
  .topbar.long-nav { flex-wrap: wrap; }
  .topbar.long-nav .nav-burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: var(--touch-target-min); height: var(--touch-target-min);
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-m); background: var(--color-surface); cursor: pointer; }
  .topbar.long-nav .nav-burger span, .topbar.long-nav .nav-burger span::before, .topbar.long-nav .nav-burger span::after { display: block; width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; content: ""; position: relative; }
  .topbar.long-nav .nav-burger span::before { position: absolute; top: -6px; }
  .topbar.long-nav .nav-burger span::after { position: absolute; top: 6px; }
  .topbar.long-nav .nav-toggle:focus-visible + .nav-burger { outline: var(--focus-ring); outline-offset: 2px; }
  .topbar.long-nav .nav, .topbar.long-nav .logout { display: none; width: 100%; margin-left: 0; }
  .topbar.long-nav .nav-toggle:checked ~ .nav { display: flex; flex-direction: column; gap: var(--space-xxs); }
  .topbar.long-nav .nav-toggle:checked ~ .nav a { padding: var(--space-sm); }
  .topbar.long-nav .nav-toggle:checked ~ .logout { display: flex; flex-wrap: wrap; padding-top: var(--space-s); border-top: 1px solid var(--color-border); }
  .topbar.long-nav .logout .who { max-width: 100%; flex-basis: 100%; }
}

@media (max-width: 1920px) and (min-width: 1101px) {
  .topbar.long-nav { padding-left: var(--space-l); padding-right: var(--space-l); gap: 14px; }
  .topbar.long-nav .nav { gap: 0; margin-left: 0; }
  .topbar.long-nav .nav a { padding: var(--space-s); font-size: var(--font-size-body-small); }
  .topbar.long-nav .nav a[aria-current="page"]::after { left: var(--space-s); right: var(--space-s); }
  .topbar.long-nav .logout { gap: 10px; }
  .topbar.long-nav .logout .who { display: none; }
}
@media (max-width: 1600px) and (min-width: 1101px) {
  .topbar.long-nav { flex-wrap: wrap; row-gap: 0; }
  .topbar.long-nav .logout { order: 2; margin-left: auto; }
  .topbar.long-nav .logout .who { display: inline; }
  .topbar.long-nav .nav { order: 3; width: 100%; margin: 0 calc(-1 * var(--space-s)); padding-bottom: var(--space-xs); flex-wrap: wrap; justify-content: center; }
}

/* Organization logo: any aspect ratio, never wider than the header allows */
img.tenant-logo { width: auto; max-width: 240px; object-fit: contain; }
.login-logo img.tenant-logo { max-width: 360px; }

/* User list: one quiet row action plus a menu for the rest; the bulk bar follows the selection.
   Kullanıcı listesi: satırda tek sakin eylem, gerisi menüde; toplu işlem çubuğu seçimi izler. */
table.data:has(.rowmenu) th:first-child, table.data:has(.rowmenu) td:first-child { width: 44px; min-width: 0; }
td.person strong { display: block; font-weight: var(--font-weight-semibold); color: var(--color-text); }
td.person .helptext { display: block; margin-top: 1px; }
.btn.small { padding: var(--space-xs) var(--space-sm); font-size: var(--font-size-body-small); }
.rowactions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); white-space: nowrap; }
/* The menu must not be clipped by the table: no overflow clipping here, the corners are rounded on the header cells.
   Menü tablo tarafından kırpılmasın: taşma kırpması yok, köşeler başlık hücrelerinde yuvarlanır. */
table.data:has(.rowmenu) { overflow: visible; }
/* The visually hidden header labels are absolutely positioned: keep them inside their cell, or they widen the page.
   Görsel olarak gizli başlık etiketleri hücresinin içinde kalsın, yoksa sayfayı genişletir. */
table.data:has(.rowmenu) th { position: relative; }
table.data:has(.rowmenu) th:first-child { border-top-left-radius: var(--radius-card); }
table.data:has(.rowmenu) th:last-child { border-top-right-radius: var(--radius-card); }
.tablewrap:has(.rowmenu) { overflow: visible; }
@media (max-width: 640px) { table.data:has(.rowmenu) { overflow-x: auto; } .tablewrap:has(.rowmenu) { overflow-x: auto; } }
.rowmenu { position: relative; }
.rowmenu summary { list-style: none; cursor: pointer; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-s); color: var(--color-text); font-size: 1.2rem; line-height: 1; user-select: none; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary:hover, .rowmenu[open] summary { background: var(--tint-hover); color: var(--color-text); }
.rowmenu summary:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.rowmenu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; padding: var(--space-xs); display: flex; flex-direction: column;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-dialog); box-shadow: var(--shadow-pop); }
.rowmenu-list form { margin: 0; display: block; }
.rowmenu-list a, .rowmenu-list button.link { display: block; width: 100%; text-align: left; padding: var(--space-s) 10px; border-radius: var(--radius-s); font-size: var(--font-size-body-small);
  color: var(--color-text); text-decoration: none; }
.rowmenu-list a:hover, .rowmenu-list button.link:hover { background: var(--tint-hover); }
.rowmenu-list .danger { color: var(--color-error); border-top: 1px solid var(--color-border); margin-top: var(--space-xs); border-radius: 0 0 var(--radius-s) var(--radius-s); padding-top: 10px; }
.tablecard:not(:has(input[name="ids"]:checked)) + .bulkbar { display: none; }
.tablecard:has(input[name="ids"]:checked) + .bulkbar { position: sticky; bottom: var(--space-sm); z-index: 10; padding: var(--space-sm) var(--space-m); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-dialog); box-shadow: var(--shadow-pop); }

/* Hatalı soru bildirimi: sonuç sayfasında sessiz bir bağlantı, açılınca küçük form /
   question report: a quiet link on the result page, a small form when opened */
.reportbox { margin-top: 10px; font-size: var(--font-size-body-small); }
.reportbox summary { cursor: pointer; color: var(--color-text-muted); }
.reportbox summary:hover { color: var(--color-text); }
.reportbox form { margin-top: var(--space-s); }
.reportbox label { display: block; margin-bottom: var(--space-xs); }

/* Mobil düzeltmeler (#136) / Mobile fixes (#136):
   1) Sonraki kurallar tabloya overflow:hidden verdiği için dar ekranda sağ sütunlar kesiliyordu; yatay kaydırma geri getirildi.
      Later rules set overflow:hidden on tables, clipping right-hand columns on narrow screens; horizontal scrolling restored.
   2) Video kapısı (gizlilik uyarısı) 16:9 kutuya sığmıyor, üst satır kesiliyordu; dar ekranda kutu içeriğe göre büyür.
      The video privacy gate did not fit the 16:9 box and its first line was clipped; on narrow screens the box grows with its content. */
@media (max-width: 640px) {
  table.data { display: block; overflow-x: auto; }
  .video-embed .video-stage:not(:has(iframe)) { aspect-ratio: auto; min-height: 240px; }
}

/* Tasarım incelemesi düzeltmeleri (RFC 0037) / design review fixes (RFC 0037) */
/* Devre dışı ve salt okunur alanlar düzenlenebilir görünmesin / disabled and read-only fields must not look editable */
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly],
.card form textarea:disabled, .card form textarea[readonly] {
  background: var(--color-bg); color: var(--color-text-muted); border-style: dashed; cursor: not-allowed; }
.btn:disabled, .btn[aria-disabled="true"], button.primary:disabled { opacity: .5; cursor: not-allowed; }
/* Sayı, tarih, adres ve arama alanları da metin alanı gibi dolgulu / number, date, url, search fields get the same padding */
input[type=number], input[type=date], input[type=url], input[type=search] { padding: 10px var(--space-sm); min-height: var(--touch-target-min); }
input[type=number] { max-width: 12ch; }
/* Kendi çizdiğimiz radyo/onay kutusunun devre dışı hâli / disabled state of our own radio and checkbox */
input[type=radio]:disabled, input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
/* Windows yüksek kontrast (forced-colors) zemin ve gölgeyi siler; seçili radyo görünmez olurdu.
   Bu kipte tarayıcının yerel çizimine dönülür.
   Forced colours (Windows high contrast) drop backgrounds and shadows, hiding the checked radio;
   in that mode the native rendering is used. */
@media (forced-colors: active) {
  input[type=radio], input[type=checkbox]:not(.nav-toggle) { appearance: auto; -webkit-appearance: auto; }
  input[type=checkbox]:not(.nav-toggle)::before { content: none; }
}
/* Kullanıcı listesinde satır seçim kutusunun etiketi 44x44 dokunma alanı verir.
   The row-select label in the user list gives a 44x44 touch area. */
.row-select { display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--touch-target-min); min-height: var(--touch-target-min); margin: -10px; cursor: pointer; }
/* Mor seri kutusu kendi veri renginden türer / the purple tile tint derives from its own data colour */
.tone-purple { background: color-mix(in srgb, #6c5ce7 10%, var(--color-surface)); }
/* Koyu modda pano kutuları yüzey rengi + üst renk çizgisi (ağır bloklar yerine).
   In dark mode dashboard tiles use the surface plus a coloured top rule instead of heavy blocks. */
@media (prefers-color-scheme: dark) {
  .tile { background: var(--color-surface); border-top: 3px solid var(--color-border-strong); }
  .tone-green { border-top-color: var(--color-success); }
  .tone-red { border-top-color: var(--color-error); }
  .tone-yellow { border-top-color: var(--color-warning); }
  .tone-purple { border-top-color: #6c5ce7; }
  .tile-ring .ring-track { stroke: var(--gray-700); }
  /* Turuncu düğmede turuncu halka seçilmez: odak halkası metin rengi / on orange buttons the ring uses the text colour */
  .btn:focus-visible, button.primary:focus-visible, a.button:focus-visible, .btn-cert:focus-visible { outline-color: var(--color-text); }
}
/* "Ben" satırı hover'da da vurgulu kalsın / the "me" row keeps its highlight on hover */
table.data tbody tr.me:hover td { background: var(--tint-accent-strong); }
/* Dokunmatik ekranda en küçük hedef 44 px / minimum 44 px target on touch screens */
@media (pointer: coarse) {
  .btn, .btn.small, .btn-cert, .logout button.link, .rowmenu summary, .reportbox summary,
  .logout a.link, table.data td.actions a, a.act { min-height: var(--touch-target-min); }
  .reportbox summary, .logout a.link, table.data td.actions a, a.act { display: inline-flex; align-items: center; }
  /* "?" halkası küçük kalır; dokunma alanı görünmez dolguyla 44 px'e büyür.
     The "?" ring stays small; an invisible ::after extends the touch area to 44 px. */
  .help-link { position: relative; }
  .help-link::after { content: ""; position: absolute; inset: -14px; }
  .reportbox summary { display: flex; }
  /* Tek başına duran kutucuk parmakla seçilebilsin; etiketli seçeneklerde hedef etiketin tamamı.
     A standalone box is larger for fingers; in labelled choices the whole label is the target. */
  input[type=checkbox]:not(.nav-toggle), input[type=radio] { width: 22px; height: 22px; }
  input[type=checkbox]:not(.nav-toggle)::before { width: 6px; height: 12px; }
  .rowmenu summary { width: var(--touch-target-min); }
}
@media (max-width: 480px) {
  /* Girişte dar ekranda boş kalan üst çubuk gizlenir / the empty sign-in top bar is hidden on phones */
  .page-login .topbar { display: none; }
  fieldset.question { padding: var(--space-m); }
  .choice { padding: 10px; }
}
