/* Shared simulator foundation, workspace, charts, and responsive layout. */

/* Source: funify_v1_002.css */
:root {
  --bg: #f5f8fa;
  --surface: #fff;
  --card: #fff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --text: #111827;
  --muted: #6b7280;
  --brand: var(--color-primary);
  --brand-soft-1: #6f8dff;
  --brand-soft-2: #5e7eff;
  --ring: rgba(79, 124, 255, 0.22);
  --accent-1: #6ec1f5;
  --accent-2: #2b88d8;
  --accent-border: #cfeaff;
  --btn-text: #fff;
  --input-bg: #fff;
  --input-border: #d1d5db;
  --pill-bg: #f1f5ff;
  --pill-border: #dbe4ff;
  --pill-dot: #6585ff;
  --pill-text: #253bff;
  --bar-bg: #eef2ff;
  --bar-mat: #5b86ff;
  --bar-waste: #8a6cff;
  --details-bg: #fff;
  --details-border: #e5e7eb;
  --pill-h: 28px;
  --pill-px: 10px;
  --pill-fs: 0.9rem;
  --desk-w: var(--content-width);
  --desk-h: 1024px;

  --hero-bg:
    radial-gradient(
      1200px 400px at 0% 0%,
      color-mix(in oklab, var(--brand), white 88%) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, color-mix(in oklab, var(--surface), white 6%), var(--card));
  --nav-link: #374151;

  --hero-gap: 0px;
  --title-lift: 30px;

  --hero-img: url('/resources/pic/categories/computer-hero.webp');
  --hero-img-size: cover;
  --hero-img-pos: center right;
  --hero-img-opacity: 0.8;
  --hero-img-blur: 0px;
}

[data-theme='dark'] {
  --bg: #0f172a;
  --surface: #0b1022;
  --card: #0b1226cc;
  --border: #1e293b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #6aa4ff;
  --brand-soft-1: #7fb1ff;
  --brand-soft-2: #679cff;
  --ring: rgba(106, 164, 255, 0.25);
  --input-bg: #0b1326;
  --input-border: #1b2440;
  --pill-bg: #0d1733;
  --pill-border: #1b2440;
  --pill-dot: #89a8ff;
  --pill-text: #d7e3ff;
  --bar-bg: #0d1733;
  --bar-mat: #4d79ff;
  --bar-waste: #7d61ff;
  --details-bg: #0c142a;
  --details-border: #1b2440;
  --accent-1: #3a96e6;
  --accent-2: #1679c1;
  --accent-border: #145f98;
  --btn-text: #fff;
  --nav-link: #cbd5e1;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 480px at -10% -10%, rgba(142, 197, 252, 0.2), transparent 60%),
    radial-gradient(900px 480px at 110% -10%, rgba(196, 181, 253, 0.18), transparent 60%), var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    Apple SD Gothic Neo,
    Noto Sans,
    sans-serif;
  line-height: 1.6;
}

a {
  color: #365cfb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  position: relative;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 240px at 0% -10%, rgba(79, 124, 255, 0.12), transparent 60%),
    radial-gradient(600px 240px at 100% 0%, rgba(138, 108, 255, 0.12), transparent 60%),
    var(--surface);
}

.hero h2 {
  margin: 0 0 6px 0;
  font-size: 1.2rem;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

input,
select,
button {
  color: var(--text);
  width: 100%;
  padding: 8px 10px;
  min-height: 34px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  outline: none;
  transition:
    border 0.15s,
    box-shadow 0.15s,
    transform 0.02s,
    background 0.15s;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.skip-link:focus {
  top: 12px;
  left: 12px;
}

.skip-link:focus,
.skip-link:focus-visible {
  outline: 2px solid #4f7cff;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -1000px;
  left: 0;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  z-index: 1000;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1600px) {
  body {
    background-position: center top;
  }
}

@media (min-width: 1024px) {
  .wrap {
    width: min(100vw, var(--desk-w));
    max-width: var(--desk-w);
    margin-left: auto;
    margin-right: auto;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .wrap {
    min-height: min(100vh, var(--desk-h));
  }
}

@media (max-width: 1023px) {
  :root {
    --hero-img-opacity: 0.18;
  }

  html,
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 10px 6px;
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
  }
}

input:disabled,
select:disabled {
  background-color: #f3f3f3;
  color: #777;
  border-color: #ddd;
  cursor: not-allowed;
  box-shadow: none;
}

:root {
  color-scheme: light;
  --gh-canvas: #ffffff;
  --gh-canvas-subtle: #f6f8fa;
  --gh-canvas-inset: #f6f8fa;
  --gh-border: #d0d7de;
  --gh-border-muted: #d8dee4;
  --gh-fg: #1f2328;
  --gh-muted: #59636e;
  --gh-accent: #0969da;
  --gh-accent-subtle: #ddf4ff;
  --gh-header: #1f2937;
  --gh-shadow: 0 8px 24px rgba(140, 149, 159, 0.18);
  --bg: var(--gh-canvas);
  --surface: var(--gh-canvas);
  --text: var(--gh-fg);
  --muted: var(--gh-muted);
  --border: var(--gh-border);
  --brand: var(--gh-accent);
  --panel: var(--gh-canvas);
  --panel-strong: var(--gh-canvas);
  --panel-soft: var(--gh-canvas-subtle);
  --line: var(--gh-border);
  --line-strong: color-mix(in oklab, var(--gh-border), var(--gh-fg) 28%);
  --ink-strong: var(--gh-fg);
  --ink-soft: var(--gh-muted);
  --brand-soft: var(--gh-accent-subtle);
  --brand-strong: var(--gh-accent);
  --shadow-md: var(--gh-shadow);
  --shadow-lg: 0 16px 40px rgba(140, 149, 159, 0.22);
  --radius-xl: 16px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --gh-canvas: #0d1117;
  --gh-canvas-subtle: #161b22;
  --gh-canvas-inset: #010409;
  --gh-border: #30363d;
  --gh-border-muted: #21262d;
  --gh-fg: #e6edf3;
  --gh-muted: #8b949e;
  --gh-accent: #2f81f7;
  --gh-accent-subtle: rgba(56, 139, 253, 0.14);
  --gh-header: #010409;
  --gh-shadow: 0 8px 24px rgba(1, 4, 9, 0.38);
  --bg: var(--gh-canvas);
  --surface: var(--gh-canvas);
  --text: var(--gh-fg);
  --muted: var(--gh-muted);
  --border: var(--gh-border);
  --brand: var(--gh-accent);
  --panel: var(--gh-canvas);
  --panel-strong: color-mix(in oklab, var(--gh-canvas), white 4%);
  --panel-soft: var(--gh-canvas-subtle);
  --line: var(--gh-border);
  --line-strong: color-mix(in oklab, var(--gh-border), white 18%);
  --ink-strong: var(--gh-fg);
  --ink-soft: var(--gh-muted);
  --brand-soft: var(--gh-accent-subtle);
  --brand-strong: var(--gh-accent);
  --shadow-md: var(--gh-shadow);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.45);
}

button,
input {
  font: inherit;
}

.footer-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.6rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}

.section-head p {
  max-width: 920px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.68;
}

.result-item,
.result-empty {
  display: block;
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
}

.result-item {
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.result-item strong {
  display: block;
  color: var(--ink-strong);
  font-size: 0.98rem;
  line-height: 1.36;
}

.result-item span,
.result-empty {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.48;
}

.result-item:hover {
  background: var(--brand-soft);
  border-color: color-mix(in oklab, var(--brand), transparent 72%);
  transform: translateY(-1px);
}

[data-site-search] .result-item,
[data-site-search] .result-empty {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  transform: none;
}

[data-site-search] .result-item strong {
  display: block;
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.32;
}

[data-site-search] .result-item span,
[data-site-search] .result-empty {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

[data-site-search] .result-item:hover,
[data-site-search] .result-item:focus-visible {
  border-color: color-mix(in oklab, var(--brand), transparent 72%);
  background: var(--brand-soft);
  color: inherit;
  outline: none;
  transform: none;
}

funify-footer {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
}

.footer {
  margin-top: 16px;
}

.footer-shell {
  border-radius: var(--radius-xl);
  border: 0;
  box-shadow: none;
  padding: 16px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  padding-bottom: 14px;
}

.footer-brand h2 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.footer-brand p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.68;
  font-size: 0.95rem;
}

.footer-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
}

.footer-col h3 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.footer-links,
.footer-meta {
  display: grid;
  gap: 8px;
}

.footer-link,
.footer-meta a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}

.footer-link:hover,
.footer-meta a:hover {
  color: var(--brand);
}

.footer-meta span {
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.9rem;
}

.footer-copyright {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.footer-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .footer-meta span {
    display: none;
  }

  .footer-top,
  .footer-bottom,
  .footer-copyright,
  .footer-tagline {
    display: none;
  }

  .footer-shell {
    padding: 18px 10px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .footer-mobile {
    display: grid;
    justify-items: center;
    gap: 12px;
    color: var(--ink-soft);
    text-align: center;
  }

  .footer-mobile-brand {
    color: var(--ink-strong);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .footer-mobile-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
  }

  .footer-mobile-links a {
    padding: 0 9px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    line-height: 1;
    text-decoration: none;
  }

  .footer-mobile-copyright {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.68rem;
    line-height: 1.45;
  }
}

@media (max-width: 720px) {
  .footer-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .section-head p,
  .footer-brand p {
    font-size: 0.94rem;
  }

  .footer-bottom {
    justify-items: center;
    text-align: center;
  }

  .footer-col {
    text-align: center;
  }

  .footer-links,
  .footer-meta {
    justify-items: center;
  }

  .footer-copyright {
    justify-content: center;
    text-align: center;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    font-size: 0.82rem;
  }
}

body {
  margin: 0;
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.github-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 24px;
  background: var(--gh-header);
  color: #f0f6fc;
}

.github-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 36px;
  border-radius: 1px;
  overflow: hidden;
  flex: none;
}

.github-mark img {
  width: auto;
  height: 56px;
  object-fit: contain;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.topbar-links a {
  color: inherit;
  text-decoration: none;
}

.topbar-links a,
.topbar-theme-button {
  font-weight: 600;
  font-size: 0.92rem;
}

.topbar-theme-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: inherit;
}

.topbar-theme-button:hover {
  color: inherit;
  text-decoration: none;
}

.topbar-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 38px;
  margin-left: auto;
  border: 1px solid rgba(240, 246, 252, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(240, 246, 252, 0.08), rgba(240, 246, 252, 0.02));
  color: #f0f6fc;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.topbar-menu-button:hover,
.topbar-menu-button[aria-expanded='true'] {
  border-color: rgba(240, 246, 252, 0.42);
  background: rgba(240, 246, 252, 0.12);
  box-shadow: inset 0 0 0 1px rgba(240, 246, 252, 0.04);
}

.topbar-menu-button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 70px 10px 10px;
  background: rgba(1, 4, 9, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.mobile-menu-modal.is-open {
  display: flex;
}

.mobile-menu-panel {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: calc(100dvh - 80px);
  min-height: 0;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-canvas);
  color: var(--gh-fg);
  box-shadow: 0 18px 44px rgba(1, 4, 9, 0.34);
  overflow: hidden;
  transform: translateY(-6px);
  animation: mobileMenuIn 0.16s ease forwards;
}

@keyframes mobileMenuIn {
  to {
    transform: translateY(0);
  }
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-canvas-subtle);
}

.mobile-menu-head h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: var(--gh-canvas);
  color: var(--gh-muted);
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.mobile-menu-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
}

.mobile-menu-close:hover {
  border-color: var(--gh-accent);
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
}

.mobile-menu-links {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 8px;
}

.mobile-menu-links a,
.mobile-theme-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--gh-fg);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.mobile-menu-links a::after,
.mobile-theme-button::after {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.52;
}

.mobile-menu-links a:hover,
.mobile-theme-button:hover {
  border-color: var(--gh-border);
  background: var(--gh-canvas-subtle);
  color: var(--gh-accent);
}

.footer {
  width: var(--funify-page-width, min(1280px, calc(100% - 32px)));
  margin-left: auto;
  margin-right: auto;
}

.footer-shell {
  border-color: var(--gh-border);
  border-radius: 6px;
  background: var(--gh-canvas);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.section-head p,
.footer-brand p,
.footer-meta span {
  color: var(--gh-muted);
}

.section-head {
  align-items: center;
  margin: -16px -16px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-canvas-subtle);
}

.section-head h2,
.footer-brand h2,
.footer-col h3 {
  color: var(--gh-fg);
  letter-spacing: 0;
}

.result-item:hover {
  transform: none;
  border-color: var(--gh-accent);
  background: var(--gh-canvas-subtle);
  box-shadow: none;
}

.footer {
  margin-top: 16px;
  margin-bottom: 24px;
}

.footer-shell {
  background: var(--gh-canvas-subtle);
}

.footer-top,
.footer-bottom,
.footer-copyright {
  border-color: var(--gh-border);
}

.footer-link,
.footer-meta a {
  color: var(--gh-accent);
}

@media (max-width: 900px) {
  .github-topbar {
    padding: 12px 16px;
  }

  .topbar-links {
    display: none;
  }

  .topbar-menu-button {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .footer {
    width: min(100% - 20px, 1280px);
  }

  .section-head {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.github-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex: 0 0 auto;
}

.github-mark {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.github-mark img {
  display: block;
  width: auto;
  height: 56px;
  max-width: none;
  flex-shrink: 0;
}

.topbar-links-left {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 0px;
  flex: 0 0 auto;
}

.topbar-links-right {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 0px;
  flex: 0 0 auto;
}

.topbar-links-left a,
.topbar-links-right a {
  white-space: nowrap;
  text-decoration: none;
}

.mobile-menu-section {
  display: grid;
  gap: 3px;
}

.mobile-menu-section + .mobile-menu-section {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--gh-border);
}

.mobile-menu-label {
  padding: 3px 10px;
  color: var(--gh-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .github-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
  }

  .topbar-left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar-links,
  .topbar-links-left,
  .topbar-links-right {
    display: none !important;
  }

  .topbar-menu-button {
    display: inline-flex !important;
    flex: 0 0 auto;
    margin-left: 12px;
  }

  .github-mark {
    min-width: 0;
  }

  .github-mark img {
    max-width: min(220px, calc(100vw - 96px));
    height: 50px;
    object-fit: contain;
  }
}

.code-keyword {
  color: #cf222e;
  font-weight: 700;
}

.code-function {
  color: #8250df;
}

@media print {
  .github-topbar,
  .footer {
    display: none !important;
  }
}

.calculator-page {
  display: grid;
  gap: 14px;
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 0;
}

.calculator-page [id] {
  scroll-margin-top: 96px;
}

.calculator-ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.calculator-ghost-button {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink-strong);
}

#resetBtn {
  border-color: #8c959f;
  background: #f6f8fa;
  color: #57606a;
}

#resetBtn:hover {
  border-color: #6e7781;
  background: #eef1f4;
  color: #24292f;
}

[data-theme='dark'] #resetBtn {
  border-color: #6e7681;
  background: #161b22;
  color: #c9d1d9;
}

[data-theme='dark'] #resetBtn:hover {
  border-color: #8b949e;
  background: #21262d;
  color: #f0f6fc;
}

.calculator-ghost-button:hover {
  border-color: var(--brand);
}

.post-article-body {
  max-width: 920px;
  margin-inline: auto;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.post-article-body h1,
.post-article-body h2,
.post-article-body h3 {
  margin: 28px 0 12px;
  color: var(--ink-strong);
  line-height: 1.3;
}

.post-article-body h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.post-article-body p {
  margin: 0 0 16px;
}

.post-article-body strong {
  color: var(--ink-strong);
}

.post-article-body a {
  color: var(--brand);
  overflow-wrap: anywhere;
}

.post-article-body img {
  max-width: 100%;
  height: auto;
}

.post-article-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.92em;
}

.post-article-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--ink-soft);
  text-align: left;
  vertical-align: top;
}

.calculator-error {
  margin: 0;
  color: #cf222e;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.calculator-error[hidden] {
  display: none !important;
}

.calculator-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.calculator-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calculator-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink-strong);
  text-decoration: none;
  cursor: pointer;
}

.calculator-icon-button img,
.calculator-icon-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.calculator-icon-button.brand {
  border: 0;
}

.calculator-icon-button.x,
.calculator-icon-button.threads {
  background: #111;
}

.calculator-icon-button.fb {
  background: #1877f2;
}

.calculator-icon-button.naver {
  background: #03c75a;
}

.calculator-related-share {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.calculator-related-share h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1rem;
  text-align: center;
}

.calculator-related-share .calculator-share-grid {
  justify-content: center;
}

@media (max-width: 640px) {
  .calculator-page {
    width: min(100% - 20px, 1280px);
    padding-inline: 0;
  }

  .calculator-ghost-button {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

/* Source: funify-crypto_v1_002.css */

/* Source: funify-crypto-mobile.css */
@media (max-width: 720px) {
  :root {
    --crypto-mobile-nav-height: 67px;
  }

  body[data-crypto-mobile-template] {
    padding-bottom: calc(var(--crypto-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    background: #f7f9fc;
  }

  body[data-crypto-mobile-template] .wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100dvh;
    padding-top: 0;
    background: #f7f9fc;
  }

  body[data-crypto-mobile-template] .calculator-page {
    width: 100%;
    margin: 0;
    padding: 14px 10px 18px;
    box-sizing: border-box;
  }

  body[data-crypto-mobile-template] [data-crypto-mobile-panel] {
    display: none !important;
  }

  body[data-crypto-mobile-template] [data-tool-mobile-extra] {
    display: none !important;
  }

  body[data-crypto-mobile-template] .wrap > funify-footer {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 0 !important;
    padding: 0 4px;
    box-sizing: border-box;
  }

  html[data-theme='dark'],
  html[data-theme='dark'] body[data-crypto-mobile-template],
  html[data-theme='dark'] body[data-crypto-mobile-template] .wrap,
  html[data-theme='dark'] body[data-crypto-mobile-template] .wrap > funify-footer,
  html[data-theme='dark'] body[data-crypto-mobile-template] .wrap > funify-footer .footer {
    background: #0d1117 !important;
  }
}

/* Source: funify-simulator.css */
.simulator-page .hero {
  position: relative;
  margin-top: 18px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 16px;
  background: linear-gradient(
    120deg,
    var(--gh-canvas) 0%,
    color-mix(in srgb, var(--simulator-accent) 7%, var(--gh-canvas)) 100%
  );
}

.simulator-page .hero::after {
  content: '';
  position: absolute;
  top: -70px;
  right: -35px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--simulator-accent) 8%, transparent);
  pointer-events: none;
}

.hero-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--gh-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-align: left;
  text-transform: uppercase;
}

.hero-label::before {
  display: none;
  content: '';
}

.simulator-page h1 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0;
  font-size: clamp(1.85rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero-description {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.simulator-page .lead {
  max-width: 760px;
  margin: 0;
  color: var(--gh-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.simulator-page .note {
  color: var(--gh-muted);
  font-size: 1rem;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.workspace-head h2 {
  margin: 0;
  font-size: 2rem;
}

.workspace-head p {
  margin: 2px 0 0;
}

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

.simulator-field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.76rem;
  font-weight: 800;
}

.simulator-field output {
  color: var(--simulator-accent);
}

.simulator-field input,
.simulator-field select {
  width: 100%;
}

.simulator-selects {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.simulator-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.statusbar {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gh-border);
}

.view-tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  background: var(--gh-canvas-subtle);
}

.view-tab {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gh-muted);
  font-weight: 800;
  cursor: pointer;
}

.view-tab[aria-selected='true'] {
  background: var(--gh-canvas);
  color: var(--gh-fg);
  box-shadow: 0 1px 4px rgba(20, 32, 51, 0.1);
}

.simulator-full-width-mobile .view-tab {
  flex: 1 1 auto;
  width: auto;
  padding-inline: clamp(6px, 2vw, 14px);
}

.view-panel[hidden] {
  display: none;
}

.view-panel > .simulator-panel:first-child,
.view-panel > .sim-grid:first-child {
  margin-top: 12px;
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sim-card {
  padding: 0;
  overflow: hidden;
}

.sim-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px;
  border-bottom: 1px solid var(--gh-border);
}

.sim-head h2 {
  margin: 0;
}

.sim-head p {
  margin: 3px 0 0;
  color: var(--gh-muted);
  font-size: 0.85rem;
}

.badge {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 99px;
  background: var(--gh-canvas-subtle);
  font-size: 0.72rem;
  font-weight: 800;
}

.sim-body {
  padding: 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.metric {
  padding: 9px;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-canvas-subtle);
}

.metric span {
  display: block;
  color: var(--gh-muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.metric strong {
  font-size: 1.2rem;
}

.machine {
  padding: 12px;
  border: 1px dashed var(--gh-border);
  border-radius: 12px;
  background: var(--gh-canvas-subtle);
}

.machine-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--gh-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.rows {
  display: grid;
  gap: 7px;
}

.state-row {
  display: grid;
  grid-template-columns: 78px 1fr 70px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--gh-border);
  border-radius: 9px;
  background: var(--gh-canvas);
}

.state-name,
.state {
  font-size: 0.7rem;
  font-weight: 800;
}

.state {
  text-align: right;
}

.bar {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--gh-border-muted);
}

.fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
}

.queue {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--gh-border);
  border-radius: 9px;
  background: var(--gh-canvas);
}

.queue h3 {
  margin: 0 0 7px;
  font-size: 0.73rem;
}

.chips {
  display: flex;
  min-height: 22px;
  gap: 5px;
  flex-wrap: wrap;
}

.chip {
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--gh-canvas-subtle);
  font-size: 0.66rem;
  font-weight: 800;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 3px 0;
  color: var(--gh-muted);
}

.timeline-wrap {
  overflow-x: auto;
}

.timeline {
  min-width: 700px;
}

.trow {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 8px;
  align-items: center;
  margin: 7px 0;
}

.tlabel {
  font-size: 0.7rem;
  font-weight: 800;
}

.track {
  position: relative;
  height: 21px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  background: var(--gh-canvas-subtle);
}

.seg {
  position: absolute;
  top: 0;
  height: 100%;
}

.cursor {
  position: absolute;
  inset-block: 0;
  width: 2px;
  background: var(--gh-fg);
}

.stepper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.simulator-page {
  --simulator-run: #2e9d63;
  --simulator-wait: #f3a51b;
  --simulator-secondary: #7c4dff;
  --simulator-muted: #7b8794;
}

.simulator-page .result-grid .better {
  color: var(--simulator-run);
  font-weight: 900;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  margin-top: 12px;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  overflow: hidden;
}

.result-grid > * {
  padding: 10px;
  border-bottom: 1px solid var(--gh-border);
}

.result-grid > *:nth-child(3n + 2),
.result-grid > *:nth-child(3n + 3) {
  border-left: 1px solid var(--gh-border);
}

.result-grid > *:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.rhead {
  background: var(--gh-canvas-subtle);
  font-weight: 800;
}

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

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

.insight {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-canvas-subtle);
}

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

  .sim-grid,
  .concept-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .simulator-page .hero {
    margin-top: 10px;
    padding: 20px 18px;
  }

  .simulator-page h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .hero-description {
    display: block;
  }

  .workspace-head {
    align-items: flex-start;
  }

  .workspace-head {
    flex-direction: column;
  }

  .simulator-actions {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
  }

  .simulator-actions .simulator-button {
    flex: 1;
    width: auto;
  }

  .controls-grid,
  .simulator-selects {
    grid-template-columns: 1fr;
  }

  .view-tab {
    padding: 9px 5px;
    font-size: 0.78rem;
  }

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

  .step-copy {
    grid-column: 1/-1;
    grid-row: 1;
  }

  .state-row {
    grid-template-columns: 68px 1fr 64px;
  }

  .result-grid > * {
    padding: 8px;
    font-size: 0.75rem;
  }
}

.hero-label::before {
  height: 5px;
}

.workspace-head .simulator-actions {
  display: flex;
  width: auto;
  flex-flow: row nowrap;
  align-items: center;
}

.workspace-head .simulator-actions .simulator-button {
  width: auto;
  min-width: 132px;
  flex: 0 0 auto;
}

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

@media (max-width: 950px) {
  .controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace-head .simulator-actions {
    width: 100%;
    flex-direction: row;
  }

  .workspace-head .simulator-actions .simulator-button {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }
}

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

.sim-card {
  position: relative;
  border-top-width: 4px;
  box-shadow: 0 8px 22px rgba(20, 32, 51, 0.05);
}

.simulator-model-primary {
  border-top-color: #d98b25;
}

.sim-head {
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, var(--gh-canvas-subtle), var(--gh-canvas));
}

.sim-head h2 {
  margin: 2px 0 3px;
  font-size: 1.3rem;
}

.model-label {
  color: var(--gh-muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sim-head .badge {
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  box-shadow: 0 1px 3px rgba(20, 32, 51, 0.06);
}

.simulator-model-primary .badge {
  border-color: color-mix(in srgb, #d98b25 30%, var(--gh-border));
  color: #a66512;
}

.sim-body {
  padding-top: 12px;
}

.metrics {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 11px;
  background: var(--gh-canvas-subtle);
}

.metric {
  padding: 10px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.metric + .metric {
  border-left: 1px solid var(--gh-border);
}

.metric strong {
  font-size: 1.35rem;
  line-height: 1.2;
}

.simulator-model-primary .metric strong {
  color: #a66512;
}

.calculator-page.simulator-page {
  width: var(--funify-page-width, min(1280px, calc(100% - 32px)));
}

.sim-card,
.simulator-model-primary {
  border-top-width: 1px;
  border-top-color: var(--gh-border);
}

.sim-head {
  background: var(--gh-canvas);
}

.model-label {
  color: var(--gh-muted);
  letter-spacing: 0.06em;
}

.model-label b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 18px;
  margin-right: 6px;
  border: 1px solid var(--gh-border);
  border-radius: 4px;
  background: var(--gh-canvas-subtle);
  color: var(--gh-fg);
  font-size: 0.61rem;
  letter-spacing: 0;
}

.sim-head .badge,
.simulator-model-primary .badge {
  border-color: var(--gh-border);
  background: transparent;
  color: var(--gh-muted);
  box-shadow: none;
}

.simulator-model-primary .metric strong {
  color: var(--gh-fg);
}

@media (max-width: 640px) {
  .calculator-page.simulator-page {
    width: min(100% - 20px, 1280px);
  }
}

.concept-first {
  margin-top: 14px;
  padding: 0;
  border: 1px solid var(--gh-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--gh-canvas);
}

.concept-first-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gh-border);
}

.concept-first-head h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.concept-first-head p {
  margin: 0;
  color: var(--gh-muted);
  font-size: 0.88rem;
}

.concept-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.concept-side {
  padding: 20px;
}

.concept-side + .concept-side {
  border-left: 1px solid var(--gh-border);
}

.concept-side h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 1.1rem;
}

.concept-side h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
}

.concept-side.round-marker h3::before {
  border-radius: 50%;
}

.concept-sentence {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 750;
}

.concept-flow {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.concept-flow span {
  padding: 6px 9px;
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  background: var(--gh-canvas-subtle);
  font-size: 0.75rem;
  font-weight: 750;
}

.concept-flow i {
  color: var(--gh-muted);
  font-style: normal;
}

.concept-detail {
  margin: 14px 0 0;
  color: var(--gh-muted);
  font-size: 0.8rem;
}

.simple-demo {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--gh-border);
  border-radius: 16px;
  background: var(--gh-canvas);
}

.simple-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.simple-demo-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.simple-demo-head p {
  margin: 3px 0 0;
  color: var(--gh-muted);
  font-size: 0.8rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.demo-model {
  padding: 14px;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  background: var(--gh-canvas-subtle);
}

.demo-model h3 {
  margin: 0 0 3px;
  font-size: 0.92rem;
}

.demo-message {
  margin: 0 0 12px;
  color: var(--gh-muted);
  font-size: 0.76rem;
}

.demo-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.demo-row > span {
  color: var(--gh-muted);
  font-size: 0.69rem;
  font-weight: 800;
}

.demo-track {
  position: relative;
  height: 20px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 4px;
  background: var(--gh-canvas);
}

.demo-segment {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: var(--left);
  width: var(--width);
  border-radius: 3px;
  transform-origin: left;
  background: #30363d;
}

.demo-segment.waiting {
  background: repeating-linear-gradient(135deg, #d9dde3 0 5px, #f2f4f7 5px 10px);
}

.demo-segment.callback {
  background: #30363d;
}

.simple-demo.is-replaying .demo-segment {
  animation: demoReveal 0.55s ease both;
  animation-delay: var(--delay, 0s);
}

@keyframes demoReveal {
  from {
    opacity: 0;
    transform: scaleX(0);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.demo-legend {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  color: var(--gh-muted);
  font-size: 0.68rem;
}

.demo-legend span::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 2px;
  background: #30363d;
  vertical-align: -1px;
}

.demo-legend .legend-wait::before {
  background: #d9dde3;
}

.demo-note {
  margin: 12px 0 0;
  color: var(--gh-muted);
  font-size: 0.7rem;
  text-align: right;
}

.settings-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--gh-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--gh-border);
}

@media (max-width: 760px) {
  .concept-compare,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .concept-side + .concept-side {
    border-top: 1px solid var(--gh-border);
    border-left: 0;
  }

  .simple-demo-head {
    align-items: flex-start;
  }

  .demo-row {
    grid-template-columns: 58px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .simple-demo.is-replaying .demo-segment {
    animation: none;
  }
}

.simple-demo-head .concept-replay {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  padding: 7px 11px;
  border: 1px solid var(--gh-border);
  border-radius: 7px;
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 32, 51, 0.06);
}

.simple-demo-head .concept-replay:hover {
  border-color: var(--gh-muted);
  background: var(--gh-canvas-subtle);
}

.simple-demo-head .concept-replay:active {
  transform: translateY(1px);
}

.simple-demo-head .concept-replay:focus-visible {
  outline: 2px solid var(--simulator-accent);
  outline-offset: 2px;
}

.concept-replay span {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 520px) {
  .simple-demo-head {
    display: flex;
    flex-direction: row;
  }

  .simple-demo-head .concept-replay {
    white-space: nowrap;
  }

  .concept-replay {
    font-size: 0 !important;
  }

  .concept-replay span {
    font-size: 1rem;
  }
}

.demo-track::after {
  content: '';
  position: absolute;
  z-index: 4;
  top: -2px;
  bottom: -2px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: #e5484d;
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.12);
  opacity: 0;
  pointer-events: none;
}

.simple-demo.is-replaying .demo-track::after {
  animation: demoPlayhead 4.8s linear both;
}

.simple-demo.is-replaying .demo-segment {
  animation: demoReveal 0.7s ease both;
  animation-delay: var(--delay, 0s);
}

.concept-replay.is-playing {
  border-color: var(--simulator-accent);
  color: var(--simulator-accent);
}

.concept-replay.is-playing span {
  animation: replaySpin 1s linear infinite;
}

@keyframes demoPlayhead {
  0% {
    left: 0;
    opacity: 1;
  }

  96% {
    opacity: 1;
  }

  100% {
    left: calc(100% - 2px);
    opacity: 0;
  }
}

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

.demo-track::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0 0 0 0;
  border-radius: 3px;
  background: var(--gh-canvas);
  opacity: 0;
  pointer-events: none;
}

.simple-demo.is-replaying .demo-track::before {
  animation: demoRevealMask 4.8s linear both;
}

.simple-demo.is-replaying .demo-segment {
  animation: none;
}

@keyframes demoRevealMask {
  0% {
    left: 0;
    opacity: 1;
  }

  99.5% {
    left: 99.5%;
    opacity: 1;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

.demo-segment {
  background: #91b7df;
}

.demo-segment.waiting {
  background: repeating-linear-gradient(135deg, #f4cfaa 0 5px, #fff0df 5px 10px);
}

.demo-segment.callback {
  background: #efb0b7;
}

.demo-legend span:first-child::before {
  background: linear-gradient(90deg, #91b7df 0 50%, #9fd4c4 50%);
}

.demo-legend .legend-wait::before {
  background: #f4cfaa;
}

.demo-model h3 small {
  margin-left: 6px;
  color: var(--gh-muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.demo-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  overflow: hidden;
  color: #243447;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.demo-segment.waiting {
  color: #754f2d;
}

.demo-segment.callback {
  color: #713c44;
}

.demo-legend .legend-end::before {
  background: #efb0b7;
}

.demo-segment.productive {
  background: #a9d9c8;
  color: #285f51;
}

.demo-legend .legend-productive::before {
  background: #a9d9c8;
}

.demo-or {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  color: var(--gh-muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.demo-or::before,
.demo-or::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--gh-border);
}

.demo-or span {
  padding: 2px 7px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
}

.single-thread-row {
  padding-top: 1px;
}

.demo-legend span:first-child::before {
  background: #91b7df;
}

.demo-clarifier {
  margin: -6px 0 12px;
  padding-left: 9px;
  border-left: 2px solid #a9d9c8;
  color: var(--gh-muted);
  font-size: 0.7rem;
}

.simulator-state-list-wide .state-row {
  grid-template-columns: 78px minmax(0, 1fr) 92px;
}

.simulator-state-list-wide .state {
  white-space: nowrap;
}

.timeline .track {
  height: 30px;
}

.timeline .tlabel {
  font-size: 0.78rem;
}

.timeline .seg {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  overflow: hidden;
  color: #243447;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.timeline-legend {
  display: flex;
  gap: 12px;
  margin-top: 7px;
  flex-wrap: wrap;
  color: var(--gh-muted);
  font-size: 0.72rem;
}

.timeline-legend span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
}

.tl-legend-start::before {
  background: #91b7df;
}

.tl-legend-wait::before {
  background: #f4cfaa;
}

.tl-legend-free::before {
  background: #a9d9c8;
}

.tl-legend-handle::before {
  background: #efb0b7;
}

.settings-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #7ba7f7;
  transition: color 0.18s ease;
}

.settings-toggle:hover,
.settings-toggle:focus-visible {
  color: #4a82e8;
  background: none;
}

.settings-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simulation-settings-drawer {
  position: fixed;
  inset: 64px 0 0;
  z-index: 90;
  display: grid;
  justify-items: end;
  background: rgba(15, 23, 42, 0.46);
}

.simulation-settings-drawer[hidden] {
  display: none;
}

.simulation-settings-drawer-panel {
  width: min(92vw, 390px);
  height: 100%;
  overflow: auto;
  padding: 16px;
  background: var(--gh-canvas);
  border-left: 1px solid var(--gh-border);
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.24);
  animation: simulationSettingsSlideIn 0.18s ease-out;
}

.simulation-settings-drawer-head {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -16px -16px 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-canvas);
}

.simulation-settings-drawer-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.settings-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gh-fg);
  cursor: pointer;
}

.settings-drawer-close:hover,
.settings-drawer-close:focus-visible {
  background: var(--gh-canvas-subtle);
}

.settings-drawer-close svg {
  display: block;
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simulation-settings-drawer-body {
  padding-top: 18px;
}

.simulation-settings-drawer-body .controls-grid,
.simulation-settings-drawer-body .simulator-selects {
  grid-template-columns: 1fr;
}

.simulation-settings-drawer-body .simulator-selects {
  margin-top: 10px;
}

body.simulation-settings-open {
  overflow: hidden;
}

@keyframes simulationSettingsSlideIn {
  from {
    transform: translateX(24px);
    opacity: 0.65;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .settings-toggle {
    display: inline-flex;
    position: absolute;
    top: 2px;
    right: 0;
  }

  .workspace-head {
    position: relative;
    align-items: flex-start;
    padding-right: 0;
  }

  .workspace-head > div:first-child {
    padding-right: 30px;
  }

  .workspace-head .simulator-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .workspace-head .simulator-actions .simulator-button {
    width: 100%;
    min-width: 0;
  }

  .sim-head .badge {
    display: none;
  }

  .demo-segment {
    font-size: 0;
  }

  .demo-legend span,
  .timeline-legend span {
    position: relative;
    padding-left: 14px;
  }

  .demo-legend span::before,
  .timeline-legend span::before {
    position: absolute;
    top: 0.18em;
    left: 0;
    margin-right: 0;
  }

  .view-tabs,
  .view-panel,
  .view-panel > .simulator-panel,
  .section-head,
  .timeline-wrap {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .view-tab {
    min-width: 0;
    padding-inline: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .timeline-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .stepper > * {
    min-width: 0;
  }

  .stepper .simulator-button {
    width: 100%;
    min-width: 0;
  }

  .simulation-settings-drawer-panel {
    padding: 10px 12px;
  }

  .simulation-settings-drawer-head {
    top: -10px;
    margin: -10px -12px 0;
    padding: 9px 12px;
  }

  .simulation-settings-drawer-body {
    padding-top: 7px;
  }

  .simulation-settings-drawer-body .controls-grid,
  .simulation-settings-drawer-body .simulator-selects {
    gap: 5px;
  }

  .simulation-settings-drawer-body .simulator-selects {
    margin-top: 5px;
  }

  .simulation-settings-drawer-body .simulator-field {
    min-width: 0;
    padding: 6px 9px;
  }

  .simulation-settings-drawer-body .simulator-field label {
    margin-bottom: 0;
    line-height: 1.15;
  }

  .simulation-settings-drawer-body input[type='range'] {
    height: 20px;
    min-height: 20px;
    margin: 0;
  }

  .simulation-settings-drawer-body select {
    box-sizing: border-box;
    min-width: 0;
    min-height: 34px;
    padding-right: 28px;
    font-size: clamp(11px, 3.35vw, 14px);
    white-space: nowrap;
  }
}

/* Source: page-specific hero styles */
body.common-header-overlay .wrap {
  position: relative;
  padding: 0 0 24px;
}

body.common-header-overlay .site-header {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(calc(100% - 32px), 1280px);
  transform: translateX(-50%);
}

body.common-header-overlay .site-header .menu {
  color: #fff;
}

body.common-header-overlay .calculator-page.simulator-page {
  margin-top: 0;
}

.simulator-page .hero {
  min-height: 380px;
  margin-top: 0;
  padding: 126px 42% 42px 38px;
  border: 0;
  border-radius: 24px;
  background: #eaf6ff;
  box-shadow: 0 18px 44px rgba(34, 72, 126, 0.13);
}

.simulator-page .hero::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background:
    linear-gradient(
      90deg,
      rgba(248, 252, 255, 0.98) 0%,
      rgba(239, 248, 255, 0.94) 29%,
      rgba(235, 247, 255, 0.55) 46%,
      rgba(235, 247, 255, 0) 62%
    ),
    url('/resources/pic/categories/computer-hero.webp') center/cover no-repeat;
  content: '';
  opacity: 1;
  pointer-events: none;
}

.simulator-page .hero h1,
.simulator-page .hero .hero-label,
.simulator-page .hero-description {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  body.common-header-overlay .wrap {
    padding: 0 0 10px;
  }

  body.common-header-overlay .site-header {
    width: 100%;
  }

  body.common-header-overlay .site-header .menu {
    color: var(--common-ink);
    text-shadow: none;
  }

  .calculator-page.simulator-page {
    margin-top: 0;
  }

  .simulator-page .hero {
    width: 100%;
    min-height: 530px;
    margin-top: 0;
    margin-left: 0;
    padding: 70px 20px 270px;
    border-radius: 0 0 16px 16px;
    background: #f8fcff;
    box-shadow: none;
    transform: none;
  }

  .simulator-page .hero::after {
    inset: auto 0 0;
    width: 100%;
    height: 280px;
    border-radius: 0 0 16px 16px;
    background:
      linear-gradient(
        180deg,
        #f8fcff 0%,
        rgba(248, 252, 255, 0.96) 7%,
        rgba(248, 252, 255, 0.36) 22%,
        rgba(248, 252, 255, 0) 38%
      ),
      url('/resources/pic/categories/computer-hero.webp') 63% center/auto 100% no-repeat;
    opacity: 1;
  }

  .simulator-page .hero-label {
    margin-bottom: 7px;
    font-size: 0.65rem;
  }

  .simulator-page .hero h1 {
    max-width: 100%;
    font-size: clamp(1.75rem, 7.8vw, 2.1rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
  }

  .simulator-page .hero .lead {
    max-width: 100%;
    margin-top: 1px;
    color: #40536b;
    font-size: 0.8rem;
    line-height: 1.48;
  }
}

/* Compact header shared by the I/O and context-switching simulators. */
.simulator-page .hero.hero--compact {
  min-height: 258px;
  padding: 88px 28px 24px;
}

@media (max-width: 768px) {
  .simulator-page .hero.hero--compact {
    min-height: 350px;
    padding: 70px 20px 170px;
  }

  .simulator-page .hero.hero--compact::after {
    height: 175px;
  }
}

/* Edge-to-edge mobile layout for the systems simulators. */
@media (max-width: 768px) {
  .simulator-full-width-mobile {
    background: var(--color-surface);
  }

  .simulator-full-width-mobile .wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .simulator-full-width-mobile .calculator-page.simulator-page,
  .simulator-full-width-mobile main.simulator-page {
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 0;
  }

  .simulator-full-width-mobile .simulator-page .hero,
  .simulator-full-width-mobile .simulator-page .hero::after {
    border-radius: 0;
  }

  .simulator-full-width-mobile .simulator-page .simulator-panel {
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
  }

  .simulator-full-width-mobile .simulator-page :is(.sim-grid, .concept-grid) {
    gap: 0;
    margin: 0;
  }

  .simulator-full-width-mobile .view-tabs {
    margin-inline: 0;
    padding-inline: 16px;
    border-radius: 0;
  }
}
