/* SEOZING console — vanilla CSS, no external assets. */

:root {
  color-scheme: light;
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface-2: #f3f6f4;
  --surface-3: #eef3f0;
  --ink: #0e1a17;
  --ink-soft: #2a3a34;
  --muted: #57655f;
  --muted-2: #66736c;
  --line: #dfe7e2;
  --line-strong: #cbd8d1;
  --accent: #0f766e;
  --accent-strong: #0a5b55;
  --accent-soft: #e4f3ef;
  --accent-ink: #084b46;
  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --focus: #0f766e;
  --shadow-sm: 0 1px 2px rgba(14, 26, 23, .05);
  --shadow-md: 0 14px 34px -22px rgba(14, 26, 23, .3);
  --shadow-lg: 0 36px 90px -48px rgba(14, 26, 23, .45);
  --radius-sm: 9px;
  --radius: 15px;
  --radius-lg: 22px;
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.022em; text-wrap: balance; }
code { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }

:where(a, button, input, textarea, select, summary, dialog, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: #bde9df; color: var(--ink); }

.visually-hidden {
  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: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-150%);
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.optional { color: var(--muted-2); font-weight: 450; }

/* ---------------- brand / buttons / chips ---------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-word { color: var(--ink); font-size: 1.02rem; letter-spacing: .01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand--light { color: #2fbdae; }
.brand--light .brand-word { color: #fff; }

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .68rem 1rem;
  border: 1px solid var(--btn-line);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-ink: #fff;
  --btn-line: var(--accent);
  box-shadow: 0 7px 16px -12px rgba(15, 118, 110, .9);
}
.btn--primary:hover { --btn-bg: var(--accent-strong); --btn-line: var(--accent-strong); }
.btn--secondary { --btn-bg: var(--surface); --btn-ink: var(--accent-ink); }
.btn--secondary:hover { --btn-line: var(--accent); background: var(--accent-soft); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--muted);
  --btn-line: transparent;
}
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-ink: var(--ink); }
.btn--danger { --btn-bg: var(--danger); --btn-ink: #fff; --btn-line: var(--danger); }
.btn--danger:hover { --btn-bg: #8f1c13; --btn-line: #8f1c13; }
.btn--danger-ghost {
  --btn-bg: transparent;
  --btn-ink: var(--danger);
  --btn-line: #efc9c5;
}
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--small { min-height: 36px; padding: .48rem .7rem; font-size: .82rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .58; cursor: not-allowed; transform: none; }
.btn__spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn--secondary .btn__spinner { border-color: rgba(15, 118, 110, .25); border-top-color: var(--accent); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .55rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.4;
  white-space: nowrap;
}
.chip--neutral { background: var(--surface-3); color: var(--muted); }
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip--success { background: var(--success-soft); color: var(--success); }
.chip--warning { background: var(--warning-soft); color: var(--warning); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }

/* ---------------- forms ---------------- */

.field { display: grid; gap: .38rem; margin-bottom: .95rem; }
.field > label {
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 650;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: .62rem .78rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: .93rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #6b7871; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .13);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { margin: 0; color: var(--muted-2); font-size: .78rem; }

.form-error {
  margin: .2rem 0 .85rem;
  padding: .6rem .72rem;
  border: 1px solid #f3c7c3;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: .85rem;
  line-height: 1.45;
}
.notice {
  margin: 0 0 1rem;
  padding: .62rem .75rem;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f2f7fd;
  color: #1d4f8a;
  font-size: .85rem;
  line-height: 1.45;
}
.notice[data-tone="warning"] { border-color: #f2d6a2; background: #fffaeb; color: var(--warning); }
.notice[data-tone="success"] { border-color: #bfe3cd; background: #ecfdf3; color: var(--success); }

/* ---------------- boot ---------------- */

.boot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: .9rem;
  min-height: 100dvh;
  color: var(--muted);
  font-size: .9rem;
}
.boot__mark { width: 44px; height: 44px; animation: breathe 1.6s ease-in-out infinite; }
.boot p { margin: 0; }

/* ---------------- auth ---------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100dvh;
  background: var(--bg);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(1.7rem, 4vw, 3rem);
  background:
    radial-gradient(44rem 28rem at 90% 0%, rgba(47, 189, 174, .22), transparent 60%),
    radial-gradient(36rem 22rem at 0% 100%, rgba(15, 118, 110, .28), transparent 66%),
    #10211c;
  color: #eaf4ef;
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 78%);
}
.auth-brand > * { position: relative; }
.auth-brand__pitch { margin: auto 0; max-width: 520px; padding: 3rem 0; }
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent-ink);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow--dark { color: #5bd4c5; }
.auth-brand__headline {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.02;
  text-wrap: balance;
}
.auth-brand__pitch > p:not(.eyebrow):not(.auth-brand__headline) {
  max-width: 44ch;
  margin-bottom: 1.7rem;
  color: #a9bdb4;
  font-size: 1.02rem;
}
.auth-brand__list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.auth-brand__list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: #d2e2da;
  font-size: .89rem;
}
.auth-brand__list li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  margin-top: .52em;
  border-radius: 50%;
  background: #2fbdae;
  box-shadow: 0 0 0 4px rgba(47, 189, 174, .13);
}
.auth-brand__foot { margin: auto 0 0; color: #7f978c; font-size: .78rem; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3rem);
}
.auth-card {
  width: min(100%, 420px);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.auth-card__head h1 { margin-bottom: .35rem; font-size: 1.65rem; }
.auth-card__head > p:not(.eyebrow) { margin-bottom: 1.2rem; color: var(--muted); font-size: .9rem; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  margin-bottom: 1.25rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
}
.auth-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.auth-form .btn { margin-top: .2rem; }
.auth-card__back { margin: 1.15rem 0 0; text-align: center; font-size: .8rem; }
.auth-card__back a { color: var(--muted-2); text-decoration: none; }
.auth-card__back a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------------- app shell ---------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 1.15rem 1rem;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar__brand { padding: .2rem .45rem 1.3rem; }
.side-nav { display: grid; gap: .15rem; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: .89rem;
  font-weight: 600;
  text-decoration: none;
}
.side-nav a svg {
  width: 18px; height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.sidebar__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.side-subscription {
  margin: 0 .35rem .6rem;
  color: var(--muted-2);
  font-size: .74rem;
  font-weight: 600;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
}
.user-chip:hover { background: var(--surface-2); }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
}
.user-chip__text { display: grid; min-width: 0; }
.user-chip__name {
  overflow: hidden;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip__email {
  overflow: hidden;
  color: var(--muted-2);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-main { min-width: 0; padding: 2rem clamp(1.2rem, 4vw, 3rem) 4rem; }
.view { width: min(100%, 1120px); margin-inline: auto; }

/* ---------------- page scaffolding ---------------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0 0 .3rem; font-size: clamp(1.5rem, 2.5vw, 1.95rem); }
.page-head p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 64ch; }
.page-head p .chip { margin-right: .35rem; vertical-align: 1px; }
#main-content:focus,
#view h1:focus { outline: none; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; flex: none; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .55rem;
  color: var(--muted-2);
  font-size: .78rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }

.stack { display: grid; gap: 1rem; }
.card {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}
.card__head h2 { margin: 0; font-size: 1.02rem; }
.card__head p { margin: .2rem 0 0; color: var(--muted-2); font-size: .8rem; }
.card__head .chip { margin-top: .1rem; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .9fr);
  gap: 1rem;
  align-items: start;
}
.create-card { position: sticky; top: 1.5rem; }

/* ---------------- dashboard ---------------- */

.site-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.site-list li { border-bottom: 1px solid var(--line); }
.site-list li:last-child { border-bottom: 0; }
.site-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: .8rem;
  padding: .85rem .2rem;
  color: inherit;
  text-decoration: none;
}
.site-row:hover { background: #fbfdfc; }
.site-row__body { min-width: 0; }
.site-row__name {
  display: block;
  overflow: hidden;
  margin-bottom: .12rem;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .65rem;
  color: var(--muted-2);
  font-size: .76rem;
}
.site-row__meta span {
  overflow: hidden;
  max-width: 33ch;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-row__chevron { color: #9aa8a1; }
.site-row__chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.empty-state {
  display: grid;
  justify-items: center;
  gap: .55rem;
  padding: 2.4rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdfc;
  text-align: center;
}
.empty-state h3 { margin: 0; font-size: 1rem; }
.empty-state p { max-width: 42ch; margin: 0; color: var(--muted); font-size: .87rem; }
.empty-state .btn { margin-top: .4rem; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .2rem;
  margin-bottom: .95rem;
  padding: .22rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.segmented label { position: relative; display: block; }
.segmented input {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
  cursor: pointer;
}
.segmented input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.segmented input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.mode-panel { display: grid; }
.create-form .btn { width: 100%; }

/* ---------------- site detail ---------------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr);
  gap: 1rem;
  align-items: start;
}
.detail-side { display: grid; gap: 1rem; }
.meta-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; margin: 0; }
.meta-grid > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: .5rem;
  align-items: baseline;
}
.meta-grid dt { color: var(--muted-2); font-size: .76rem; }
.meta-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: .84rem;
}
.meta-grid dd code { color: var(--muted); font-size: .76rem; }
.site-url { color: var(--accent-ink); text-decoration: none; }
.site-url:hover { text-decoration: underline; }

.deployment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.deployment-line:last-of-type { border-bottom: 0; }
.deployment-line span { color: var(--muted-2); font-size: .78rem; }
.deployment-line strong,
.deployment-line a { font-size: .83rem; font-weight: 650; text-align: right; overflow-wrap: anywhere; }

.target-box {
  margin-top: .8rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.target-box__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .35rem;
  color: var(--muted-2);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.target-box code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: .8rem;
}
.copy-btn {
  min-height: 28px;
  padding: .22rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.copy-btn.is-done { border-color: var(--success); color: var(--success); }

.latest-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.domain-form { display: grid; gap: .6rem; }
.domain-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.domain-actions .btn { flex: 1 1 auto; }
.verify-result {
  margin-top: .7rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.verify-result[data-tone="success"] { border-color: #b7e4ca; background: var(--success-soft); }
.verify-result[data-tone="warning"] { border-color: #f2d6a2; background: var(--warning-soft); }
.verify-result[data-tone="danger"] { border-color: #f3c7c3; background: var(--danger-soft); }
.verify-result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .35rem;
}
.verify-result__head strong { font-size: .84rem; }
.verify-result p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.verify-result ul { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .78rem; }
.verify-result li { overflow-wrap: anywhere; }
.domain-note { margin: .7rem 0 0; color: var(--muted-2); font-size: .76rem; }

.danger-card { border-color: #efd7d4; }
.danger-card .card__head h2 { color: var(--danger); }
.danger-card p { margin: 0 0 .9rem; color: var(--muted); font-size: .83rem; }

/* ---------------- live build ---------------- */

.live-card {
  border-color: #c7e3da;
  box-shadow: 0 14px 34px -26px rgba(15, 118, 110, .5);
}
.live-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.live-head h2 { margin: 0 0 .15rem; font-size: 1.02rem; }
.live-head p { margin: 0; color: var(--muted-2); font-size: .76rem; }
.live-controls { display: flex; align-items: center; gap: .5rem; flex: none; }
.connection {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  color: var(--muted-2);
  font-size: .73rem;
  font-weight: 650;
}
.connection__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}
.connection[data-state="live"] .connection__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.8s ease-in-out infinite; }
.connection[data-state="done"] .connection__dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.connection[data-state="error"] .connection__dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.connection[data-state="paused"] .connection__dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }

.build-progress {
  position: relative;
  height: 6px;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e8efec;
}
.build-progress span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: indeterminate 1.4s ease-in-out infinite;
}
.build-progress[data-done="true"] span { width: 100%; animation: none; }
.build-progress[data-failed="true"] span { width: 100%; background: var(--danger); animation: none; }

.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-bottom: 1rem; }
.signal {
  padding: .62rem .7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.signal span { display: block; margin-bottom: .18rem; color: var(--muted-2); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.signal strong { display: block; font-size: .85rem; letter-spacing: -.01em; }
.signal[data-ready="true"] { border-color: #bfe6d0; background: var(--success-soft); }
.signal[data-ready="true"] strong { color: var(--success); }
.signal__link { display: inline-block; margin-top: .2rem; font-size: .74rem; font-weight: 650; }

.live-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.live-columns h3 { margin: 0 0 .5rem; color: var(--muted); font-size: .74rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.step-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.step-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: start;
  gap: .5rem;
  padding: .38rem 0;
  border-bottom: 1px solid #edf2ef;
}
.step-item:last-child { border-bottom: 0; }
.step-dot {
  width: 14px; height: 14px;
  margin-top: .16rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}
.step-dot[data-status="done"] { border-color: var(--success); background: var(--success); box-shadow: inset 0 0 0 3px var(--surface); }
.step-dot[data-status="running"] { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.step-dot[data-status="skipped"] { border-style: dashed; background: var(--surface-3); }
.step-dot[data-status="failed"] { border-color: var(--danger); background: var(--danger); box-shadow: inset 0 0 0 3px var(--surface); }
.step-item__name { min-width: 0; font-size: .82rem; font-weight: 600; }
.step-item__meta { display: block; margin-top: .05rem; color: var(--muted-2); font-size: .7rem; font-weight: 450; }
.step-item__status { color: var(--muted-2); font-size: .7rem; font-weight: 650; text-transform: capitalize; }
.step-item[data-status="done"] .step-item__status { color: var(--success); }
.step-item[data-status="running"] .step-item__status { color: var(--accent-ink); }
.step-item[data-status="failed"] .step-item__status { color: var(--danger); }
.step-item[data-status="skipped"] .step-item__name { color: var(--muted-2); }

.area-list { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; max-height: 260px; overflow: auto; }
.area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .32rem 0;
  border-bottom: 1px solid #edf2ef;
  font-size: .78rem;
}
.area-item:last-child { border-bottom: 0; }
.area-item__name { overflow-wrap: anywhere; }
.area-item .chip { padding: .12rem .4rem; font-size: .66rem; }
.asset-summary { margin: .6rem 0 0; color: var(--muted-2); font-size: .73rem; }
.empty-inline { margin: 0; color: var(--muted-2); font-size: .8rem; }

.build-log { margin-top: .85rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.build-log summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 650; }
.build-log__list {
  display: grid;
  gap: .15rem;
  max-height: 180px;
  margin: .55rem 0 0;
  padding: .55rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #10211c;
  color: #a9c2b7;
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.45;
}
.build-log__line { white-space: pre-wrap; overflow-wrap: anywhere; }
.build-log__line[data-level="warn"] { color: #f3cf7a; }
.build-log__line[data-level="error"] { color: #f3a8a0; }

.build-history { display: grid; }
.build-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .7rem;
  padding: .65rem .1rem;
  border-bottom: 1px solid var(--line);
}
.build-row:last-child { border-bottom: 0; }
.build-row__main { min-width: 0; }
.build-row__id { display: block; color: var(--ink-soft); font-family: var(--mono); font-size: .78rem; }
.build-row__meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin-top: .12rem; color: var(--muted-2); font-size: .71rem; }
.build-row__link { font-size: .76rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.build-row__link:hover { text-decoration: underline; }

/* ---------------- billing ---------------- */

.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.billing-status h2, .entitlements h2 { margin: 0 0 .2rem; font-size: 1.02rem; }
.billing-status__plan { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.billing-status__plan strong { font-size: 1.1rem; }
.billing-status p { margin: 0; color: var(--muted); font-size: .84rem; }
.billing-meta { display: grid; gap: .45rem; margin: .9rem 0 0; padding: .75rem 0 0; border-top: 1px solid var(--line); }
.billing-meta div { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.billing-meta dt { color: var(--muted-2); font-size: .76rem; }
.billing-meta dd { margin: 0; color: var(--ink-soft); font-size: .82rem; font-weight: 600; text-align: right; }
.billing-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.entitlement-list { display: grid; gap: .45rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.entitlement-list li { display: flex; align-items: center; gap: .5rem; color: var(--ink-soft); font-size: .83rem; }
.entitlement-list .tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  flex: none;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: .68rem;
  font-weight: 800;
}
.entitlement-list .tick[data-off="true"] { background: var(--surface-3); color: var(--muted-2); }
.section-title { margin: 1.8rem 0 .8rem; font-size: 1.12rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.plan-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.plan-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.plan-card__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .2rem; }
.plan-card h3 { margin: 0; font-size: 1rem; }
.plan-price { display: flex; align-items: baseline; gap: .15rem; margin: .35rem 0 .85rem; }
.plan-price strong { font-size: 1.9rem; letter-spacing: -.04em; line-height: 1; }
.plan-price span { color: var(--muted-2); font-size: .8rem; }
.plan-card ul { display: grid; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.plan-card li { position: relative; padding-left: 1.2rem; color: var(--ink-soft); font-size: .82rem; }
.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .46em;
  width: 7px; height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.plan-card__limits { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .9rem; }
.plan-card__limits span { padding: .16rem .42rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .66rem; font-weight: 650; }
.plan-card .btn { margin-top: auto; width: 100%; }
.plan-card__current { color: var(--accent-ink); font-size: .7rem; font-weight: 750; }

/* ---------------- settings ---------------- */

.settings-grid { display: grid; gap: 1rem; width: min(100%, 900px); }
.account-head { display: flex; align-items: center; gap: .9rem; }
.account-head .avatar { width: 46px; height: 46px; font-size: .95rem; }
.account-head h2 { margin: 0 0 .1rem; font-size: 1rem; }
.account-head p { margin: 0; color: var(--muted-2); font-size: .8rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.account-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .85rem 0 0; color: var(--muted); font-size: .8rem; }

.key-reveal {
  margin-bottom: 1rem;
  padding: .85rem;
  border: 1px solid #bfe6d0;
  border-radius: 10px;
  background: var(--success-soft);
}
.key-reveal h3 { margin: 0 0 .2rem; font-size: .88rem; }
.key-reveal p { margin: 0 0 .6rem; color: var(--muted); font-size: .78rem; }
.key-value {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .5rem;
  border: 1px solid #b7e4ca;
  border-radius: 7px;
  background: var(--surface);
}
.key-value code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: .76rem;
}
.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .8rem;
  padding: .7rem .1rem;
  border-bottom: 1px solid var(--line);
}
.key-row:last-child { border-bottom: 0; }
.key-row__main { min-width: 0; }
.key-row__name { display: block; overflow: hidden; color: var(--ink-soft); font-size: .86rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.key-row__meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin-top: .1rem; color: var(--muted-2); font-size: .72rem; }
.key-row__meta code { color: var(--muted); }
.key-row .chip { font-size: .66rem; }
.key-create { display: flex; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.key-create .field { flex: 1; margin: 0; }
.key-create .btn { flex: none; }

/* ---------------- loading / error ---------------- */

.skeleton {
  display: block;
  border-radius: 5px;
  background: linear-gradient(90deg, #edf2ef, #f8fbf9, #edf2ef);
  background-size: 200% 100%;
  animation: shimmer 1.35s linear infinite;
}
.skeleton--line { height: 11px; margin-bottom: .5rem; }
.skeleton--line.short { width: 48%; }
.skeleton--row { height: 54px; margin-bottom: .55rem; border-radius: 8px; }
.skeleton--card { height: 150px; border-radius: var(--radius); }
.skeleton-group { display: grid; gap: 1rem; }
.error-state {
  display: grid;
  justify-items: center;
  gap: .55rem;
  padding: 2.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.error-state h2 { margin: 0; font-size: 1.05rem; }
.error-state p { max-width: 48ch; margin: 0; color: var(--muted); font-size: .86rem; }
.error-state .btn { margin-top: .35rem; }

/* ---------------- toasts ---------------- */

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: grid;
  gap: .5rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .45rem .45rem .45rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in .2s ease both;
}
.toast__bar { align-self: stretch; border-radius: 8px 0 0 8px; background: var(--accent); }
.toast--success .toast__bar { background: var(--success); }
.toast--error .toast__bar { background: var(--danger); }
.toast--warning .toast__bar { background: var(--warning); }
.toast__msg { padding: .15rem 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.4; }
.toast__close {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  font-size: 1rem;
  line-height: 1;
}
.toast__close:hover { background: var(--surface-2); color: var(--ink); }

/* ---------------- dialog ---------------- */

.dialog {
  width: min(440px, calc(100vw - 2rem));
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(9, 22, 18, .48); backdrop-filter: blur(2px); }
.dialog__head { display: flex; gap: .8rem; margin-bottom: 1rem; }
.dialog__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
}
.dialog__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog h2 { margin: 0 0 .25rem; font-size: 1.06rem; }
.dialog p { margin: 0; color: var(--muted); font-size: .85rem; }
.dialog__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 300;
  padding: .8rem 1rem;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: .88rem;
}

/* ---------------- motion ---------------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.93); opacity: .7; } }
@keyframes indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(300%); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- responsive ---------------- */

@media (max-width: 1050px) {
  .dash-grid, .detail-grid { grid-template-columns: 1fr; }
  .create-card { position: static; }
  .billing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 1.2rem 1.4rem; }
  .auth-brand__pitch, .auth-brand__foot { display: none; }
  .auth-panel { padding: 1.4rem 1rem 3rem; }
  .auth-card { box-shadow: var(--shadow-md); }
}

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: .7rem;
    padding: .55rem .9rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar__brand { padding: 0; }
  .sidebar__brand .brand-mark { width: 27px; height: 27px; }
  .sidebar__brand .brand-word { font-size: .9rem; }
  .side-nav { display: flex; flex-direction: row; gap: .15rem; margin-left: auto; }
  .side-nav a { padding: .45rem .55rem; font-size: .8rem; white-space: nowrap; }
  .side-nav a svg { display: none; }
  .sidebar__foot { display: none; }
  .app-main { padding: 1.25rem 1rem 3rem; }
}

@media (max-width: 720px) {
  .page-head { display: grid; gap: .85rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .live-columns { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: 1fr 1fr; }
  .signal-grid .signal:first-child { grid-column: 1 / -1; }
  .meta-grid > div { grid-template-columns: 88px minmax(0, 1fr); }
  .key-create { display: grid; }
  .key-create .btn { width: 100%; }
}

@media (max-width: 560px) {
  .auth-card { padding: 1.2rem; border-radius: var(--radius); }
  .auth-card__head h1 { font-size: 1.45rem; }
  .sidebar__brand .brand-word { display: none; }
  .side-nav a { padding: .45rem .5rem; }
  .page-actions .btn { flex-basis: 100%; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-grid .signal:first-child { grid-column: auto; }
  .build-row { grid-template-columns: minmax(0, 1fr) auto; }
  .build-row .build-row__link { grid-column: 1 / -1; }
  .key-row { grid-template-columns: minmax(0, 1fr) auto; }
  .key-row .btn { grid-column: 1 / -1; justify-self: start; }
  .dialog__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .build-progress span { width: 62%; transform: none; }
  .skeleton { background: #eef3f0; }
}


/* Legal links in the sidebar */
.sidebar__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  margin-top: .55rem;
  font-size: .72rem;
  line-height: 1.4;
}
.sidebar__legal a { color: #66736c; text-decoration: none; }
.sidebar__legal a:hover { color: #0e1a17; text-decoration: underline; }
