/* Flowral documentation — Sakura Paper.
   No CSS framework, external fonts, runtime renderer or trackers. */

:root {
  color-scheme: light;
  --page: #fcfaf9;
  --paper: #fffefd;
  --paper-alt: #f8f2f3;
  --surface: #fffafb;
  --text: #302b30;
  --text-deep: #242025;
  --muted: #756b73;
  --muted-light: #9b8e96;
  --line: #eae0e2;
  --line-strong: #d9c8ce;
  --accent: #ae667e;
  --accent-deep: #8d4b64;
  --accent-subtle: #f5e7eb;
  --pink: #e9b3c2;
  --green: #809f84;
  --shadow: 0 16px 44px rgba(67,36,47,.07);
  --font-ui: Inter, "Segoe UI", "Noto Sans", system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --topbar-h: 72px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #191820;
  --paper: #24202a;
  --paper-alt: #2c2530;
  --surface: #28232e;
  --text: #ebe4e9;
  --text-deep: #fcf6f8;
  --muted: #b0a2ae;
  --muted-light: #8e7f8c;
  --line: #39323c;
  --line-strong: #514450;
  --accent: #e9acc0;
  --accent-deep: #f0bacb;
  --accent-subtle: #3d2b38;
  --pink: #be7f9b;
  --green: #a4bda3;
  --shadow: 0 18px 55px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.65 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--pink); color: #292025; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10000; background: var(--paper); border: 1px solid var(--accent); padding: 8px 18px; border-radius: 6px; text-decoration: none; }
.skip-link:focus { top: 12px; }

.topbar { position: sticky; z-index: 40; top: 0; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px,3.9vw,72px); background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-left,.topbar-actions { display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand img { filter: saturate(.85); }
.brand > span:first-of-type { font-size: 23px; font-weight: 650; letter-spacing: -.075em; color: var(--text-deep); }
.brand-dot { color: var(--accent); }
.brand-separator { display: inline-block; margin: 0 1px 0 5px; width: 1px; height: 23px; background: var(--line-strong); }
.brand-subtitle { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.topbar-actions { gap: 14px; }
.icon-button { display: inline-grid; place-items: center; width: 35px; height: 35px; color: var(--muted); background: none; border: 0; border-radius: 5px; }
.icon-button:hover { background: var(--paper-alt); color: var(--accent-deep); }
.search-trigger { display: flex; align-items: center; gap: 10px; background: var(--page); color: var(--muted); border: 1px solid var(--line); min-width: 188px; padding: 8px 10px; border-radius: 5px; text-align: left; font-size: 12px; }
.search-trigger span { flex: 1; }
.search-trigger kbd { font: 10px var(--font-mono); color: var(--muted-light); padding: 3px 5px; border: 1px solid var(--line); border-radius: 3px; }
.search-trigger:hover { border-color: var(--accent); }
.mobile-menu,.mobile-close { display: none; }

.shell { display: flex; max-width: 1680px; margin: 0 auto; min-height: calc(100vh - var(--topbar-h)); }
.sidebar { width: 272px; flex: 0 0 272px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; padding: 34px 25px 32px 30px; border-right: 1px solid var(--line); }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; color: var(--accent-deep); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.nav-group { margin-bottom: 24px; }
.nav-group h2 { color: var(--muted-light); font-family: var(--font-mono); letter-spacing: .11em; font-size: 10px; font-weight: 600; text-transform: uppercase; margin: 0 0 8px 12px; }
.nav-group a { display: flex; align-items: center; border-radius: 5px; color: var(--muted); text-decoration: none; font-size: 12.5px; padding: 6px 12px; line-height: 1.45; margin: 1px 0; border-left: 2px solid transparent; transition: background .15s ease, color .15s ease; }
.nav-group a:hover { color: var(--text-deep); background: var(--paper-alt); }
.nav-group a.active { background: var(--accent-subtle); color: var(--accent-deep); font-weight: 650; border-left-color: var(--accent); }
.sidebar-bottom { color: var(--muted-light); font: 11px/1.5 var(--font-mono); display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 24px 8px 0; }
.sidebar-petal { color: var(--accent); font-size: 18px; }

.page-frame { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 188px; gap: clamp(25px,3vw,57px); align-items: start; padding: 48px clamp(28px,3.5vw,64px) 44px; }
.docs-page { width: 100%; min-width: 0; max-width: 825px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 21px; font-size: 11px; font-family: var(--font-mono); color: var(--muted-light); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.toc { position: sticky; top: calc(var(--topbar-h) + 40px); align-self: start; font-size: 12px; border-left: 1px solid var(--line); padding: 3px 0 14px 17px; max-height: calc(100vh - 140px); overflow-y: auto; }
.toc h2 { font: 600 10px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted-light); margin: 0 0 14px; }
.toc a { display: block; text-decoration: none; color: var(--muted); line-height: 1.5; padding: 5px 0; }
.toc a.toc-level-3 { padding-left: 12px; font-size: 11.5px; }
.toc a:hover,.toc a.current { color: var(--accent-deep); }
.content-footer { margin-top: 77px; padding: 23px 0; border-top: 1px solid var(--line); color: var(--muted-light); font-size: 11px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.content-footer a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.content-footer a:hover { color: var(--accent); }

/* Markdown document */
.prose { overflow-wrap: break-word; }
.prose > h1 { font: 500 clamp(32px,3vw,44px)/1.15 var(--font-display); letter-spacing: -.034em; color: var(--text-deep); margin: 0 0 20px; }
.prose h2 { font: 580 clamp(22px,2vw,28px)/1.3 var(--font-display); letter-spacing: -.024em; color: var(--text-deep); margin: 46px 0 14px; padding-top: 6px; }
.prose h3 { font-size: 16px; letter-spacing: -.02em; font-weight: 650; margin: 30px 0 10px; }
.prose h4 { font-size: 13px; font-weight: 650; margin: 24px 0 6px; }
.prose h1 + p { font-size: 15.5px; color: var(--muted); }
.prose p { margin: 14px 0; line-height: 1.82; }
.prose strong { color: var(--text-deep); font-weight: 650; }
.prose a { color: var(--accent-deep); text-decoration-color: var(--pink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 23px; margin: 13px 0 20px; }
.prose li { padding-left: 3px; margin: 6px 0; line-height: 1.75; }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 3px solid var(--pink); margin: 24px 0; padding: 13px 20px; background: var(--paper-alt); color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose hr { border: none; height: 1px; background: var(--line); margin: 35px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 22px 0 31px; display: block; overflow-x: auto; }
.prose th { text-align: left; white-space: nowrap; background: var(--paper-alt); font-weight: 650; color: var(--text-deep); }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 11px 14px; min-width: 65px; vertical-align: top; }
.prose tr:hover td { background: var(--surface); }
.prose code { font-family: var(--font-mono); font-size: .84em; padding: 2px 4px; color: var(--accent-deep); border: 1px solid var(--line); background: var(--paper-alt); border-radius: 3px; }
.prose pre { margin: 0; padding: 20px; background: var(--paper-alt); color: var(--text); overflow: auto; font: 12px/1.78 var(--font-mono); tab-size: 2; }
.prose pre code { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; border-radius: 0; white-space: pre; }
.code-frame { border: 1px solid var(--line); background: var(--paper-alt); border-radius: 7px; margin: 20px 0 28px; overflow: hidden; }
.code-top { display: flex; justify-content: space-between; align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); padding: 5px 10px 5px 16px; }
.code-lang { font: 10px var(--font-mono); color: var(--muted-light); text-transform: uppercase; letter-spacing: .05em; }
.code-copy { color: var(--muted); background: transparent; border: 0; padding: 4px 8px; border-radius: 3px; font: 10px var(--font-mono); }
.code-copy:hover { background: var(--accent-subtle); color: var(--accent-deep); }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose h2, .prose h3 { scroll-margin-top: 95px; }

/* Home */
.home-page { grid-column: 1/-1; min-width: 0; }
.hero { position: relative; margin-bottom: 80px; padding: 16px 0 60px; border-bottom: 1px solid var(--line); }
.eyebrow, .section-overline { font: 10px/1.6 var(--font-mono); letter-spacing: .17em; text-transform: uppercase; color: var(--accent-deep); }
.eyebrow { display: flex; align-items: center; gap: 11px; }
.eyebrow-line { width: 26px; height: 1px; background: var(--accent); }
.hero-version { margin-left: auto; color: var(--muted-light); font-size: 10px; letter-spacing: .045em; text-transform: none; }
.hero-row { display: grid; grid-template-columns: 1.22fr .78fr; align-items: center; gap: 40px; min-height: 445px; }
.hero-copy { padding: 44px 0 0; }
.hero h1 { margin: 0; color: var(--text-deep); font: 500 clamp(43px,5.2vw,76px)/1.075 var(--font-display); letter-spacing: -.062em; }
.hero h1 em, .section-intro h2 em { color: var(--accent); font-weight: 400; }
.hero-lead { color: var(--muted); font-size: 15px; line-height: 1.88; margin: 23px 0 30px; max-width: 580px; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.primary-link { background: var(--accent-deep); color: #fff; border: 1px solid var(--accent-deep); padding: 12px 19px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 12px; font-weight: 650; border-radius: 4px; transition: transform .15s ease, background .15s ease; }
.primary-link:hover { transform: translateY(-1px); background: var(--accent); }
html[data-theme="dark"] .primary-link { color: #271923; }
.secondary-link { font-size: 12px; text-decoration: none; border-bottom: 1px solid var(--line-strong); padding: 8px 0; }
.secondary-link:hover { color: var(--accent-deep); }
.hero-note { display: flex; align-items: center; gap: 9px; font: 10px/1.5 var(--font-mono); color: var(--muted); margin-top: 29px; }
.status-dot { width: 6px; height: 6px; display: inline-block; background: var(--green); border-radius: 50%; }
.flower-illustration { display: flex; justify-content: center; align-items: center; min-width: 0; }
.flower-frame { position: relative; width: min(100%,340px); aspect-ratio: 1/1.12; display: grid; place-items: center; background: radial-gradient(circle at 42% 37%,var(--paper) 0, var(--paper-alt) 62%,transparent 74%); border: 1px solid var(--line); border-radius: 50% 48% 49% 51%; }
.flower-frame::before,.flower-frame::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; inset: -12px 14px 12px -14px; transform: rotate(13deg); pointer-events: none; }
.flower-frame::after { inset: 10px -9px -6px 6px; transform: rotate(-8deg); }
.flower-frame svg { position: relative; z-index: 1; width: 88%; height: 95%; }
.flower-caption { position: absolute; bottom: -23px; right: 8px; font: 9px var(--font-mono); letter-spacing: .12em; color: var(--muted-light); }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: end; margin-bottom: 30px; }
.section-intro h2,.theme-showcase h2,.next-step h2 { font: 500 clamp(32px,3vw,44px)/1.17 var(--font-display); color: var(--text-deep); letter-spacing: -.04em; margin: 11px 0 0; }
.section-intro p,.theme-showcase p,.next-step p { line-height: 1.85; font-size: 13px; color: var(--muted); margin: 0; max-width: 430px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 0 0 110px; }
.feature-card { display: flex; flex-direction: column; min-height: 240px; text-decoration: none; padding: 24px; background: var(--paper); border: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { border-color: var(--pink); transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-number { color: var(--accent); font: 10px var(--font-mono); letter-spacing: .09em; }
.feature-card h3 { font: 500 23px/1.2 var(--font-display); letter-spacing: -.03em; margin: 25px 0 8px; }
.feature-card p { font-size: 12px; color: var(--muted); margin: 0 0 28px; line-height: 1.75; }
.feature-action { display: flex; margin-top: auto; justify-content: space-between; align-items: center; color: var(--accent-deep); font: 600 11px var(--font-ui); }
.theme-showcase { margin: 0 0 100px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 90px; }
.theme-showcase h2 { margin-bottom: 19px; }
.theme-showcase p { margin-bottom: 23px; }
.inline-link { text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 3px; display: inline-flex; align-items: center; gap: 12px; color: var(--accent-deep); font-weight: 650; font-size: 12px; }
.theme-paper-example { border: 1px solid var(--line-strong); background: var(--paper); padding: 26px; max-width: 400px; min-height: 320px; box-shadow: 9px 9px 0 var(--paper-alt), 10px 10px 0 var(--line); transform: rotate(1.5deg); }
.paper-top { display: flex; justify-content: space-between; color: var(--accent-deep); font: 10px var(--font-mono); letter-spacing: .03em; padding-bottom: 60px; }
.paper-top span:last-child { font-size: 22px; line-height: .9; }
.paper-line { height: 5px; border-radius: 6px; background: var(--line); width: 74%; margin: 14px 0; }
.paper-line-strong { width: 50%; height: 10px; background: var(--pink); }
.paper-line-short { width: 42%; }
.paper-swatches { display: flex; gap: 7px; margin-top: 24px; }
.paper-swatches span { height: 24px; width: 24px; background: #fffbfa; border: 1px solid #ddd1d5; }
.paper-swatches span:nth-child(2) { background: #efc7d0; }
.paper-swatches span:nth-child(3) { background: #b97990; }
.paper-swatches span:nth-child(4) { background: #3b2d38; }
.paper-bottom { font: 9px var(--font-mono); letter-spacing: .07em; color: var(--muted-light); margin-top: 34px; }
.next-step { padding: 34px; display: flex; justify-content: space-between; align-items: center; gap: 30px; background: var(--paper-alt); border: 1px solid var(--line); }
.next-step h2 { font-size: 29px; margin-bottom: 10px; }
.next-step .primary-link { flex-shrink: 0; }

/* Search modal */
.search-overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: min(18vh,140px) 18px 18px; }
.search-backdrop { position: absolute; inset: 0; background: rgba(25,20,28,.48); }
.search-dialog { position: relative; width: min(100%,630px); max-height: min(70vh,600px); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 30px 100px rgba(12,7,20,.26); overflow: hidden; display: flex; flex-direction: column; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); color: var(--accent-deep); }
.search-field input { border: 0; outline: 0; background: transparent; min-width: 0; flex: 1; color: var(--text); font-size: 14px; }
.search-field input::placeholder { color: var(--muted-light); }
.search-field button { background: var(--paper-alt); border: 1px solid var(--line); color: var(--muted); border-radius: 4px; font: 10px var(--font-mono); padding: 6px; }
.search-results { padding: 9px; overflow: auto; flex: 1; }
.search-results > p { color: var(--muted); padding: 18px; font-size: 12px; }
.search-result { display: block; border: 1px solid transparent; border-radius: 6px; padding: 11px 13px; text-decoration: none; }
.search-result:hover, .search-result.selected { border-color: var(--line); background: var(--paper-alt); }
.search-result span { display: block; font: 10px var(--font-mono); color: var(--accent-deep); margin-bottom: 3px; }
.search-result strong { font-size: 13px; color: var(--text-deep); }
.search-result p { font: 11px/1.6 var(--font-ui); color: var(--muted); margin: 3px 0 0; }
.search-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font: 10px var(--font-mono); color: var(--muted-light); }
.error-page { padding: 10vh 0; }
.error-page h1 { font: 500 48px var(--font-display); letter-spacing: -.05em; }
.error-page p { color: var(--muted); margin-bottom: 30px; }

@media (max-width: 1320px) {
  .page-frame { grid-template-columns: minmax(0,1fr) 165px; gap: 27px; padding-left: 39px; padding-right: 36px; }
  .sidebar { width: 251px; flex-basis: 251px; }
  .feature-card { padding: 20px; }
  .theme-showcase { gap: 45px; }
}
@media (max-width: 1100px) {
  .page-frame { grid-template-columns: minmax(0,1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 64px; }
  .topbar { padding: 0 20px; }
  .mobile-menu,.mobile-close { display: inline-grid; }
  .topbar-left { gap: 12px; }
  .sidebar { position: fixed; z-index: 61; top: var(--topbar-h); left: 0; bottom: 0; width: min(300px,85vw); height: auto; background: var(--paper); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: var(--topbar-h) 0 0; z-index: 60; background: rgba(30,20,30,.3); }
  .page-frame { width: 100%; padding: 32px 28px; }
  .hero-row { grid-template-columns: 1.35fr .65fr; gap: 14px; }
  .hero h1 { font-size: clamp(40px,6vw,66px); }
  .hero { margin-bottom: 60px; }
}
@media (max-width: 640px) {
  .topbar { gap: 6px; padding: 0 12px; }
  .topbar-left { gap: 4px; }
  .brand img { width: 26px; }
  .brand > span:first-of-type { font-size: 21px; }
  .brand-separator,.brand-subtitle,.search-trigger span,.search-trigger kbd { display: none; }
  .search-trigger { min-width: 0; width: 35px; height: 35px; padding: 7px; justify-content: center; border: 0; background: none; }
  .topbar-actions { gap: 2px; }
  .page-frame { padding: 25px 19px; }
  .hero { padding: 4px 0 45px; }
  .hero-row { display: block; min-height: 0; }
  .hero-copy { padding-top: 43px; }
  .hero h1 { font-size: clamp(41px,10vw,60px); }
  .flower-illustration { display: none; }
  .hero-version { display: none; }
  .hero-lead { font-size: 14px; }
  .hero-note { font-size: 9px; align-items: start; }
  .section-intro,.theme-showcase { grid-template-columns: 1fr; gap: 20px; }
  .section-intro { margin-bottom: 28px; }
  .feature-grid { grid-template-columns: 1fr; margin-bottom: 60px; }
  .feature-card { min-height: 175px; }
  .feature-card h3 { margin-top: 16px; }
  .theme-showcase { margin-bottom: 70px; }
  .theme-paper-example { margin: 10px 13px 0 0; }
  .next-step { display: block; padding: 24px; }
  .next-step .primary-link { margin-top: 22px; }
  .content-footer { flex-direction: column; align-items: start; gap: 10px; }
  .prose > h1 { font-size: 32px; }
  .prose h2 { font-size: 23px; }
  .prose table { font-size: 11.5px; }
  .prose td,.prose th { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
