/* page CSS: the app windows (the product's own UI, live), inside their visuals only */
.hero__window { background:
  radial-gradient(120% 60% at 70% 118%, #4f6b52 0 40%, transparent 41%),
  radial-gradient(90% 50% at 10% 108%, #3f5a47 0 42%, transparent 43%),
  radial-gradient(80% 40% at 60% 92%, #8fa9a0 0 40%, transparent 41%),
  linear-gradient(#5d7f88, #a7c0bd 70%, #c9d3c8); }
.pgw { --w-bg: #0f1412; --w-line: rgb(227 226 218 / .09); --w-soft: rgb(227 226 218 / .05);
  background: var(--w-bg); color: var(--p-ink); border-radius: var(--r-lg); overflow: clip;
  box-shadow: 0 0 0 1px var(--w-line), 0 30px 60px -30px rgb(0 0 0 / .8); font: 400 14px/1.45 var(--font-text); text-align: left; }
.pgw__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--w-line); color: var(--p-muted); font: 400 13px/1 var(--font-mono); white-space: nowrap; overflow: hidden; }
.pgw__bar b { color: var(--p-ink); font-weight: 500; }
.pgw__dots { display: inline-flex; gap: 6px; } .pgw__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgb(227 226 218 / .16); }
.pgw__sp { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; background: var(--w-soft); color: var(--p-muted); font: 500 13px/1 var(--font-text); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip[data-state="ready"] { color: var(--p-accent); } .chip[data-state="busy"] { color: #d9c27a; } .chip[data-state="error"] { color: #e59a8a; }
.pgw__body { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 420px; }
.pgw__side { border-right: 1px solid var(--w-line); padding: 16px; display: grid; align-content: start; gap: 14px; }
.pgw__main { padding: 16px 18px; min-width: 0; display: grid; align-content: start; gap: 14px; }
.boot { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.boot li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; color: var(--p-muted); }
.boot li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; justify-self: center; }
.boot li[data-done] { color: var(--p-ink); } .boot li[data-done]::before { background: var(--p-accent); border-color: var(--p-accent); }
.boot li[data-active]::before { border-color: #d9c27a; }
.boot time { font: 400 13px/1 var(--font-mono); color: var(--p-muted); }
.sql { margin: 0; font: 400 13px/1.6 var(--font-mono); color: #c9d6cf; white-space: pre-wrap; word-break: break-word; }
.sql .k { color: var(--p-accent); } .sql .s { color: #e3c99a; }
.res { width: 100%; border-collapse: collapse; font: 400 13px/1.4 var(--font-mono); }
.res th { text-align: left; font: 500 13px/1 var(--font-text); color: var(--p-muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--w-line); white-space: nowrap; }
.res td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--w-line); vertical-align: top; overflow-wrap: anywhere; }
.res td.on { color: var(--p-accent); } .res td.off, .res .off { color: var(--p-muted); }
.st--ok { color: var(--p-accent); } .st--warn { color: #d9c27a; } .st--fail { color: #e59a8a; } .st--info { color: var(--p-muted); }
.res tbody tr { animation: rowin .5s ease both; } @keyframes rowin { from { background: rgb(159 199 184 / .14); } to { background: transparent; } }
.note { margin: 0; color: var(--p-muted); font: 400 13px/1.45 var(--font-text); }
.pgw__bar .note { font-family: var(--font-mono); }
.pane-label { margin: 0; font: 500 13px/1 var(--font-text); color: var(--p-muted); }
code { font-family: var(--font-mono); font-size: .92em; }
.hero .hero__c .hero__lead { color: var(--p-ink); }
.head-row { margin-bottom: var(--head-gap); align-items: start; }
.head-row h2 { margin: 0; } .head-row p { margin: 0; }
.res td:first-child { white-space: nowrap; }
/* the engine tests: one cell a case, per tier */
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; padding: 40px 32px; min-height: 420px; align-content: center; }
.tier { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h t" "c c"; gap: 20px 24px; align-items: end; }
.tier__h { grid-area: h; display: grid; gap: 4px; } .tier__h h3 { margin: 0; font: 500 16px/1.3 var(--font-text); } .tier .tally { grid-area: t; } .tier .cells { grid-area: c; }
.cells { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 4px; }
.cells i { aspect-ratio: 1; border-radius: 3px; background: rgb(227 226 218 / .08); transition: background .25s ease, transform .25s ease; }
.cells i[data-r="pass"] { background: var(--p-accent); } .cells i[data-r="design"] { background: #50605a; } .cells i[data-r="fail"] { background: #e59a8a; transform: scale(1.2); }
.tally { margin: 0; font: 500 28px/1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; text-align: right; }
.tally small { display: block; margin-top: 6px; font: 400 13px/1.3 var(--font-text); color: var(--p-muted); letter-spacing: 0; }
.pgw__foot { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-top: 1px solid var(--w-line); color: var(--p-muted); font-size: 13px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; } .legend span { display: inline-flex; align-items: center; gap: 6px; } .legend span::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.ctl { min-height: 44px; padding: 0 16px; border: 1px solid var(--w-line); border-radius: var(--r-sm); background: var(--w-soft); color: var(--p-ink); font: 500 14px/1 var(--font-text); cursor: pointer; transition: background .2s ease, transform .1s ease; }
.ctl:hover { background: rgb(227 226 218 / .1); } .ctl:active { transform: translateY(1px); } .ctl[disabled] { opacity: .5; cursor: progress; }
/* the flags, rollout and import panes */
.fld { display: grid; gap: 8px; } .fld label { font: 500 14px/1.3 var(--font-text); color: var(--p-muted); }
.fld input, .fld textarea, .fld select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--w-line); border-radius: var(--r-sm); background: #0b0f0d; color: var(--p-ink); font: 400 16px/1.4 var(--font-mono); }
.fld textarea { min-height: 112px; resize: vertical; }
.fld input:focus-visible, .fld textarea:focus-visible, .fld select:focus-visible { outline: 2px solid var(--p-action); outline-offset: 1px; }
.range { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 16px; align-items: center; }
.range input { width: 100%; accent-color: var(--p-accent); min-height: 44px; padding: 0; border: 0; background: none; }
.range output { font: 500 28px/1 var(--font-display); text-align: right; font-variant-numeric: tabular-nums; }
.bar-cell { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
.bar-cell i { display: block; height: 6px; border-radius: 3px; background: var(--p-accent); min-width: 2px; transition: width .4s ease; }
.frame-app .pgw__body { min-height: 480px; }
.mo-pc__visual .pgw { height: 100%; } .codecard { padding: 28px; display: grid; gap: 14px; align-content: start; height: 100%; min-height: 320px; }
.codecard .sql { font-size: 14px; }
.drop { padding: 16px; border: 1px dashed rgb(227 226 218 / .22); border-radius: var(--r-md); }
.cmd { display: block; padding: 12px 14px; border-radius: var(--r-sm); background: #0b0f0d; font: 400 13px/1.5 var(--font-mono); color: #c9d6cf; overflow-wrap: anywhere; }
@media (max-width: 1023px) { .pgw__body { grid-template-columns: 1fr; } .pgw__side { border-right: 0; border-bottom: 1px solid var(--w-line); } .tiers { grid-template-columns: 1fr; gap: 32px; } .frame-app .pgw__body { min-height: 0; } }
.pgw__bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) { .pgw__dots { display: none; } .pgw__bar .note { display: none; }
  .hero .res tbody tr:nth-child(n+2), .hero [data-hero-time] { display: none; } .hero .pgw__main { padding: 12px 14px; gap: 10px; }
  .codecard { min-height: 0; padding: 20px; } .codecard .sql { font-size: 13px; } }
@media (max-width: 639px) { .hero .pgw__side { display: none; } .pgw__bar .hide-sm { display: none; } .tiers { padding: 16px; } .pgw__foot { flex-wrap: wrap; padding: 12px 16px; } .res th:nth-child(4), .res td:nth-child(4) { display: none; } #import .res th:nth-child(3), #import .res td:nth-child(3) { display: table-cell; } }

/* ---- app pages (every page but Home): a header, then the tool ---------------------------------------------------- */
[data-view][hidden] { display: none !important; }
.app-page { padding-block: 112px 96px; display: grid; gap: 28px; }
.app-head { display: grid; gap: 12px; max-width: 760px; }
.app-head h1 { margin: 0; font: var(--display-weight) clamp(32px, 4vw, 48px)/1.08 var(--font-display); letter-spacing: var(--display-tracking); }
.app-head p { margin: 0; color: var(--p-ink); }
.app-head .t-label { color: var(--p-muted); }
.sql .c { color: var(--p-muted); }
.pgw__body--wide { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 1023px) { .pgw__body--wide { grid-template-columns: 1fr; } }
@media (max-width: 1023px) { .app-page { padding-block: 96px 64px; } }

/* ---- the database pill in the nav --------------------------------------------------------------------------------- */
.dbpill { position: relative; }
.dbpill summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.dbpill summary::-webkit-details-marker { display: none; }
.dbpill .chip { height: 28px; padding: 0 10px; font-size: 13px; }
.dbpill__pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 90vw); padding: 16px; display: grid; gap: 12px; z-index: 60;
  background: #0f1412; border-radius: var(--r-md); box-shadow: 0 0 0 1px rgb(227 226 218 / .12), 0 24px 48px -24px rgb(0 0 0 / .9); }
.nav__link[aria-current="page"] { color: var(--p-ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }

/* ---- Home: the five pages and the facts ------------------------------------------------------------------------- */
.page-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.page-card { grid-column: span 2; display: grid; align-content: start; gap: 12px; padding: 24px; min-height: 220px; border-radius: var(--r-lg);
  background: #0f1412; box-shadow: 0 0 0 1px rgb(227 226 218 / .09); color: var(--p-ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.page-card:nth-child(4), .page-card:nth-child(5) { grid-column: span 3; }
.page-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(159 199 184 / .45); }
.page-card__k { font: 500 20px/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
.page-card__t { color: var(--p-ink); font: 400 15px/1.5 var(--font-text); }
.page-card__c { align-self: end; margin-top: 8px; color: var(--p-accent); font: 400 13px/1.4 var(--font-mono); overflow-wrap: anywhere; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.facts > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid rgb(227 226 218 / .1); }
.facts dt { color: var(--p-muted); font: 500 14px/1.5 var(--font-text); }
.facts dd { margin: 0; font: 400 15px/1.5 var(--font-text); overflow-wrap: anywhere; }
.facts code { font-size: 13px; }
@media (max-width: 1023px) { .page-cards { grid-template-columns: 1fr 1fr; } .page-card, .page-card:nth-child(4), .page-card:nth-child(5) { grid-column: span 1; } .facts { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .page-cards { grid-template-columns: 1fr; } .facts > div { grid-template-columns: 1fr; gap: 4px; } .dbpill { display: none; } }
/* the app pages size to their content (the Home sections keep the one-screen rhythm) */
main > section[data-view]:not([data-view="home"]) { height: auto; min-height: 100vh; padding: 0; }
main > section[data-view]:not([data-view="home"]) > .wrap { height: auto; }
