:root {
  --ink: #090b0d;
  --charcoal: #14171a;
  --panel: #f4f5f1;
  --paper: #ffffff;
  --lime: #c8ff35;
  --muted: #7b8288;
  --line: rgba(255, 255, 255, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: "Geist", Arial, sans-serif; letter-spacing: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.page-shell { overflow-x: hidden; width: 100%; max-width: 100%; }

.nav { position: absolute; z-index: 10; inset: 0 0 auto; height: 84px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border-radius: 6px; }
.brand-mark svg { width: 19px; }
.nav-links { display: flex; gap: 32px; color: rgba(255,255,255,.72); font-size: 14px; }
.nav-links a:hover { color: white; }
.nav-action { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.nav-action svg { width: 17px; }

.hero { min-height: 820px; position: relative; display: flex; align-items: center; padding: 160px 4vw 110px; overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: contrast(1.08) saturate(.84); }
.hero-wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,7,10,.96) 0%, rgba(4,7,10,.78) 38%, rgba(4,7,10,.17) 72%, rgba(4,7,10,.28) 100%), linear-gradient(0deg, rgba(4,7,10,.88), transparent 42%); }
.hero-content { position: relative; z-index: 2; width: min(1120px, 92vw); }
.hero h1 { margin: 0; max-width: 1120px; font-size: clamp(3rem, 7vw, 7rem); line-height: .93; letter-spacing: 0; font-weight: 600; }
.hero h1 span { color: var(--lime); }
.hero-content > p { width: min(590px, 90vw); margin: 34px 0 0; color: rgba(255,255,255,.76); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.55; }
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.button { min-height: 50px; padding: 0 20px; border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 650; font-size: 14px; cursor: pointer; transition: transform .25s ease, background .25s ease, color .25s ease; }
.button:hover { transform: translateY(-2px); }
.button svg { width: 18px; }
.button-primary { background: var(--lime); color: var(--ink); }
.button-primary:hover { background: #dcff7b; }
.button-quiet { color: white; border-color: rgba(255,255,255,.4); background: rgba(8,10,12,.32); backdrop-filter: blur(12px); }
.route-ribbon { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 58px; display: flex; align-items: center; background: var(--lime); color: var(--ink); overflow: hidden; }
.ribbon-track { width: max-content; display: flex; align-items: center; gap: 32px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.ribbon-track svg { width: 20px; }

.workbench-section { padding: 150px 4vw 180px; background: #e9ece7; color: var(--ink); }
.section-intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: 8vw; align-items: end; max-width: 1400px; margin: 0 auto 64px; }
.section-intro h2 { margin: 0; font-size: clamp(3rem, 6vw, 6rem); line-height: .96; font-weight: 560; }
.section-intro p { margin: 0; color: #555d62; font-size: 18px; line-height: 1.65; max-width: 560px; }
.workbench-grid { max-width: 1400px; margin: auto; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: minmax(290px, auto) minmax(250px, auto); grid-auto-flow: dense; gap: 2px; background: #b9beba; border: 2px solid #b9beba; }
.panel { background: var(--paper); padding: clamp(24px, 3vw, 44px); overflow: hidden; }
.builder { grid-column: span 7; grid-row: span 2; }
.result, .history { grid-column: span 5; grid-row: span 1; }
.result { background: var(--charcoal); color: white; }
.panel-heading, .result-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.panel-heading.compact { align-items: center; }
.eyebrow { margin: 0 0 12px; color: #6f777b; font-size: 12px; line-height: 1; font-weight: 700; text-transform: uppercase; }
.result .eyebrow { color: rgba(255,255,255,.5); }
.panel h3 { margin: 0; font-size: clamp(24px, 2.5vw, 38px); line-height: 1.08; font-weight: 560; }
.icon-button { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border: 1px solid #cfd3d0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.icon-button:hover { transform: translateY(-2px); background: #eef0ed; }
.icon-button svg { width: 19px; }
.icon-button.light { color: white; border-color: rgba(255,255,255,.3); }
.icon-button.light:hover { background: rgba(255,255,255,.1); }
.builder label { display: block; margin: 70px 0 12px; color: #62696d; font-size: 13px; font-weight: 600; }
.input-row { min-height: 72px; padding: 8px 8px 8px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #b9bfbb; background: #f8f9f7; }
.input-row > svg { width: 21px; color: #646b6f; }
.input-row input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; }
.generate-button { height: 54px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 5px; background: var(--ink); color: white; font-weight: 650; cursor: pointer; }
.generate-button svg { width: 17px; }
.form-error { min-height: 20px; margin: 10px 0 0; color: #a12e2e; font-size: 13px; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.preset { padding: 9px 13px; border: 1px solid #c7ccc8; border-radius: 5px; background: white; color: #4f565a; cursor: pointer; }
.preset:hover, .preset.active { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.handoff-flow { margin-top: 76px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 16px; }
.handoff-flow > div { display: grid; gap: 5px; }
.handoff-flow span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 12px; font-weight: 700; }
.handoff-flow strong { margin-top: 8px; font-size: 14px; }
.handoff-flow small { color: #7b8387; }
.handoff-flow > svg { width: 18px; color: #9ba19e; }
.status-dot { color: var(--lime); font-size: 11px; font-weight: 700; }
.status-dot::before { content: ""; width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(200,255,53,.12); }
.result h3 { margin-top: 30px; max-width: 520px; }
.link-readout { margin-top: 22px; padding: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: rgba(255,255,255,.66); font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-actions { display: flex; gap: 8px; margin-top: 24px; }
.result-actions .button { flex: 1; }
.save-status { min-height: 18px; margin: 18px 0 0; color: rgba(255,255,255,.54); font-size: 12px; }
.history .panel-heading > svg { color: #777e82; }
.recent-list { margin-top: 30px; display: grid; }
.recent-item { width: 100%; padding: 15px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-top: 1px solid #dfe2df; background: transparent; text-align: left; cursor: pointer; }
.recent-item strong { display: block; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { display: block; color: #858c90; margin-top: 4px; }
.recent-item svg { width: 17px; flex: 0 0 17px; }
.empty-history { color: #7b8286; font-size: 14px; }

.boundary-section { max-width: 1400px; margin: auto; padding: 180px 4vw; display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; align-items: start; }
.sticky-title { position: sticky; top: 80px; }
.sticky-title > p { color: var(--lime); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.sticky-title h2 { margin: 20px 0 0; font-size: clamp(3rem, 5vw, 5.6rem); line-height: .97; font-weight: 560; }
.sticky-title h2 span { color: #7f878d; }
.boundary-stack { display: grid; gap: 22px; }
.boundary-card { min-height: 280px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: 8px; transform-origin: center top; }
.boundary-card > svg { width: 34px; height: 34px; }
.boundary-card h3 { margin: 0; font-size: clamp(26px, 3vw, 42px); font-weight: 560; }
.boundary-card p { max-width: 560px; margin: 16px 0 0; line-height: 1.6; opacity: .72; }
.boundary-card.lime { background: var(--lime); color: var(--ink); }
.boundary-card.dark { background: #202429; }
.boundary-card.outline { border: 1px solid #4f565c; }
.image-card { min-height: 430px; position: relative; justify-content: flex-end; }
.image-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease-out; }
.image-card:hover img { transform: scale(1.05); }
.image-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,7,9,.94), rgba(5,7,9,.04) 70%); }
.image-card div { position: relative; z-index: 2; }

.action-section { padding: 150px 4vw; background: #f1f2ee; color: var(--ink); display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.action-section h2 { margin: 0; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .95; font-weight: 560; }
.action-section p { margin: 24px 0 0; color: #687075; font-size: 18px; }
.oversized { min-height: 66px; flex: 0 0 auto; }
footer { min-height: 130px; padding: 32px 4vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #9ba1a5; font-size: 13px; }
footer .brand { color: white; }
footer a:last-child { color: white; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { min-height: 760px; padding-top: 130px; align-items: flex-end; }
  .hero-image { object-position: 64% center; }
  .hero-wash { background: linear-gradient(0deg, rgba(4,7,10,.97) 10%, rgba(4,7,10,.46) 70%, rgba(4,7,10,.65)); }
  .section-intro, .boundary-section { grid-template-columns: 1fr; }
  .workbench-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .builder, .result, .history { grid-column: span 1; grid-row: span 1; }
  .sticky-title { position: static; }
  .action-section { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .nav { height: 70px; }
  .nav-action { font-size: 0; }
  .nav-action svg { width: 20px; }
  .hero { min-height: 720px; padding: 120px 20px 100px; }
  .hero h1 { font-size: clamp(3rem, 14vw, 4.4rem); }
  .hero-content > p { font-size: 16px; }
  .hero-actions .button { width: 100%; }
  .workbench-section, .boundary-section, .action-section { padding: 110px 20px; }
  .panel { padding: 24px 20px; }
  .builder label { margin-top: 48px; }
  .input-row { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .generate-button { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .handoff-flow { grid-template-columns: 1fr; margin-top: 48px; gap: 20px; }
  .handoff-flow > svg { display: none; }
  .handoff-flow > div { grid-template-columns: auto 1fr; column-gap: 12px; }
  .handoff-flow span { grid-row: 1 / 3; }
  .handoff-flow strong { margin: 0; }
  .result-actions { flex-wrap: wrap; }
  .result-actions .button { flex-basis: 100%; }
  .boundary-card { min-height: 250px; padding: 28px; }
  .image-card { min-height: 380px; }
  footer { flex-direction: column; align-items: flex-start; }
}

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