:root {
  color-scheme: light;
  --ink: #112c28;
  --muted: #5c716d;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --line: #d9e2dd;
  --accent: #b94120;
  --accent-dark: #922f17;
  --mint: #dff4ed;
  --green: #16745f;
  --shadow: 0 24px 70px rgba(24, 60, 52, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; }

.skip-link { position: fixed; z-index: 20; top: .75rem; left: .75rem; padding: .65rem 1rem; border-radius: .5rem; background: var(--ink); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid #1679b8; outline-offset: 3px; }

.site-header, main, footer { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(17,44,40,.12); }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; aspect-ratio: 1; border-radius: 50% 50% 45% 55%; background: var(--ink); color: #fff; font-weight: 800; }
.demo-badge { padding: .35rem .7rem; border: 1px solid #b8cbc5; border-radius: 999px; color: var(--muted); font-size: .82rem; font-weight: 700; }

.hero { display: grid; grid-template-columns: 1.35fr .8fr; align-items: end; gap: clamp(2rem, 5vw, 5rem); padding: clamp(3.5rem, 8vw, 7rem) 0 3rem; }
.hero h1 { max-width: 13ch; margin: .3rem 0 1.2rem; font: 800 clamp(2.7rem, 6vw, 5.8rem)/.98 Georgia, serif; letter-spacing: -.055em; }
.hero-copy { max-width: 61ch; margin: 0; color: var(--muted); font-size: 1.08rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--accent-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rule-card { padding: 1.25rem 1.35rem; border: 1px solid #bad6cd; border-radius: 1rem; background: var(--mint); box-shadow: 0 16px 38px rgba(32,98,82,.08); }
.rule-card > span { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.rule-card strong { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; font-size: 1rem; }
.rule-card strong b { color: #6d7f7b; }
.rule-card p { margin: .8rem 0 0; color: #405e57; font-size: .9rem; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; }
.dot-good { background: #16856c; }.dot-loose { background: #db9e27; }.dot-tight { background: #d6513c; }

.product-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); overflow: hidden; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--paper); box-shadow: var(--shadow); }
.product-visual { position: relative; min-height: 600px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 60% 35%, #fff 0, #f3ead9 48%, #e9ddca 100%); }
.product-visual svg { position: relative; z-index: 1; width: min(92%, 680px); filter: drop-shadow(0 28px 22px rgba(32,51,46,.18)); transform: rotate(-4deg); }
.product-visual p { position: absolute; bottom: 1rem; color: #6a746f; font-size: .76rem; }
.visual-orbit { position: absolute; width: 70%; aspect-ratio: 1; border: 1px solid rgba(19,64,55,.12); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.12), 0 0 0 100px rgba(255,255,255,.08); }
.product-info { padding: clamp(1.5rem, 4vw, 3.5rem); }
.product-heading { display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; }
.product-heading h2 { margin: .15rem 0 0; font: 700 clamp(2rem, 4vw, 3.2rem)/1.05 Georgia, serif; letter-spacing: -.035em; }
.price { margin: 0; white-space: nowrap; font-weight: 800; }
.description { margin: 1.2rem 0; color: var(--muted); }
.color-row { display: flex; align-items: center; gap: .65rem; padding-block: .8rem; border-block: 1px solid var(--line); font-size: .9rem; }
.color-row span { color: var(--muted); }.color-row strong { margin-left: auto; }
.color-row i { width: 1.2rem; aspect-ratio: 1; border: 2px solid #fff; border-radius: 50%; background: #91c9b9; box-shadow: 0 0 0 1px #9eb7b0; }
.field-group { display: grid; gap: .4rem; margin: 1.5rem 0 1rem; }
label { font-size: .86rem; font-weight: 800; }
select, input { width: 100%; min-height: 48px; padding: .68rem .8rem; border: 1px solid #aebfb9; border-radius: .65rem; background: #fff; color: var(--ink); }
.size-cta { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: .65rem; border: 0; border-radius: .75rem; background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(190,68,31,.22); font-weight: 800; cursor: pointer; transition: transform .18s, background .18s; }
.size-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
.size-cta:active { transform: translateY(1px); }
.sdk-status { min-height: 1.5rem; margin: .7rem 0; color: var(--muted); font-size: .83rem; text-align: center; }
.size-data { margin-top: 1rem; border-top: 1px solid var(--line); }
.size-data summary { padding: 1rem 0; cursor: pointer; font-weight: 750; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .84rem; }
caption { padding-bottom: .65rem; color: var(--muted); text-align: left; }
th, td { padding: .55rem .4rem; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }

.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-block: 1.25rem; }
.panel, .code-panel { border: 1px solid var(--line); border-radius: 1.25rem; background: var(--paper); }
.panel { padding: clamp(1.3rem, 3vw, 2rem); }
.panel h2, .code-panel h2 { margin: .1rem 0 .65rem; font: 700 1.55rem/1.15 Georgia, serif; }
.config-panel form { display: grid; gap: .45rem; margin-top: 1.3rem; }
.config-panel small { margin-bottom: .65rem; color: var(--muted); }
.secondary-button { min-height: 46px; margin-top: .75rem; border: 1px solid var(--ink); border-radius: .65rem; background: var(--ink); color: #fff; font-weight: 750; cursor: pointer; }
.config-status { display: grid; gap: .4rem; margin: 1.2rem 0 0; }
.config-status div { display: flex; justify-content: space-between; gap: 1rem; }
.config-status dt { color: var(--muted); }.config-status dd { margin: 0; font-family: ui-monospace, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.config-message { min-height: 1.2rem; margin: .8rem 0 0; color: #9b351d; font-size: .82rem; }
.panel-heading { display: flex; justify-content: space-between; gap: 1rem; }
.text-button { align-self: start; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--accent-dark); cursor: pointer; }
.muted { color: var(--muted); font-size: .88rem; }
.event-log { height: 238px; margin: 1rem 0 0; padding: .25rem 0 0; overflow: auto; list-style: none; border-top: 1px solid var(--line); }
.event-log li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .65rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); font-size: .83rem; }
.event-log time { color: var(--green); font-family: ui-monospace, monospace; font-weight: 700; }

.code-panel { display: grid; grid-template-columns: .72fr 1.28fr; gap: 2rem; padding: clamp(1.5rem, 4vw, 3rem); margin-bottom: 4rem; }
.code-panel p { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { overflow: auto; margin: 0; padding: 1.35rem; border-radius: .85rem; background: #102b27; color: #dcf4ed; font-size: .82rem; line-height: 1.65; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
footer { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

@media (max-width: 820px) {
  .hero, .product-shell, .integration-grid, .code-panel { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }.hero h1 { font-size: clamp(2.8rem, 13vw, 4.5rem); }
  .product-visual { min-height: 370px; }.product-visual svg { width: 95%; }
  .code-panel { gap: 1rem; } footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 1.1rem, 1180px); }
  .site-header { min-height: 68px; }.brand b { display: none; }.demo-badge { font-size: .7rem; }
  .hero { padding-bottom: 1.5rem; }.rule-card { padding: 1rem; }
  .product-shell, .panel, .code-panel { border-radius: .9rem; }
  .product-info { padding: 1.2rem; }.product-heading { display: block; }.price { margin-top: .65rem; }
  .event-log { height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
