/* Anchor Loss — modern iki dilli e-öğrenme. Renkler :root jetonlarında; koyu tema hem sistemden hem düğmeden. */
:root {
  --bg: #f6f8fb; --bg-alt: #eaf0f7; --card: #ffffff; --text: #13243a; --muted: #55667c; --line: #d6dfeb;
  --brand: #0b2540; --brand-2: #14507f; --accent: #ffb703; --accent-ink: #3b2a00; --ok: #15803d; --bad: #b42318;
  --sky: #cfe6f7; --sea-top: #5fb3d9; --sea-bot: #1f5f8b; --seabed: #7a6a52; --wave: #e8f6ff;
  --hull: #34495e; --hull-top: #8aa0b4; --metal: #5b6b7a; --metal-2: #94a3b0; --chain: #3c4650;
  --shadow: 0 1px 2px rgba(11,37,64,.06), 0 8px 24px rgba(11,37,64,.08);
  --r: 16px; --font: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09131f; --bg-alt: #0d1b2b; --card: #11243a; --text: #e6eef7; --muted: #9db0c5; --line: #223a55;
    --brand: #061423; --brand-2: #5aa9e0; --accent: #ffc233; --accent-ink: #231a00; --ok: #4ade80; --bad: #ff8a80;
    --sky: #17314b; --sea-top: #1e5f8c; --sea-bot: #0a2a45; --seabed: #4a3f31; --wave: #8fd0f5;
    --hull: #5d7389; --hull-top: #9bb0c4; --metal: #9aa8b5; --metal-2: #c3cdd6; --chain: #aeb9c4;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09131f; --bg-alt: #0d1b2b; --card: #11243a; --text: #e6eef7; --muted: #9db0c5; --line: #223a55;
  --brand: #061423; --brand-2: #5aa9e0; --accent: #ffc233; --accent-ink: #231a00; --ok: #4ade80; --bad: #ff8a80;
  --sky: #17314b; --sea-top: #1e5f8c; --sea-bot: #0a2a45; --seabed: #4a3f31; --wave: #8fd0f5;
  --hull: #5d7389; --hull-top: #9bb0c4; --metal: #9aa8b5; --metal-2: #c3cdd6; --chain: #aeb9c4;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--brand-2); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--brand) 92%, transparent); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar-in { width: min(1180px, 100% - 24px); margin-inline: auto; display: flex; align-items: center; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand span { color: #fff; }
.nav { display: none; flex: 1; gap: 2px; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #cfe0f1; text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover, .nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.seg { display: inline-flex; background: rgba(255,255,255,.12); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: #cfe0f1; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.icon-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.2); }
.progress { height: 3px; background: rgba(255,255,255,.12); }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
@media (min-width: 1000px) { .nav { display: flex; } .menu-btn { display: none; } .tools { margin-left: 0; } }
@media (max-width: 999px) {
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--brand); padding: 8px 12px 14px; max-height: 70vh; overflow: auto; }
  .nav.open a { font-size: 16px; padding: 12px; }
}

/* hero */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 500px at 80% -10%, #1d6aa0 0%, transparent 60%), linear-gradient(180deg, #0b2540, #0f3a5e 60%, #14507f); overflow: hidden; }
.hero-in { position: relative; z-index: 2; padding: clamp(56px, 12vw, 120px) 0 clamp(96px, 16vw, 170px); max-width: 820px; margin-inline: 0; margin-left: max(16px, calc((100% - 1080px) / 2)); }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.4rem); line-height: 1.02; letter-spacing: -.02em; margin: 12px 0 18px; }
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #d6e6f5; max-width: 40em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.meta li { background: rgba(255,255,255,.12); padding: 4px 12px; border-radius: 999px; font-size: 14px; color: #e6f1fb; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 38%; z-index: 1; }
.waves svg { width: 100%; height: 100%; display: block; }
.waves .w1 { fill: rgba(255,255,255,.1); animation: sway 9s ease-in-out infinite alternate; }
.waves .w2 { fill: var(--bg); }
@keyframes sway { to { transform: translateX(-3%); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; padding: 13px 22px; border-radius: 12px; border: 2px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn.sm { padding: 8px 14px; font-size: 15px; }
.sec .btn.ghost { color: var(--brand-2); }

/* sections */
.sec { padding: clamp(48px, 8vw, 96px) 0; }
.sec.alt { background: var(--bg-alt); }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.num { font-weight: 800; font-size: 14px; color: var(--accent-ink); background: var(--accent); padding: 2px 9px; border-radius: 8px; }
h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 8px; }
.sub { margin-top: 28px; }
.lead2 { font-size: 1.15rem; color: var(--muted); max-width: 46em; margin-bottom: 26px; }
.hint { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.cols { display: grid; gap: 14px 40px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 800px) { .cols { grid-template-columns: 1fr 1fr; } }
.grid2 { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 20px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.grid2 > .card + .card, .tools-grid > .card + .card { margin-top: 0; }
.callout { border-left: 6px solid var(--accent); margin-top: 24px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards .card + .card { margin-top: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2); margin-top: 8px; }

/* diagram */
.diagram-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; overflow-y: hidden; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
#diagram { width: 100%; min-width: 640px; height: auto; display: block; }
.hs.on circle:not(.hit), .hs:hover circle:not(.hit) { r: 19; }
.wave-line { animation: sway 6s ease-in-out infinite alternate; }
.hs { cursor: pointer; }
.hs circle { fill: var(--accent); stroke: var(--brand); stroke-width: 2.5; transition: r .15s; }
.hs circle.hit { fill: transparent; stroke: none; }
.hs.on circle.hit, .hs:hover circle.hit, .hs:focus-visible circle.hit { fill: transparent; stroke: none; stroke-width: 0; r: 20; }
.hs text { fill: var(--accent-ink); font: 700 14px var(--font); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.hs:hover circle, .hs.on circle { r: 19; stroke: #fff; }
.hs.on circle { fill: #fff; stroke: var(--accent); stroke-width: 4; }
.hs:focus-visible { outline: none; }
.hs:focus-visible circle { stroke: #fff; stroke-width: 4; }
.part-card { margin-top: 18px; display: grid; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 800px) { .part-card { grid-template-columns: 1fr 1fr 1fr; } .part-card .pc-head { grid-column: 1 / -1; } }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-head b { font-size: 1.35rem; }
.pc-head .no { background: var(--accent); color: var(--accent-ink); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.pc h4 { margin: 0 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pc p { font-size: 16px; }
.pc.fail h4 { color: var(--bad); }
.pc.chk h4 { color: var(--ok); }

/* stats / bars */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 4px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; color: var(--brand-2); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); }
.bars .row { margin: 14px 0; }
.bars .lab { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.bars .track { height: 18px; background: var(--bg-alt); border-radius: 9px; overflow: hidden; }
.bars .fill { height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, var(--brand-2), var(--accent)); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.costs li, .example-list li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px dashed var(--line); }
.costs li:last-child, .example-list li:last-child { border-bottom: 0; }
.costs li::before, .example-list li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.example { border-left: 6px solid var(--bad); margin-top: 20px; }
.src-tag { font-size: 12px; font-weight: 700; color: var(--brand-2); margin-left: 6px; white-space: nowrap; }

.brake { display: flex; gap: 14px; margin: 16px 0 4px; flex-wrap: wrap; }
.brake div { flex: 1 1 140px; background: var(--bg-alt); border-radius: 12px; padding: 14px; text-align: center; }
.brake b { display: block; font-size: 2.2rem; color: var(--brand-2); line-height: 1.1; }
.brake span { font-size: 14px; color: var(--muted); }

/* calculators */
.field { display: block; margin: 12px 0; font-size: 15px; }
.field > span { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.field output { font-weight: 700; color: var(--brand-2); white-space: nowrap; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.gauge { position: relative; display: flex; height: 16px; border-radius: 8px; overflow: hidden; margin: 18px 0 8px; }
.zone.z1 { flex: 6; background: #e5484d; } .zone.z2 { flex: 4; background: #3ba55d; } .zone.z3 { flex: 2; background: #f0a500; }
.gauge i { position: absolute; top: -4px; width: 4px; height: 24px; background: var(--text); border-radius: 2px; left: 0; transition: left .2s; box-shadow: 0 0 0 2px var(--card); }
.result { font-weight: 600; min-height: 3.4em; margin-top: 8px; }
.result.ok { color: var(--ok); } .result.bad { color: var(--bad); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
#dragSvg { width: min(100%, 320px); display: block; margin: 0 auto 8px; }
.tools-grid .card { display: flex; flex-direction: column; }

/* cases */
.cases { display: grid; gap: 20px; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: grid; }
@media (min-width: 860px) { .case { grid-template-columns: 1fr 1fr; } }
.case-main { padding: 24px; }
.case-main h3 { font-size: 1.6rem; margin-bottom: 2px; }
.case-main .where { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.case-side { padding: 24px; background: var(--bg-alt); }
.case-side ul li { padding: 8px 0 8px 22px; position: relative; font-size: 16px; }
.case-side ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); background: var(--accent); width: 16px; height: 16px; font-size: 11px; line-height: 16px; text-align: center; border-radius: 50%; top: 13px; }

/* accordion */
.acc details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.acc summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.6rem; color: var(--brand-2); transition: transform .2s; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc ul { padding: 0 20px 14px; }
.acc li { padding: 10px 0; border-top: 1px dashed var(--line); }

/* video */
.vid { margin: 0; }
.vid video { width: 100%; border-radius: var(--r); background: #000; display: block; box-shadow: var(--shadow); }
.vid figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* quiz */
.quiz .qmeta { color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; margin-bottom: 8px; }
.qbar { height: 6px; background: var(--bg-alt); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.qbar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.quiz h3 { font-size: 1.3rem; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 13px 16px; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--brand-2); }
.opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--card)); }
.opt:disabled { cursor: default; }
.explain { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg-alt); }
.explain b.ok { color: var(--ok); } .explain b.bad { color: var(--bad); }
.quiz .btn { margin-top: 16px; }
.score { text-align: center; padding: 10px 0; }
.score big { display: block; font-size: 4rem; font-weight: 800; color: var(--brand-2); line-height: 1; }

.srcs li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.srcs a { word-break: break-word; }
.legal { margin-top: 24px; font-size: 15px; color: var(--muted); }
.legal p + p { margin-top: 10px; }
.foot { background: var(--brand); color: #cfe0f1; padding: 32px 0; font-size: 15px; }
.foot a { color: var(--accent); }
.foot-in { display: grid; gap: 6px; }

/* reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .waves .w1, .wave-line { animation: none; }
  .bars .fill { transition: none; }
}
