/* ==========================================================================
   HTML Atelier — product site
   1. Tokens
   2. Base & utilities
   3. Buttons & small parts
   4. Navigation
   5. Hero
   6. Trust bar
   7. Why / contrast
   8. Interactive demo
   9. Feature bento
   10. Workflow, gallery, lightbox
   11. Safety
   12. Install
   13. FAQ
   14. Open source
   15. Final CTA & footer
   16. Motion & responsive
   ========================================================================== */

/* ===== 1. Tokens ========================================================= */
:root {
  color-scheme: light;
  --paper: #fbf7f0;
  --paper-deep: #f5ecdf;
  --paper-warm: #fdf9f2;
  --card: #fffdfa;
  --white: #ffffff;

  --ink: #2f2724;
  --ink-deep: #241c18;
  --ink-soft: #5c4f46;
  --muted: #6f6056;

  --line: rgba(88, 58, 37, 0.12);
  --line-soft: rgba(88, 58, 37, 0.07);
  --line-strong: rgba(88, 58, 37, 0.2);

  --caramel: #a9622f;
  --caramel-deep: #82461d;
  --caramel-ink: #6d3a15;
  --caramel-soft: #f3e3cf;

  --sage: #4f8f79;
  --sage-deep: #306b57;
  --sage-soft: #e0efe7;

  --blue: #4f7fa8;
  --blue-deep: #315f87;
  --blue-soft: #e3eef7;

  --violet: #7566c4;
  --violet-deep: #5847a8;
  --violet-soft: #ece8f9;

  --amber: #c9963f;
  --amber-deep: #8b6418;
  --amber-soft: #f8efd8;

  --font: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei",
    "PingFang SC", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Source Han Serif SC", "Songti SC",
    "STSong", "Noto Serif SC", Georgia, serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, monospace;

  --wrap: 1240px;
  --nav-h: 74px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(64, 43, 29, 0.05),
    0 12px 32px -22px rgba(64, 43, 29, 0.24);
  --shadow-float: 0 18px 44px -26px rgba(64, 43, 29, 0.34);
  --shadow-paper: 0 24px 60px -34px rgba(64, 43, 29, 0.38);
}

/* ===== 2. Base & utilities ============================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 22px);
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 98, 47, 0.42) transparent;
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(169, 98, 47, 0.34);
  background-clip: content-box;
}

html::-webkit-scrollbar-thumb:hover {
  background: rgba(169, 98, 47, 0.55);
  background-clip: content-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(243, 227, 207, 0.55) 0, rgba(251, 247, 240, 0) 720px),
    var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.28;
}

h3 {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.4;
}

p {
  margin: 0;
  text-wrap: pretty;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--caramel-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--caramel-ink);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(117, 102, 196, 0.22);
}

:focus-visible {
  outline: 3px solid rgba(117, 102, 196, 0.5);
  outline-offset: 3px;
  border-radius: 8px;
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.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;
  left: 16px;
  top: -70px;
  z-index: 300;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: top 0.2s ease, opacity 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  opacity: 1;
  pointer-events: auto;
  color: #fff;
}

.tone-caramel {
  --tone: var(--caramel);
  --tone-deep: var(--caramel-deep);
  --tone-soft: var(--caramel-soft);
}

.tone-sage {
  --tone: var(--sage);
  --tone-deep: var(--sage-deep);
  --tone-soft: var(--sage-soft);
}

.tone-blue {
  --tone: var(--blue);
  --tone-deep: var(--blue-deep);
  --tone-soft: var(--blue-soft);
}

.tone-violet {
  --tone: var(--violet);
  --tone-deep: var(--violet-deep);
  --tone-soft: var(--violet-soft);
}

.tone-amber {
  --tone: var(--amber);
  --tone-deep: var(--amber-deep);
  --tone-soft: var(--amber-soft);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  position: relative;
  padding: clamp(64px, 7vw, 96px) 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(32px, 3.6vw, 48px);
}

.section-head h2 {
  max-width: 760px;
}

.section-head .lead {
  max-width: 640px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--caramel-deep);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 2px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--caramel);
}

.fine-print {
  max-width: 940px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(88, 58, 37, 0.06);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.87em;
  overflow-wrap: anywhere;
}

.live-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage);
  animation: breathe 2.8s ease-in-out infinite;
}

/* ===== 3. Buttons & small parts ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fffaf3;
  background: var(--caramel-deep);
  border-color: var(--caramel-deep);
  box-shadow: 0 1px 2px rgba(64, 43, 29, 0.16), 0 8px 20px -12px rgba(130, 70, 29, 0.55);
}

.btn-primary:hover {
  color: #fff;
  background: var(--caramel-ink);
  border-color: var(--caramel-ink);
  box-shadow: 0 1px 2px rgba(64, 43, 29, 0.16), 0 12px 24px -12px rgba(130, 70, 29, 0.6);
}

.btn-soft {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(64, 43, 29, 0.05);
}

.btn-soft:hover {
  color: var(--ink);
  background: #fff;
  border-color: rgba(169, 98, 47, 0.4);
  box-shadow: 0 6px 16px -10px rgba(64, 43, 29, 0.3);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
}

.btn-lg {
  min-height: 54px;
  padding: 0 27px;
  font-size: 15px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(169, 98, 47, 0.32);
  color: var(--caramel-deep);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.text-link .icon {
  width: 15px;
  height: 15px;
}

.text-link:hover {
  border-color: var(--caramel);
  color: var(--caramel-ink);
}

.icon-box {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--tone-soft, var(--caramel-soft));
  color: var(--tone-deep, var(--caramel-deep));
}

.icon-box .icon {
  width: 22px;
  height: 22px;
}

.brand-version,
.tool-zoom,
.status-text,
.tab-count,
.search-count,
.outline-mark,
.status-draft,
.footer-mini {
  font-variant-numeric: tabular-nums;
}

/* ===== 4. Navigation ==================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(251, 247, 240, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
  background: rgba(251, 247, 240, 0.94);
  box-shadow: 0 16px 40px -36px rgba(64, 43, 29, 0.5);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: var(--wrap);
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 9px 20px -12px rgba(146, 80, 31, 0.72);
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand-version {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-menu a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover {
  background: rgba(243, 227, 207, 0.72);
  color: var(--caramel-deep);
}

.nav-menu a:active {
  background: var(--caramel-soft);
}

.nav-menu a.is-active {
  background: rgba(243, 227, 207, 0.92);
  color: var(--caramel-deep);
}

.nav-menu .nav-mobile-link {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-github .icon {
  width: 17px;
  height: 17px;
}

.nav-github:hover {
  background: var(--violet-soft);
  color: var(--violet-deep);
}

.nav-install {
  min-height: 40px;
  padding: 0 16px;
  font-size: 12.5px;
}

.nav-install .icon {
  width: 15px;
  height: 15px;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 250, 0.88);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(169, 98, 47, 0.34);
  background: var(--caramel-soft);
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle .icon {
  width: 20px;
  height: 20px;
}

.nav-toggle-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: block;
}

/* ===== 5. Hero ========================================================== */
.hero {
  position: relative;
  padding: clamp(36px, 4.4vw, 64px) 0 clamp(40px, 4.6vw, 60px);
  overflow: hidden;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(34px, 4vw, 54px);
  align-items: center;
}

.hero-copy {
  animation: heroIn 0.8s 0.04s both;
}

.hero-eyebrow {
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid rgba(169, 98, 47, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--caramel-deep);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.hero-eyebrow::before {
  display: none;
}

h1 .h1-line {
  display: block;
  white-space: nowrap;
}

.h1-accent {
  color: var(--caramel-deep);
}

.hero-lead {
  max-width: 540px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.28vw, 18px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-note .icon {
  width: 14px;
  height: 14px;
  color: var(--sage-deep);
}

.hero-art {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 8px 0 22px;
  animation: heroIn 0.9s 0.14s both;
}

.hero-stage {
  position: relative;
  min-height: 528px;
}

/* paper preview */
.hero-paper {
  position: absolute;
  top: 88px;
  left: 0;
  z-index: 3;
  width: min(80%, 432px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  background:
    repeating-linear-gradient(180deg, rgba(151, 104, 62, 0.026) 0 1px, transparent 1px 5px),
    #f9f3e9;
  box-shadow: var(--shadow-paper);
  transform: rotate(-1.7deg);
  overflow: hidden;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.55s ease;
}

.hero-art:hover .hero-paper {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 52px 100px -52px rgba(64, 43, 29, 0.6);
}

.hero-paper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  background: linear-gradient(225deg, rgba(255, 255, 255, 0) 49%, rgba(255, 253, 248, 0.9) 50%);
  pointer-events: none;
  opacity: 0;
}

.hero-paper-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(143, 101, 65, 0.14);
  background: rgba(255, 252, 246, 0.72);
}

.mini-dots {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(147, 102, 65, 0.28);
}

.mini-dots i:first-child {
  background: rgba(201, 150, 63, 0.7);
}

.paper-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-file .icon {
  width: 10px;
  height: 10px;
}

.paper-view {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-paper-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 6px;
  align-items: center;
  padding: 20px 18px 14px 20px;
}

.hp-eyebrow {
  color: var(--caramel-deep);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hp-title {
  position: relative;
  margin: 25px 0 9px;
  padding: 3px 4px;
  color: #38271d;
  font-family: var(--serif);
  font-size: clamp(21px, 1.9vw, 27px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hp-title.is-selected {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 3px;
  background: rgba(117, 102, 196, 0.06);
}

.sel-label {
  position: absolute;
  left: -2px;
  top: -19px;
  padding: 3px 7px;
  border-radius: 4px 4px 4px 0;
  background: var(--violet);
  color: #fff;
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 6px 12px -8px rgba(88, 71, 168, 0.8);
}

.hp-lead {
  color: #6b5a4e;
  font-size: 10.5px;
  line-height: 1.75;
}

.hp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.hp-meta span {
  padding: 2px 7px;
  border: 1px solid rgba(143, 101, 65, 0.18);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.8);
  color: #7b6a5d;
  font-size: 8px;
  line-height: 1.6;
  white-space: nowrap;
}

.hp-cup {
  width: 100%;
  max-width: 128px;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(59, 36, 24, 0.12));
}

.hero-paper-toc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 0 18px 16px;
}

.hero-paper-toc span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border: 1px solid rgba(143, 101, 65, 0.16);
  border-radius: 6px;
  background: rgba(255, 251, 244, 0.86);
  color: #56463c;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.hero-paper-toc b {
  color: var(--caramel-deep);
  font-family: var(--serif);
  font-weight: 600;
}

.hero-paper-section {
  padding: 12px 18px 18px;
  border-top: 1px dashed rgba(143, 101, 65, 0.2);
}

.hero-paper-section p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  color: #4a382d;
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 700;
}

.hero-paper-section p b {
  color: var(--caramel-deep);
  font-family: var(--serif);
  font-size: 8.5px;
  font-weight: 600;
}

.hero-paper-section i {
  display: block;
  height: 3px;
  margin-top: 4px;
  border-radius: 2px;
  background: rgba(107, 90, 78, 0.16);
}

.hero-paper-section i:nth-of-type(2) {
  width: 84%;
}

.hero-paper-section i.is-short {
  width: 62%;
}

/* hero source card */
.hero-code {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: min(61%, 348px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(201, 150, 63, 0.12), transparent 64%),
    #2c2320;
  box-shadow: 0 34px 70px -40px rgba(36, 28, 24, 0.8);
  color: #d9c9ba;
  transform: rotate(3.2deg);
  overflow: hidden;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-art:hover .hero-code {
  transform: rotate(1.4deg) translateY(-3px);
}

.hero-code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(244, 233, 221, 0.52);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.hero-code-bar .mini-dots i {
  background: rgba(255, 255, 255, 0.18);
}

.hero-code-bar .mini-dots i:first-child {
  background: rgba(201, 150, 63, 0.8);
}

.hero-code-lines {
  margin: 0;
  padding: 12px 14px 16px 16px;
  list-style: none;
  counter-reset: codeLine;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.9;
  color: rgba(236, 219, 203, 0.5);
}

.hero-code-lines li {
  counter-increment: codeLine;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 8px;
  white-space: nowrap;
}

.hero-code-lines li::before {
  content: counter(codeLine);
  color: rgba(236, 219, 203, 0.24);
  text-align: right;
}

.hero-code-lines li > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-code-lines .code-line-content {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.hero-code-lines li.is-dim > span {
  color: rgba(236, 219, 203, 0.26);
}

.hero-code-lines li:nth-child(2) {
  margin: 3px -6px;
  padding: 2px 6px;
  border-left: 2px solid var(--violet);
  border-radius: 3px;
  background: rgba(117, 102, 196, 0.2);
}

.hero-code-lines li:nth-child(2) > span {
  color: #cdbfe9;
}

.hero-code-lines li:nth-child(2) em {
  color: #f0d9bd;
  font-style: normal;
}

.code-pin {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 8px 16px -10px rgba(0, 0, 0, 0.7);
}

.code-pin .icon {
  width: 9px;
  height: 9px;
}

/* hero floating form */
.hero-form {
  position: absolute;
  right: 4px;
  bottom: 6px;
  z-index: 5;
  width: min(58%, 244px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.97);
  box-shadow: var(--shadow-float);
  transform: rotate(-1.2deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-art:hover .hero-form {
  transform: rotate(0.4deg) translateY(-3px);
}

.hero-form-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.hero-form-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
}

.hero-form-icon .icon {
  width: 12px;
  height: 12px;
}

.hero-form-head strong {
  display: block;
  font-size: 9.5px;
  line-height: 1.25;
}

.hero-form-head div > span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.hero-form-mode {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-form-field {
  min-height: 46px;
  padding: 8px 9px;
  border: 1px solid rgba(169, 98, 47, 0.16);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(88, 58, 37, 0.04);
}

.hero-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.hero-form-hint {
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.4;
}

.hero-form-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-form-actions i {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.hero-form-actions b {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--caramel-deep);
  color: #fffaf3;
  font-size: 8px;
  line-height: 1.5;
}

/* ===== 6. Trust bar ===================================================== */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(26px, 2.8vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px 21px;
}

.trust-item + .trust-item {
  border-left: 1px solid var(--line-soft);
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--tone-soft);
  color: var(--tone-deep);
}

.trust-icon .icon {
  width: 18px;
  height: 18px;
}

.trust-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.trust-item div > span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ===== 7. Why / contrast =============================================== */
.why .section-head {
  margin-bottom: clamp(32px, 3.6vw, 46px);
}

.contrast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
  align-items: stretch;
}

.contrast-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 408px;
  padding: clamp(26px, 3vw, 36px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}

.contrast-panel.is-before {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #2c2421;
  box-shadow: 0 24px 56px -40px rgba(36, 28, 24, 0.7);
  color: #f4e9dd;
}

.contrast-panel.is-after {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.panel-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-bottom: 17px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(244, 233, 221, 0.76);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.panel-label .icon {
  width: 14px;
  height: 14px;
}

.is-after .panel-label {
  background: var(--caramel-soft);
  color: var(--caramel-deep);
}

.is-before h3 {
  color: #fbf2e8;
  margin-bottom: 10px;
  font-size: clamp(22px, 2vw, 27px);
}

.is-after h3 {
  margin-bottom: 10px;
  font-size: clamp(22px, 2vw, 27px);
}

.contrast-panel > p {
  max-width: 480px;
  font-size: 14.5px;
  line-height: 1.8;
}

.is-before > p {
  color: rgba(244, 233, 221, 0.66);
}

.is-after > p {
  color: var(--ink-soft);
}

.before-code {
  position: relative;
  margin-top: auto;
  padding: 13px 15px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(14, 11, 10, 0.42);
  overflow: hidden;
}

.before-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(244, 233, 221, 0.4);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.before-code pre {
  margin: 10px 0 0;
  overflow: hidden;
  color: rgba(244, 233, 221, 0.42);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.8;
  white-space: pre;
}

.before-code code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.tok-tag {
  color: rgba(244, 233, 221, 0.28);
}

.tok-attr {
  color: rgba(201, 150, 63, 0.52);
}

.tok-str {
  color: rgba(201, 150, 63, 0.4);
}

.before-note {
  position: absolute;
  right: 13px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(201, 150, 63, 0.16);
  color: #d9b777;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.5;
}

.contrast-arrow {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(169, 98, 47, 0.16);
  border-radius: 50%;
  background: #fffdfa;
  box-shadow: 0 18px 40px -26px rgba(64, 43, 29, 0.45);
  color: var(--caramel-deep);
}

.contrast-arrow .icon {
  width: 19px;
  height: 19px;
}

.quick-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: auto 0 16px;
  padding: 20px 0 0;
  list-style: none;
}

.quick-steps li {
  position: relative;
  min-width: 0;
  padding: 14px 11px 12px;
  border: 1px solid rgba(143, 101, 65, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.7);
}

.quick-steps li + li::before {
  content: "";
  position: absolute;
  top: 27px;
  left: -9px;
  width: 9px;
  border-top: 1px dashed rgba(143, 101, 65, 0.28);
}

.quick-num {
  display: block;
  margin-bottom: 7px;
  color: var(--caramel-deep);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
}

.quick-icon .icon {
  width: 15px;
  height: 15px;
}

.quick-steps strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.4;
}

.quick-steps small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ===== 8. Interactive demo ============================================= */
.demo-section {
  padding: clamp(64px, 7vw, 96px) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-deep);
}

.demo-head {
  margin-bottom: clamp(24px, 2.8vw, 36px);
}

.demo-shell {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.7);
  box-shadow: var(--shadow-paper);
}

.demo-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 8px 12px;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.demo-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(117, 102, 196, 0.13);
  animation: breatheViolet 2.8s ease-in-out infinite;
}

.demo-topnote {
  color: var(--muted);
  font-size: 12.5px;
}

/* app chrome */
.atelier-app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 690px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdfa;
  box-shadow: inset 0 1px 0 #fff;
  overflow: hidden;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #f8f0e5, #f5ebdd);
  color: var(--muted);
  font-size: 10.5px;
}

.app-window-dots {
  display: inline-flex;
  gap: 5px;
  flex: 0 0 auto;
}

.app-window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(143, 101, 65, 0.22);
}

.app-window-dots i:nth-child(1) {
  background: #dca06c;
}

.app-window-dots i:nth-child(2) {
  background: #e4c185;
}

.app-window-dots i:nth-child(3) {
  background: #a9c4b3;
}

.app-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 3px 8px -6px rgba(64, 43, 29, 0.4);
}

.app-tab .icon {
  width: 12px;
  height: 12px;
  color: var(--caramel);
}

.app-dirty {
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--violet);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-dirty.is-on {
  opacity: 1;
}

.app-path {
  margin-left: 2px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.app-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: rgba(91, 61, 40, 0.42);
}

.app-title-actions .icon {
  width: 13px;
  height: 13px;
}

.app-body {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) 326px;
  flex: 1;
  min-height: 0;
}

.atelier-app.tree-hidden .app-tree {
  display: none;
}

.atelier-app.tree-hidden .app-body {
  grid-template-columns: minmax(0, 1fr) 326px;
}

/* file tree */
.app-tree {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line-soft);
  background: #faf4ea;
}

.tree-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 13px 9px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 800;
}

.tree-head .icon {
  width: 13px;
  height: 13px;
  color: var(--caramel);
}

.tree-scroll {
  flex: 1;
  padding: 0 8px 10px;
  overflow-y: auto;
}

.tree-folder {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
}

.tree-folder .icon {
  width: 12px;
  height: 12px;
  color: rgba(91, 61, 40, 0.48);
}

.tree-folder.is-open {
  color: var(--ink);
  font-weight: 700;
}

.tree-folder.is-open .icon:nth-child(2) {
  color: var(--caramel);
}

.tree-folder.is-small {
  margin-left: 8px;
  font-weight: 500;
}

.tree-children {
  margin-left: 15px;
  padding-left: 5px;
  border-left: 1px solid rgba(143, 101, 65, 0.12);
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tree-file .icon {
  width: 11px;
  height: 11px;
  color: rgba(91, 61, 40, 0.4);
}

.tree-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-file em {
  margin-left: auto;
  color: rgba(91, 61, 40, 0.34);
  font-family: var(--mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.05em;
}

.tree-file:hover {
  background: rgba(243, 227, 207, 0.54);
  color: var(--caramel-deep);
}

.tree-file.is-current {
  border-color: rgba(169, 98, 47, 0.16);
  background: #fffaf3;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 3px 8px -7px rgba(64, 43, 29, 0.5);
}

.tree-file.is-current .icon {
  color: var(--caramel);
}

.tree-file.is-current em {
  color: var(--caramel);
}

.tree-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8.5px;
}

.tree-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

/* workspace */
.app-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #f2e9dc;
}

.app-previewpane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.app-previewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 33px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-bottom: 1px solid rgba(143, 101, 65, 0.1);
  background: rgba(255, 252, 247, 0.7);
  color: var(--muted);
  font-size: 9px;
}

.previewbar-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-weight: 700;
}

.previewbar-label .icon {
  width: 11px;
  height: 11px;
  color: var(--caramel);
}

.previewbar-hint {
  color: var(--violet-deep);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.page-scroll {
  flex: 1;
  min-height: 0;
  padding: 15px 16px 26px;
  overflow: auto;
  background-image: radial-gradient(rgba(143, 101, 65, 0.14) 1px, transparent 1px);
  background-size: 17px 17px;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 98, 47, 0.35) transparent;
}

.page-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.page-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(169, 98, 47, 0.32);
}

.page-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* source pane */
.app-sourcepane {
  display: none;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(360px 220px at 100% 0%, rgba(201, 150, 63, 0.1), transparent 64%),
    #2a221f;
}

.app-sourcebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(244, 233, 221, 0.54);
  font-size: 9px;
}

.sourcebar-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ecdfd1;
  font-weight: 700;
}

.sourcebar-title .icon {
  width: 11px;
  height: 11px;
  color: var(--amber);
}

.sourcebar-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 8.5px;
}

.sourcebar-type {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 233, 221, 0.5);
  font-family: var(--mono);
  font-size: 7px;
}

.source-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 150, 63, 0.38) transparent;
}

.source-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.source-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(201, 150, 63, 0.32);
}

.source-code {
  min-width: max-content;
  padding: 9px 0 18px;
  color: #d8c8b9;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.85;
}

.source-code:focus-visible {
  outline-offset: -3px;
}

.src-line {
  display: grid;
  grid-template-columns: 35px minmax(max-content, 1fr);
  align-items: flex-start;
  min-height: 1.85em;
  padding: 0 14px 0 0;
  border-left: 2px solid transparent;
  cursor: default;
}

.src-line.is-clickable {
  cursor: pointer;
}

.src-line.is-clickable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.src-num {
  padding-right: 9px;
  color: rgba(244, 233, 221, 0.22);
  font-size: 8.5px;
  text-align: right;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.src-text {
  display: block;
  white-space: pre;
  color: #e6d8c9;
}

.src-text .src-tag {
  color: #d7a26b;
}

.src-text .src-token {
  color: #e6d8c9;
}

.src-line.is-selected .src-text .src-tag {
  color: #f0c78f;
}

.src-line.is-selected .src-text .src-token {
  color: #fff3e3;
}

.src-line.is-flash .src-text .src-tag {
  color: #e8c88f;
}

.src-line.is-selected {
  border-left-color: var(--violet);
  background: rgba(117, 102, 196, 0.2);
}

.src-line.is-selected .src-num {
  color: rgba(205, 191, 233, 0.85);
}

.src-line.is-selected .src-text {
  color: #f1e7ff;
}

.src-line.is-flash {
  border-left-color: var(--amber);
  background: rgba(201, 150, 63, 0.16);
  animation: sourceFlash 1.3s ease;
}

.src-line.is-flash .src-num {
  color: #e8c88f;
}

/* panel */
.app-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: #fffdfa;
  overflow: hidden;
}

.panel-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-file img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 5px 12px -8px rgba(146, 80, 31, 0.6);
}

.panel-file div {
  min-width: 0;
}

.panel-file strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-file div > span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.panel-file-badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.5;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--line-soft);
}

.tool-btn,
.tool-zoom {
  display: grid;
  place-items: center;
  height: 23px;
  min-width: 23px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tool-btn:hover,
.tool-zoom:hover {
  background: var(--caramel-soft);
  color: var(--caramel-deep);
}

.tool-btn:active,
.tool-zoom:active {
  transform: scale(0.95);
}

.tool-btn .icon {
  width: 12px;
  height: 12px;
}

.tool-btn[data-tool="后退"] .icon {
  transform: rotate(180deg);
}

.tool-sep {
  width: 1px;
  height: 13px;
  margin: 0 4px;
  background: var(--line);
}

.tool-spacer {
  flex: 1;
}

.tool-zoom {
  width: 34px;
  min-width: 34px;
  font-family: var(--mono);
  font-size: 7.5px;
  font-variant-numeric: tabular-nums;
}

/* mode segmented control */
.mode-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin: 8px 10px 0;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f6efe5;
}

.mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 25px;
  padding: 0 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mode-switch button .icon {
  width: 10px;
  height: 10px;
}

.mode-switch button:hover {
  background: rgba(255, 253, 249, 0.8);
  color: var(--caramel-deep);
}

.mode-switch button.is-active {
  background: #fffdfa;
  color: var(--caramel-deep);
  box-shadow: 0 3px 8px -6px rgba(64, 43, 29, 0.5);
}

.mode-switch button[data-mode="edit"].is-active {
  background: var(--violet-soft);
  color: var(--violet-deep);
}

/* search */
.panel-search {
  padding: 8px 10px 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(169, 98, 47, 0.44);
  box-shadow: 0 0 0 2px rgba(169, 98, 47, 0.1);
}

.search-box .icon {
  width: 11px;
  height: 11px;
  color: var(--muted);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 9px;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(135, 119, 106, 0.74);
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-count {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(143, 101, 65, 0.07);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.6;
  white-space: nowrap;
}

.search-count.is-match {
  background: var(--violet-soft);
  color: var(--violet-deep);
}

.search-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
}

/* panel tabs */
.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 30px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.panel-tabs button::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s ease;
}

.panel-tabs button:hover {
  color: var(--caramel-deep);
  background: rgba(243, 227, 207, 0.32);
}

.panel-tabs button[aria-selected="true"] {
  color: var(--caramel-deep);
}

.panel-tabs button[aria-selected="true"]::after {
  background: var(--caramel);
}

.tab-count {
  padding: 0 3px;
  border-radius: 3px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.panel-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 98, 47, 0.3) transparent;
}

.panel-body::-webkit-scrollbar {
  width: 7px;
}

.panel-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(169, 98, 47, 0.28);
}

.panel-section {
  padding: 10px 11px 14px;
}

.panel-section:focus-visible {
  outline-offset: -3px;
}

.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
}

.panel-subhead span:last-child {
  font-family: var(--mono);
  font-size: 7px;
}

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 255px;
  padding: 26px 20px 18px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--violet-soft), rgba(243, 227, 207, 0.72));
  color: var(--violet-deep);
}

.empty-icon .icon {
  width: 19px;
  height: 19px;
}

.panel-empty strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
}

.panel-empty p {
  max-width: 220px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.empty-hint {
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #faf4ea;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
}

.panel-empty-compact {
  min-height: 190px;
  padding-top: 18px;
}

.panel-empty-compact .empty-icon {
  width: 36px;
  height: 36px;
}

.panel-empty-line {
  padding: 24px 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}

/* edit form */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-type {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
}

.form-type-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--violet-soft);
  color: var(--violet-deep);
}

.form-type-icon .icon {
  width: 11px;
  height: 11px;
}

.form-type strong {
  font-size: 9.5px;
  line-height: 1.4;
}

.form-type span {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.form-field label,
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.5;
}

.form-field label span,
.form-label-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
}

.form-field textarea,
.form-field input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  color: var(--ink);
  font: inherit;
  font-size: 9.5px;
  line-height: 1.65;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field textarea {
  min-height: 74px;
  resize: vertical;
}

.form-field input {
  height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}

.form-field textarea:focus,
.form-field input:focus {
  border-color: rgba(117, 102, 196, 0.55);
  box-shadow: 0 0 0 2px rgba(117, 102, 196, 0.1);
}

.form-field input[readonly] {
  background: #f8f2e9;
  color: var(--muted);
}

.form-hint {
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfa;
  color: var(--ink-soft);
  font: inherit;
  font-size: 8px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mini-btn .icon {
  width: 10px;
  height: 10px;
}

.mini-btn:hover {
  border-color: rgba(169, 98, 47, 0.32);
  background: #fffaf3;
  color: var(--caramel-deep);
}

.mini-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.mini-btn.is-quiet {
  margin-left: auto;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.mini-btn.is-quiet:hover {
  background: #faf4ea;
  color: var(--caramel-deep);
}

.choose-image {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: 1px;
  color: var(--caramel-deep);
  font-size: 8px;
  font-weight: 650;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.choose-image:hover {
  text-decoration: underline;
}

.choose-image .icon {
  width: 10px;
  height: 10px;
}

/* outline */
.outline-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.outline-item button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 9px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.outline-item button:hover {
  background: #faf4ea;
  color: var(--caramel-deep);
}

.outline-item.is-h1 button {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.outline-item.is-h2 button {
  font-weight: 650;
}

.outline-item.is-h3 button {
  padding-left: 14px;
  color: var(--ink-soft);
  font-size: 8.5px;
}

.outline-mark {
  flex: 0 0 auto;
  width: 16px;
  padding: 1px 0;
  border-radius: 3px;
  background: rgba(169, 98, 47, 0.08);
  color: var(--caramel);
  font-family: var(--mono);
  font-size: 6.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.outline-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* changes */
.changes-list {
  display: grid;
  gap: 6px;
}

.change-item {
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fffefb;
}

.change-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.change-type {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-size: 6.5px;
  font-weight: 700;
  line-height: 1.5;
}

.change-head strong {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-head button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--caramel-deep);
  font: inherit;
  font-size: 7px;
  cursor: pointer;
}

.change-head button:hover {
  text-decoration: underline;
}

.change-old,
.change-new {
  display: block;
  font-size: 8px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.change-old {
  color: var(--muted);
}

.change-old b,
.change-new b {
  display: inline-block;
  min-width: 38px;
  margin-right: 2px;
  color: rgba(135, 119, 106, 0.8);
  font-size: 6.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.change-old del {
  text-decoration-color: rgba(135, 119, 106, 0.55);
}

.change-new {
  color: var(--ink);
}

.change-new mark {
  padding: 0 2px;
  border-radius: 2px;
  background: rgba(201, 150, 63, 0.24);
  color: var(--ink);
}

/* resources */
.res-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.res-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fffefb;
}

.res-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--tone-soft);
  color: var(--tone-deep);
}

.res-icon .icon {
  width: 11px;
  height: 11px;
}

.res-info {
  min-width: 0;
}

.res-info strong {
  display: block;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-info span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.res-state {
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 6.5px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.res-state.is-ok {
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.res-state.is-missing {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.res-state.is-remote {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.res-state.is-inline {
  background: var(--violet-soft);
  color: var(--violet-deep);
}

.res-source {
  padding: 0;
  border: 0;
  background: none;
  color: var(--caramel-deep);
  font: inherit;
  font-size: 7px;
  font-weight: 650;
  cursor: pointer;
}

.res-source:hover {
  text-decoration: underline;
}

.panel-footnote {
  margin-top: 8px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.6;
}

/* status bar */
.app-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 6px 10px 6px 13px;
  border-top: 1px solid var(--line-soft);
  background: #fbf4e9;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 8.5px;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage);
  transition: background 0.2s ease;
}

.status-dot.is-dirty {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(117, 102, 196, 0.12);
}

.status-text {
  color: var(--ink-soft);
  font-size: 8.5px;
  line-height: 1.4;
  white-space: nowrap;
}

.status-text.is-saved {
  color: var(--sage-deep);
  font-weight: 650;
}

.status-draft {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(224, 239, 231, 0.9);
  color: var(--sage-deep);
  font-size: 7px;
  line-height: 1.5;
  white-space: nowrap;
}

.status-draft .icon {
  width: 8px;
  height: 8px;
  stroke-width: 2.4;
}

.status-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.status-icon .icon {
  width: 12px;
  height: 12px;
}

.status-icon:hover:not(:disabled) {
  background: var(--caramel-soft);
  color: var(--caramel-deep);
}

.status-icon:disabled {
  opacity: 0.34;
  cursor: default;
}

.status-save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 27px;
  padding: 0 11px;
  border: 1px solid rgba(109, 58, 21, 0.22);
  border-radius: 6px;
  background: linear-gradient(135deg, #a9622f, #8b4a1c);
  color: #fffaf3;
  font: inherit;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 7px 14px -10px rgba(109, 58, 21, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.status-save .icon {
  width: 10px;
  height: 10px;
}

.status-save:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #955425, #774017);
  box-shadow: 0 10px 18px -10px rgba(109, 58, 21, 0.8);
}

.status-save:active {
  transform: translateY(0) scale(0.98);
}

.app-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  max-width: min(92%, 440px);
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(44, 35, 32, 0.96);
  box-shadow: 0 16px 30px -20px rgba(36, 28, 24, 0.8);
  color: #fbf2e8;
  font-size: 9.5px;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* mode states */
.atelier-app[data-mode="source"] .app-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.atelier-app[data-mode="source"] .app-previewpane {
  display: none;
}

.atelier-app[data-mode="source"] .app-sourcepane {
  display: flex;
}

.atelier-app[data-mode="split"] .app-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.atelier-app[data-mode="split"] .app-sourcepane {
  display: flex;
  order: -1;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.atelier-app[data-mode="split"] .app-previewpane {
  order: 1;
}

.atelier-app[data-mode="split"] .page-scroll {
  padding: 12px 12px 20px;
}

.atelier-app[data-mode="split"] .coffee {
  font-size: 12px;
}

.atelier-app[data-mode="preview"] .demo-page [data-obj] {
  cursor: default;
}

.atelier-app[data-mode="source"] .demo-page [data-obj] {
  cursor: default;
}

/* demo page — scoped recreation of the coffee note */
.demo-page {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
}

.coffee {
  position: relative;
  color: #2b211b;
  background: #f7f1e8;
  border-radius: 9px;
  box-shadow:
    0 26px 50px -34px rgba(59, 36, 24, 0.45),
    0 0 0 1px rgba(59, 36, 24, 0.04);
  font-family: "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", var(--font);
  font-size: 13px;
  line-height: 1.8;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.coffee-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: center;
  padding: 30px 28px 22px;
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(243, 226, 205, 0.86), transparent 62%),
    linear-gradient(180deg, #f9f4ec 0%, #f7f1e8 100%);
}

.coffee-eyebrow {
  margin-bottom: 7px;
  color: #b8743f;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.coffee-title {
  margin: 0 0 8px;
  color: #3b2418;
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 31px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.coffee-lead {
  color: #6b5a4e;
  font-size: 11.5px;
  line-height: 1.78;
}

.coffee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.coffee-meta span {
  padding: 1px 8px;
  border: 1px solid #e2d5c3;
  border-radius: 999px;
  background: #fffaf3;
  color: #6b5a4e;
  font-size: 8.5px;
  line-height: 1.65;
  white-space: nowrap;
}

.coffee-art {
  margin: 0;
  display: flex;
  justify-content: center;
}

.coffee-art img {
  width: 100%;
  max-width: 132px;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(59, 36, 24, 0.14));
}
.coffee-toc {
  display: flex;
  gap: 6px;
  padding: 0 28px 8px;
  background: #f7f1e8;
}

.coffee-toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #e2d5c3;
  border-radius: 7px;
  background: #fffaf3;
  color: #2b211b;
  font-size: 9.5px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.coffee-toc a b {
  color: #b8743f;
  font-family: var(--serif);
  font-size: 8.5px;
  font-weight: 600;
}

.coffee-main {
  padding: 4px 28px 18px;
  background: #f7f1e8;
}

.coffee-section {
  padding: 22px 0 12px;
  border-bottom: 1px dashed #e2d5c3;
}

.coffee-section:last-child {
  border-bottom: 0;
}

.coffee-num {
  display: block;
  color: #b8743f;
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.coffee-h2 {
  margin: 1px 0 6px;
  color: #3b2418;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.coffee-section > p {
  margin-bottom: 10px;
  color: #2b211b;
  font-size: 11.5px;
  line-height: 1.82;
}

.coffee-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}

.coffee-card {
  padding: 11px 11px 10px;
  border: 1px solid #e2d5c3;
  border-radius: 9px;
  background: #fffaf3;
  box-shadow: 0 8px 18px -16px rgba(59, 36, 24, 0.35);
}

.coffee-origin {
  display: block;
  color: #6b5a4e;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.coffee-card h4 {
  margin: 1px 0 4px;
  color: #3b2418;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.coffee-card p {
  margin-bottom: 7px;
  color: #6b5a4e;
  font-size: 8.5px;
  line-height: 1.7;
}

.coffee-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1dcc6;
  color: #3b2418;
  font-size: 7px;
  line-height: 1.6;
}

.coffee-roast {
  margin: 10px 0 8px;
}

.coffee-roast-bar {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9a66b 0%, #a86a3a 45%, #5b3421 75%, #2b1810 100%);
}

.coffee-roast-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: #6b5a4e;
  font-size: 7.5px;
}

.coffee-section .is-plain {
  color: #6b5a4e;
  font-size: 11px;
}

.coffee-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.coffee-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 7px;
}

.coffee-steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b2418;
  color: #fff;
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 600;
}

.coffee-steps b {
  color: #3b2418;
  font-size: 9.5px;
  line-height: 1.6;
}

.coffee-steps span {
  color: #6b5a4e;
  font-size: 8.5px;
  line-height: 1.65;
}

.coffee-tablewrap {
  margin: 8px 0 12px;
  overflow-x: auto;
}

.coffee-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  background: #fffaf3;
  font-size: 8.5px;
  text-align: left;
}

.coffee-table th,
.coffee-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e2d5c3;
}

.coffee-table th {
  background: #efe5d6;
  color: #3b2418;
  font-weight: 600;
}

.coffee-table td {
  color: #6b5a4e;
}

.coffee-quote {
  margin: 6px 0 8px;
  padding: 11px 14px;
  border-left: 3px solid #b8743f;
  border-radius: 0 8px 8px 0;
  background: #fffaf3;
  color: #3b2418;
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.7;
}

.coffee-quote cite {
  display: block;
  margin-top: 4px;
  color: #6b5a4e;
  font-family: var(--font);
  font-size: 8px;
  font-style: normal;
}

.coffee-foot {
  padding: 14px 28px 22px;
  background: #f7f1e8;
  color: #6b5a4e;
  font-size: 8px;
  line-height: 1.7;
}

.coffee-foot a {
  color: #b8743f;
  text-decoration: none;
  border-bottom: 1px solid #f1dcc6;
}

/* Compact page when the workbench pane gets narrow (split mode / small screens) */
.demo-page.coffee.is-compact {
  font-size: 11.5px;
}

.demo-page.is-compact .coffee-hero {
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 6px;
  padding: 20px 16px 14px;
}

.demo-page.is-compact .coffee-eyebrow {
  margin-bottom: 5px;
  font-size: 8px;
}

.demo-page.is-compact .coffee-title {
  margin-bottom: 6px;
  font-size: 21px;
  line-height: 1.35;
  white-space: normal;
}

.demo-page.is-compact .coffee-lead {
  font-size: 10px;
  line-height: 1.7;
}

.demo-page.is-compact .coffee-meta {
  gap: 4px;
  margin-top: 7px;
}

.demo-page.is-compact .coffee-meta span {
  padding: 1px 6px;
  font-size: 7px;
}

.demo-page.is-compact .coffee-art img {
  max-width: 84px;
}

.demo-page.is-compact .coffee-art {
  width: 84px;
}

.demo-page.is-compact .coffee-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 0 16px 6px;
}

.demo-page.is-compact .coffee-toc a {
  padding: 5px 7px;
  font-size: 8.5px;
}

.demo-page.is-compact .coffee-main {
  padding: 2px 16px 12px;
}

.demo-page.is-compact .coffee-num {
  font-size: 8px;
}

.demo-page.is-compact .coffee-h2 {
  font-size: 15px;
  line-height: 1.45;
}

.demo-page.is-compact .coffee-section {
  padding: 16px 0 10px;
}

.demo-page.is-compact .coffee-section > p {
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 1.75;
}

.demo-page.is-compact .coffee-cards {
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 9px 0 4px;
}

.demo-page.is-compact .coffee-card {
  padding: 9px 9px 8px;
}

.demo-page.is-compact .coffee-origin {
  font-size: 6.5px;
}

.demo-page.is-compact .coffee-card h4 {
  font-size: 12px;
}

.demo-page.is-compact .coffee-card p {
  margin-bottom: 5px;
  font-size: 8px;
  line-height: 1.65;
}

.demo-page.is-compact .coffee-tag {
  font-size: 6.5px;
}

.demo-page.is-compact .coffee-roast-labels {
  font-size: 7px;
}

.demo-page.is-compact .coffee-steps {
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 9px 0 10px;
}

.demo-page.is-compact .coffee-steps b {
  font-size: 9px;
}

.demo-page.is-compact .coffee-steps span {
  font-size: 8px;
}

.demo-page.is-compact .coffee-table {
  font-size: 8px;
}

.demo-page.is-compact .coffee-table th,
.demo-page.is-compact .coffee-table td {
  padding: 4px 6px;
}

.demo-page.is-compact .coffee-quote {
  padding: 10px 12px;
  font-size: 9.5px;
}

.demo-page.is-compact .coffee-foot {
  padding: 12px 16px 16px;
  font-size: 7.5px;
}

/* selection states */
.demo-page [data-obj] {
  position: relative;
  border-radius: 3px;
  transition: outline-color 0.16s ease, background 0.16s ease;
}

.atelier-app[data-mode="edit"] .demo-page [data-obj]:hover {
  outline: 1.5px dashed rgba(117, 102, 196, 0.62);
  outline-offset: 3px;
  background: rgba(117, 102, 196, 0.035);
}

.atelier-app[data-mode="split"] .demo-page [data-obj]:hover {
  outline: 1.5px dashed rgba(117, 102, 196, 0.55);
  outline-offset: 3px;
}

.demo-page [data-obj].is-selected {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  background: rgba(117, 102, 196, 0.06);
}

.coffee-img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.demo-page [data-obj].is-selected::after {
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: -2px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 3px 3px 3px 0;
  background: var(--violet);
  color: #fff;
  font-family: var(--font);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 5px 10px -7px rgba(88, 71, 168, 0.8);
}

.demo-page [data-obj].is-flash {
  outline: 2px dashed var(--violet);
  outline-offset: 4px;
  animation: flashRing 1.5s ease;
}

.demo-page [data-obj][data-static-hint] {
  cursor: pointer;
}

/* demo footer */
.demo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 6px 2px;
}

.demo-foot p {
  max-width: 660px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.demo-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.demo-foot-actions .btn {
  font-size: 13px;
}

/* ===== 9. Feature bento ================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card > * {
  position: relative;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(64, 43, 29, 0.05), 0 18px 40px -24px rgba(64, 43, 29, 0.3);
}

/* Flat tints keep the white mockups inside each card readable. */
.feature-diff {
  grid-column: span 7;
  background: #f9efe2;
}

.feature-modes {
  grid-column: span 5;
  background: #f6f3fb;
}

.feature-small {
  grid-column: span 4;
}

.feature-small.tone-sage {
  background: #f1f8f4;
}

.feature-small.tone-blue {
  background: #f1f6fb;
}

.feature-small.tone-amber {
  background: #fcf6ea;
}

.feature-links {
  grid-column: span 12;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: #faf3ea;
}

.feature-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.4;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.8;
}

.feature-diff-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: center;
}

.diff-visual {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: 0 18px 36px -32px rgba(64, 43, 29, 0.45);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.7;
  overflow: hidden;
}

.diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(143, 101, 65, 0.12);
  color: var(--muted);
  font-size: 7.5px;
}

.diff-head span:last-child {
  color: var(--caramel-deep);
}

.diff-line {
  display: grid;
  grid-template-columns: 11px 17px minmax(0, 1fr);
  gap: 3px;
  align-items: baseline;
  margin: 0 -3px;
  padding: 1px 3px;
  border-radius: 3px;
}

.diff-line code {
  padding: 0;
  background: none;
  color: var(--ink-soft);
  font-size: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diff-line.is-quiet {
  opacity: 0.44;
}

.diff-line:not(.is-quiet) {
  background: rgba(169, 98, 47, 0.08);
  box-shadow: inset 2px 0 0 var(--caramel);
}

.diff-sign {
  color: var(--caramel);
}

.diff-gutter {
  color: rgba(135, 119, 106, 0.45);
  font-size: 7px;
  text-align: right;
}

.diff-line mark {
  padding: 0 2px;
  border-radius: 2px;
  background: rgba(201, 150, 63, 0.36);
  color: var(--ink);
}

.d-tag {
  color: rgba(111, 92, 78, 0.56);
}

.d-attr {
  color: rgba(111, 92, 78, 0.46);
}

.d-str {
  color: rgba(111, 92, 78, 0.52);
}

.d-comment {
  color: rgba(135, 119, 106, 0.62);
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}

.feature-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--tone-deep, var(--caramel-deep));
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.mode-demo {
  margin: 16px 0 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  background: rgba(255, 253, 249, 0.72);
}

.mode-demo-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(117, 102, 196, 0.08);
}

.mode-demo-switch span {
  padding: 3px 2px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.mode-demo-switch span.is-on {
  background: #fffdfa;
  color: var(--violet-deep);
  box-shadow: 0 3px 7px -6px rgba(64, 43, 29, 0.5);
}

.mode-demo-panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.mdp {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 50px;
  padding: 5px;
  border: 1px solid rgba(143, 101, 65, 0.12);
  border-radius: 5px;
  background: #fffefb;
}

.mdp i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(117, 102, 196, 0.18);
}

.mdp i:nth-child(2) {
  width: 78%;
}

.mdp i:nth-child(3) {
  width: 62%;
}

.mdp i:nth-child(4) {
  width: 84%;
}

.mdp b {
  display: block;
  height: 10px;
  margin-top: auto;
  border-radius: 2px;
  background: rgba(169, 98, 47, 0.18);
}

.mdp-preview b {
  height: 16px;
  margin-top: 0;
  background: rgba(169, 98, 47, 0.16);
}

.mdp-preview i:nth-of-type(1) {
  width: 88%;
}

.mdp-preview i:nth-of-type(2) {
  width: 64%;
}

.mdp-source {
  background: #2c2320;
}

.mdp-source i {
  background: rgba(244, 233, 221, 0.2);
}

.mdp-source i:nth-child(2) {
  width: 66%;
  background: rgba(201, 150, 63, 0.52);
}

.mdp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  align-content: start;
  gap: 3px;
  background: linear-gradient(90deg, #2c2320 0 49%, #fffefb 50%);
}

.mdp-split i {
  grid-column: 1;
  background: rgba(244, 233, 221, 0.2);
}

.mdp-split b {
  grid-column: 2;
  margin-top: 0;
}

.mdp-split i:nth-of-type(2) {
  grid-column: 1;
  background: rgba(201, 150, 63, 0.5);
}

.mdp-split i:nth-of-type(3) {
  grid-column: 2;
  width: 80%;
  height: 8px;
  background: rgba(169, 98, 47, 0.18);
}

.mini-tabs {
  display: grid;
  gap: 4px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.mini-tabs li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(224, 239, 231, 0.9);
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.62);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.mini-tabs li:first-child {
  border-color: rgba(79, 143, 121, 0.26);
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-weight: 700;
}

.mini-tabs .icon {
  width: 12px;
  height: 12px;
  color: var(--sage-deep);
}

.feature-small .feature-meta span {
  background: rgba(224, 239, 231, 0.72);
}

.feature-small.tone-blue .feature-meta span {
  background: rgba(227, 238, 247, 0.82);
  color: var(--blue-deep);
}

.feature-small.tone-amber .feature-meta span {
  background: rgba(248, 239, 216, 0.9);
  color: var(--amber-deep);
}

.merge-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 15px;
  padding: 9px;
  border: 1px solid rgba(227, 238, 247, 0.9);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.62);
}

.merge-source {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(79, 127, 168, 0.16);
  border-radius: 5px;
  background: #fffefb;
  color: var(--ink-soft);
  font-size: 7.5px;
  line-height: 1.4;
  text-align: center;
}

.merge-source i {
  display: block;
  margin-top: 1px;
  color: var(--blue);
  font-size: 6.5px;
  font-style: normal;
}

.merge-arrow {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 1px 0;
  color: var(--blue);
}

.merge-arrow .icon {
  width: 11px;
  height: 11px;
}

.merge-result {
  grid-column: 1 / -1;
  padding: 4px 5px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 7.5px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.embed-visual {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid rgba(248, 239, 216, 0.95);
  border-radius: 11px;
  background: rgba(255, 253, 249, 0.6);
}

.embed-code {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 5px;
  background: #2c2320;
  color: rgba(244, 233, 221, 0.48);
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.55;
  white-space: nowrap;
}

.embed-code em {
  color: rgba(201, 150, 63, 0.82);
  font-style: normal;
}

.embed-arrow {
  flex: 0 0 auto;
  color: var(--amber-deep);
}

.embed-arrow .icon {
  width: 11px;
  height: 11px;
}

.embed-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(143, 101, 65, 0.14);
  border-radius: 6px;
  background: #f7f1e8;
}

.embed-dots {
  display: inline-flex;
  gap: 2px;
}

.embed-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(143, 101, 65, 0.3);
}

.embed-card b {
  color: #3b2418;
  font-family: var(--serif);
  font-size: 8px;
  line-height: 1.4;
}

.embed-skel {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(143, 101, 65, 0.16);
}

.embed-skel.short {
  width: 68%;
}

.feature-links-copy {
  max-width: 640px;
}

.feature-links-copy p + p {
  margin-top: 8px;
}

/* static picture of the toolbar's share menu */
.share-menu {
  flex: 0 0 auto;
  width: 300px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-float);
  list-style: none;
}

.share-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.share-menu li:first-child {
  background: var(--caramel-soft);
  color: var(--caramel-ink);
}

.share-menu li:last-child {
  position: relative;
  margin-top: 7px;
}

.share-menu li:last-child::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 12px;
  right: 12px;
  border-top: 1px solid var(--line-soft);
}

.share-menu .icon {
  width: 16px;
  height: 16px;
  color: var(--caramel-deep);
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 6px;
  margin-top: 24px;
}

.feature-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.feature-chips .icon {
  width: 14px;
  height: 14px;
  color: var(--caramel);
}

/* ===== 10. Screenshots, gallery, lightbox ============================== */
.screenshots {
  border-top: 1px solid var(--line-soft);
  background: var(--paper-warm);
}

.gallery {
  scroll-margin-top: calc(var(--nav-h) + 30px);
}

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

.shot-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.shot-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

.shot-media {
  position: relative;
  display: block;
  border-radius: 15px;
  overflow: hidden;
  background: #f3ece2;
}

.shot-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(88, 58, 37, 0.06);
  pointer-events: none;
}

.shot-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shot-card:hover .shot-media img {
  transform: scale(1.015);
}

.shot-hover {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 28, 24, 0.72);
  color: #fffaf3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.shot-hover .icon {
  width: 12px;
  height: 12px;
}

.shot-card:hover .shot-hover,
.shot-card:focus-visible .shot-hover {
  opacity: 1;
  transform: translateY(0);
}

.shot-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 8px 4px;
}

.shot-caption strong {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.5;
}

.shot-caption span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: nowrap;
}

/* lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(36, 28, 24, 0.76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox-inner {
  width: min(1240px, 94vw);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.08);
  box-shadow: 0 60px 140px -60px rgba(0, 0, 0, 0.8);
  animation: lightboxIn 0.26s ease;
}

.lightbox-media {
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.lightbox-media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 74vh;
  height: auto;
  margin: 0 auto;
}

.lightbox-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 6px 2px;
  color: rgba(255, 250, 243, 0.68);
  font-size: 13px;
  line-height: 1.6;
}

.lightbox-bar p {
  color: #fffaf3;
  font-size: 14px;
}

.lightbox-bar span {
  flex: 0 0 auto;
  color: rgba(255, 250, 243, 0.6);
  font-size: 12.5px;
  white-space: nowrap;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(36, 28, 24, 0.6);
  color: #fffaf3;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(36, 28, 24, 0.86);
  transform: scale(1.04);
}

.lightbox-close .icon {
  width: 18px;
  height: 18px;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-open .site-nav {
  z-index: 0;
}

/* ===== 11. Safety ====================================================== */
.safety {
  border-top: 1px solid var(--line-soft);
}

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

.safety-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.safety-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}

.safety-num {
  color: rgba(169, 98, 47, 0.55);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.safety-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--tone-soft);
  color: var(--tone-deep);
}

.safety-icon .icon {
  width: 18px;
  height: 18px;
}

.safety-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.safety-card h3 {
  margin-bottom: 8px;
}

.safety-card > p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.8;
}

.tick-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.tick-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

.tick-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--sage-deep);
  stroke-width: 2.2;
}

.tick-list.is-warn .icon {
  color: var(--violet-deep);
}

.tick-list.is-warn li:last-child .icon {
  color: var(--amber-deep);
}

.tick-list.is-blue .icon {
  color: var(--blue-deep);
}

.safety-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.safety-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(183, 125, 31, 0.2);
  border-radius: var(--radius);
  background: #fbf3e2;
}

.warning-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--amber-deep);
}

.warning-icon .icon {
  width: 15px;
  height: 15px;
}

.safety-warning p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.safety-warning strong {
  color: var(--amber-deep);
  font-weight: 650;
}

/* ===== 12. Install ===================================================== */
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.install-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.install-market {
  border-color: rgba(169, 98, 47, 0.22);
  background: #fbf3e8;
}

.install-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.install-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.badge-soft {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.install-card h3 {
  margin-bottom: 6px;
  font-size: clamp(20px, 1.8vw, 24px);
}

.install-card-head p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.install-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--caramel-deep);
}

.install-icon .icon {
  width: 24px;
  height: 24px;
}

.install-icon.icon-soft {
  color: var(--blue-deep);
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: installStep;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.install-steps li > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--caramel);
  color: #fffaf3;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

.install-steps strong {
  color: var(--ink);
  font-weight: 650;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: auto;
}

.install-fineprint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.manual-copy {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
}

.manual-tree {
  margin: 12px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre;
  overflow-x: auto;
}

.manual-tree code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.req-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.req-strip span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.req-strip .icon {
  width: 15px;
  height: 15px;
  color: var(--caramel);
}

.req-strip b {
  font-weight: 650;
}

.conflict-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(183, 125, 31, 0.2);
  border-radius: var(--radius);
  background: #fbf3e2;
}

.conflict-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: rgba(255, 253, 249, 0.82);
  color: var(--amber-deep);
}

.conflict-icon .icon {
  width: 14px;
  height: 14px;
}

.conflict-note p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== 13. FAQ ======================================================== */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(38px, 5vw, 76px);
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
}

.faq-intro .lead {
  max-width: 380px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
}

.faq-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 26px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.faq-item[open] {
  border-color: rgba(169, 98, 47, 0.24);
  box-shadow: var(--shadow-card);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.faq-item summary:hover {
  background: rgba(243, 227, 207, 0.3);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-q {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--caramel-soft);
  color: var(--caramel-deep);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
}

.faq-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 50%;
  background: #faf4ea;
  transition: background 0.2s ease;
}

.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.faq-toggle::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-toggle {
  background: var(--caramel-soft);
}

.faq-item[open] .faq-toggle::before,
.faq-item[open] .faq-toggle::after {
  background: var(--caramel-deep);
}

.faq-item[open] .faq-toggle::after {
  opacity: 0;
  transform: rotate(90deg) scaleX(0);
}

.faq-answer {
  padding: 0 20px 20px 56px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.85;
}

.faq-answer p + p,
.faq-answer pre + p {
  margin-top: 9px;
}

.faq-code {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #2c2320;
  color: #eadccf;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
}

.faq-code code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* ===== 14. Open source ================================================= */
.open-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(30px, 4vw, 58px);
  align-items: center;
  padding: clamp(28px, 4.4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-deep);
}

.open-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.open-lead {
  max-width: 500px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
}

.open-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 21px;
}

.open-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.open-badges .icon {
  width: 13px;
  height: 13px;
  color: var(--caramel);
}

.open-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.license-panel {
  position: relative;
  z-index: 1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.license-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 6px;
}

.license-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--violet-soft);
  color: var(--violet-deep);
}

.license-icon .icon {
  width: 19px;
  height: 19px;
}

.license-head strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
}

.license-head span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.license-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.license-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.license-list li:last-child {
  border-bottom: 0;
}

.license-list b {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.45;
}

.license-list li > div span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.license-list a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--caramel-deep);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}

.license-list a .icon {
  width: 12px;
  height: 12px;
}

.license-list a:hover {
  text-decoration: underline;
}

.license-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.license-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

/* ===== 15. Final CTA & footer ========================================= */
.final-cta {
  padding: clamp(20px, 3vw, 46px) 0 clamp(74px, 8vw, 106px);
}

.cta-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 40px;
  align-items: center;
  padding: clamp(32px, 4.6vw, 60px);
  border: 1px solid rgba(169, 98, 47, 0.2);
  border-radius: 24px;
  background: linear-gradient(135deg, #f8ead8 0%, #fbf4ea 100%);
  box-shadow: var(--shadow-card);
}

.cta-copy h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.3;
}

.cta-copy p {
  max-width: 520px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  justify-self: end;
}

.cta-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  position: relative;
  padding: 64px 0 28px;
  background: #2a2320;
  color: #f4e9dd;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1.44fr);
  gap: 56px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.footer-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(244, 233, 221, 0.62);
  font-size: 13px;
}

.footer-tagline {
  max-width: 360px;
  margin-top: 18px;
  color: rgba(244, 233, 221, 0.7);
  font-size: 14px;
  line-height: 1.8;
}

.footer-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 233, 221, 0.66);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.footer-mini .live-dot {
  width: 5px;
  height: 5px;
  background: #d49d64;
}

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

.footer-col-title {
  margin: 0 0 12px;
  color: rgba(255, 250, 243, 0.92);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: rgba(244, 233, 221, 0.72);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #e3b27e;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(244, 233, 221, 0.6);
  font-size: 13px;
  line-height: 1.7;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: rgba(244, 233, 221, 0.78);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #e3b27e;
}

.site-footer :focus-visible {
  outline-color: #e3b27e;
}

/* ===== 16. Motion ====================================================== */
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 143, 121, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(79, 143, 121, 0);
  }
}

@keyframes breatheViolet {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(117, 102, 196, 0.26);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(117, 102, 196, 0);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes flashRing {
  0% {
    box-shadow: 0 0 0 0 rgba(117, 102, 196, 0.34);
  }
  55% {
    box-shadow: 0 0 0 8px rgba(117, 102, 196, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(117, 102, 196, 0);
  }
}

@keyframes sourceFlash {
  0% {
    background: rgba(201, 150, 63, 0.34);
  }
  100% {
    background: rgba(201, 150, 63, 0.16);
  }
}

@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reveal].is-visible {
  animation: revealUp 0.66s cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

/* ===== 17. Responsive ================================================= */
@media (max-width: 1200px) {
  .wrap,
  .nav-shell {
    padding-left: 28px;
    padding-right: 28px;
  }

  .nav-menu a {
    padding: 8px 9px;
    font-size: 12.5px;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero-stage {
    min-height: 512px;
  }

  .app-body {
    grid-template-columns: 174px minmax(0, 1fr) 316px;
  }

  .feature-card {
    padding: 27px;
  }
}

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

  .hero-copy {
    max-width: 820px;
  }

  .hero-art {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }

  .hero h1 {
    max-width: 820px;
    font-size: clamp(44px, 6vw, 56px);
  }

  .hero-lead {
    max-width: 620px;
  }

  .hero-stage {
    min-height: 548px;
  }

  .hero-paper {
    width: min(72%, 440px);
  }

  .hero-code {
    width: min(54%, 360px);
  }

  .hero-form {
    width: min(44%, 250px);
  }

  .feature-diff-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  .app-body {
    grid-template-columns: minmax(0, 1fr) 306px;
  }

  .app-tree {
    display: none;
  }

  .tool-collapse {
    display: none;
  }

  .atelier-app.tree-hidden .app-body {
    grid-template-columns: minmax(0, 1fr) 306px;
  }
}

@media (max-width: 980px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 8px);
    left: 18px;
    right: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 34px 80px -34px rgba(64, 43, 29, 0.42);
    max-height: calc(100vh - var(--nav-h) - 20px);
    overflow-y: auto;
  }

  .site-nav.is-open .nav-menu {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 14px;
    border-radius: 13px;
    font-size: 14px;
  }

  .nav-menu a:hover,
  .nav-menu a.is-active {
    background: var(--caramel-soft);
  }

  .nav-menu .nav-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    border-radius: 0 0 12px 12px;
    color: var(--caramel-deep);
    font-weight: 650;
  }

  .nav-mobile-link .icon {
    width: 16px;
    height: 16px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-github {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

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

  .trust-item:nth-child(3) {
    border-left: 0;
  }

  .trust-item:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .contrast {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  }

  .contrast-panel {
    min-height: 430px;
  }

  .quick-steps {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .quick-steps li {
    display: grid;
    grid-template-columns: 32px 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    padding: 8px 9px;
  }

  .quick-steps li + li::before {
    display: none;
  }

  .quick-num {
    grid-row: span 2;
    align-self: center;
    margin: 0;
  }

  .quick-icon {
    grid-row: span 2;
    margin: 0;
  }

  .quick-steps strong {
    align-self: end;
    font-size: 13px;
  }

  .quick-steps small {
    font-size: 11.5px;
  }

  .feature-diff,
  .feature-modes {
    grid-column: span 12;
  }

  .feature-small {
    grid-column: span 6;
  }

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

  .req-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .faq-intro {
    position: static;
  }

  .faq-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .open-panel {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cta-actions {
    justify-self: start;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 900px) {
  .contrast {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contrast-panel {
    min-height: 0;
  }

  .contrast-arrow {
    width: 40px;
    height: 40px;
    margin: -7px auto;
    transform: rotate(90deg);
  }

  .quick-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
  }

  .quick-steps li {
    display: block;
    padding: 14px 11px 12px;
  }

  .quick-num {
    display: block;
    margin-bottom: 7px;
  }

  .quick-icon {
    margin-bottom: 8px;
  }

  .quick-steps small {
    display: block;
  }

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

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

  .footer-cols {
    gap: 22px;
  }
}

@media (max-width: 860px) {
  .atelier-app {
    height: auto;
  }

  .app-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .atelier-app.tree-hidden .app-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-workspace {
    height: 430px;
  }

  .app-panel {
    height: 520px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .atelier-app[data-mode="split"] .app-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 258px 300px;
    height: 558px;
  }

  .atelier-app[data-mode="split"] .app-sourcepane {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .atelier-app[data-mode="split"] .app-previewpane {
    height: 300px;
  }

  .atelier-app[data-mode="split"] .app-previewbar {
    display: none;
  }

  .panel-empty {
    min-height: 190px;
  }

  .feature-small {
    grid-column: span 12;
  }

  .feature-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .share-menu {
    width: 100%;
    max-width: 360px;
  }

  .feature-modes {
    flex-direction: column;
    min-height: 0;
  }

  .feature-modes .feature-top {
    position: static;
    margin-bottom: 16px;
  }

  .feature-modes h3 {
    margin-top: 0;
  }

  .feature-modes .mode-demo {
    margin-top: 15px;
  }

  .feature-modes .feature-meta {
    position: static;
    padding-top: 16px;
  }

  .req-strip {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  :root {
    --nav-h: 66px;
  }

  .wrap,
  .nav-shell {
    padding-left: 22px;
    padding-right: 22px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-version {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: clamp(36px, 7.4vw, 46px);
  }

  .hero-lead {
    margin-top: 18px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-note {
    margin-top: 16px;
  }

  .hero-art {
    padding-bottom: 0;
  }

  .hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-height: 0;
  }

  .hero-paper {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 460px;
    transform: rotate(-0.8deg);
  }

  .hero-art:hover .hero-paper {
    transform: rotate(0deg) translateY(-2px);
  }

  .hero-code,
  .hero-form {
    display: none;
  }

  .trust-bar {
    margin-top: 24px;
  }

  .trust-item {
    padding: 14px 16px;
  }

  .demo-shell {
    padding: 9px;
    border-radius: 24px;
  }

  .demo-topline {
    flex-wrap: wrap;
    gap: 6px;
  }

  .demo-topnote {
    display: none;
  }

  .atelier-app {
    border-radius: 16px;
  }

  .app-titlebar {
    padding: 0 9px;
    gap: 8px;
  }

  .app-window-dots {
    display: none;
  }

  .app-path {
    display: none;
  }

  .app-tab {
    margin-left: 0;
  }

  .app-workspace {
    height: 390px;
  }

  .page-scroll {
    padding: 10px 10px 18px;
  }

  .app-sourcepane {
    min-height: 0;
  }

  .atelier-app[data-mode="split"] .app-workspace {
    grid-template-rows: 230px 300px;
    height: 530px;
  }

  .atelier-app[data-mode="split"] .app-previewpane {
    height: 300px;
  }

  .app-panel {
    height: 540px;
  }

  .app-status {
    flex-wrap: wrap;
    gap: 5px 8px;
    padding: 6px 9px;
  }

  .status-draft {
    display: none;
  }

  .status-text {
    font-size: 8px;
  }

  .app-toast {
    font-size: 9px;
  }

  .demo-foot {
    padding-top: 12px;
  }

  .feature-diff-grid {
    gap: 14px;
  }

  .feature-card {
    padding: 24px;
  }

  .diff-visual {
    font-size: 8px;
  }

  .feature-chips {
    justify-content: flex-start;
  }

  .install-card {
    padding: 24px 22px;
  }

  .install-icon {
    width: 46px;
    height: 46px;
  }

  .req-strip {
    padding: 15px 17px;
  }

  .faq-item summary {
    padding: 15px 16px;
    gap: 10px;
  }

  .faq-answer {
    padding: 0 16px 16px 50px;
  }

  .open-panel {
    padding: 28px 24px;
  }

  .license-panel {
    padding: 20px;
  }

  .cta-panel {
    padding: 32px 24px;
  }

  .cta-actions {
    align-items: stretch;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .cta-actions .text-link {
    align-self: flex-start;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .wrap,
  .nav-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav-menu {
    left: 12px;
    right: 12px;
  }

  .nav-shell {
    gap: 10px;
  }

  .nav-install {
    min-height: 38px;
    padding: 0 13px;
  }

  .nav-install .icon {
    display: none;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .hero-eyebrow {
    font-size: 12px;
    padding: 5px 11px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-paper-body {
    grid-template-columns: minmax(0, 1fr) 92px;
    padding: 16px 14px 12px 16px;
  }

  .hp-title {
    font-size: clamp(19px, 5.6vw, 24px);
    white-space: normal;
  }

  .hp-cup {
    max-width: 92px;
  }

  .hero-paper-toc {
    padding: 0 14px 14px;
  }

  .trust-bar {
    grid-template-columns: 1fr;
  }

  .trust-item + .trust-item {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .trust-item:nth-child(3) {
    border-top: 1px solid var(--line-soft);
  }

  .contrast-panel {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .quick-steps {
    grid-template-columns: 1fr;
  }

  .quick-steps li {
    display: grid;
    grid-template-columns: 32px 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    padding: 8px 9px;
  }

  .quick-num {
    grid-row: span 2;
    align-self: center;
    margin: 0;
  }

  .quick-icon {
    grid-row: span 2;
    margin: 0;
  }

  .section-head h2,
  .faq-intro h2,
  .open-copy h2,
  .cta-copy h2 {
    font-size: 26px;
  }

  .demo-badge {
    font-size: 12px;
  }

  .app-panel {
    height: 560px;
  }

  .panel-file {
    padding: 8px 10px;
  }

  .mode-switch {
    margin: 7px 8px 0;
  }

  .mode-switch button {
    font-size: 8px;
  }

  .mode-switch button .icon {
    display: none;
  }

  .panel-search {
    padding: 7px 8px 0;
  }

  .panel-tabs button {
    font-size: 8.5px;
  }

  .panel-section {
    padding: 9px 9px 12px;
  }

  .app-workspace {
    height: 360px;
  }

  .app-panel {
    height: 540px;
  }

  .atelier-app[data-mode="split"] .app-workspace {
    grid-template-rows: 210px 280px;
    height: 490px;
  }

  .atelier-app[data-mode="split"] .app-previewpane {
    height: 280px;
  }

  .status-left {
    gap: 4px;
  }

  .status-text {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .status-save {
    padding: 0 9px;
  }

  .demo-foot-actions .btn {
    flex: 1 1 auto;
  }

  .feature-card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .feature-diff-grid {
    grid-template-columns: 1fr;
  }

  .feature-meta span {
    font-size: 11.5px;
  }

  .shot-card {
    padding: 7px;
    border-radius: 18px;
  }

  .shot-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 9px 6px 3px;
  }

  .safety-card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .safety-warning {
    padding: 14px 16px;
  }

  .install-actions {
    align-items: stretch;
  }

  .install-actions .btn {
    width: 100%;
  }

  .install-actions .text-link {
    align-self: flex-start;
  }

  .install-card {
    border-radius: 18px;
  }

  .install-icon {
    display: none;
  }

  .open-panel {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .open-links .btn {
    flex: 1 1 auto;
  }

  .license-list li {
    align-items: flex-start;
  }

  .cta-panel {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .lightbox-inner {
    padding: 7px;
    border-radius: 16px;
  }

  .lightbox-bar {
    flex-direction: column;
    gap: 4px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 400px) {
  .wrap,
  .nav-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 35px);
  }

  .app-workspace {
    height: 340px;
  }

  .app-panel {
    height: 530px;
  }

  .status-text {
    max-width: 130px;
  }

  .status-save .icon {
    display: none;
  }

  .open-links .btn {
    width: 100%;
  }
}

@media (hover: none) {
  .feature-card:hover,
  .shot-card:hover,
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .hero-art:hover .hero-paper,
  .hero-art:hover .hero-code,
  .hero-art:hover .hero-form {
    transform: none;
  }

  .shot-hover {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-copy,
  .hero-art,
  [data-reveal].is-visible {
    animation: none !important;
  }

  .live-dot,
  .demo-live-dot {
    animation: none !important;
  }
}

@media print {
  .site-nav,
  .final-cta,
  .demo-section,
  .lightbox,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .section {
    padding: 24px 0;
    break-inside: avoid;
  }

  .feature-card,
  .safety-card,
  .shot-card,
  .install-card,
  .open-panel,
  .cta-panel,
  .faq-item {
    box-shadow: none;
  }

  .site-footer {
    background: #fff;
    color: var(--ink);
  }

  .site-footer strong,
  .footer-brand span,
  .footer-mini,
  .footer-col-title,
  .footer-col a,
  .footer-bottom,
  .footer-bottom a,
  .footer-tagline {
    color: var(--ink) !important;
  }
}

/* ===== Selection labels ================================================= */
/* 文字类选中只保留选框：标签压在上一行文字上会显得像遮挡。 */
.demo-page [data-obj][data-kind="text"].is-selected::after {
  content: none;
}

@media (max-width: 560px) {
  .mode-demo-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mdp {
    height: 44px;
  }
}

@media (max-width: 560px) {
  .previewbar-hint,
  .search-hint {
    display: none;
  }

  .tool-btn,
  .tool-zoom {
    height: 28px;
    min-width: 28px;
  }

  .tool-btn .icon {
    width: 13px;
    height: 13px;
  }
}
