:root {
  --navy-950: #06172b;
  --navy-900: #0a213b;
  --navy-800: #113554;
  --blue-500: #1677e8;
  --blue-600: #0b66cf;
  --red-500: #dc2f3f;
  --ink: #152033;
  --muted: #617086;
  --line: #d9e0e8;
  --surface: rgba(255, 255, 255, .96);
  --success: #12805c;
  --radius-lg: 26px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--navy-950);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: rgba(4, 17, 34, .55);
  background-image: url("cds-alpine-background.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  background-blend-mode: multiply;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.page-shell {
  width: min(1340px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 124px;
  color: white;
}
.brand { display: inline-flex; align-items: center; gap: 18px; text-decoration: none; }
.brand-mark { font-size: 35px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.brand-mark::after { content: "."; color: var(--red-500); }
.brand-divider { width: 1px; height: 34px; background: rgba(255,255,255,.65); }
.brand-product { font-size: 31px; font-weight: 600; letter-spacing: -.03em; }
.company-name { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.72); }

main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0 76px; }
footer {
  color: rgba(255,255,255,.68);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 28px;
  font-size: 13px;
}

.hero-card, .panel {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 24px 70px rgba(1, 15, 31, .3);
  backdrop-filter: blur(18px);
}
.hero-card { border-radius: var(--radius-lg); padding: 62px; }
.hero-card--home { width: min(850px, 100%); }
.eyebrow {
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: clamp(44px, 5.1vw, 72px); line-height: 1.03; letter-spacing: -.055em; color: var(--navy-950); }
h1 span { color: var(--blue-600); }
.lead { color: var(--muted); font-size: 19px; line-height: 1.55; max-width: 700px; margin: 26px 0 34px; }
.code-form { padding-top: 8px; }
.code-form > label, .field-label { display: block; font-size: 14px; font-weight: 750; margin-bottom: 10px; color: var(--navy-900); }
.code-row { display: flex; gap: 12px; }
input[type="text"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
  border-radius: 10px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
input[type="text"], select { min-height: 54px; padding: 0 17px; }
textarea { min-height: 280px; padding: 17px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(22,119,232,.13); }

.button {
  border: 0;
  border-radius: 10px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); }
.button--primary { color: white; background: var(--blue-600); box-shadow: 0 8px 20px rgba(11,102,207,.25); }
.button--primary:hover { background: #075bb8; }
.button--dark { background: var(--navy-900); color: white; }
.button--ghost { border: 1px solid var(--line); background: white; color: var(--navy-900); }
.button--full { width: 100%; margin-top: 26px; }
.action-row { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 28px; display: flex; align-items: center; gap: 26px; }
.action-row p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.5; }
.action-row p strong { color: var(--ink); }
.action-row--compact { justify-content: flex-start; border: 0; padding: 0; }

.notice { border-radius: 9px; padding: 13px 15px; margin: 18px 0; background: #edf5ff; color: var(--navy-800); font-size: 14px; }
.notice--error { background: #fff0f1; color: #9d1c2a; }
.page-heading { color: white; margin-bottom: 28px; }
.page-heading h1 { color: white; font-size: clamp(38px, 4.5vw, 61px); }
.page-heading .eyebrow { color: #86bfff; margin-bottom: 10px; }
.back-link { display: inline-block; color: rgba(255,255,255,.78); margin-bottom: 24px; text-decoration: none; font-size: 14px; }

.share-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr); gap: 22px; align-items: start; }
.panel { border-radius: 20px; padding: 36px; }
.panel--settings { position: sticky; top: 20px; }
.panel h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 28px; }
.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; background: #eaf0f6; padding: 4px; border-radius: 11px; margin-bottom: 28px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 10px 28px; border-radius: 8px; font-size: 14px; font-weight: 750; cursor: pointer; }
.segmented input:checked + span { background: white; box-shadow: 0 2px 7px rgba(12,34,60,.13); color: var(--blue-600); }
.field-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 12px; }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 8px 0 24px; min-height: 38px; }
.panel--settings select { margin-bottom: 0; appearance: auto; }
.drop-zone { min-height: 280px; border: 2px dashed #b8c7d8; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); cursor: pointer; background: #f8fafc; text-align: center; }
.drop-zone:hover { border-color: var(--blue-500); background: #f1f7ff; }
.drop-zone strong { color: var(--blue-600); font-size: 17px; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.file-name { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 26px; padding: 22px 0; cursor: pointer; }
.toggle-row span { display: flex; flex-direction: column; gap: 5px; }
.toggle-row strong { font-size: 14px; }
.toggle-row small { color: var(--muted); line-height: 1.4; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i { width: 46px; height: 26px; flex: 0 0 auto; border-radius: 20px; background: #cbd4df; position: relative; transition: background .15s; }
.toggle-row i::after { content: ""; position: absolute; width: 20px; height: 20px; background: white; border-radius: 50%; top: 3px; left: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .15s; }
.toggle-row input:checked + i { background: var(--blue-600); }
.toggle-row input:checked + i::after { transform: translateX(20px); }
.security-note { display: flex; flex-direction: column; gap: 7px; margin-top: 24px; padding: 16px; border-radius: 11px; background: #edf7f4; color: #17634f; font-size: 13px; line-height: 1.45; }

.result-card { width: min(760px, 100%); text-align: center; margin: auto; }
.result-card h1, .content-card h1 { font-size: clamp(40px, 5vw, 62px); }
.result-card .lead { margin-left: auto; margin-right: auto; }
.success-dot { width: 15px; height: 15px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 8px rgba(18,128,92,.12); margin: 0 auto 28px; }
.generated-code { background: var(--navy-950); color: white; padding: 20px 20px 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 13px; margin: 28px 0 15px; }
.generated-code code { font-family: "SFMono-Regular", Consolas, monospace; font-weight: 700; font-size: clamp(19px, 3vw, 30px); letter-spacing: .08em; overflow-wrap: anywhere; }
.share-link-label { margin: 24px 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.generated-link { margin-top: 0; text-align: left; }
.generated-link code { font-size: 14px; letter-spacing: 0; }
.copy-button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: white; padding: 9px 14px; border-radius: 8px; cursor: pointer; }
.result-meta { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; }
.result-meta span { background: #edf2f7; border-radius: 99px; padding: 7px 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.content-card { width: min(900px, 100%); margin: auto; }
.shared-text { white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f6f9; border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-height: 180px; max-height: 52vh; overflow: auto; margin: 28px 0; font: 15px/1.65 "SFMono-Regular", Consolas, monospace; }

@media (max-width: 900px) {
  .page-shell { width: min(100% - 30px, 720px); }
  .site-header { min-height: 92px; }
  .company-name { display: none; }
  main { padding-top: 14px; }
  .hero-card { padding: 38px; }
  .share-layout { grid-template-columns: 1fr; }
  .panel--settings { position: static; }
  footer { flex-direction: column; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 20px, 520px); }
  .brand { gap: 12px; }
  .brand-mark { font-size: 27px; }
  .brand-product { font-size: 24px; }
  .brand-divider { height: 27px; }
  .hero-card, .panel { border-radius: 18px; padding: 25px; }
  h1 { font-size: 39px; }
  .lead { font-size: 16px; }
  .code-row, .action-row { flex-direction: column; align-items: stretch; }
  .code-row .button { width: 100%; }
  .action-row p { text-align: center; }
  .panel { padding: 24px 20px; }
  .segmented { width: 100%; }
  .segmented span { text-align: center; padding-left: 16px; padding-right: 16px; }
  .generated-code { flex-direction: column; padding: 20px; }
  .copy-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

