/* Yasal sayfalar: canlı masanın üstünde duran basılı bir kâğıt. */
@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(../fonts/Nunito_400Regular.ttf) format('truetype'); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(../fonts/Nunito_700Bold.ttf) format('truetype'); }
@font-face { font-family: Nunito; font-weight: 900; font-display: swap; src: url(../fonts/Nunito_900Black.ttf) format('truetype'); }

:root {
  --night: #0b0a10; --paper: #f7f1e6; --ink: #241d30; --soft: #5a5266; --rule: #e0d6c5;
  --lamp: #ffc67a; --violet: #6d3fd8; --gutter: clamp(16px, 6vw, 88px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body { background: var(--night); color: var(--ink); font: 400 1.0625rem/1.68 Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

#desk { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; display: block; opacity: 0; transition: opacity 1.4s ease; }
#desk.ready { opacity: 1; }
.no-webgl #desk, .no-webgl #bubble { display: none; }
.no-webgl body { background: radial-gradient(90% 70% at 75% 25%, #33261a 0%, var(--night) 70%) fixed; }

.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px var(--gutter); }
.brand { margin-right: auto; display: flex; align-items: center; gap: 10px; color: #f6efe4; text-decoration: none; font-weight: 900; font-size: 1.1rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.top nav { display: flex; gap: 2px; }
.top nav a { min-height: 40px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 10px; color: #f6efe4; font-weight: 700; font-size: .94rem; text-decoration: none; background: rgba(11, 10, 16, .55); }
.top nav a:hover { background: rgba(11, 10, 16, .85); }
.top nav a[aria-current="page"] { color: #231605; background: var(--lamp); }

#bubble {
  position: fixed; z-index: 5; left: 0; top: 0; max-width: 230px; padding: 11px 15px;
  background: var(--paper); color: #1e1b4b; border-radius: 16px 16px 16px 4px;
  font-weight: 700; font-size: .98rem; line-height: 1.3; pointer-events: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; will-change: transform;
}
#bubble.show { opacity: 1; }

.sheet {
  position: relative; z-index: 10; width: min(46rem, calc(100vw - 2 * var(--gutter))); min-width: 0;
  margin: 92px 0 72px var(--gutter); padding: clamp(28px, 4.4vw, 56px) clamp(22px, 4.6vw, 60px) 34px;
  background: var(--paper); border-radius: 4px;
  box-shadow: 0 2px 0 #e9dfcd, 0 3px 0 #d7ccb8, 0 34px 70px rgba(0, 0, 0, .6);
}
h1 { font-weight: 900; font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.025em; text-wrap: balance; }
.meta { margin-top: 10px; color: var(--soft); font-weight: 700; font-size: .95rem; }
.toc { margin-top: 26px; padding: 14px 0; border-block: 1px solid var(--rule); }
.toc b { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--soft); }
.toc ol { list-style: none; columns: 2; column-gap: 28px; }
.toc a { display: block; padding: 3px 0; color: var(--ink); font-weight: 700; font-size: .92rem; line-height: 1.3; text-decoration: none; }
.toc a:hover { color: var(--violet); text-decoration: underline; }

.doc { counter-reset: part; }
.doc section { counter-increment: part; margin-top: 32px; scroll-margin-top: 80px; }
.doc h2 { display: flex; gap: 12px; align-items: baseline; font-size: .98rem; font-weight: 900; letter-spacing: .03em; line-height: 1.3; }
.doc h2::before { content: counter(part, decimal-leading-zero); color: var(--violet); font-variant-numeric: tabular-nums; }
.doc p { margin-top: 8px; }
.doc ul { list-style: none; margin-top: 10px; display: grid; gap: 9px; }
.doc li { padding-left: 16px; border-left: 2px solid var(--rule); }
.doc strong { font-weight: 900; }
.doc a, footer a { color: var(--violet); font-weight: 700; }
.action { display: inline-flex; align-items: center; min-height: 46px; margin-top: 14px; padding: 0 18px; border-radius: 12px; background: var(--ink); color: var(--paper) !important; font-weight: 900; text-decoration: none; }
.action:hover { background: var(--violet); }
.path { display: inline; font-weight: 900; color: var(--violet); }

footer { margin-top: 38px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--soft); font-size: .94rem; }

@media (max-width: 1099px) {
  .sheet { width: auto; margin: 46vh 16px 40px; }
  .top { padding: 12px 16px; }
}
@media (max-width: 620px) {
  .brand { font-size: 0; gap: 0; }
  .brand img { width: 30px; height: 30px; }
  .top { gap: 4px; }
  .top nav { gap: 0; }
  .top nav a { padding: 0 7px; font-size: .8rem; }
  .sheet { max-width: calc(100vw - 32px); min-width: 0; }
  .doc, .doc p, .doc li, .doc h2 { overflow-wrap: anywhere; }
  .toc ol { columns: 1; }
  #bubble { max-width: 180px; font-size: .9rem; padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { #desk { transition: none; } }
