:root {
  color-scheme: light;
  --bg: #f8f1df;
  --bg-strong: #f3e5c4;
  --paper: rgba(255, 250, 239, 0.88);
  --paper-solid: #fffaf0;
  --paper-rule: rgba(107, 137, 169, 0.32);
  --paper-margin: rgba(182, 76, 52, 0.46);
  --card-shadow: 0 28px 65px rgba(56, 38, 15, 0.14);
  --ink: #231d14;
  --ink-soft: rgba(35, 29, 20, 0.78);
  --ink-faint: rgba(35, 29, 20, 0.64);
  --highlight: #f0e61e;
  --highlight-soft: rgba(247, 236, 124, 0.62);
  --highlight-deep: #a3921a;
  --line: rgba(35, 29, 20, 0.12);
  --line-strong: rgba(35, 29, 20, 0.2);
  --accent: #0f5f5f;
  --accent-soft: rgba(15, 95, 95, 0.12);
  --button-ink: #0d0a02;
  --code-bg: rgba(35, 29, 20, 0.06);
  --hero-width: min(1180px, calc(100vw - 48px));
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(180deg, #f6ecda 0%, #f2e0b8 100%);
  color: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.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: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--paper-solid);
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
  z-index: 50;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: -10rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(240, 230, 30, 0.28), transparent 68%);
}

.page-glow-right {
  right: -10rem;
  top: 15rem;
  background: radial-gradient(circle, rgba(15, 95, 95, 0.16), transparent 66%);
}

.site-header,
.section,
.site-footer {
  position: relative;
  z-index: 1;
  width: var(--hero-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
  width: var(--hero-width);
  margin: 0.5rem auto 0;
  background: rgba(248, 241, 223, 0.78);
  border: 1px solid rgba(35, 29, 20, 0.08);
  border-radius: 1.1rem;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(56, 38, 15, 0.08);
  z-index: 10;
}

@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(35, 36, 39, 0.78); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 3px 7px rgba(0, 0, 0, 0.12);
}

.brand strong {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand span,
.site-nav a,
.lede,
.feature-card p,
.workflow-step p,
.preview-copy,
.closing-card p,
.site-footer p,
.note-list dd {
  color: var(--ink-soft);
}

.brand span {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.9rem;
}

.site-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.site-nav a {
  position: relative;
  padding: 0.3rem 0;
  font-size: 0.96rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1rem;
  height: 0.25rem;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--highlight), rgba(240, 230, 30, 0));
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--highlight), #f7cf45);
  color: var(--button-ink) !important;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 6px 14px rgba(186, 150, 23, 0.28);
}

.nav-cta::after { display: none; }

.section {
  padding: 4.8rem 0;
}

.section-compact {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  align-items: center;
  gap: 3.5rem;
  padding-top: 3rem;
}

.eyebrow,
.card-kicker,
.panel-title,
.step-number,
.panel-meta,
.note-list dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.18rem 0.55rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2,
.closing-card h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.7rem, 8vw, 6.6rem);
  overflow-wrap: break-word;
}

.lede {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-icon {
  width: 1.05rem;
  height: 1.05rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.button-primary {
  background: linear-gradient(135deg, var(--highlight), #f7cf45);
  color: var(--button-ink);
  box-shadow: 0 12px 24px rgba(186, 150, 23, 0.24);
}

.button-secondary {
  border-color: rgba(35, 29, 20, 0.12);
  background: rgba(255, 255, 255, 0.54);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.stat-row li,
.ribbon-card,
.paper-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 250, 239, 0.9)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 1.9rem,
      rgba(107, 137, 169, 0.08) 1.9rem,
      rgba(107, 137, 169, 0.08) 1.98rem
    );
  border: 1px solid rgba(67, 46, 16, 0.08);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.stat-row li {
  min-width: 8.3rem;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.1rem;
}

.stat-row strong {
  display: block;
  font-size: 1.55rem;
}

.stat-row span {
  color: var(--ink-faint);
  font-size: 0.93rem;
}

.hero-demo-frame {
  position: relative;
  perspective: 1200px;
}

.hero-demo {
  position: relative;
  overflow: hidden;
  border-radius: 1.8rem;
  transform: rotate(1.2deg);
  animation: cardFloat 5.5s ease-in-out infinite;
  transition: transform 400ms ease;
}

.hero-demo.is-settled {
  animation: none;
  transform: rotate(0deg);
}

.hero-demo::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  left: 4.15rem;
  width: 1px;
  background: var(--paper-margin);
  opacity: 0.66;
  pointer-events: none;
}

.window-chrome,
.theme-row,
.demo-status,
.panel-label,
.preview-footer,
.export-tags,
.note-list {
  display: flex;
  align-items: center;
}

.window-chrome {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.4rem;
}

.traffic-lights {
  display: inline-flex;
  gap: 0.45rem;
}

.traffic-lights span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.traffic-lights .red { background: #ec6a5e; }
.traffic-lights .yellow { background: #f5bf4f; }
.traffic-lights .green { background: #61c554; }

.segmented-control,
.theme-row {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.segmented-control {
  justify-content: flex-end;
}

.mode-pill,
.theme-chip {
  padding: 0.42rem 0.82rem;
  border: 1px solid rgba(35, 29, 20, 0.12);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
}

.mode-pill.is-active,
.theme-chip.is-active {
  background: var(--highlight-soft);
  color: var(--button-ink);
  border-color: rgba(163, 146, 26, 0.34);
}

.theme-row {
  padding: 0 1.2rem 1rem;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.97fr) minmax(0, 1.03fr);
  gap: 0.95rem;
  padding: 0 1.2rem 1.2rem;
  transition: grid-template-columns 240ms ease;
}

.panel-block {
  min-height: 27rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(35, 29, 20, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.panel-label {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(35, 29, 20, 0.08);
}

.panel-title,
.card-kicker {
  color: var(--ink-faint);
  font-size: 0.73rem;
  font-weight: 700;
}

.panel-meta {
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 700;
}

.code-sample {
  margin: 0;
  padding: 1.2rem 1.25rem 1.6rem;
  color: var(--ink);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.72;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 1.84rem,
      rgba(107, 137, 169, 0.1) 1.84rem,
      rgba(107, 137, 169, 0.1) 1.92rem
    );
}

.tok-h { color: var(--accent); font-weight: 700; }
.tok-li { color: var(--ink); }
.tok-q { color: var(--ink-soft); font-style: italic; }
.tok-x { color: var(--highlight-deep); font-weight: 700; }

.hero-demo[data-theme="dark"] .tok-h { color: #7fd9d9; }
.hero-demo[data-theme="dark"] .tok-x { color: #f0e61e; }
.hero-demo[data-theme="github"] .tok-h { color: #0969da; }
.hero-demo[data-theme="github"] .tok-q { color: rgba(31, 35, 40, 0.7); }

.rendered-note {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.rendered-note h2,
.rendered-note h3,
.feature-card h3,
.workflow-step h3,
.preview-notes h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: -0.03em;
}

.rendered-note h2 {
  margin: 0;
  font-size: 1.9rem;
}

.rendered-note h3 {
  margin: 0;
  font-size: 1.15rem;
}

.task-list,
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list {
  display: grid;
  gap: 0.75rem;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.check {
  width: 1rem;
  height: 1rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(35, 29, 20, 0.22);
  background: rgba(255, 255, 255, 0.5);
}

.check.on {
  background:
    linear-gradient(135deg, rgba(240, 230, 30, 0.9), rgba(247, 207, 69, 0.9));
  border-color: rgba(163, 146, 26, 0.42);
}

.rendered-note blockquote {
  margin: 0;
  padding: 1rem 1rem 1rem 1.2rem;
  border-left: 0.32rem solid rgba(15, 95, 95, 0.32);
  background: rgba(15, 95, 95, 0.06);
  color: var(--ink-soft);
  line-height: 1.7;
}

.preview-footer {
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(35, 29, 20, 0.12);
}

.preview-footer strong,
.note-list dt {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

.preview-footer span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.95rem;
}

.demo-status {
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0 1.2rem 1.2rem;
}

.demo-status span,
.export-tags span {
  display: inline-flex;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(35, 29, 20, 0.08);
  color: var(--ink-faint);
  font-size: 0.82rem;
}

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

.ribbon-card {
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
}

.ribbon-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
}

.section-heading {
  max-width: 54rem;
  margin-bottom: 2rem;
}

.section-intro {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.95rem;
  line-height: 1.6;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.screenshot-section {
  padding-top: 3.6rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.shot-card {
  grid-column: span 4;
  overflow: hidden;
  border-radius: 1.6rem;
}

.shot-card img {
  width: 100%;
  height: auto;
  background: rgba(255, 255, 255, 0.16);
}

.shot-card figcaption {
  padding: 1.05rem 1.15rem 1.2rem;
}

.shot-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shot-card strong {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.35rem;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.shot-card p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  line-height: 1.68;
}

.shot-featured {
  grid-column: span 7;
}

.shot-tall {
  grid-column: span 5;
}

.shot-wide {
  grid-column: span 6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.workflow-step,
.preview-notes,
.closing-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
}

.feature-card {
  min-height: 17rem;
  padding: 1.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.85rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(240, 230, 30, 0.55), rgba(247, 207, 69, 0.55));
  border: 1px solid rgba(163, 146, 26, 0.32);
  color: var(--button-ink);
}

.feature-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card::after,
.workflow-step::after,
.preview-notes::after,
.closing-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.feature-card h3,
.workflow-step h3,
.preview-notes h3 {
  margin: 0.45rem 0 0.75rem;
  font-size: 1.55rem;
  line-height: 1.03;
}

.feature-card p,
.workflow-step p,
.preview-copy p,
.note-list dd,
.detail-list li,
.closing-card p {
  margin: 0;
  line-height: 1.7;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.workflow-step {
  padding: 1.35rem 1.35rem 1.45rem;
}

.step-number {
  display: inline-block;
  color: var(--highlight-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

.workflow-export {
  background:
    linear-gradient(180deg, rgba(255, 247, 216, 0.92), rgba(255, 250, 239, 0.92)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 1.9rem,
      rgba(107, 137, 169, 0.08) 1.9rem,
      rgba(107, 137, 169, 0.08) 1.98rem
    );
}

.export-tags {
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.preview-copy {
  display: grid;
  gap: 1rem;
  padding-top: 0.3rem;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
}

.detail-list li {
  position: relative;
  padding-left: 1.3rem;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--highlight);
}

.preview-notes {
  padding: 1.5rem;
}

.note-list {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.1rem;
}

.note-list div {
  padding-top: 1rem;
  border-top: 1px dashed rgba(35, 29, 20, 0.13);
}

.note-list div:first-child {
  padding-top: 0;
  border-top: 0;
}

.note-list dd {
  margin: 0.35rem 0 0;
}

.closing-card {
  padding: 2rem;
  text-align: center;
}

.closing-card .eyebrow {
  margin-bottom: 1.15rem;
}

.closing-card h2 {
  max-width: 13ch;
  margin: 0 auto;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.closing-card p {
  max-width: 42rem;
  margin: 1.2rem auto 0;
}

.closing-card .button {
  margin-top: 1.8rem;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  justify-content: center;
  margin-top: 1.8rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid rgba(35, 29, 20, 0.1);
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-brand img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
}

.footer-brand strong {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.05rem;
}

.footer-brand span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.82rem;
}

.footer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--accent);
}

.footer-meta {
  margin: 0;
  text-align: right;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand,
  .footer-meta {
    justify-self: center;
    text-align: center;
  }
}

.hero-demo[data-mode="formatted"] .demo-layout {
  grid-template-columns: 0 minmax(0, 1fr);
}

.hero-demo[data-mode="formatted"] .editor-pane {
  opacity: 0;
  transform: translateX(-0.6rem);
  pointer-events: none;
}

.hero-demo[data-mode="raw"] .demo-layout {
  grid-template-columns: minmax(0, 1fr) 0;
}

.hero-demo[data-mode="raw"] .preview-pane {
  opacity: 0;
  transform: translateX(0.6rem);
  pointer-events: none;
}

.hero-demo[data-mode="raw"] .editor-pane,
.hero-demo[data-mode="formatted"] .preview-pane,
.hero-demo[data-mode="split"] .editor-pane,
.hero-demo[data-mode="split"] .preview-pane {
  opacity: 1;
  transform: translateX(0);
}

.editor-pane,
.preview-pane {
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.hero-demo[data-theme="light"] {
  --paper: rgba(255, 255, 255, 0.88);
  --paper-solid: #ffffff;
  --ink: #171717;
  --ink-soft: rgba(23, 23, 23, 0.76);
  --ink-faint: rgba(23, 23, 23, 0.48);
  --code-bg: rgba(23, 23, 23, 0.05);
}

.hero-demo[data-theme="sepia"] {
  --paper: rgba(255, 250, 239, 0.88);
  --paper-solid: #fff8ea;
  --ink: #231d14;
  --ink-soft: rgba(35, 29, 20, 0.72);
  --ink-faint: rgba(35, 29, 20, 0.48);
  --code-bg: rgba(35, 29, 20, 0.06);
}

.hero-demo[data-theme="github"] {
  --paper: rgba(246, 248, 250, 0.92);
  --paper-solid: #f6f8fa;
  --ink: #1f2328;
  --ink-soft: rgba(31, 35, 40, 0.76);
  --ink-faint: rgba(31, 35, 40, 0.5);
  --paper-margin: rgba(9, 105, 218, 0.28);
  --paper-rule: rgba(9, 105, 218, 0.18);
  --code-bg: rgba(31, 35, 40, 0.06);
}

.hero-demo[data-theme="dark"] {
  --paper: rgba(35, 36, 39, 0.95);
  --paper-solid: #232427;
  --ink: #f4f1eb;
  --ink-soft: rgba(244, 241, 235, 0.76);
  --ink-faint: rgba(244, 241, 235, 0.48);
  --paper-margin: rgba(240, 230, 30, 0.22);
  --paper-rule: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --code-bg: rgba(255, 255, 255, 0.05);
}

.hero-demo[data-theme] {
  background:
    linear-gradient(180deg, var(--paper), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 14%);
  color: var(--ink);
}

.hero-demo[data-theme] .mode-pill,
.hero-demo[data-theme] .theme-chip,
.hero-demo[data-theme] .demo-status span,
.hero-demo[data-theme] .export-tags span {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--paper-solid) 76%, transparent);
  border-color: var(--line);
}

.hero-demo[data-theme] .mode-pill.is-active,
.hero-demo[data-theme] .theme-chip.is-active {
  color: var(--button-ink);
}

.hero-demo[data-theme] .panel-block {
  background: color-mix(in srgb, var(--paper-solid) 72%, transparent);
  border-color: var(--line);
}

.hero-demo[data-theme] .panel-label,
.hero-demo[data-theme] .preview-footer,
.hero-demo[data-theme] .note-list div {
  border-color: var(--line);
}

.hero-demo[data-theme] .code-sample {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper-solid) 18%, transparent), transparent),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 1.84rem,
      var(--paper-rule) 1.84rem,
      var(--paper-rule) 1.92rem
    );
}

.hero-demo[data-theme="dark"] .window-chrome,
.hero-demo[data-theme="dark"] .theme-row,
.hero-demo[data-theme="dark"] .panel-label,
.hero-demo[data-theme="dark"] .rendered-note blockquote {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(1.2deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.15deg);
  }
}

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

  .shot-card,
  .shot-featured,
  .shot-tall,
  .shot-wide {
    grid-column: span 1;
  }

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

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

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2rem;
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 760px) {
  :root {
    --hero-width: min(100vw - 28px, 1180px);
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 1rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .stat-row li {
    min-width: 0;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
    max-width: 100%;
    word-break: break-word;
    hyphens: auto;
  }

  .ribbon,
  .screenshot-grid,
  .feature-grid,
  .workflow-grid,
  .preview-grid,
  .demo-layout {
    grid-template-columns: 1fr;
  }

  .window-chrome,
  .panel-label,
  .preview-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-demo {
    transform: none;
    animation: none;
  }

  .hero-demo::before {
    left: 1.3rem;
  }

  .hero-demo[data-mode="formatted"] .demo-layout,
  .hero-demo[data-mode="raw"] .demo-layout,
  .hero-demo[data-mode="split"] .demo-layout {
    grid-template-columns: 1fr;
  }

  .hero-demo[data-mode="formatted"] .editor-pane,
  .hero-demo[data-mode="raw"] .preview-pane {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
