/* OnlineTest — ortak stiller (renkler, yazı tipi, düğmeler, form öğeleri) */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/lexend-latin-ext-wght-normal.woff2) format('woff2-variations'),
       url(../fonts/lexend-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/lexend-latin-wght-normal.woff2) format('woff2-variations'),
       url(../fonts/lexend-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Yeşil tahta */
  --board: #22463a;
  --board-deep: #173226;
  --board-hi: #2d5a49;
  --chalk: #f3f6f1;
  --chalk-2: rgba(243, 246, 241, .76);
  --chalk-3: rgba(243, 246, 241, .48);
  --chalk-line: rgba(243, 246, 241, .17);
  --yellow: #ffd84d;
  --yellow-deep: #c9a32a;
  --yellow-ink: #352a00;

  /* Kağıt ve mürekkep */
  --paper: #ffffff;
  --paper-2: #f3f5f2;
  --ink: #1d2b53;
  --ink-2: #4b577a;
  --ink-3: #8790a8;
  --line: #e0e4ea;

  /* Optik form baskı rengi */
  --form: #d94c74;
  --form-soft: #f8d9e3;

  --ok: #1b9a57;
  --ok-soft: #dcf2e5;
  --bad: #d23b3b;
  --bad-soft: #fae0e0;

  /* Şık renkleri (A-F): ana, açık, koyu */
  --o1: #2f5bea; --o1s: #dbe4fd; --o1d: #1c3eae;
  --o2: #ef6a1f; --o2s: #fde2d2; --o2d: #ae4a0e;
  --o3: #8a4fd8; --o3s: #e9dff8; --o3d: #6031a5;
  --o4: #12926a; --o4s: #d2efe5; --o4d: #0a684b;
  --o5: #df383e; --o5s: #f9d9da; --o5d: #a2232a;
  --o6: #b38500; --o6s: #f5eac6; --o6d: #7d5d00;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow-paper: 0 1px 0 rgba(29, 43, 83, .05), 0 14px 34px -16px rgba(8, 28, 20, .55);
  --font: 'Lexend', ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --focus: #2f5bea;

  --chalk-dust:
    radial-gradient(120% 80% at 12% -10%, rgba(255, 255, 255, .075), transparent 55%),
    radial-gradient(90% 70% at 105% 115%, rgba(0, 0, 0, .25), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.o1 { --c: var(--o1); --cs: var(--o1s); --cd: var(--o1d); }
.o2 { --c: var(--o2); --cs: var(--o2s); --cd: var(--o2d); }
.o3 { --c: var(--o3); --cs: var(--o3s); --cd: var(--o3d); }
.o4 { --c: var(--o4); --cs: var(--o4s); --cd: var(--o4d); }
.o5 { --c: var(--o5); --cs: var(--o5s); --cd: var(--o5d); }
.o6 { --c: var(--o6); --cs: var(--o6s); --cd: var(--o6d); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper-2);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
a { color: var(--o1); }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* İkonlar */
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ic.fill { fill: currentColor; stroke: none; }

/* Düğmeler */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.15;
  border: 0;
  border-radius: 12px;
  padding: .78em 1.25em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .08s ease, box-shadow .12s ease, background-color .15s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not([disabled]) { transform: translateY(2px); }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--board); color: var(--chalk); box-shadow: 0 3px 0 var(--board-deep); }
.btn-primary:hover:not([disabled]) { background: var(--board-hi); }
.btn-primary:active:not([disabled]) { box-shadow: 0 1px 0 var(--board-deep); }
.btn-chalk { background: var(--yellow); color: var(--yellow-ink); box-shadow: 0 4px 0 var(--yellow-deep); }
.btn-chalk:hover:not([disabled]) { background: #ffe06d; }
.btn-chalk:active:not([disabled]) { box-shadow: 0 2px 0 var(--yellow-deep); }
.btn-quiet { background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover:not([disabled]) { background: #e9ece8; }
.btn-line { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-danger { background: var(--bad); color: #fff; box-shadow: 0 3px 0 #9d2626; }
.btn-text { background: none; color: inherit; padding: .5em .6em; text-decoration: underline; text-underline-offset: .2em; }
.btn-sm { font-size: .875rem; padding: .55em .9em; border-radius: 10px; }
.btn-lg { font-size: 1.15rem; padding: .9em 1.6em; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: .55em; border-radius: 10px; }

/* Optik form balonu */
.bubble {
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  border: .14em solid var(--c, var(--form));
  color: var(--c, var(--form));
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  line-height: 1;
  flex: none;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.bubble.is-filled { background: var(--c, var(--form)); color: #fff; }
.bubble.sm { font-size: .78rem; }

/* Form öğeleri */
.field { display: block; margin: 0 0 1rem; }
.field-label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .4rem; }
.field-hint { display: block; font-size: .8125rem; color: var(--ink-3); margin-top: .35rem; }
.input, .select, .textarea {
  font: inherit;
  width: 100%;
  padding: .7em .85em;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; min-height: 5.5em; line-height: 1.45; }
.select { appearance: none; -webkit-appearance: none; padding-right: 2.2em; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%234b577a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right .85em center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--o1); box-shadow: 0 0 0 3px rgba(47, 91, 234, .16); }
.input::placeholder, .textarea::placeholder { color: #a9b0c2; }

.check { display: flex; gap: .7em; align-items: flex-start; cursor: pointer; padding: .55em 0; }
.check input { width: 1.2em; height: 1.2em; margin: .15em 0 0; accent-color: var(--board); flex: none; }
.check b { display: block; font-weight: 600; }
.check small { display: block; color: var(--ink-3); font-size: .85em; }

/* Seçenek listesi (pencerelerde) */
.opts { margin: 14px 0 0; padding: 0; border: 0; }
.opts legend { padding: 0; margin-bottom: 4px; }
.opts .check { border-top: 1px solid var(--line); padding: 12px 0; }
.opts legend + .check, .opts .check:first-child { border-top: 0; }
.dlg .opts + .opts { margin-top: 10px; border-top: 1px solid var(--line); }

/* Bildirim (toast) */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: .7em 1.1em; border-radius: 12px; font-size: .95rem; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: toastIn .2s ease-out; pointer-events: auto; }
.toast.is-bad { background: var(--bad); }
.toast.is-ok { background: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* Diyalog */
.dlg-back { position: fixed; inset: 0; background: rgba(16, 36, 28, .55); z-index: 900; display: grid; place-items: center; padding: 16px; animation: fadeIn .15s ease-out; overflow-y: auto; }
.dlg { background: #fff; color: var(--ink); border-radius: var(--r-l); width: min(440px, 100%); padding: 24px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); animation: dlgIn .18s ease-out; }
.dlg.wide { width: min(540px, 100%); }
.dlg h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.dlg p { color: var(--ink-2); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
