/* Harris Leech Property, private proposal.
   Page: Horizon AI visual system. Demonstration window: Claude interface. */

@font-face {
  font-family: "Inter";
  src: url("inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("jetbrains-mono-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  /* Horizon AI */
  --bg: #f5f8fd;
  --card: #ffffff;
  --ink: #0b1526;
  --ink-2: #31405e;
  --muted: #5d6b84;
  --faint: #93a0b4;
  --line: #e3e9f3;
  --line-2: #cdd8e8;
  --blue: #2453ee;
  --blue-2: #173dbd;
  --blue-bg: #eef3fe;
  --blue-line: #c5d4fb;
  --green: #12915b;
  --navy: #070d19;
  --sans: "Inter", Arial, sans-serif;
  --display: "Space Grotesk", "Inter", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;

  /* Access screen, Arnold questionnaire palette */
  --blue-3: #5f83ff;
  --blue-4: #93aaff;
  --green-2: #4fd39b;
  --dark: #05080f;
  --dark-line: rgba(132, 155, 223, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.28, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.42, 1);

  /* Claude, demonstration window only */
  --c-bg: #faf9f5;
  --c-side: #f5f4ee;
  --c-card: #ffffff;
  --c-ink: #1f1e1c;
  --c-ink2: #6f6d66;
  --c-ink3: #a3a094;
  --c-line: #e8e6de;
  --c-line2: #dcd9cf;
  --c-bubble: #f0eee7;
  --c-hover: #ecebe3;
  --c-coral: #c96442;
  --c-coral-deep: #b25537;
  --c-burst: #d97757;
  --c-green: #4d7c5f;
  --c-green-soft: #eef3ec;
  --c-amber: #8a7347;
  --c-amber-soft: #f3efe4;
  --c-amber-line: #e5dcc8;
  --c-sans: "Geist", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --c-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
ul { list-style: none; }

/* ========================= ACCESS =========================
   Ambient login lifted from the Arnold questionnaire built for Sovereign
   Private, adapted from a password field to a six-digit code. */

body.gate-page { background: var(--dark); }

.login-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 68px 24px 88px;
  color: #fff;
  background: linear-gradient(150deg, #05080f, #0a1426 58%, #070f1e);
}

.ambient-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-aurora {
  position: absolute;
  top: -24%;
  left: -14%;
  width: 74%;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 91, 209, 0.44), transparent 66%);
  filter: blur(46px);
  animation: auroraDrift 26s ease-in-out infinite;
}
.ambient-aurora-2 {
  top: auto;
  bottom: -32%;
  left: auto;
  right: -18%;
  width: 70%;
  height: 84%;
  background: radial-gradient(circle, rgba(36, 83, 238, 0.3), transparent 66%);
  animation-duration: 34s;
  animation-direction: reverse;
}
.ambient-aurora-3 {
  top: 38%;
  left: 34%;
  width: 52%;
  height: 60%;
  background: radial-gradient(circle, rgba(122, 92, 240, 0.24), transparent 66%);
  animation-duration: 30s;
  animation-delay: -8s;
}
.ambient-grid {
  position: absolute;
  inset: -12%;
  background-image:
    linear-gradient(rgba(95, 131, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 131, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 34%, #000 0, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 50% 34%, #000 0, transparent 74%);
  animation: gridDrift 16s linear infinite;
}
.ambient-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(147, 170, 255, 0.9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(147, 170, 255, 0.6) 0 1.2px, transparent 2px),
    radial-gradient(circle at 84% 68%, rgba(79, 211, 155, 0.7) 0 1.2px, transparent 2px),
    radial-gradient(circle at 34% 78%, rgba(147, 170, 255, 0.5) 0 1.2px, transparent 2px);
  background-size: 260px 240px, 330px 300px, 440px 380px, 380px 340px;
  animation: starTwinkle 6s ease-in-out infinite;
}
.ambient-beam {
  position: absolute;
  top: 0;
  left: -30%;
  width: 26%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(120, 150, 255, 0.11), transparent);
  animation: beamSweep 9s 1.2s ease-out infinite;
}

@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4%, -6%, 0) scale(1.14); }
  66% { transform: translate3d(-5%, 4%, 0) scale(0.94); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes gridDrift { to { transform: translate3d(46px, 46px, 0); } }
@keyframes starTwinkle { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.95; } }
@keyframes beamSweep {
  0% { transform: translateX(-30%) skewX(-16deg); opacity: 0; }
  12% { opacity: 1; }
  60% { opacity: 0.5; }
  100% { transform: translateX(520%) skewX(-16deg); opacity: 0; }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes loginFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(0, -7px, 0) rotate(1deg); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(79, 211, 155, 0.1); }
  50% { box-shadow: 0 0 0 11px rgba(79, 211, 155, 0.02); }
}
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes cellShake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  46% { transform: translateX(5px); }
  72% { transform: translateX(-3px); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
  padding: 44px 48px 40px;
  border: 1px solid var(--dark-line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(14, 26, 49, 0.94), rgba(8, 16, 31, 0.98));
  box-shadow: 0 46px 110px -40px rgba(0, 0, 0, 0.86), inset 0 1px rgba(255, 255, 255, 0.05);
  animation: rise 0.8s var(--ease-out) both;
}
.login-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(95, 131, 255, 0.13), transparent 36%, transparent 66%, rgba(122, 92, 240, 0.1));
  pointer-events: none;
  content: "";
}
.login-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}
.login-brand img { width: 148px; height: auto; }
.login-brand span {
  color: #8fa0c0;
  font: 600 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login-icon {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(95, 131, 255, 0.36);
  border-radius: 16px;
  color: #b9c9ff;
  background: linear-gradient(150deg, rgba(95, 131, 255, 0.24), rgba(36, 83, 238, 0.06));
  animation: loginFloat 5.6s ease-in-out infinite;
}
.login-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-icon em {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(95, 131, 255, 0.4);
  animation: softPulse 3.4s ease-in-out infinite;
}
.mono-kicker {
  position: relative;
  color: var(--blue-4);
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mono-kicker::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--blue-3);
  content: "";
}
.login-card h1 {
  position: relative;
  max-width: 470px;
  margin: 12px 0 0;
  font: 600 clamp(32px, 5.6vw, 46px)/1.04 var(--display);
  letter-spacing: -0.044em;
  color: #fff;
}

.pin-form { position: relative; margin-top: 32px; }
.pin-form > label {
  display: block;
  margin-bottom: 12px;
  color: #d9e1f0;
  font-weight: 650;
}
.pin-inputs { display: flex; gap: 10px; }
.pin-cell {
  position: relative;
  flex: 1 1 0;
  animation: rise 0.5s var(--ease-out) both;
}
.pin-cell:nth-child(1) { animation-delay: 0.30s; }
.pin-cell:nth-child(2) { animation-delay: 0.36s; }
.pin-cell:nth-child(3) { animation-delay: 0.42s; }
.pin-cell:nth-child(4) { animation-delay: 0.48s; }
.pin-cell:nth-child(5) { animation-delay: 0.54s; }
.pin-cell:nth-child(6) { animation-delay: 0.60s; }
.pin-digit {
  width: 100%;
  height: 66px;
  padding: 0;
  border: 1px solid rgba(159, 176, 214, 0.34);
  border-radius: 13px;
  background: rgba(4, 10, 20, 0.72);
  color: transparent;
  caret-color: var(--blue-3);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}
.pin-digit:hover { border-color: rgba(159, 176, 214, 0.6); }
.pin-digit:focus { border-color: #6f90ff; box-shadow: 0 0 0 4px rgba(95, 131, 255, 0.15); }
.pin-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #cfdaff;
  font-size: 30px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.14s var(--ease), transform 0.18s var(--ease-spring);
  pointer-events: none;
}
.pin-cell.is-filled .pin-mask { opacity: 1; transform: none; }
.pin-cell.is-filled .pin-digit { border-color: rgba(95, 131, 255, 0.55); background: rgba(12, 24, 46, 0.85); }
.pin-inputs.is-wrong .pin-cell { animation: cellShake 0.4s var(--ease) both; }
.pin-inputs.is-wrong .pin-digit { border-color: rgba(255, 150, 160, 0.6); }

.form-helper { min-height: 22px; margin: 12px 0 0; color: #8fa0bd; font-size: 13px; }
.form-error { min-height: 22px; margin: 12px 0 0; color: #ffb6c0; font-size: 13px; font-weight: 600; }

.login-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 12px;
  color: #fff;
  font-weight: 750;
  background: linear-gradient(135deg, var(--blue), #3d67f7);
  box-shadow: 0 14px 34px -14px rgba(36, 83, 238, 0.85);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s var(--ease);
}
.login-button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  background-size: 220% 100%;
  background-position: -40% 0;
  opacity: 0;
  transition: opacity 0.2s;
  content: "";
}
.login-button:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -14px rgba(36, 83, 238, 0.9); }
.login-button:hover::after { opacity: 1; animation: shimmer 1.1s var(--ease) forwards; }
.login-button:active { transform: translateY(0) scale(0.985); }
.login-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.24s var(--ease-spring); }
.login-button:hover svg { transform: translateX(4px); }

.privacy-line {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 26px;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8fa0bd;
  font-size: 13px;
  line-height: 1.55;
}
.privacy-line svg { width: 18px; flex: none; fill: none; stroke: var(--green-2); stroke-width: 1.7; margin-top: 2px; }

.login-footer {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: 22px;
  left: 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #91a0bd;
  font: 600 10px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ========================= PROPOSAL PAGE ========================= */

.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 0;
}
.site-nav img { width: 118px; height: auto; }
.nav-meta { color: var(--muted); font-size: 12.5px; text-align: center; }
.nav-lock {
  justify-self: end;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--card);
}
.nav-lock:hover { border-color: var(--blue); color: var(--blue); }

.section-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* ---- offer ---- */

.offer { padding: 82px 0 10px; }
.offer-head { margin-bottom: 46px; }
.offer-head .section-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue);
  margin-bottom: 24px;
}
.offer-head .section-label::before { content: ""; width: 7px; height: 7px; background: var(--blue); }
.offer-head h2 { max-width: 17ch; font-size: clamp(2.4rem, 5.2vw, 4.2rem); margin-bottom: 0; }

.control-note {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
  background: var(--blue-bg);
  border: 1px solid var(--blue-line);
  border-radius: 16px;
  padding: 26px 30px;
  margin-bottom: 14px;
}
.control-note span {
  display: block;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.control-note strong { font-size: 17px; line-height: 1.42; letter-spacing: -0.015em; }
.control-note p { color: var(--ink-2); font-size: 14px; line-height: 1.65; }

.licence-strip {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 30px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 30px;
  margin-bottom: 22px;
}
.licence-strip > div:first-child > span {
  display: block;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.licence-strip > div:first-child > strong { display: block; font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; margin-bottom: 7px; }
.licence-strip > div:first-child > p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.licence-price { border-left: 1px solid var(--line); padding-left: 26px; }
.licence-price small { display: block; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.licence-price strong { display: block; font-family: var(--display); font-size: 23px; letter-spacing: -0.04em; }
.licence-price span { color: var(--muted); font-size: 12.5px; }

.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stage-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 30px 32px;
  display: flex;
  flex-direction: column;
}
.stage-free { box-shadow: inset 0 3px 0 var(--green); }
.stage-dark { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: inset 0 3px 0 var(--blue); }
.stage-top { display: flex; flex-direction: column; gap: 10px; }
.stage-top > span { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.stage-top > strong { font-family: var(--display); font-size: 40px; letter-spacing: -0.05em; line-height: 1; }
.stage-top > strong small { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.stage-card h3 { font-size: 22px; margin: 18px 0 16px; }
.stage-card li {
  position: relative;
  padding: 7px 0 7px 24px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.stage-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--blue);
}
.stage-note {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.stage-note b { color: var(--ink); }
.stage-dark .stage-top > span { color: #8ea3c9; }
.stage-dark li { color: #c2cee2; }
.stage-dark li::before { border-color: #4f7dff; }
.stage-dark .stage-note { border-color: rgba(255, 255, 255, 0.14); color: #93a4c1; }
.stage-dark .stage-note b { color: #fff; }

.conditions {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 40px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
}
.conditions-label { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.conditions li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.62;
}
.conditions li:last-child { border-bottom: none; padding-bottom: 0; }
.conditions li:first-child { padding-top: 0; }
.conditions b { color: var(--ink); font-weight: 600; }

/* ---- demonstration intro ---- */

.demo-intro { padding: 84px 0 40px; }
.demo-intro-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; margin-top: 16px; }
.demo-intro-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin-top: 14px; }
.demo-intro-copy > p { max-width: 420px; color: var(--muted); font-size: 15px; line-height: 1.68; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.live-pill i, .demo-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.demo-steps { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; }
.demo-steps span { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.demo-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 11.5px;
}

/* ---- window frame ---- */

.demo-stage { padding: 0 0 90px; }
.demo-window {
  width: min(1300px, calc(100% - 40px));
  margin: 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  overflow: hidden;
  background: var(--c-bg);
  box-shadow: 0 30px 80px rgba(11, 21, 38, 0.14);
}
.demo-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: #efeee7;
  border-bottom: 1px solid var(--c-line);
  padding: 11px 16px;
  font-family: var(--c-sans);
  font-size: 12.5px;
  color: var(--c-ink2);
}
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: #c2bfb5; }
.win-dots i:first-child { background: var(--c-burst); }
.win-title { justify-self: center; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.win-title img { width: 17px; height: 17px; border-radius: 4px; }
.demo-live { justify-self: end; display: flex; align-items: center; gap: 7px; }
.demo-disclaimer {
  width: min(1300px, calc(100% - 40px));
  margin: 16px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer {
  border-top: 1px solid var(--line-2);
  padding: 28px 0 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.footer-inner img { width: 100px; height: auto; opacity: 0.8; }
.footer-inner p { justify-self: center; color: var(--muted); font-size: 12.5px; text-align: center; }
.footer-inner a { justify-self: end; color: var(--blue); font-size: 12.5px; font-weight: 600; }

/* ========================= CLAUDE DEMONSTRATION ========================= */

.cd-app {
  display: flex;
  height: 720px;
  min-height: 600px;
  overflow: hidden;
  position: relative;
  font-family: var(--c-sans);
  color: var(--c-ink);
  background: var(--c-bg);
}
.cd-app *:focus-visible { outline: 2px solid var(--c-coral); outline-offset: 2px; }

.cd-side {
  width: 262px;
  flex: 0 0 262px;
  background: var(--c-side);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
}
.cd-side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 14px; }
.cd-wordmark { height: 19px; width: auto; color: var(--c-ink); }
.cd-icon { color: var(--c-ink3); border-radius: 8px; padding: 5px; }
.cd-icon svg { width: 17px; height: 17px; }
.cd-icon:hover { background: var(--c-hover); color: var(--c-ink2); }
.cd-newchat {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 10px;
}
.cd-newchat:hover { background: var(--c-hover); }
.cd-newchat i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 14px;
  line-height: 1;
}
.cd-recents { flex: 1; overflow-y: auto; margin-top: 16px; min-height: 0; }
.cd-side-label { display: block; font-size: 12px; color: var(--c-ink3); padding: 0 10px 6px; }
.cd-recent {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 13.5px;
  color: var(--c-ink2);
  padding: 7px 10px;
  border-radius: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-recent:hover { background: var(--c-hover); }
.cd-recent.is-active { background: #e7e5dc; color: var(--c-ink); }
.cd-recent i { color: var(--c-coral); font-style: normal; margin-right: 7px; }
.cd-side-bottom { border-top: 1px solid var(--c-line); padding-top: 10px; margin-top: 8px; }
.cd-syn {
  display: inline-block;
  font-size: 11px;
  color: var(--c-amber);
  border: 1px solid var(--c-amber-line);
  background: var(--c-amber-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin: 0 0 10px 8px;
}
.cd-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; }
.cd-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #5d5a52;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.cd-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.cd-user-meta strong { font-size: 13.5px; font-weight: 600; }
.cd-user-meta em { font-style: normal; font-size: 11.5px; color: var(--c-ink3); }

.cd-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cd-topbar { height: 52px; flex: 0 0 52px; display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.cd-side-open { display: none; }
.cd-topbar-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-stage { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* ---- home ---- */

.cd-home { margin: auto; width: min(920px, 94%); padding: 24px 0 30px; }
.cd-greeting { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.cd-burst { width: 32px; height: 32px; flex: 0 0 32px; }
.cd-greeting h2 { font-family: var(--c-serif); font-weight: 400; font-size: 32px; letter-spacing: -0.01em; }
.cd-home-note { max-width: 640px; margin: 0 auto 30px; text-align: center; color: var(--c-ink3); font-size: 14px; line-height: 1.55; }
.cd-chip-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; align-items: start; }
.cd-chip-label {
  display: block;
  font-family: var(--c-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0 0 10px 6px;
}
.cd-chips { display: flex; flex-direction: column; }
.cd-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
}
.cd-chip:hover { background: var(--c-hover); }
.cd-chip svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; color: var(--c-ink3); }
.cd-chip-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cd-chip-copy strong { font-size: 13.5px; font-weight: 600; }
.cd-chip-copy em { font-style: normal; font-size: 11.5px; line-height: 1.35; color: var(--c-ink3); }

/* ---- thread ---- */

.cd-thread { width: 100%; }
.cd-messages { width: min(730px, 94%); margin: 0 auto; padding: 24px 0 10px; }
.cd-banner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--c-amber);
  background: var(--c-amber-soft);
  border: 1px solid var(--c-amber-line);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 16px;
}
.cd-banner svg { width: 13px; height: 13px; flex: 0 0 13px; }
.cd-user-msg {
  background: var(--c-bubble);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 18px 0 6px auto;
  max-width: 85%;
  width: fit-content;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.cd-turn { margin: 16px 0 28px; }
.cd-thinking { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.cd-thinking .cd-burst-small { width: 16px; height: 16px; flex: 0 0 16px; color: var(--c-burst); animation: cdPulse 1.15s ease-in-out infinite; }
@keyframes cdPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.18); opacity: 1; } }
.cd-status { font-size: 13px; color: var(--c-ink3); margin: 0 0 10px 2px; }
.cd-status.cd-shimmer {
  background: linear-gradient(90deg, var(--c-ink3) 30%, #cfccc0 50%, var(--c-ink3) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cdShimmer 1.6s linear infinite;
}
@keyframes cdShimmer { to { background-position: -200% 0; } }

.cd-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--c-line);
  background: #fcfbf7;
  border-radius: 12px;
  padding: 9px 13px;
  margin: 7px 0;
  font-size: 13.5px;
}
.cd-tool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  overflow: hidden;
  background: #ede9dc;
}
.cd-tool-badge img { width: 22px; height: 22px; }
.cd-tool-badge svg { width: 14px; height: 14px; color: var(--c-coral); }
.cd-tool-label { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-tool-sum { color: var(--c-ink3); margin-left: auto; white-space: nowrap; font-size: 12.5px; }
.cd-spin {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-left: auto;
  border: 2px solid #e8e4da;
  border-top-color: var(--c-coral);
  border-radius: 50%;
  animation: cdRotate 0.8s linear infinite;
}
@keyframes cdRotate { to { transform: rotate(360deg); } }
.cd-tick { width: 15px; height: 15px; flex: 0 0 15px; color: var(--c-green); }

.cd-ai { font-family: var(--c-serif); font-size: 16.5px; line-height: 1.68; margin-top: 12px; }
.cd-ai p { margin: 0 0 12px; }
.cd-ai p:last-child { margin-bottom: 0; }
.cd-ai strong { font-weight: 700; }
.cd-ai ul { margin: 0 0 12px 20px; list-style: disc; }
.cd-ai li { margin: 4px 0; }

.cd-sources { margin-top: 14px; }
.cd-sources-label { font-size: 12px; color: var(--c-ink3); margin-bottom: 7px; }
.cd-source-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-source-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 330px;
  border: 1px solid var(--c-line);
  background: var(--c-card);
  border-radius: 11px;
  padding: 7px 11px;
  text-align: left;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cd-source-chip:hover { border-color: #d9b8a5; box-shadow: 0 2px 8px rgba(160, 90, 50, 0.08); }
.cd-source-chip svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--c-coral); }
.cd-sc-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cd-sc-title { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-sc-meta { font-size: 11px; color: var(--c-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- queue table ---- */

.cd-queue {
  border: 1px solid var(--c-line2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--c-card);
  margin-top: 14px;
}
.cd-queue-head {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f7f5ee;
  border-bottom: 1px solid var(--c-line);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
}
.cd-queue-head svg { width: 15px; height: 15px; color: var(--c-ink3); }
.cd-queue-head span { margin-left: auto; font-weight: 400; color: var(--c-ink3); font-size: 12px; }
.cd-queue-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-top: 1px solid #f0eee6;
  font-size: 13.5px;
}
.cd-queue-row:first-of-type { border-top: none; }
.cd-queue-main { min-width: 0; }
.cd-queue-main strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-queue-main small { color: var(--c-ink3); font-size: 11.5px; }
.cd-flag {
  margin-left: auto;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--c-line2);
  color: var(--c-ink2);
}
.cd-flag.is-ready { color: var(--c-green); background: var(--c-green-soft); border-color: #d5e3d6; }
.cd-flag.is-hold { color: var(--c-amber); background: var(--c-amber-soft); border-color: var(--c-amber-line); }
.cd-flag.is-block { color: var(--c-coral-deep); background: #fbefe9; border-color: #edd3c5; }

/* ---- output pack ---- */

.cd-pack {
  border: 1px solid var(--c-line2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--c-card);
  margin-top: 16px;
}
.cd-pack-head {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f7f5ee;
  border-bottom: 1px solid var(--c-line);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
}
.cd-pack-head svg { width: 15px; height: 15px; color: var(--c-amber); }
.cd-pack-head span { margin-left: auto; font-weight: 400; color: var(--c-ink3); font-size: 12px; }
.cd-tabs { display: flex; gap: 4px; padding: 12px 15px 0; }
.cd-tab {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-ink2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.cd-tab:hover { background: var(--c-hover); }
.cd-tab.is-active { background: var(--c-bubble); border-color: var(--c-line2); color: var(--c-ink); }
.cd-pack-body {
  padding: 14px 16px 4px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--c-ink2);
}
.cd-pack-body p { margin: 0 0 10px; }
.cd-pack-body strong { color: var(--c-ink); font-weight: 600; }
.cd-pack-foot { display: flex; align-items: center; gap: 10px; padding: 10px 15px 14px; }
.cd-copy {
  background: var(--c-coral);
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
}
.cd-copy:hover { background: var(--c-coral-deep); }
.cd-copy.is-done { background: var(--c-green); }
.cd-pack-note { margin-left: auto; font-size: 12px; color: var(--c-ink3); }

.cd-hold {
  border: 1px solid var(--c-amber-line);
  border-left: 3px solid var(--c-amber);
  background: #fdfbf5;
  border-radius: 12px;
  padding: 13px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--c-ink2);
}
.cd-hold strong { display: block; color: var(--c-amber); margin-bottom: 6px; font-size: 13px; }
.cd-hold ul { margin: 0 0 0 18px; list-style: disc; }
.cd-hold li { margin: 4px 0; }

/* ---- composer ---- */

.cd-composer-wrap { width: min(700px, 94%); margin: 0 auto; padding: 8px 0 16px; flex: 0 0 auto; }
.cd-composer {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(40, 36, 28, 0.05), 0 1px 3px rgba(40, 36, 28, 0.04);
  padding: 14px 16px 10px;
}
.cd-composer textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--c-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-ink);
  background: transparent;
  max-height: 150px;
  caret-color: transparent;
}
.cd-composer textarea::placeholder { color: #b8b5aa; }
.cd-composer-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cd-plus { font-size: 20px; color: var(--c-ink3); line-height: 1; }
.cd-spacer { flex: 1; }
.cd-model { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--c-ink2); }
.cd-model svg { width: 14px; height: 14px; color: var(--c-ink3); }
.cd-send {
  width: 34px;
  height: 34px;
  background: var(--c-coral);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.14s ease;
}
.cd-send svg { width: 17px; height: 17px; }
.cd-send:disabled { background: #e5e2d9; color: #b5b2a8; cursor: default; }
.cd-send.is-sent { transform: scale(0.86); }
.cd-composer-note { font-size: 11.5px; color: var(--c-ink3); text-align: center; margin-top: 9px; }

.cd-in { animation: cdIn 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes cdIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- document viewer ---- */

.cd-doc {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--c-sans);
}
.cd-doc[hidden] { display: none; }
.cd-doc-backdrop { position: absolute; inset: 0; background: rgba(11, 21, 38, 0.5); }
.cd-doc-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(20, 18, 14, 0.4);
}
.cd-doc-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--c-line); }
.cd-doc-type {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-coral);
  margin-bottom: 7px;
}
.cd-doc-head h3 { font-family: var(--c-serif); font-weight: 600; font-size: 19px; line-height: 1.35; color: var(--c-ink); letter-spacing: 0; }
.cd-doc-meta { font-size: 12.5px; color: var(--c-ink3); margin-top: 6px; }
.cd-doc-head .cd-icon { margin-left: auto; }
.cd-doc-body {
  overflow-y: auto;
  padding: 20px 22px;
  font-family: var(--c-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-ink);
  white-space: pre-wrap;
}
.cd-doc-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-top: 1px solid var(--c-line);
  font-size: 12px;
  color: var(--c-ink3);
}

/* ========================= RESPONSIVE ========================= */

@media (min-width: 861px) {
  .cd-app.is-side-collapsed .cd-side { display: none; }
  .cd-app.is-side-collapsed .cd-side-open { display: inline-flex; }
}

@media (max-width: 1080px) {
  .conditions { grid-template-columns: 1fr; gap: 18px; }
  .control-note { grid-template-columns: 1fr; gap: 16px; }
  .licence-strip { grid-template-columns: 1fr 1fr; }
  .licence-strip > div:first-child { grid-column: 1 / -1; }
  .licence-price:first-of-type { padding-left: 0; border-left: none; }
  .stage-grid { grid-template-columns: 1fr; }
  .demo-intro-copy { flex-direction: column; align-items: flex-start; gap: 22px; }
}

@media (max-width: 860px) {
  .site-nav, .footer-inner { grid-template-columns: 1fr auto; }
  .nav-meta, .footer-inner p { display: none; }
  .cd-app { height: 640px; }
  .cd-side {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 40px rgba(30, 28, 24, 0.18);
  }
  .cd-app.is-side-open .cd-side { transform: none; }
  .cd-side-open { display: inline-flex; }
  .cd-chip-zone { grid-template-columns: 1fr; gap: 4px; }
  .cd-chip-label { padding-top: 12px; }
}

@media (max-width: 620px) {
  .offer, .demo-intro { padding-top: 56px; }
  .demo-window, .demo-disclaimer { width: calc(100% - 24px); }
  .win-title { font-size: 11.5px; }
  .cd-app { height: 600px; }
  .cd-messages { width: calc(100% - 28px); }
  .cd-source-chip { max-width: 100%; }
  .cd-queue-row { flex-wrap: wrap; }
  .cd-flag { margin-left: 0; }
}

@media (max-width: 600px) {
  .login-shell { padding: 40px 16px 74px; }
  .login-card { padding: 32px 22px 30px; border-radius: 22px; }
  .login-brand { margin-bottom: 28px; }
  .login-brand img { width: 118px; }
  .pin-inputs { gap: 7px; }
  .pin-digit { height: 58px; }
  .pin-mask { font-size: 26px; }
  .login-footer { right: 18px; left: 18px; font-size: 9px; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-in, .cd-thinking .cd-burst-small, .cd-status.cd-shimmer, .cd-spin,
  .ambient-aurora, .ambient-grid, .ambient-stars, .ambient-beam,
  .login-card, .login-icon, .login-icon em, .pin-cell, .pin-inputs.is-wrong .pin-cell {
    animation: none !important;
  }
  .login-button::after { animation: none !important; }
  html { scroll-behavior: auto; }
}
