/* ==========================================================================
   Arkhos website installer
   Matches the public site: petrol-blue grounds, flare accent, Archivo / IBM Plex.
   Two-column wizard (brand rail + step card) that collapses to one column on phones.
   External file only: the installer runs under a strict Content-Security-Policy.
   ========================================================================== */

:root {
  color-scheme: dark;

  --p-950: #050f15;
  --p-900: #08161f;
  --p-850: #0b1d28;
  --p-800: #0f2533;
  --p-700: #163243;
  --p-600: #21465b;

  --fg: #e8eef1;
  --fg-2: #b6c4cc;
  --fg-3: #8197a3;
  --line: rgba(196, 222, 235, 0.12);
  --line-2: rgba(196, 222, 235, 0.24);

  --flare: #ff8b2b;
  --flare-2: #ffa04f;
  --flare-ink: #170a02;
  --good: #45d08b;
  --bad: #ff6464;
  --warn: #f4c16a;
  --info: #3fb7e2;

  --sheen: linear-gradient(100deg, #9a7bff 0%, #3fb7e2 28%, #5fe3b6 50%, #f4c16a 72%, #ff8b2b 100%);

  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius: 4px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--p-900);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; }
ol, ul { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--flare); text-underline-offset: 3px; }
a:hover { color: var(--flare-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.88em; }
code {
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(196, 222, 235, 0.08);
  border: 1px solid var(--line);
  color: var(--fg);
  word-break: break-word;
}
strong { font-weight: 600; color: var(--fg); }
[hidden] { display: none !important; }
::selection { background: var(--flare); color: var(--p-950); }

:focus-visible {
  outline: 2px solid var(--flare);
  outline-offset: 3px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 2px solid var(--flare); outline-offset: 4px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--flare); color: var(--flare-ink); font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; color: var(--flare-ink); }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Shell ---------- */
.ins {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
}

.ins-rail {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; gap: 40px;
  padding: 40px 32px 32px;
  background:
    radial-gradient(120% 60% at 0% 100%, rgba(255, 139, 43, 0.12), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(196, 222, 235, 0.035) 27px 28px),
    var(--p-950);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.ins-rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--sheen);
}
.ins-rail__top { display: grid; gap: 18px; }
.ins-rail__label { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--fg-2); }
.ins-rail__foot { margin-top: auto; }
.ins-rail__foot p {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.86rem; line-height: 1.5; color: var(--fg-3);
}
.ins-rail__foot .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--fg-3); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.brand__mark { width: 30px; height: 36px; }
.brand__word { display: grid; line-height: 1; }
.brand__name { font-family: var(--font-display); font-stretch: 125%; font-weight: 750; font-size: 1.22rem; letter-spacing: 0.16em; }
.brand__sub { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.42em; color: var(--fg-3); margin-top: 5px; }

/* Step list (desktop) */
.steps { list-style: none; display: grid; gap: 2px; position: relative; }
.steps__item { position: relative; }
.steps__item:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 46px; bottom: -8px; width: 1px;
  background: var(--line-2);
}
.steps__item.is-done:not(:last-child)::after { background: rgba(69, 208, 139, 0.45); }
.steps__link {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 8px 10px 14px 0;
  border-radius: var(--radius);
  color: var(--fg-3); text-decoration: none;
}
a.steps__link:hover { color: var(--fg); }
a.steps__link:hover .steps__title { text-decoration: underline; text-underline-offset: 3px; }
.steps__num {
  display: grid; place-items: center; flex: none;
  width: 35px; height: 35px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--fg-3); background: var(--p-950);
  position: relative; z-index: 1;
}
.steps__num .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.steps__text { display: grid; gap: 2px; padding-top: 5px; min-width: 0; }
.steps__title { font-family: var(--font-display); font-stretch: 108%; font-weight: 650; font-size: 0.98rem; line-height: 1.25; color: inherit; }
.steps__sub { font-size: 0.8rem; color: var(--fg-3); line-height: 1.4; }

.steps__item.is-done .steps__link { color: var(--fg-2); }
.steps__item.is-done .steps__num { border-color: rgba(69, 208, 139, 0.55); color: var(--good); background: rgba(69, 208, 139, 0.08); }
.steps__item.is-current .steps__link { color: var(--fg); }
.steps__item.is-current .steps__num {
  border-color: var(--flare); color: var(--flare-ink); background: var(--flare);
  box-shadow: 0 0 0 5px rgba(255, 139, 43, 0.16);
}
.steps__item.is-current .steps__sub { color: var(--fg-2); }
.steps__item.is-upcoming .steps__title { color: var(--fg-3); }

/* Compact progress (phones) */
.progress { display: none; }
.progress__text { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.progress__bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 10px; }
.progress__bar span { height: 4px; border-radius: 2px; background: var(--line-2); }
.progress__bar .is-done { background: var(--good); }
.progress__bar .is-current { background: var(--flare); }

/* Main column */
.ins-main {
  min-width: 0;
  padding: clamp(28px, 5vw, 72px) var(--gutter) 40px;
  display: flex; flex-direction: column; align-items: center;
}
.ins-main:focus { outline: none; }
.ins-card {
  width: 100%; max-width: 780px;
  padding: clamp(22px, 4vw, 48px);
  background: var(--p-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  display: grid; gap: 28px;
  min-width: 0;
}
.ins-card > * { min-width: 0; }
.ins-meta {
  margin-top: 22px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3);
  text-align: center;
}

/* Single-column variant (problem / already installed / PHP version pages) */
.ins--solo { grid-template-columns: minmax(0, 1fr); }
.ins-rail--solo {
  position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px;
  padding: 22px var(--gutter);
  border-right: 0; border-bottom: 1px solid var(--line);
  background: var(--p-950);
}
.ins-rail--solo .ins-rail__top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.ins-rail--solo .ins-rail__foot { display: none; }

/* ---------- Typography in the card ---------- */
.ins-head { display: grid; gap: 12px; }
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--fg-2);
}
h1 {
  font-family: var(--font-display); font-stretch: 112%; font-weight: 700;
  font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.6rem); line-height: 1.08; letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead { font-size: clamp(1rem, 0.96rem + 0.25vw, 1.12rem); line-height: 1.6; color: var(--fg-2); font-weight: 300; max-width: 62ch; text-wrap: pretty; }
.lead code { font-weight: 400; }
.ins-h2 {
  font-family: var(--font-display); font-stretch: 108%; font-weight: 650;
  font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.005em;
}
.ins-small { font-size: 0.9rem; color: var(--fg-3); }
.mono-inline { font-family: var(--font-mono); font-size: 0.86rem; color: var(--fg); word-break: break-word; }
.plain-list { list-style: none; }
.mono-list { font-family: var(--font-mono); font-size: 0.9rem; display: grid; gap: 4px; margin-top: 6px; }

.chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-2);
}

.howto {
  counter-reset: howto;
  list-style: none;
  display: grid; gap: 12px;
}
.howto li {
  counter-increment: howto;
  position: relative;
  padding-left: 40px;
  color: var(--fg-2);
  line-height: 1.55;
}
.howto li::before {
  content: counter(howto);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  color: var(--flare); border: 1px solid rgba(255, 139, 43, 0.45);
}
.help-note {
  display: grid; gap: 10px;
  padding: 16px 18px; border-radius: var(--radius);
  background: rgba(196, 222, 235, 0.04); border: 1px solid var(--line);
  color: var(--fg-2); font-size: 0.95rem;
}

/* ---------- Notices ---------- */
.notice {
  --tone: var(--info);
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--tone) 42%, transparent);
  background: color-mix(in srgb, var(--tone) 8%, transparent);
  color: var(--fg-2);
  min-width: 0;
}
.notice > .icon { color: var(--tone); margin-top: 2px; width: 22px; height: 22px; }
.notice__body { display: grid; gap: 6px; min-width: 0; flex: 1; }
.notice__body p { line-height: 1.55; overflow-wrap: anywhere; }
.notice__title { font-weight: 600; color: var(--fg); }
.notice--good { --tone: var(--good); }
.notice--bad { --tone: var(--bad); }
.notice--warn { --tone: var(--warn); }
.notice--info { --tone: var(--info); }
.focus-target { display: grid; }
.error-summary__list { list-style: none; display: grid; gap: 4px; }
.error-summary__list a { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(255, 100, 100, 0.6); }
.error-summary__list a:hover { color: var(--flare-2); }

/* ---------- Requirements ---------- */
.req-group { display: grid; gap: 10px; }
.req-group__title {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3);
}
.req-list { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); }
.req {
  --tone: var(--good);
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
}
.req + .req { border-top: 1px solid var(--line); }
.req > .icon, .req__icon-slot .icon { color: var(--tone); width: 22px; height: 22px; margin-top: 1px; }
.req__icon-slot { flex: none; display: block; }
.req--pass { --tone: var(--good); }
.req--warn { --tone: var(--warn); }
.req--fail { --tone: var(--bad); background: rgba(255, 100, 100, 0.05); }
.req--info { --tone: var(--fg-3); }
.req__body { flex: 1; display: grid; gap: 4px; min-width: 0; }
.req__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; align-items: baseline; }
.req__label { font-weight: 500; color: var(--fg); }
.req__value { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-2); overflow-wrap: anywhere; }
.req--fail .req__value { color: var(--bad); }
.req--warn .req__value { color: var(--warn); }
.req__detail { font-size: 0.92rem; color: var(--fg-3); line-height: 1.5; overflow-wrap: anywhere; }
.req__fix {
  margin-top: 8px; padding: 12px 14px;
  border-left: 2px solid var(--tone);
  background: rgba(196, 222, 235, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem; color: var(--fg-2);
  display: grid; gap: 4px;
}
.req__fix-title {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--tone);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.form-row--host { grid-template-columns: minmax(0, 1fr) 140px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field--medium input, .field--medium select { max-width: 320px; }
.field > label, .choices__legend, .code-field label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2);
}
.field__opt { color: var(--fg-3); letter-spacing: 0.1em; margin-left: 6px; }
.field input, .field select, .code-box {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--p-900);
  color: var(--fg);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--fg-3); opacity: 0.75; }
.field input:hover, .field select:hover { border-color: rgba(196, 222, 235, 0.36); }
.field input:focus, .field select:focus, .code-box:focus {
  outline: none; border-color: var(--flare);
  box-shadow: 0 0 0 3px rgba(255, 139, 43, 0.25);
}
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 17px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option, .field select optgroup { background: var(--p-850); color: var(--fg); }
.field__hint { font-size: 0.88rem; color: var(--fg-3); line-height: 1.5; }
.field__error {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.9rem; color: var(--bad); line-height: 1.45;
}
.field__error .icon { width: 17px; height: 17px; margin-top: 2px; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--bad); }
.field.is-invalid input:focus, .field.is-invalid select:focus { box-shadow: 0 0 0 3px rgba(255, 100, 100, 0.25); }
.field__match { font-size: 0.88rem; }
.field__match.is-good { color: var(--good); }
.field__match.is-bad { color: var(--warn); }

/* Password with show/hide */
.pw { position: relative; display: flex; }
.pw input { padding-right: 84px; }
.pw__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 38px; min-width: 64px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--p-800); color: var(--fg-2);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pw__toggle:hover { color: var(--fg); border-color: var(--fg-3); }

/* Strength meter */
.pw-meter { display: grid; gap: 6px; }
.pw-meter__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter__bar span { height: 4px; border-radius: 2px; background: var(--line-2); transition: background 0.25s; }
.pw-meter.is-1 .pw-meter__bar span:nth-child(-n+1) { background: var(--bad); }
.pw-meter.is-2 .pw-meter__bar span:nth-child(-n+2) { background: var(--warn); }
.pw-meter.is-3 .pw-meter__bar span:nth-child(-n+3) { background: var(--good); }
.pw-meter.is-4 .pw-meter__bar span:nth-child(-n+4) { background: var(--good); }
.pw-meter__text { font-size: 0.88rem; color: var(--fg-2); line-height: 1.45; }

/* Grouped fields */
.group {
  display: grid; gap: 22px;
  padding: 0; border: 0; min-width: 0;
}
.group + .group { padding-top: 26px; border-top: 1px solid var(--line); }
.group__title {
  display: flex; align-items: center; gap: 10px;
  float: left; width: 100%;               /* keeps the legend out of the fieldset's top border */
  padding: 0; margin-bottom: 2px;
  font-family: var(--font-display); font-stretch: 108%; font-weight: 650;
  font-size: 1.12rem; color: var(--fg);
}
.group__title + * { clear: both; }
.group__title .icon { color: var(--flare); }
.group__intro { font-size: 0.93rem; color: var(--fg-3); margin-top: -10px; }
.group--smtp {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(5, 15, 21, 0.45);
}

/* Radio choices */
.choices {
  display: grid; gap: 10px;
  padding: 20px; margin: 0; min-width: 0;
  border: 1px solid rgba(244, 193, 106, 0.4); border-radius: var(--radius);
  background: rgba(244, 193, 106, 0.05);
}
.choices--plain { padding: 0; border: 0; background: none; }
.choices__legend { padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.choices__legend + * { clear: both; }
.choices > .choices__legend { color: var(--fg-2); }
.choices:not(.choices--plain) > .choices__legend {
  font-family: var(--font-display); font-stretch: 108%; font-weight: 650; font-size: 1.05rem;
  letter-spacing: -0.005em; text-transform: none; color: var(--warn);
}
.choices__intro { font-size: 0.95rem; color: var(--fg-2); margin-bottom: 6px; }
.choice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--p-900);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.choice:hover { border-color: rgba(196, 222, 235, 0.4); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--flare); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--flare); background: rgba(255, 139, 43, 0.07); }
.choice--danger:has(input:checked) { border-color: var(--bad); background: rgba(255, 100, 100, 0.07); }
.choice:has(input:focus-visible) { outline: 2px solid var(--flare); outline-offset: 2px; }
.choice__text { display: grid; gap: 3px; min-width: 0; }
.choice__title { font-weight: 600; color: var(--fg); line-height: 1.4; }
.choice__desc { font-size: 0.9rem; color: var(--fg-3); line-height: 1.5; }
.choices__confirm { padding-top: 6px; }

/* Toggle switch (a real checkbox underneath) */
.switch {
  position: relative;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--p-900);
}
.switch input {
  appearance: none; -webkit-appearance: none;
  flex: none; margin: 2px 0 0;
  width: 48px; height: 28px; border-radius: 999px;
  background: var(--p-700); border: 1px solid var(--line-2);
  position: relative; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--fg-2);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.switch input:checked { background: var(--flare); border-color: var(--flare); }
.switch input:checked::after { transform: translateX(20px); background: var(--flare-ink); }
.switch input:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; }
.switch label { display: grid; gap: 2px; cursor: pointer; }
.switch__title { font-weight: 600; color: var(--fg); }
.switch__desc { font-size: 0.9rem; color: var(--fg-3); }
.alerts-body { display: grid; gap: 22px; }

/* Test button + result */
.test-row {
  display: grid; gap: 14px; justify-items: start;
  padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.test-row__result { width: 100%; display: grid; }
.test-row__result:empty { display: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border: 1px solid var(--btn-bd); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-size: 0.97rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: var(--flare); --btn-fg: var(--flare-ink); --btn-bd: var(--flare); font-weight: 600; }
.btn--primary:hover { --btn-bg: var(--flare-2); --btn-bd: var(--flare-2); }
.btn--primary:focus-visible { outline-color: var(--fg); }
.btn--ghost { --btn-bd: rgba(232, 238, 241, 0.34); }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.06); --btn-bd: var(--fg); }
.btn--text { --btn-bd: transparent; padding: 0 10px; color: var(--fg-2); }
.btn--text:hover { --btn-fg: var(--fg); color: var(--fg); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.88rem; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ins-spin 0.8s linear infinite;
}
.btn[aria-busy="true"] .icon { display: none; }
@keyframes ins-spin { to { transform: rotate(360deg); } }

.actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 6px;
}
.actions--start { justify-content: flex-start; }
.actions__group { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.actions__form { margin-left: auto; }
.actions__note { font-size: 0.9rem; color: var(--fg-3); text-align: right; margin-top: -14px; }

/* ---------- Help box (details) ---------- */
.help {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(63, 183, 226, 0.05);
}
.help__summary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--fg);
  border-radius: var(--radius);
}
.help__summary::-webkit-details-marker { display: none; }
.help__summary .icon { color: var(--info); }
.help__summary::after {
  content: ""; margin-left: auto; flex: none;
  width: 8px; height: 8px; border-right: 2px solid var(--fg-2); border-bottom: 2px solid var(--fg-2);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s;
}
.help[open] > .help__summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.help__body { display: grid; gap: 16px; padding: 4px 18px 20px; }
.help__note {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.93rem; color: var(--fg-2);
  padding-top: 14px; border-top: 1px solid var(--line);
}
.help__note .icon { color: var(--info); margin-top: 2px; width: 18px; height: 18px; }

/* Technical details (transcripts) */
.tech { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.tech summary {
  cursor: pointer; width: fit-content;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2);
}
.tech summary:hover { color: var(--fg); }
.tech pre {
  margin: 10px 0 0; padding: 14px;
  max-height: 320px; overflow: auto;
  background: var(--p-950); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.8rem; line-height: 1.55; color: var(--fg-2);
  white-space: pre-wrap; word-break: break-word;
}

/* ---------- Summary (install step) ---------- */
.summary { display: grid; gap: 14px; }
.summary__section { border: 1px solid var(--line); border-radius: var(--radius); }
.summary__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(196, 222, 235, 0.03);
}
.summary__title { font-family: var(--font-display); font-stretch: 108%; font-weight: 650; font-size: 1.02rem; }
.summary__edit { font-size: 0.9rem; font-weight: 500; }
.summary__list { display: grid; padding: 6px 18px; }
.summary__row {
  display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 4px 18px;
  padding: 10px 0;
}
.summary__row + .summary__row { border-top: 1px solid var(--line); }
.summary__row dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }
.summary__row dd { color: var(--fg); overflow-wrap: anywhere; }

/* ---------- Manual config ---------- */
.code-field__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.code-box {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.6;
  resize: vertical; white-space: pre; overflow: auto;
  background: var(--p-950); color: var(--fg-2);
}

/* ---------- Done ---------- */
.ins-head--done { justify-items: start; }
.done-mark {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(69, 208, 139, 0.12); border: 1px solid rgba(69, 208, 139, 0.55); color: var(--good);
  margin-bottom: 6px;
}
.done-mark .icon { width: 28px; height: 28px; stroke-width: 2.2; }
.next { list-style: none; display: grid; gap: 12px; }
.next__item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(196, 222, 235, 0.03);
}
.next__item > div { display: grid; gap: 4px; min-width: 0; }
.next__item p { color: var(--fg-2); font-size: 0.95rem; overflow-wrap: anywhere; }
.next__num {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255, 139, 43, 0.5); color: var(--flare);
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
}
.next__title { font-family: var(--font-display); font-stretch: 108%; font-weight: 650; font-size: 1.05rem; }
.cleanup {
  display: grid; gap: 14px; justify-items: start;
  padding: 22px; border: 1px solid var(--line-2); border-radius: var(--radius);
}
.cleanup__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-stretch: 108%; font-weight: 650; font-size: 1.08rem;
}
.cleanup__title .icon { color: var(--flare); }
.cleanup p { color: var(--fg-2); font-size: 0.95rem; }
.cleanup__fallback { font-size: 0.88rem !important; color: var(--fg-3) !important; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 900px) {
  .ins { display: block; }
  .ins-rail {
    position: static; height: auto;
    gap: 18px;
    padding: 18px var(--gutter) 16px;
    border-right: 0; border-bottom: 1px solid var(--line);
    background:
      radial-gradient(80% 120% at 100% 0%, rgba(255, 139, 43, 0.1), transparent 60%),
      var(--p-950);
  }
  .ins-rail__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
  .ins-rail__foot, .ins-steps { display: none; }
  .progress { display: block; }
  .ins-main { padding: 20px var(--gutter) 32px; }
  .ins-rail--solo { padding: 18px var(--gutter); }
}

@media (max-width: 640px) {
  .ins-card { padding: 20px 16px; gap: 24px; border-radius: 8px; }
  .form-row, .form-row--host { grid-template-columns: minmax(0, 1fr); }
  .field--medium { max-width: none; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions > .btn, .actions__group, .actions__group .btn, .actions__form, .actions__form .btn { width: 100%; }
  .actions__group { flex-direction: column-reverse; margin-left: 0; }
  .actions__form { margin-left: 0; }
  .actions > span:empty { display: none; }
  .actions--start { flex-direction: column; }
  .actions__note { text-align: left; margin-top: -10px; }
  .summary__row { grid-template-columns: minmax(0, 1fr); }
  .summary__row dt { padding-top: 0; }
  .choices { padding: 16px 14px; }
  .choice { padding: 12px 14px; }
  .group--smtp { padding: 16px 14px; }
  .switch { padding: 16px 14px; }
  .test-row { padding: 14px; }
  .test-row .btn { width: 100%; }
  .req { padding: 12px 14px; gap: 12px; }
  .brand__name { font-size: 1.08rem; }
  .ins-rail__label { font-size: 0.9rem; }
  .cleanup { padding: 18px 16px; }
  .cleanup .btn, .cleanup form { width: 100%; }
  .next__item { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .btn[aria-busy="true"]::before { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

@media (forced-colors: active) {
  .steps__item.is-current .steps__num, .btn--primary { border: 2px solid CanvasText; }
  .switch input { border: 2px solid CanvasText; }
}
