:root {
  color-scheme: light;
  --ink: #17342f;
  --muted: #61706b;
  --paper: #f5f0e6;
  --surface: #fffdf8;
  --line: #d5ccbc;
  --green: #176f5f;
  --green-dark: #0f5045;
  --orange: #bd5b31;
  --yellow: #eabf55;
  --blue: #38617b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; min-height: 70px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid rgba(213, 204, 188, .9); background: rgba(245, 240, 230, .92); backdrop-filter: blur(16px); }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; }
.wordmark span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--green); font-size: .72rem; letter-spacing: .04em; }
.site-header nav { display: flex; justify-content: center; gap: 25px; }
.site-header nav a { color: var(--muted); font-size: .84rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.header-action { padding: 10px 14px; border-radius: 8px; color: white; background: var(--ink); font-size: .8rem; font-weight: 800; text-decoration: none; }
main, footer { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.hero { min-height: calc(100vh - 70px); display: flex; flex-direction: column; justify-content: center; padding: 90px 0 65px; }
.eyebrow, .section-label { color: var(--orange); font-size: .75rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 1100px; margin: 22px 0 28px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(4rem, 9.2vw, 8.7rem); font-weight: 500; line-height: .86; letter-spacing: -.068em; }
.hero h1 em { color: var(--green); font-weight: 500; }
.hero-copy { max-width: 780px; margin: 0; color: #405650; font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.65; }
.hero-actions, .firebase-actions, .demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 9px; font-weight: 800; text-decoration: none; }
.button.primary { border-color: var(--green); color: white; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: var(--surface); }
.text-button { padding: 8px; border: 0; color: var(--green); background: transparent; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 880px; margin: 70px 0 0; border-top: 1px solid var(--line); }
.hero-facts div { padding: 20px 20px 0 0; }
.hero-facts dt { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-facts dd { margin: 7px 0 0; font-weight: 800; }
.section { padding: 110px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 820px; margin: 16px 0 45px; }
.split-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); max-width: none; gap: 70px; align-items: end; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 5vw, 5rem); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.7; }
.ownership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ownership-card { min-height: 390px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ownership-card > span, .trace-heading > span, .screen header span, .screen-title small, .command-example span, .reference article > span { color: var(--muted); font-size: .71rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.ownership-card h3 { max-width: 300px; margin: 70px 0 28px; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; line-height: 1.08; }
.ownership-card ul { display: grid; gap: 12px; padding: 0; list-style: none; color: var(--muted); }
.ownership-card li::before { content: "✓"; margin-right: 10px; color: var(--green); font-weight: 900; }
.engine-card { color: white; background: var(--green); border-color: var(--green); }
.engine-card > span, .engine-card ul { color: #d3ebe4; }
.engine-card li::before { color: var(--yellow); }
.firebase-card { border-top: 5px solid var(--orange); }
.boundary-note { margin: 24px 0 0; padding: 20px 24px; border-left: 4px solid var(--orange); background: #efe7d9; line-height: 1.65; }
.architecture { overflow: hidden; }
.architecture-flow { display: grid; grid-template-columns: 1fr 30px 1fr 30px 1fr 30px 1fr; align-items: stretch; }
.architecture-flow article { min-width: 0; padding: 28px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.architecture-flow article span { display: block; color: var(--orange); font-size: .67rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.architecture-flow article strong { display: block; margin: 24px 0 12px; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 500; }
.architecture-flow article small { color: var(--muted); line-height: 1.5; }
.architecture-flow i { display: grid; place-items: center; color: var(--green); font-size: 1.35rem; font-style: normal; transform: rotate(-90deg); }
.architecture-flow .firebase-layer { color: white; border-color: var(--ink); background: var(--ink); }
.architecture-flow .firebase-layer small { color: #bdcec9; }
.flow-legend { display: flex; gap: 28px; margin-top: 22px; color: var(--muted); }
.flow-legend span { margin-right: 8px; color: var(--ink); font-weight: 900; }
.demo-actions { margin: 0 0 20px; }
.demo-actions .button { font-size: .88rem; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .7fr); gap: 18px; align-items: start; }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.screen, .trace-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.screen header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid #e6dfd3; }
.screen header div { display: grid; gap: 5px; }
.screen header small { padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e1eee9; font-size: .7rem; font-weight: 800; }
.customer-screen { background: #f1eee8; }
.screen-title { display: flex; justify-content: space-between; padding: 20px 20px 5px; }
.demo-items { padding: 0 20px 15px; }
.demo-items article { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e6dfd3; }
.demo-items article:last-child { border-bottom: 0; }
.demo-items article > div:first-child { display: grid; gap: 5px; }
.demo-items article small { color: var(--muted); }
.stock-control { display: grid; grid-template-columns: 32px 36px 32px; align-items: center; text-align: center; }
.stock-control button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: white; font-weight: 900; }
.stock-control output, .customer-stock { font-weight: 900; }
.customer-stock small { font-weight: 500; }
.trace-panel { padding: 24px; background: var(--ink); color: white; }
.trace-heading { display: grid; gap: 7px; padding-bottom: 19px; border-bottom: 1px solid #3b554f; }
.trace-heading > span { color: #9db7b0; }
.trace-steps { display: grid; gap: 9px; margin: 20px 0; padding: 0; list-style: none; }
.trace-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; padding: 10px; border-radius: 8px; color: #849c96; transition: .2s ease; }
.trace-steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #58716b; border-radius: 50%; font-size: .72rem; font-weight: 900; }
.trace-steps li div { display: grid; gap: 3px; }
.trace-steps li small { line-height: 1.4; }
.trace-steps li[data-state="active"] { color: white; background: #25463e; }
.trace-steps li[data-state="active"] > span { color: var(--ink); border-color: var(--yellow); background: var(--yellow); }
.trace-steps li[data-state="complete"] { color: #c8ddd7; }
.trace-steps li[data-state="complete"] > span { color: white; border-color: var(--green); background: var(--green); }
.trace-steps li[data-state="error"] { color: #ffd4c1; background: #563528; }
.trace-panel pre { min-height: 130px; margin: 0; padding: 15px; overflow: auto; border-radius: 8px; color: #e9dfc8; background: #0c2420; font-size: .74rem; line-height: 1.55; }
.trace-output { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; }
.trace-output div { min-width: 0; padding-right: 8px; }
.trace-output dt { color: #8ea69f; font-size: .65rem; text-transform: uppercase; }
.trace-output dd { overflow: hidden; margin: 5px 0 0; font-size: .74rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.demo-message { margin: 18px 0 0; padding: 18px 22px; border-radius: 10px; color: var(--green-dark); background: #dcebe6; font-weight: 700; }
.implementation-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 50px; align-items: start; }
.implementation-steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.implementation-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 15px; }
.implementation-steps li > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--orange); font-weight: 900; }
.implementation-steps strong { display: block; margin: 2px 0 6px; }
.implementation-steps p { margin: 0; color: var(--muted); line-height: 1.5; }
.code-window, .command-example pre { margin: 0; padding: 30px; overflow: auto; border-radius: 15px; color: #deebe7; background: #112e29; font-size: clamp(.73rem, 1.2vw, .88rem); line-height: 1.7; }
.code-window span { color: #efbb73; }
.command-example { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; margin-top: 50px; padding: 34px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.command-example h3 { margin: 10px 0; font-family: Georgia, serif; font-size: 2.2rem; font-weight: 500; }
.command-example p { margin: 0; color: var(--muted); line-height: 1.6; }
.command-example pre { padding: 22px; border-radius: 10px; font-size: .78rem; }
.firebase-guide { position: relative; }
.firebase-steps { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.firebase-steps article { min-height: 270px; padding: 26px 22px; border-right: 1px solid var(--line); }
.firebase-steps article:last-child { border-right: 0; }
.firebase-steps article > span { color: var(--orange); font-weight: 900; }
.firebase-steps h3 { margin: 68px 0 12px; font-family: Georgia, serif; font-size: 1.4rem; font-weight: 500; }
.firebase-steps p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.firebase-steps code { font-size: .76rem; }
.safety-callout { display: grid; grid-template-columns: .4fr 1fr; gap: 35px; margin-top: 30px; padding: 25px; border-left: 4px solid var(--orange); background: #eee6d7; }
.safety-callout p { margin: 0; line-height: 1.6; }
.reference-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.reference article { display: flex; flex-direction: column; gap: 10px; min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.reference article > span { margin-bottom: 36px; color: var(--orange); }
.reference article code { width: fit-content; padding: 5px 8px; border-radius: 5px; color: var(--green-dark); background: #e4eee9; font-size: .78rem; }
.next-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.next-links a { display: flex; justify-content: space-between; gap: 20px; padding: 24px; border-radius: 12px; color: white; background: var(--green); text-decoration: none; }
.next-links a:last-child { background: var(--ink); }
.next-links span { color: #c7ddd6; }
.creator-cta { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 44px; align-items: center; margin-top: 12px; padding: 34px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.creator-cta > div:first-child > span { color: var(--orange); font-size: .71rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.creator-cta h3 { margin: 10px 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 500; line-height: 1.05; }
.creator-cta p { max-width: 670px; margin: 0; color: var(--muted); line-height: 1.6; }
.creator-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
footer { display: grid; grid-template-columns: 1fr 2fr auto; gap: 30px; align-items: center; padding: 38px 0 55px; border-top: 1px solid var(--line); color: var(--muted); }
footer > span { color: var(--ink); font-weight: 900; }
footer p { margin: 0; }
footer a { color: var(--green); font-weight: 800; }
@media (max-width: 1040px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-header nav { display: none; }
  .header-action { justify-self: end; }
  .ownership-grid { grid-template-columns: 1fr 1fr; }
  .firebase-card { grid-column: 1 / -1; min-height: 300px; }
  .architecture-flow { grid-template-columns: 1fr 22px 1fr; gap: 10px 0; }
  .architecture-flow i:nth-of-type(2) { display: none; }
  .architecture-flow article:nth-of-type(3) { grid-column: 1; }
  .architecture-flow i:nth-of-type(3) { grid-column: 2; }
  .architecture-flow article:nth-of-type(4) { grid-column: 3; }
  .demo-grid, .implementation-grid { grid-template-columns: 1fr; }
  .firebase-steps { grid-template-columns: repeat(2, 1fr); }
  .firebase-steps article { border-bottom: 1px solid var(--line); }
  .reference-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .site-header { min-height: 62px; padding: 0 16px; }
  .header-action { display: none; }
  main, footer { width: min(100% - 28px, 1240px); }
  .hero { min-height: auto; padding: 85px 0; }
  .hero h1 { font-size: clamp(3.6rem, 17vw, 6rem); }
  .hero-facts, .split-heading, .ownership-grid, .screens, .command-example, .firebase-steps, .reference-grid, .next-links, .safety-callout, footer { grid-template-columns: 1fr; }
  .hero-facts div { padding-bottom: 10px; }
  .section { padding: 78px 0; }
  .split-heading { gap: 24px; }
  .ownership-card { min-height: 340px; }
  .firebase-card { grid-column: auto; }
  .architecture-flow { grid-template-columns: 1fr; }
  .architecture-flow article, .architecture-flow article:nth-of-type(3), .architecture-flow article:nth-of-type(4), .architecture-flow i:nth-of-type(3) { grid-column: 1; }
  .architecture-flow i { transform: none; min-height: 28px; }
  .architecture-flow i:nth-of-type(2) { display: grid; }
  .flow-legend { flex-direction: column; gap: 0; }
  .trace-output { grid-template-columns: 1fr; gap: 13px; }
  .implementation-grid { gap: 36px; }
  .command-example { gap: 25px; padding: 23px; }
  .firebase-steps article { min-height: 220px; border-right: 0; }
  .firebase-steps h3 { margin-top: 40px; }
  .next-links a { flex-direction: column; }
  .creator-cta { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .creator-actions { justify-content: flex-start; }
  footer { align-items: start; }
}
