:root {
  color-scheme: light;
  --ink: #132743;
  --ink-strong: #07192f;
  --paper: #f6f5f1;
  --paper-deep: #eae9e2;
  --water: #9cbfd4;
  --water-deep: #436f8a;
  --brass: #b58435;
  --mist: #c8d6dc;
  --danger: #a7352e;
  --success: #21704d;
  --line: rgba(19, 39, 67, 0.22);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; color: var(--ink); }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.025em; }
.brand small { display: block; margin-top: 1px; color: var(--water-deep); font-size: .72rem; font-weight: 650; letter-spacing: .055em; text-transform: uppercase; }
.masthead-meta { display: inline-flex; align-items: center; gap: 8px; color: #35536a; font-size: .82rem; font-weight: 600; }
.secure-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 1px 4px rgba(33, 112, 77, .4); }

.intro { max-width: 760px; padding: 58px 0 30px; }
.section-label { margin: 0 0 8px; color: var(--water-deep); font-size: .73rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 16ch; margin-bottom: 15px; color: var(--ink-strong); font-size: clamp(2.35rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.055em; }
.intro > p:last-child { max-width: 67ch; margin-bottom: 0; color: #426075; font-size: 1rem; line-height: 1.65; }

.route { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route li { position: relative; display: flex; align-items: center; gap: 9px; min-height: 55px; color: #547081; font-size: .74rem; font-weight: 750; }
.route li + li::before { position: absolute; top: 27px; right: 100%; width: 100%; border-top: 1px solid var(--mist); content: ""; }
.route span { position: relative; z-index: 1; display: inline-grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--water); border-radius: 50%; background: var(--paper); color: var(--water-deep); font-size: .7rem; }
.route .is-current { color: var(--ink); }
.route .is-current span { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 0 3px 7px rgba(7, 25, 47, .24); }

.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); align-items: start; border: 1px solid var(--line); background: rgba(255, 255, 255, .45); }
form { min-width: 0; }
.form-section { position: relative; padding: 31px; border-bottom: 1px solid var(--line); }
.form-section::after { position: absolute; right: -1px; bottom: -1px; width: 36px; height: 36px; border-top: 1px solid var(--water); border-left: 1px solid var(--water); background: var(--paper); clip-path: polygon(0 0, 100% 100%, 0 100%); content: ""; }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.step-number { display: grid; width: 32px; height: 37px; place-items: center; clip-path: polygon(0 0, 100% 18%, 87% 100%, 0 82%); background: var(--ink); color: white; font-size: .74rem; font-weight: 800; }
.section-heading .section-label { margin-bottom: 4px; }
h2 { margin-bottom: 0; color: var(--ink-strong); font-size: 1.17rem; letter-spacing: -.025em; }
.section-copy { max-width: 65ch; margin: -5px 0 19px 45px; color: #527083; font-size: .88rem; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
label:not(.provider-switch label) { display: block; margin-bottom: 7px; color: #273f55; font-size: .83rem; font-weight: 740; }
input { width: 100%; min-height: 43px; border: 1px solid #9eb2bc; border-radius: 2px; background: rgba(255,255,255,.78); color: var(--ink-strong); padding: 10px 11px; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input:hover { border-color: #618399; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(67, 111, 138, .2); background: white; }
.field-hint, .profile-note { margin: 7px 0 0; color: #557082; font-size: .76rem; line-height: 1.45; }
.field-error { min-height: 0; margin: 0; color: var(--danger); font-size: .78rem; font-weight: 650; line-height: 1.4; }
.field.is-invalid input { border-color: var(--danger); background: #fff7f6; }
.field-error:not(:empty) { margin-top: 6px; }
code { border-radius: 3px; background: #e7edf0; padding: .12em .3em; color: #24495f; font-size: .9em; }
.text-action { margin-top: 8px; border: 0; background: transparent; padding: 0; color: #225c7b; font-size: .78rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-action:hover { color: var(--ink); }

.provider-switch { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 21px; border: 1px solid var(--line); }
.provider-switch label { position: relative; min-height: 72px; cursor: pointer; }
.provider-switch label + label { border-left: 1px solid var(--line); }
.provider-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.provider-switch span { display: block; height: 100%; padding: 14px 15px; color: #567084; font-size: .88rem; font-weight: 750; line-height: 1.2; transition: background .18s ease, color .18s ease; }
.provider-switch small { display: block; margin-top: 5px; color: inherit; font-size: .7rem; font-weight: 600; }
.provider-switch input:checked + span { background: var(--ink); color: #fff; }
.provider-switch input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: -3px; }
.profile-fields { padding: 19px; border-top: 3px solid var(--water); background: rgba(192, 216, 227, .20); }
.profile-fields[hidden] { display: none; }
.optional-fields { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.optional-fields summary { color: #31566f; font-size: .83rem; font-weight: 750; cursor: pointer; }
.optional-fields .field-grid { padding-top: 17px; }

.submit-section { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 31px; background: var(--ink); color: white; }
.submit-section .section-label { color: #b3d2e2; }
.submit-section h2 { color: white; font-size: 1.45rem; }
.submit-section p:last-child { max-width: 50ch; margin: 8px 0 0; color: #d0e1e9; font-size: .87rem; line-height: 1.5; }
.deploy-button { display: inline-flex; flex: none; align-items: center; justify-content: space-between; min-width: 218px; gap: 18px; border: 1px solid #e7f4f9; background: #e7f4f9; color: var(--ink-strong); padding: 13px 16px; font-size: .86rem; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, color .18s ease; }
.deploy-button:hover { background: var(--brass); border-color: var(--brass); color: #102338; transform: translateY(-2px); }
.deploy-button:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.deploy-button:disabled { opacity: .65; cursor: wait; transform: none; }

.fold-summary { position: sticky; top: 20px; overflow: hidden; min-height: 100%; padding: 30px 27px; background: #e8eef0; }
.fold-summary::before { position: absolute; top: -74px; right: -83px; width: 242px; height: 242px; border: 1px solid #a7c8d8; transform: rotate(32deg); content: ""; }
.fold-summary::after { position: absolute; right: 27px; bottom: 122px; width: 90px; border-top: 1px solid var(--water-deep); transform: rotate(-24deg); transform-origin: right; content: ""; }
.fold-summary > * { position: relative; z-index: 1; }
.fold-crest { margin: -5px -9px 20px; color: var(--ink); }
.fold-crest svg { width: 100%; height: auto; fill: rgba(255,255,255,.45); stroke: currentColor; stroke-width: 1.2; }
.fold-crest circle { fill: var(--brass); stroke: var(--ink); }
.fold-summary h2 { margin-bottom: 21px; font-size: 1.62rem; }
dl { margin: 0; }
dl div { padding: 12px 0; border-top: 1px solid rgba(19,39,67,.18); }
dt { color: #5c7584; font-size: .7rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
dd { overflow-wrap: anywhere; margin: 4px 0 0; color: var(--ink); font-size: .84rem; font-weight: 680; line-height: 1.45; }
.security-promise { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-top: 28px; border-top: 1px solid rgba(19,39,67,.18); padding-top: 20px; }
.security-promise span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--success); border-radius: 50%; color: var(--success); font-size: .8rem; font-weight: 900; }
.security-promise p { margin: 0; color: #3a596b; font-size: .78rem; line-height: 1.55; }
.security-promise strong { color: var(--ink); }
.docs-link { display: inline-block; margin-top: 27px; color: var(--ink); font-size: .8rem; font-weight: 780; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.deployment-status { margin-top: 27px; border: 1px solid var(--line); border-top: 4px solid var(--brass); background: white; padding: 26px 30px; }
.deployment-status.is-error { border-top-color: var(--danger); }
.deployment-status.is-success { border-top-color: var(--success); }
.deployment-status h2 { margin-bottom: 8px; font-size: 1.35rem; }
.deployment-status p { max-width: 68ch; margin-bottom: 10px; color: #4b6678; line-height: 1.55; }
.deployment-status a { color: #174f70; font-size: .86rem; font-weight: 760; }
.deployment-status code { display: inline-block; margin-bottom: 12px; }

@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; }
  .fold-summary { position: relative; top: auto; min-height: auto; border-top: 1px solid var(--line); }
  .route li { gap: 5px; font-size: .63rem; }
  .route span { width: 20px; height: 20px; }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 28px, 1180px); padding-top: 16px; }
  .masthead-meta { display: none; }
  .intro { padding-top: 39px; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.35rem); }
  .route { grid-template-columns: 1fr; padding: 9px 0; }
  .route li { min-height: 29px; font-size: .76rem; }
  .route li + li::before { display: none; }
  .route li:not(.is-current) { display: none; }
  .form-section, .submit-section { padding: 25px 20px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .provider-switch { grid-template-columns: 1fr; }
  .provider-switch label + label { border-top: 1px solid var(--line); border-left: 0; }
  .provider-switch label { min-height: 55px; }
  .provider-switch span { padding: 10px 12px; }
  .provider-switch small { display: inline; margin-left: 5px; }
  .submit-section { display: grid; }
  .deploy-button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .fold-summary::before { animation: fold-drift 12s cubic-bezier(.22, .61, .36, 1) infinite alternate; }
  @keyframes fold-drift { to { transform: rotate(42deg) translate(14px, -10px); } }
}
