@font-face { font-family: Manrope; src: url("assets/manrope-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Golos; src: url("assets/golos-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Golos; src: url("assets/golos-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  scrollbar-gutter: stable;
  color-scheme: light;
  --paper: #edeff0;
  --paper-2: #e3e6e8;
  --surface: #fff;
  --ink: #131619;
  --body: #3c4246;
  --muted: #5a6166;
  --rule: #cbd0d3;
  --strong-rule: #8b9499;
  --accent: #a63d25;
  --button-surface: #ffffff7a;
  --button-border: #acb8c0;
  --accent-dark: #8a311e;
  --accent-soft: #f4e4de;
  --brand-accent: #ae332b;
  --steel: #2f5d7c;
  --steel-soft: #e2eaf0;
  --heading: Manrope, "Helvetica Neue", Arial, sans-serif;
  --text: Golos, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { position: relative; margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--heading); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Approved F01 background: the existing lighting and cursor response. */
.ambient {
  --light-x: 76%;
  --light-y: 42%;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 60% at var(--light-x) var(--light-y), #d3e0e9ad, transparent 100%),
    radial-gradient(ellipse 32% 43% at 3% 79%, #f4e4de78, transparent 100%);
}
.ambient-pointer {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(420px, 80vw, 1150px);
  aspect-ratio: 1;
  opacity: 0;
  background:
    radial-gradient(ellipse 42% 37% at 49% 46%, #b1c8dcba, transparent 100%),
    radial-gradient(ellipse 38% 32% at 61% 57%, #e9c5bca6, transparent 100%);
}

.page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
}

.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: var(--button-height, 44px); padding: 1px 18px; border: 1px solid transparent; border-radius: 5px; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; }
.button--outline { border-color: var(--strong-rule); background: #ffffff35; }
.button--outline:not(:disabled):hover { border-color: var(--strong-rule); background: #fff; }
.button--primary { border-color: var(--button-border); background: var(--button-surface); color: var(--ink); }
.button--primary:not(:disabled):hover { border-color: var(--strong-rule); background: #fff; }
.button--accent:not(:disabled) { border-color: var(--accent); background: var(--accent); color: #fff; }
.button--accent:hover:not(:disabled) { border-color: var(--accent-dark); background: var(--accent-dark); }
.button--primary:disabled, .cabinet-button--primary:disabled { border-color: #cbd0d3; background: #dce0e2; color: var(--muted); }
.icon { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; background-color: currentColor; mask: var(--glyph) center / contain no-repeat; }
.icon--arrow { --glyph: url("assets/arrow-up-right.svg"); width: 16px; height: 16px; }
.icon--files { --glyph: url("assets/files.svg"); }
.icon--search { --glyph: url("assets/scan-search.svg"); }
.icon--ruler { --glyph: url("assets/pencil-ruler.svg"); }
.icon--compare { --glyph: url("assets/git-compare-arrows.svg"); }
.icon--pause { --glyph: url("assets/pause.svg"); }
.icon--play { --glyph: url("assets/play.svg"); }
.icon--close { --glyph: url("assets/x.svg"); }

.main {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: clamp(22px, 3.4vh, 34px);
  min-width: 0;
  padding-block: clamp(24px, 4vh, 46px);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(26px, 4vw, 64px);
  min-width: 0;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hero h1 { width: 100%; font: 700 clamp(32px, 2.85vw, 48px)/1.09 var(--heading); letter-spacing: -.043em; text-wrap: balance; }
.hero h1 > span { color: var(--brand-accent); }
.verification { width: 100%; margin-top: clamp(18px, 2.3vh, 26px); }
.intro { color: var(--ink); font: 700 clamp(19px, 1.5vw, 24px)/1.3 var(--heading); letter-spacing: -.02em; }
.checks { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--body); font-size: clamp(16px, 1.1vw, 18px); line-height: 1.45; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks li::before { flex: 0 0 7px; color: var(--ink); font-weight: 700; content: "-"; }
.check-copy { min-width: 0; }
.check-copy > span { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(20px, 2.6vh, 28px); }
.hero-copy > .actions,
.hero-copy > .actions > [data-trial-open] { width: 100%; }

.preview {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #aab8c3;
  border-radius: 10px;
  background: #e8eef2;
}
.preview-grid {
  position: absolute;
  z-index: -1;
  inset: -10px;
  background-image:
    radial-gradient(ellipse at 47% 49%, #f9fbfcd9, transparent 77%),
    linear-gradient(#2f5d7c14 1px, transparent 1px),
    linear-gradient(90deg, #2f5d7c14 1px, transparent 1px);
  background-position: center;
  background-size: auto, 25px 25px, 25px 25px;
}
.preview-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 20px 22px 0; }
.preview-head h2 { font: 700 clamp(22px, 2vw, 32px)/1.16 var(--heading); letter-spacing: -.035em; }
.pause, .dialog-close { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid #aab8c3; border-radius: 5px; background: #ffffff66; color: var(--steel); cursor: pointer; }
.pause:hover, .dialog-close:hover { border-color: var(--steel); background: var(--surface); }
.artwork { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.artwork > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: contain; }
.artwork canvas { opacity: 0; }
.figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; padding: 12px 22px; border-top: 1px solid #bcc9d3; background: #f5f7f9ba; color: var(--body); font-size: 14px; line-height: 1.4; }
.flow-arrow, .flow-result { color: var(--steel); }
.flow-result { font-weight: 600; }
.compact-detail { display: none; }

.scenarios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.scenario { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; min-height: 126px; padding: 16px; border: 1px solid var(--rule); border-top: 2px solid var(--rule); border-radius: 5px; background: #ffffff45; text-align: left; cursor: pointer; }
.scenario[aria-pressed="true"] { border-color: #c8a091; border-top-color: var(--accent); background: #fff8f4de; }
.scenario:not(:disabled):hover { border-color: var(--accent); }
.scenario-icon { width: 22px; height: 22px; margin-top: 2px; color: var(--steel); }
.scenario[aria-pressed="true"] .scenario-icon { color: var(--accent); }
.scenario-copy { display: grid; gap: 7px; }
.scenario-title { font: 700 clamp(15px, 1.18vw, 18px)/1.24 var(--heading); letter-spacing: -.02em; }
.scenario-detail { color: var(--body); font-size: 15px; line-height: 1.4; }

dialog { width: min(440px, calc(100% - 32px)); padding: 30px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #13161959; }
dialog h2 { padding-right: 45px; font: 700 clamp(20px, 4vw, 26px)/1.18 var(--heading); }
dialog p { margin: 12px 0 20px; color: var(--body); }
.dialog-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.dialog-title-row h2 { margin: 0; padding: 0; overflow-wrap: anywhere; }

@media (min-width: 1081px) and (max-height: 800px) {
  .main { gap: 20px; padding-block: 22px; }
  .hero h1 { font-size: clamp(30px, 2.6vw, 40px); }
  .verification { margin-top: 16px; }
  .intro { font-size: 19px; }
  .checks { gap: 8px; margin-top: 10px; font-size: 16px; line-height: 1.4; }
  .actions { margin-top: 18px; }
  .preview { grid-template-rows: auto auto minmax(160px, 1fr); }
  .preview-head { padding-top: 14px; }
  .preview-head h2 { font-size: 25px; }
  .figcaption { display: none; }
  .compact-detail { display: block; padding: 10px 20px 0; color: var(--body); font-size: 16px; line-height: 1.45; }
  .scenario { align-content: center; min-height: 70px; padding: 12px 14px; }
  .scenario-detail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 1080px) {
  .main { gap: 22px; padding-block: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: clamp(26px, 4vw, 42px); }
  .hero h1 { grid-column: 1; grid-row: 1; font-size: clamp(28px, 3.4vw, 36px); }
  .verification { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .intro { font-size: 19px; }
  .checks { font-size: 16px; gap: 9px; }
  .actions { grid-column: 1; grid-row: 2; margin-top: 20px; align-self: end; }
  .preview { height: clamp(340px, 42vw, 450px); grid-template-columns: minmax(220px, .8fr) minmax(0, 1.4fr); grid-template-rows: 1fr 1fr; align-items: stretch; }
  .preview-head { grid-column: 1; grid-row: 1; align-self: end; padding: 24px 0 0 24px; }
  .preview-head h2 { font-size: clamp(25px, 2.8vw, 29px); }
  .pause { position: absolute; z-index: 2; top: 16px; right: 16px; }
  .artwork { grid-column: 2; grid-row: 1 / span 2; margin: 42px 16px 18px 0; }
  .figcaption { display: none; }
  .compact-detail { display: block; grid-column: 1; grid-row: 2; align-self: start; padding: 12px 16px 24px 24px; color: var(--body); font-size: 16px; line-height: 1.45; }
  .scenario { grid-template-columns: 20px minmax(0, 1fr); align-content: center; min-height: 76px; padding: 12px; gap: 9px; }
  .scenario-icon { width: 20px; height: 20px; }
  .scenario-title { font-size: 14px; }
  .scenario-detail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 679px) {
  .main { gap: 18px; padding-block: 20px; }
  .hero { gap: 18px; }
  .hero-copy { display: flex; flex-direction: column; }
  .hero h1 { font-size: clamp(25px, 6.1vw, 36px); line-height: 1.1; }
  .verification { margin-top: 18px; }
  .intro { font-size: 19px; }
  .checks { margin-top: 10px; gap: 9px; font-size: 16px; line-height: 1.4; }
  .actions { margin-top: 20px; align-self: auto; }
  .preview { height: clamp(300px, 74vw, 400px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); border-radius: 8px; }
  .preview-head { grid-column: 1; grid-row: 1; align-self: start; padding: 13px 14px 0; align-items: center; }
  .preview-head h2 { font-size: 23px; }
  .pause { position: relative; inset: auto; }
  .compact-detail { grid-column: 1; grid-row: 2; padding: 9px 14px 0; }
  .artwork { grid-column: 1; grid-row: 3; margin: 0; }
  .scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .scenario { min-height: 74px; padding: 10px; gap: 8px; grid-template-columns: 18px minmax(0, 1fr); }
  .scenario-icon { width: 18px; height: 18px; }
  .scenario-title { font-size: 14px; line-height: 1.25; }
}

@media (max-width: 380px) {
  .main { padding-block: 18px; }
  .hero h1 { font-size: 25px; }
  .intro { font-size: 18px; }
  .checks { gap: 8px; }
  .scenario { grid-template-columns: minmax(0, 1fr); min-height: 72px; }
  .scenario-icon { display: none; }
}

@media (max-height: 560px) and (min-width: 680px) {
  .main { align-content: start; padding-block: 20px; }
}
