/* ═══════════════════════════════════════════════════
   WebRTC API — Türkçe Çeviri
   Premium Technical Documentation Stylesheet
   ═══════════════════════════════════════════════════ */

/* ── Local Font Faces ── */
@font-face {
  font-family: 'Söhne';
  src: url('fonts/sohne-buch.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Söhne';
  src: url('fonts/sohne-buch-kursiv.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Söhne';
  src: url('fonts/sohne-halbfett.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Söhne';
  src: url('fonts/sohne-halbfett-kursiv.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Söhne Mono';
  src: url('fonts/sohne-mono-buch.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Noto Serif for "Kitap" reading mode */
@font-face {
  font-family: 'Noto Serif';
  src: url('fonts/google/0QI8MX1D_JOuMw_hLdO6T2wV9KnW-MoFoq92nPWc3ZyhTg_6e1ec5.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('fonts/google/0QI8MX1D_JOuMw_hLdO6T2wV9KnW-MoFoqF2nPWc3ZyhTjcV_153147.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* Crimson Text for "Akademik" reading mode */
@font-face {
  font-family: 'Crimson Text';
  src: url('fonts/google/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw_1ab1ad.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Crimson Text';
  src: url('fonts/google/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU_656bbe.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}

@font-face {
  font-family: 'Crimson Text';
  src: url('fonts/google/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU_749a30.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════
   Design Tokens
   ═══════════════════════════════════ */
.prose-content {
  /* Core palette */
  --bg-primary: #0a0c10;
  --bg-secondary: #111318;
  --bg-tertiary: #181c24;
  --bg-elevated: #1e2330;
  --bg-glass: rgba(17, 19, 24, 0.72);

  /* Text */
  --text-primary: #e8e6e1;
  --text-secondary: #a8a49c;
  --text-muted: #6d6960;
  --text-bright: #f5f3ef;

  /* Accent system */
  --accent: #d4a056;
  --accent-hover: #e4b76a;
  --accent-dim: #a07830;
  --accent-warm: #c97d3c;
  --accent-subtle: rgba(212, 160, 86, 0.08);
  --accent-green: #7dba6a;
  --accent-cyan: #6db8b0;
  --accent-gradient: linear-gradient(135deg, #d4a056 0%, #c97d3c 50%, #b86a2e 100%);

  /* Borders & Surfaces */
  --border-color: #252a36;
  --border-subtle: #1c2028;
  --border-accent: rgba(212, 160, 86, 0.15);

  /* Code */
  --code-bg: #0c0e14;
  --code-text: #c9c5bc;
  --code-border: #1e222e;

  /* Effects */
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(212, 160, 86, 0.06);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Spacing */
  --content-width: 52rem;
  --header-height: 52px;

  /* Typography */
  --font-body: 'Söhne', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Söhne Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --font-size-body: 1.06rem;
  --line-height-body: 1.85;
}

/* ═══════════════════════════════════
   Reset & Base
   ═══════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.content-wrapper-legacy body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--line-height-body);
  min-height: 100vh;
  transition: font-family 0.3s ease, font-size 0.3s ease, line-height 0.3s ease;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: rgba(212, 160, 86, 0.25);
  color: #fff;
}

/* ═══════════════════════════════════
   Scrollbar
   ═══════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════
   Reading Progress Bar
   ═══════════════════════════════════ */
.webrtc-old-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 999;
  width: 0;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(212, 160, 86, 0.4);
}

/* ═══════════════════════════════════
   Header
   ═══════════════════════════════════ */
.webrtc-old-.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
}

.webrtc-old-.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.webrtc-old-.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
}

.webrtc-old-.header-brand:hover {
  opacity: 0.85;
  border-bottom: none;
}

.webrtc-old-.header-brand .badge {
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.webrtc-old-.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.webrtc-old-.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border-bottom: none;
}

.webrtc-old-.header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-bottom: none;
}


/* ═══════════════════════════════════
   Main Content
   ═══════════════════════════════════ */
.prose-content .content-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════
   Typography
   ═══════════════════════════════════ */
h1 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin-bottom: 1.8rem;
  color: var(--accent);
  line-height: 1.25;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 4rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.025em;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--accent-gradient);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 2.8rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.015em;
}

h4 {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

h5, h6 {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: var(--line-height-body);
  text-align: justify;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: rgba(212, 160, 86, 0.3);
}

strong {
  font-weight: 600;
  color: var(--text-bright);
}

em {
  font-style: italic;
  color: var(--accent-cyan);
}

/* ═══════════════════════════════════
   Code
   ═══════════════════════════════════ */
code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.84em;
  border: 1px solid var(--code-border);
  -webkit-font-smoothing: auto;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
  box-shadow: var(--shadow-card);
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--code-text);
}

/* Syntax highlighting tokens */
.hl-kw  { color: #d4a056; }          /* keywords — accent amber */
.hl-str { color: #7dba6a; }          /* strings — green */
.hl-cmt { color: #5a5650; font-style: italic; }  /* comments — muted */
.hl-num { color: #6db8b0; }          /* numbers — cyan */
.hl-lit { color: #c97d3c; }          /* literals (true/false/null) — warm orange */
.hl-punc { color: #7a756c; }         /* punctuation — subtle */


/* ═══════════════════════════════════
   Lists
   ═══════════════════════════════════ */
ul, ol {
  margin: 0.8rem 0 1.2rem 1.5rem;
  color: var(--text-primary);
}

li {
  margin-bottom: 0.4rem;
  line-height: 1.75;
}

li::marker {
  color: var(--accent-dim);
}

/* ═══════════════════════════════════
   Definition Lists
   ═══════════════════════════════════ */
dd {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--border-accent);
  color: var(--text-primary);
  line-height: var(--line-height-body);
}

/* ═══════════════════════════════════
   Tables
   ═══════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th {
  background: var(--bg-tertiary);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: left;
  padding: 12px 18px;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

tr:hover td {
  background: var(--accent-subtle);
  transition: background 0.15s ease;
}

/* ═══════════════════════════════════
   Blockquote
   ═══════════════════════════════════ */
blockquote {
  border-left: 3px solid var(--accent-warm);
  background: var(--bg-secondary);
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: inset 4px 0 0 -1px var(--accent-warm);
}

blockquote p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

blockquote p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════
   Figures
   ═══════════════════════════════════ */
figure {
  margin: 2.5rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

figcaption {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ═══════════════════════════════════
   Misc Elements
   ═══════════════════════════════════ */
.slot {
  color: var(--accent-warm);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

del {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.55;
}

.indented {
  margin-left: 2rem;
}

/* ═══════════════════════════════════
   Chapter Navigation
   ═══════════════════════════════════ */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  gap: 1rem;
}

.chapter-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.25s ease;
  max-width: 45%;
  border-bottom: none;
}

.chapter-nav a:hover {
  border-color: var(--accent-dim);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  border-bottom: none;
}

.chapter-nav .nav-prev { margin-right: auto; }
.chapter-nav .nav-next { margin-left: auto; text-align: right; }

/* ═══════════════════════════════════
   Footer
   ═══════════════════════════════════ */
.webrtc-old-.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════
   Index Page — Hero
   ═══════════════════════════════════ */
.hero {
  text-align: center;
  padding: 6rem 0 3rem;
  position: relative;
}

/* Ambient glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(212, 160, 86, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.hero .subtitle {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 auto 0.5rem;
  line-height: 1.6;
}

.hero .meta-info {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero .meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 400;
  transition: border-color 0.2s ease;
}

.hero .meta-tag:hover {
  border-color: var(--border-accent);
}

.hero .meta-tag .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ═══════════════════════════════════
   Index Page — TOC
   ═══════════════════════════════════ */
.toc-section {
  margin-top: 2.5rem;
}

.toc-section h2 {
  border-bottom: none;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  margin-top: 0;
  font-weight: 400;
}

.toc-section h2::after {
  display: none;
}

.toc-grid {
  display: grid;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  background: var(--bg-secondary);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  border-bottom: none;
}

.toc-item:hover {
  background: var(--bg-tertiary);
  padding-left: 30px;
  border-bottom: none;
}

.toc-item:hover .toc-title {
  color: var(--accent);
}

.toc-item:hover .toc-number {
  background: var(--accent-dim);
  color: #fff;
  transform: scale(1.05);
}

.toc-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-primary);
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.25s ease;
  border: 1px solid var(--border-subtle);
}

.toc-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.93rem;
  transition: all 0.2s ease;
}

.toc-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.25s ease;
  opacity: 0;
}

.toc-item:hover .toc-arrow {
  transform: translateX(4px);
  color: var(--accent);
  opacity: 1;
}

.toc-divider {
  padding: 12px 26px;
  background: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dim);
}

/* ═══════════════════════════════════
   Keyboard Shortcut Hint
   ═══════════════════════════════════ */
.kbd-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  z-index: 50;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-card);
}

.kbd-hint.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kbd-hint kbd {
  display: inline-block;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin: 0 2px;
}

/* ═══════════════════════════════════
   Smooth page transitions
   ═══════════════════════════════════ */
.prose-content .content-wrapper {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════
   Note / Callout Blocks
   ═══════════════════════════════════ */
.note-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 1.2rem 1.5rem;
  margin: 1.8rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.note-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.note-block:hover {
  border-color: var(--border-accent);
}

.note-block.note-info::before { background: var(--accent-cyan); }
.note-block.note-keyword::before { background: var(--accent); }
.note-block.note-warning::before { background: #d4785a; }

.note-icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-block.note-info .note-icon { color: var(--accent-cyan); }
.note-block.note-keyword .note-icon { color: var(--accent); }
.note-block.note-warning .note-icon { color: #d4785a; }

.note-content {
  color: var(--text-secondary);
  line-height: var(--line-height-body);
  font-size: 0.94rem;
}

.note-content strong {
  color: var(--text-bright);
  font-weight: 600;
}

/* ═══════════════════════════════════
   Feature List (Introduction)
   ═══════════════════════════════════ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  background: var(--border-subtle);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.feature-item:hover {
  background: var(--bg-tertiary);
  padding-left: 26px;
}

.feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
  color: var(--accent-dim);
}

.feature-item:hover .feature-icon {
  border-color: var(--border-accent);
  transform: scale(1.05);
  color: var(--accent);
}

.feature-text {
  color: var(--text-primary);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════
   Spec Meta Card (Introduction)
   ═══════════════════════════════════ */
.spec-meta-card {
  margin: 2.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.spec-meta-title {
  padding: 12px 22px;
  background: var(--bg-tertiary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.spec-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
}

.spec-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  background: var(--bg-secondary);
}

.spec-meta-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.spec-meta-value {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 400;
}

/* ═══════════════════════════════════
   RFC Keyword Badges (Conformance)
   ═══════════════════════════════════ */
.rfc-keyword {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(212, 160, 86, 0.1);
  color: var(--accent);
  border: 1px solid rgba(212, 160, 86, 0.2);
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ═══════════════════════════════════
   Term Grid / Cards (Terminology)
   ═══════════════════════════════════ */
.term-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1.5rem 0;
}

.term-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.term-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.term-source {
  padding: 8px 18px;
  background: var(--bg-tertiary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-source::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-dim);
  flex-shrink: 0;
}

.term-body {
  padding: 14px 18px;
}

.term-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

.term-body p:last-child {
  margin-bottom: 0;
}

.term-body code {
  font-size: 0.82em;
}

/* ═══════════════════════════════════
   Section Mini-TOC
   ═══════════════════════════════════ */
.section-toc {
  margin: 2rem 0 3rem;
  padding: 1.4rem 1.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.section-toc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.section-toc-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dim);
  margin-bottom: 1rem;
  font-weight: 400;
}

.section-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-toc-list li {
  margin: 0;
}

.section-toc-list a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-family: var(--font-heading);
  transition: all 0.2s ease;
  border-bottom: none;
}

.section-toc-list a:hover {
  color: var(--accent);
  background: var(--accent-subtle);
  padding-left: 16px;
  border-bottom: none;
}

/* ═══════════════════════════════════
   Responsive
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  .prose-content .content-wrapper { padding: 2rem 1.2rem 4rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  .chapter-nav { flex-direction: column; }
  .chapter-nav a { max-width: 100%; }
  .header-inner { padding: 0; }
  .header-nav a { padding: 5px 8px; font-size: 0.76rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero .subtitle { font-size: 0.95rem; }
  .toc-item { padding: 13px 16px; }
  .toc-item:hover { padding-left: 20px; }
  .toc-arrow { opacity: 1; }
  .reading-mode-selector { display: none; }
  .kbd-hint { display: none; }
  .note-block { gap: 10px; padding: 1rem 1.2rem; }
  .feature-item { padding: 13px 16px; gap: 12px; }
  .feature-item:hover { padding-left: 18px; }
  .feature-icon { width: 30px; height: 30px; font-size: 1rem; }
  .spec-meta-grid { grid-template-columns: 1fr; }
  .term-source { padding: 7px 14px; }
  .term-body { padding: 12px 14px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero .meta-info { gap: 6px; }
  .hero .meta-tag { font-size: 0.65rem; padding: 4px 10px; }
}

/* ═══════════════════════════════════
   Print Styles
   ═══════════════════════════════════ */
@media print {
  body { background: #fff; color: #222; }
  .site-header, .site-footer, .reading-mode-selector,
  .kbd-hint, #reading-progress, .chapter-nav { display: none; }
  .prose-content .content-wrapper { max-width: 100%; padding: 0; }
  a { color: #222; border-bottom: none; }
  pre { border: 1px solid #ddd; background: #f8f8f8; }
  code { background: #f0f0f0; color: #333; border-color: #ddd; }
}
