* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #15171f;
  --muted: #5c6474;
  --soft: #f4f6fb;
  --panel: #ffffff;
  --line: #dce2ed;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 50px rgba(25, 32, 56, 0.12);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fbfcff;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

a {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.38);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

.narrow {
  max-width: 760px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 226, 237, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.breadcrumb-nav {
  border-bottom: 1px solid rgba(220, 226, 237, 0.78);
  background: rgba(248, 250, 252, 0.94);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin: 0 auto;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: rgba(100, 116, 139, 0.75);
}

.breadcrumb-list a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb-list a:hover {
  color: var(--ink);
}

.breadcrumb-list [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-link {
  text-decoration: none;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border: 3px solid var(--ink);
  border-left-color: var(--cyan);
  border-radius: 7px;
  transform: rotate(45deg);
}

.logo-text {
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

.main-nav a,
.footer-right a,
.footer-link-button {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.is-active,
.footer-right a:hover,
.footer-link-button:hover {
  color: var(--ink);
}

.footer-link-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.footer-right a,
.footer-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hero {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%),
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.12), transparent 32%);
}

.compact-hero {
  padding: 48px 0 34px;
}

.hero-copy-center {
  text-align: center;
}

.eyebrow,
.studio-label,
.result-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero h2 {
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--ink);
  font-size: 58px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 790px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 20px;
}

.studio-shell {
  width: min(1720px, calc(100% - 28px));
  margin: 0 auto;
  scroll-margin-top: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.studio-first {
  margin-top: 18px;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.studio-topbar h1,
.studio-topbar h2 {
  margin-top: 2px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tool-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  overflow-x: auto;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.tool-group:last-child {
  border-right: 0;
}

.tool-btn,
.btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tool-btn {
  min-width: 58px;
  padding: 8px 11px;
}

.btn {
  padding: 10px 16px;
}

.btn-small {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 13px;
}

.tool-btn:hover,
.btn:hover {
  transform: translateY(-1px);
  border-color: #b8c2d4;
}

.tool-btn.active,
.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.btn-ghost {
  background: #ffffff;
}

.tool-btn.danger:hover {
  border-color: #fecaca;
  color: var(--red);
}

.pulse-btn {
  position: relative;
  overflow: hidden;
}

.pulse-btn::after {
  position: absolute;
  inset: -40%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-75%) rotate(12deg);
  animation: sheen 3s ease-in-out infinite;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 640px;
}

.canvas-panel {
  position: relative;
  min-height: 640px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.05), transparent 34%),
    #eef3f9;
}

#shape-canvas {
  display: block;
  width: 100%;
  height: min(68vh, 680px);
  min-height: 520px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
}

.canvas-hint {
  position: absolute;
  left: 32px;
  bottom: 28px;
  max-width: min(720px, calc(100% - 64px));
  padding: 8px 11px;
  border: 1px solid rgba(220, 226, 237, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.analysis-result {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 36%),
    #ffffff;
  overflow: hidden;
}

.result-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin-bottom: 22px;
  border: 1px solid #dbeafe;
  border-radius: 50%;
  background: #eff6ff;
}

.result-orb::before,
.result-orb::after {
  position: absolute;
  content: "";
  border: 2px solid rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  animation: orbit 5s linear infinite;
}

.result-orb::before {
  width: 92px;
  height: 52px;
}

.result-orb::after {
  width: 52px;
  height: 92px;
  animation-duration: 6.5s;
}

.result-orb span {
  width: 28px;
  height: 28px;
  border: 5px solid var(--blue);
  border-left-color: var(--cyan);
  border-radius: 8px;
  transform: rotate(45deg);
}

.analysis-result.possible .result-orb {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.analysis-result.possible .result-orb span {
  border-color: var(--green);
  border-left-color: #22c55e;
}

.analysis-result.impossible .result-orb {
  border-color: #fecaca;
  background: #fef2f2;
}

.analysis-result.impossible .result-orb span {
  border-color: var(--red);
  border-left-color: #fb7185;
}

.analysis-result.ambiguous .result-orb {
  border-color: #fed7aa;
  background: #fff7ed;
}

.analysis-result.ambiguous .result-orb span {
  border-color: var(--amber);
  border-left-color: #fbbf24;
}

.analysis-status {
  margin-top: 4px;
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.confidence-wrap {
  margin: 22px 0;
}

.confidence-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.confidence-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.65s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.25s ease;
}

#confidence-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.analysis-details {
  color: var(--muted);
  font-size: 15px;
}

.result-reasons {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.reason-pill {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
}

.result-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.share-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.share-title {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.share-btn:hover {
  border-color: #bfd0ef;
  color: var(--ink);
}

.embed-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.embed-copy input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.decision-grid,
.source-grid,
.legal-grid,
.next-step-grid {
  display: grid;
  gap: 18px;
}

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-grid,
.legal-grid,
.next-step-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-source-grid {
  margin-bottom: 34px;
}

.decision-card,
.source-card,
.legal-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.legal-card {
  color: inherit;
  text-decoration: none;
}

.decision-card h3,
.source-card h3,
.legal-card h2,
.legal-card h3,
.note-card h2,
.note-card h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.2;
}

.legal-card h2 {
  margin-top: 0;
}

.note-card h2 {
  margin-top: 0;
}

.decision-card p,
.source-card p,
.legal-card p,
.note-card p,
.page-section li {
  color: var(--muted);
}

.source-list,
.plain-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-left: 20px;
}

.source-list a,
.plain-list a,
.note-card a {
  font-weight: 700;
}

.learning-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 36px;
  align-items: center;
}

.learning-hero .section-heading {
  margin-bottom: 0;
}

.learning-visual,
.inline-diagram {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(25, 32, 56, 0.08);
}

.learning-visual text,
.inline-diagram text {
  fill: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 750;
  letter-spacing: 0;
}

.diagram-muted {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.diagram-line {
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram-blue {
  stroke: var(--blue);
}

.diagram-cyan {
  stroke: var(--cyan);
}

.diagram-green {
  stroke: var(--green);
}

.diagram-amber {
  stroke: var(--amber);
}

.diagram-red {
  stroke: var(--red);
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.learn-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.learn-card svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f8fafc;
}

.learn-card span,
.science-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.learn-card h2,
.learn-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.learn-card p {
  color: var(--muted);
  font-size: 15px;
}

.science-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.science-flow a,
.science-flow span {
  display: grid;
  min-height: 112px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.science-flow small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 34px;
  align-items: start;
}

.learning-layout > *,
.learning-sidebar {
  min-width: 0;
}

.learning-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.learning-sidebar .note-card {
  padding: 16px;
}

.experiment-strip,
.concept-grid,
.evidence-table-wrap {
  margin-top: 28px;
}

.guide-visual {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.guide-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-visual figcaption {
  border-top: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.evidence-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.experiment-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.experiment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.experiment-card h3 {
  margin-top: 0;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.concept-card {
  border-left: 4px solid var(--blue);
  background: #f8fafc;
  padding: 16px;
}

.concept-card h3 {
  margin-top: 0;
}

.concept-card summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.concept-card summary + p {
  margin-top: 12px;
}

.equation-box {
  margin: 22px 0;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 18px;
}

.equation-box code {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 16px;
  white-space: normal;
}

.at-a-glance-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin: 2rem 0;
  padding: 1.25rem;
}

.at-a-glance-summary h2 {
  margin-top: 0;
}

.at-a-glance-summary h3 {
  font-size: 1rem;
  margin: 1rem 0 0.45rem;
}

.at-a-glance-summary p,
.at-a-glance-summary li,
.at-a-glance-summary td {
  font-size: 0.95rem;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 15px;
}

.evidence-table th,
.evidence-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.evidence-table th {
  background: #f8fafc;
  color: var(--ink);
  font-weight: 800;
}

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.step-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
}

.metadata-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.metadata-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 10px;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.inline-actions {
  justify-content: flex-start;
}

.gallery-panel {
  margin-top: 42px;
}

.gallery-heading {
  margin-bottom: 20px;
}

.shape-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.shape-gallery-filters button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.shape-gallery-filters button:hover,
.shape-gallery-filters button.active {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
}

.shape-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.shape-gallery-card {
  display: grid;
  grid-template-rows: 180px 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.shape-gallery-visual {
  display: grid;
  place-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(#edf2fa 1px, transparent 1px),
    linear-gradient(90deg, #edf2fa 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px;
}

.shape-gallery-visual img {
  display: block;
  max-width: 74%;
  max-height: 74%;
  object-fit: contain;
}

.shape-gallery-visual svg {
  width: 78%;
  height: 78%;
}

.shape-gallery-visual line {
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shape-gallery-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
}

.shape-gallery-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shape-gallery-badges span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 820;
}

.shape-gallery-credit {
  color: var(--muted);
  font-size: 12px;
}

.shape-gallery-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.shape-gallery-card p {
  margin: 0;
  font-size: 14px;
}

.shape-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.gallery-license-note {
  margin-top: 24px;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 90;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
}

.cookie-banner h2 {
  color: var(--ink);
  font-size: 18px;
}

.cookie-banner p {
  color: var(--muted);
  font-size: 14px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.section {
  padding: 86px 0;
}

.section-alt {
  background: var(--soft);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 34px;
}

.section h2,
.page-section h1 {
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading h2 {
  margin-top: 8px;
}

.section p,
.faq-item p {
  color: var(--muted);
  font-size: 17px;
}

.compact-cards,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.example-card,
.step-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
  text-align: left;
}

.interactive-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.interactive-card:hover {
  transform: translateY(-3px);
  border-color: #bfd0ef;
  box-shadow: 0 14px 30px rgba(25, 32, 56, 0.09);
}

.example-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.example-card h3,
.step-card h3,
.faq-item h3 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.example-card p,
.step-card p {
  color: var(--muted);
  font-size: 15px;
}

.faq-item {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.page-section h2 {
  margin-top: 32px;
  color: var(--ink);
  font-size: 24px;
}

.page-section h3 {
  margin-top: 24px;
  color: var(--ink);
  font-size: 19px;
}

.section .learn-card h2,
.section .legal-card h2,
.section .note-card h2,
.section .experiment-card h3,
.section .concept-card h3 {
  margin-top: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.2;
}

.section .learn-card h2 {
  font-size: 21px;
}

.page-section a {
  color: var(--blue);
}

.page-section a.btn-primary,
a.btn-primary {
  color: #ffffff;
}

.page-section a.btn-primary:hover,
a.btn-primary:hover {
  color: #ffffff;
}

.page-section a.btn-ghost {
  color: var(--ink);
}

.page-section p + p,
.page-section ul + p,
.page-section p + ul {
  margin-top: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 34px 0;
}

.embed-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #eef3f9;
}

.embed-widget {
  width: min(100%, 420px);
  min-height: 100vh;
  padding: 18px;
  background: #ffffff;
}

.embed-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

#embed-canvas {
  width: 100%;
  height: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.embed-result {
  margin-top: 18px;
}

.embed-result h1 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.embed-result p:last-child {
  color: var(--muted);
}

.embed-cta {
  display: block;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
}

.embed-powered {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-note,
.footer-meta {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.main-nav a,
.footer-right a,
.footer-link-button,
.example-card,
.step-card,
.decision-card,
.source-card,
.legal-card,
.note-card,
.btn,
.tool-btn {
  overflow-wrap: anywhere;
}

@keyframes sheen {
  0%,
  62% {
    transform: translateX(-75%) rotate(12deg);
  }
  100% {
    transform: translateX(75%) rotate(12deg);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .analysis-result {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .compact-cards,
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-hero,
  .learning-layout {
    grid-template-columns: 1fr;
  }

  .learning-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .science-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    position: relative;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 14px;
  }

  .main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
  }

  .breadcrumb-list {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .header-inner {
    flex-wrap: wrap;
  }

  .js .main-nav {
    display: none;
    flex-basis: 100%;
    gap: 8px 18px;
    padding-top: 8px;
  }

  .js .site-header.nav-open .main-nav {
    display: flex;
  }

  .compact-hero {
    padding-top: 34px;
  }

  .hero h2 {
    font-size: 38px;
  }

  .studio-shell {
    width: 100%;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .studio-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .studio-actions .btn {
    flex: 1 1 auto;
  }

  .canvas-panel {
    min-height: 460px;
    padding: 10px;
  }

  #shape-canvas {
    height: 56vh;
    min-height: 420px;
  }

  .canvas-hint {
    position: static;
    max-width: none;
    margin-top: 10px;
  }

  .compact-cards,
  .steps-grid,
  .decision-grid,
  .source-grid,
  .legal-grid,
  .next-step-grid,
  .shape-gallery,
  .learn-grid,
  .experiment-strip,
  .concept-grid,
  .learning-sidebar {
    grid-template-columns: 1fr;
  }

  .science-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-table {
    min-width: 620px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-right {
    justify-content: flex-start;
  }

  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .cookie-banner-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cookie-actions,
  .cookie-actions .btn {
    width: 100%;
  }
}
