/* FURSOY CPU (cpu.fursoy.com) — layered technical documentation styles.
   Extends /styles.css following the canonical FURSOY Web Design Standard. */

/* ===== Header additions ===== */
.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.license-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid rgba(19, 171, 184, 0.35);
  border-radius: 999px;
  background: #e5f8f6;
  color: #07949d;
  font: 700 9.5px/1.4 "Space Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Inline code & typography refinements ===== */
code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Mono", monospace;
  font-size: 0.88em;
}

.site-footer code {
  border-color: var(--footer-line);
  background: #0c292a;
  color: #6ce1dd;
}

.section-head {
  margin-bottom: 28px;
}

.section-head .kicker {
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.048em;
}

.section-lead {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.75;
}

/* ===== 01. Hero & 4-up Telemetry Strip ===== */
.cpu-hero {
  padding: 96px 0 64px;
}

.cpu-hero .lead {
  max-width: 720px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.telemetry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
}

.telemetry-label {
  color: var(--kicker-teal);
  font: 700 9.5px/1.4 "Space Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.telemetry-value {
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.telemetry-sub {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ===== 02. Interactive Architecture Diagram & Inspector ===== */
.arch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.arch-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-bg);
  color: var(--ink);
  font: 700 11px/1.3 "Space Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.arch-tab:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.arch-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f4f6f8;
}

.arch-workbench {
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 24px;
  align-items: stretch;
}

.arch-diagram-wrap {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
}

.arch-svg {
  display: block;
  width: 100%;
  height: auto;
}

.arch-node {
  cursor: pointer;
  outline: none;
}

.arch-node .node-box {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.arch-node:hover .node-box,
.arch-node:focus-visible .node-box {
  stroke: var(--teal);
  fill: #eef9f8;
}

.arch-node.is-active .node-box {
  fill: var(--ink);
  stroke: var(--teal);
  stroke-width: 2;
}

.arch-node .node-kicker {
  fill: var(--kicker-teal);
  font-family: "Space Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
}

.arch-node.is-active .node-kicker {
  fill: var(--bright);
}

.arch-node .node-title {
  fill: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.arch-node.is-active .node-title {
  fill: #f4f6f8;
}

.arch-node .node-sub {
  fill: var(--text-soft);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.arch-node.is-active .node-sub {
  fill: #c6dad8;
}

.arch-bus-line {
  stroke: #9ab5b2;
  stroke-width: 1.5;
  fill: none;
}

.arch-bus-accent {
  stroke: var(--teal);
  stroke-width: 1.75;
  fill: none;
}

.arch-bus-label {
  fill: var(--text-soft);
  font-family: "Space Mono", monospace;
  font-size: 9px;
  font-weight: 700;
}

.arch-inspector {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--footer-line);
  border-radius: 20px;
  background: linear-gradient(155deg, #0c3435, #082526);
  color: #f4f6f8;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.inspector-kicker {
  color: #6ce1dd;
  font: 700 10px/1.4 "Space Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inspector-rtl {
  padding: 3px 9px;
  border: 1px solid #315252;
  border-radius: 8px;
  background: rgba(11, 51, 52, 0.7);
  color: #b5c7c5;
  font: 700 10px/1.4 "Space Mono", monospace;
}

.inspector-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.inspector-summary {
  margin: 0;
  color: #c8d8d6;
  font-size: 13.5px;
  line-height: 1.7;
}

.inspector-list {
  margin: 4px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--footer-line);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-list li {
  position: relative;
  padding-left: 16px;
  color: #dfecea;
  font-size: 13px;
  line-height: 1.65;
}

.inspector-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--bright);
  font-weight: 800;
}

.inspector-list code {
  border-color: #315252;
  background: #082526;
  color: #6ce1dd;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.spec-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
}

.spec-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.spec-card p,
.spec-card li {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.spec-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== 03. Memory & PTW Flow ===== */
.ptw-panel {
  margin-top: 28px;
  padding: 34px;
  border: 1px solid var(--footer-line);
  border-radius: 20px;
  background: linear-gradient(155deg, #0c3435, #082526);
  color: #f4f6f8;
}

.ptw-panel .kicker {
  color: #6ce1dd;
  margin-bottom: 12px;
}

.ptw-panel h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ptw-lead {
  margin: 0 0 24px;
  color: #c2d4d2;
  font-size: 13.5px;
  line-height: 1.7;
}

.ptw-panel code {
  border-color: #315252;
  background: #082526;
  color: #6ce1dd;
}

.ptw-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ptw-step {
  padding: 20px;
  border: 1px solid #2a4849;
  border-radius: 13px;
  background: rgba(8, 37, 38, 0.72);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ptw-step-num {
  color: var(--bright);
  font: 700 10px/1.4 "Space Mono", monospace;
  letter-spacing: 0.12em;
}

.ptw-step p {
  margin: 0;
  color: #dce9e7;
  font-size: 12.5px;
  line-height: 1.65;
}

/* ===== 04. Linux Boot & CPI Conservation ===== */
.counters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.counter-tile {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-bg);
}

.counter-tile-label {
  display: block;
  color: var(--kicker-teal);
  font: 700 9.5px/1.4 "Space Mono", monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.counter-tile-val {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.counter-tile-sub {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.milestones-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
  margin-bottom: 24px;
}

.milestones-title {
  margin: 0 0 18px;
  color: var(--kicker-teal);
  font: 700 10px/1.4 "Space Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.milestones-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.milestone-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.milestone-cycle {
  display: block;
  color: var(--ink);
  font: 700 11.5px/1.4 "Space Mono", monospace;
}

.milestone-desc {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.cpi-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
}

.cpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cpi-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cpi-readout {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 700 11px/1.4 "Space Mono", monospace;
}

.cpi-bar {
  display: flex;
  width: 100%;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  overflow: hidden;
  background: var(--paper);
  margin-bottom: 20px;
}

.cpi-seg {
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.18s ease, filter 0.18s ease;
  border-right: 1px solid rgba(246, 248, 245, 0.35);
}

.cpi-seg:last-child {
  border-right: 0;
}

.cpi-seg:hover,
.cpi-seg:focus-visible,
.cpi-seg.is-active {
  filter: brightness(1.16);
  outline: none;
}

.cpi-seg.c-0 { background: #0b3334; }
.cpi-seg.c-1 { background: #13abb8; }
.cpi-seg.c-2 { background: #177e83; }
.cpi-seg.c-3 { background: #27d2d8; }
.cpi-seg.c-4 { background: #2e595a; }
.cpi-seg.c-5 { background: #527d7b; }
.cpi-seg.c-6 { background: #83a8a5; }
.cpi-seg.c-7 { background: #b7cfcd; }

.cpi-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.cpi-swatch.c-0 { background: #0b3334; }
.cpi-swatch.c-1 { background: #13abb8; }
.cpi-swatch.c-2 { background: #177e83; }
.cpi-swatch.c-3 { background: #27d2d8; }
.cpi-swatch.c-4 { background: #2e595a; }
.cpi-swatch.c-5 { background: #527d7b; }
.cpi-swatch.c-6 { background: #83a8a5; }
.cpi-swatch.c-7 { background: #b7cfcd; }

/* ===== Tables ===== */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--kicker-teal);
  font: 700 9.5px/1.4 "Space Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover,
.data-table tbody tr.is-active {
  background: #edf7f6;
}

.data-table tfoot td {
  padding: 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-weight: 800;
  background: var(--paper);
}

.mono-name {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.muted-cell {
  color: var(--text-soft);
}

/* ===== 05. Synthesis & STA Chart / Table ===== */
.notice-banner {
  padding: 18px 22px;
  border: 1px solid rgba(19, 171, 184, 0.45);
  border-radius: 13px;
  background: #eaf7f6;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.synth-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.total-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-bg);
  font: 700 11.5px/1.4 "Space Mono", monospace;
  color: var(--ink);
}

.total-chip.met {
  border-color: rgba(19, 171, 184, 0.5);
  background: #e5f8f6;
  color: #05828c;
}

.sta-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-bg);
}

.sta-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.sta-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font: 700 11px/1.3 "Space Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.filter-btn.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f4f6f8;
}

.sta-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 700 10.5px/1.4 "Space Mono", monospace;
  color: var(--text-soft);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.baseline { background: #8ea9a6; }
.legend-dot.optimized { background: var(--teal); }
.legend-dot.target { width: 2px; height: 12px; background: var(--ink); }

.sta-chart {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  margin-bottom: 24px;
}

.sta-row {
  display: grid;
  grid-template-columns: 185px 1fr 160px;
  gap: 14px;
  align-items: center;
}

.sta-row-name {
  font: 700 11.5px/1.3 "Space Mono", monospace;
  color: var(--ink);
}

.sta-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 0;
}

.sta-target-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8.78%; /* 2.000 ns / 22.776 ns */
  width: 2px;
  background: rgba(11, 51, 52, 0.55);
  z-index: 2;
}

.sta-bar-line {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(11, 51, 52, 0.06);
  overflow: hidden;
}

.sta-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.sta-bar-fill.baseline { background: #8ea9a6; }
.sta-bar-fill.optimized { background: var(--teal); }

.sta-row-vals {
  text-align: right;
  font: 700 11px/1.4 "Space Mono", monospace;
  color: var(--ink);
}

.sta-row-vals .opt-val {
  color: #05828c;
}

.wns-met {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e5f8f6;
  color: #05828c;
  font: 700 10.5px/1.3 "Space Mono", monospace;
}

.type-tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  font: 700 10px/1.3 "Space Mono", monospace;
  text-transform: uppercase;
}

/* ===== 06. Engineering Depth, Bug Analysis & Roadmap ===== */
.bug-card {
  padding: 34px;
  border: 1px solid var(--footer-line);
  border-radius: 20px;
  background: linear-gradient(155deg, #0c3435, #082526);
  color: #f4f6f8;
  margin-bottom: 24px;
}

.bug-card .kicker {
  color: #6ce1dd;
  margin-bottom: 12px;
}

.bug-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.bug-card p {
  margin: 0 0 14px;
  color: #d2e1df;
  font-size: 13.5px;
  line-height: 1.75;
}

.bug-card code {
  border-color: #315252;
  background: #082526;
  color: #6ce1dd;
}

.code-block {
  margin: 16px 0 0;
  padding: 18px 20px;
  border: 1px solid #2a4849;
  border-radius: 13px;
  background: #061c1d;
  overflow-x: auto;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #8fa5a3;
  font: 700 10px/1.4 "Space Mono", monospace;
  letter-spacing: 0.08em;
}

.code-block pre {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #e9f5f4;
}

.roadmap-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .header-nav {
    gap: 18px;
  }

  .license-badge {
    display: none;
  }
}

@media (max-width: 900px) {
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .arch-workbench {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .ptw-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .counters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .milestones-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .sta-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sta-row-vals {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .cpu-hero {
    padding: 64px 0 48px;
  }

  .telemetry-grid,
  .ptw-steps,
  .counters-grid,
  .milestones-list {
    grid-template-columns: 1fr;
  }

  .arch-diagram-wrap,
  .arch-inspector,
  .ptw-panel,
  .cpi-card,
  .sta-card,
  .bug-card,
  .spec-card {
    padding: 22px;
  }

  .license-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arch-tab,
  .arch-node .node-box,
  .cpi-seg,
  .filter-btn {
    transition: none;
  }

  .arch-tab:hover {
    transform: none;
  }
}
