/* cloudStudio. Tokens and rationale in docs/design.md. */

/* DM Sans, SIL Open Font License 1.1, see /fonts/LICENSE. Same-origin asset. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dm-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dm-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #FFFFFF;
  --bg-soft: #F5F5F5;
  --ink: #171717;
  --ink-soft: #595959;
  --line: #E5E5E5;
  --violet: #5A4BE8;
  --violet-deep: #4638C4;
  --on-violet: #FFFFFF;
  --sky: #0072CC;
  --teal: #0B7D70;
  --amber: #FFD466;
  --on-amber: #2B2000;
  --alert: #C8102E;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 62ch;
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --bg-soft: #191919;
    --ink: #F0F0F0;
    --ink-soft: #A8A8A8;
    --line: #303030;
    --violet: #9D93FF;
    --violet-deep: #B8B0FF;
    --on-violet: #101010;
    --sky: #5CB8FF;
    --teal: #3ECFB8;
    --alert: #FF8A80;
  }
}

/* Room colours: the same hue for a room everywhere it appears. */
[data-room="files"] { --room: var(--sky); }
[data-room="agents"] { --room: var(--violet); }
[data-room="deployment"] { --room: var(--teal); }

/* Base */

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--violet-deep); }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
/* Headings receive focus only as a landmark after navigation; they are not controls. */
h1:focus, h1:focus-visible, main:focus { outline: none; }

h1, h2, h3 {
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); }
h2 { font-size: 1.5rem; margin-top: 2.2em; }
h3 { font-size: 1.125rem; }

p, dd { margin: 0 0 1em; max-width: var(--measure); }
code { font-family: var(--mono); font-size: 0.92em; }

.lead { font-size: 1.2rem; }
.lead-note { color: var(--ink-soft); }
.mono { font-family: var(--mono); font-size: 0.9em; }
.loading { color: var(--ink-soft); }
.crumb { font-size: 0.9375rem; margin-bottom: 0.25rem; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--violet); text-decoration: underline; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* Header: brand, live phase and environment chips, navigation. */

.site-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark { width: 1.5rem; height: 1.5rem; }
.mark-files { fill: var(--sky); }
.mark-agents { fill: var(--violet); }
.mark-deployment { fill: var(--teal); }

.env { margin: 0; display: flex; gap: 0.4rem; flex-wrap: wrap; max-width: none; }
.chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.env .chip { color: var(--ink-soft); }
.pill { font-weight: 600; }
.pill.amber { background: var(--amber); color: var(--on-amber); }
.pill.teal { background: var(--teal); color: #FFFFFF; }
.pill.red { background: var(--alert); color: #FFFFFF; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--violet); }
.site-nav a[aria-current="page"] { color: var(--violet); }
.site-nav a.button { padding: 0.45rem 1rem; }

@media (max-width: 40rem) {
  .site-head { grid-template-columns: 1fr auto; }
  .env { justify-content: flex-end; }
  .site-nav { grid-column: 1 / -1; gap: 1.1rem; }
  .site-nav a.button { margin-left: auto; }
}
@media (max-width: 24rem) {
  /* Three rows at phone width: brand, then phase and environment, then navigation. Nothing is hidden. */
  .site-head { grid-template-columns: 1fr; gap: 0.6rem; }
  .env { justify-content: flex-start; }
}

/* Notice strip under the header for session and sign-in feedback. */

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  padding: 0.75rem var(--gutter);
  background: var(--bg-soft);
  border-top: 3px solid var(--amber);
}
.notice.is-error { border-top-color: var(--alert); }
.notice-text { margin: 0; }
.notice-dismiss { margin-left: auto; }

/* Main column */

main {
  flex: 1;
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 4rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin: 0.75rem 0 1.5rem;
}
.page-head h1 { margin-bottom: 0.2em; }
.checked { color: var(--ink-soft); font-size: 0.9375rem; margin: 0 0 0.3rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; max-width: 34rem; }

/* Buttons: pills. Primary is solid violet; everything else is outlined. */

button { font: inherit; color: inherit; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  line-height: 1.25;
  cursor: pointer;
}
.button:hover { background: var(--bg-soft); border-color: var(--ink-soft); color: var(--ink); }
.button.primary { background: var(--violet); border-color: var(--violet); color: var(--on-violet); }
.button.primary:hover { background: var(--violet-deep); border-color: var(--violet-deep); color: var(--on-violet); }
.button.small { padding: 0.3rem 0.85rem; font-size: 0.875rem; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button:disabled:hover { background: var(--bg); border-color: var(--line); }
.button.primary:disabled:hover { background: var(--violet); border-color: var(--violet); }
.button[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.button.danger { background: var(--alert); border-color: var(--alert); color: #FFFFFF; }
.button.danger:hover { background: var(--alert); border-color: var(--alert); color: #FFFFFF; opacity: 0.9; }

/* Forms: one text style for inputs and selects, pill buttons beside them. */

.field { display: flex; flex-direction: column; gap: 0.35rem; max-width: 28rem; }
.field-label, legend.field-label { font-weight: 600; }
.field-note { color: var(--ink-soft); font-size: 0.875rem; }
input[type="text"], input[type="email"], input[type="number"], select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  min-width: 0;
}
input[type="text"]:hover, input[type="email"]:hover, select:hover { border-color: var(--ink-soft); }
select { padding-right: 2rem; }
.plans-field { border: 0; padding: 0; margin: 1.75rem 0 0; min-inline-size: 0; }
.plans-field legend { padding: 0; margin-bottom: 0.6rem; }
.create-form { margin-top: 1.5rem; }
.policy { color: var(--ink-soft); max-width: var(--measure); border-left: 3px solid var(--amber); padding-left: 0.9rem; margin: 1.5rem 0; }
.section-lead { margin-bottom: 1.25rem; }

/* Plan cards: the one place the catalog is shown as cards, because a plan is a choice. */

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: 40rem; }
.plan-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  position: relative;
}
.plan-card p { max-width: none; margin: 0 0 0.35rem; }
.plan-name { font-weight: 600; font-size: 1.125rem; }
.plan-price { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.plan-per { font-size: 0.875rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.plan-spec { color: var(--ink-soft); font-size: 0.9375rem; }
.plan-note { color: var(--ink-soft); font-size: 0.875rem; border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 0.6rem; }
.plan-option { cursor: pointer; padding-left: 2.6rem; }
.plan-radio { position: absolute; left: 1.1rem; top: 1.25rem; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--violet); }
.plan-option:has(.plan-radio:checked) { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.plan-option:has(.plan-radio:disabled) { cursor: not-allowed; color: var(--ink-soft); }
.plan-option:has(.plan-radio:disabled) .plan-price { color: var(--ink-soft); }
.plan-option:has(.plan-radio:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }

/* Confirmation dialog */

.confirm {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  padding: 1.5rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
}
.confirm::backdrop { background: rgba(17, 24, 39, 0.45); }
.confirm p { margin: 0 0 1.25rem; max-width: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }

/* Members */

.members { margin-bottom: 1.5rem; }
.members td { vertical-align: middle; }
.members td:last-child::before { content: none; }
/* A row without controls has no actions cell to show, on any width. */
.members td:last-child:not(:has(.control:not([hidden]))) { display: none; }
.member-name { font-weight: 600; }
.member-email { color: var(--ink-soft); display: block; font-size: 0.9375rem; }
.role-select { padding: 0.3rem 1.8rem 0.3rem 0.6rem; font-size: 0.9375rem; }
.members .control { margin: 0; justify-content: flex-end; }
.invitation-list, .resource-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.5rem; }
.invitation { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; border: 1px dashed var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; }
.resource-list li { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; }
.resource-kind { font-weight: 600; }
.invite-form, .transfer-form { margin-top: 1.5rem; }
.members-body h3 { margin-top: 1.5rem; }
.invite-form h3, .transfer-form h3 { margin-bottom: 0.6rem; }
.invite-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.invite-row .field { flex: 1 1 14rem; }
.invite-row .button { flex: none; }
.member-actions { margin-top: 1.5rem; display: grid; gap: 0.5rem; }
@media (max-width: 40rem) {
  .members .control { justify-content: flex-start; }
}

/* Problems and empties */

.problem {
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border-left: 4px solid var(--alert);
  border-radius: 0 8px 8px 0;
}
.empty {
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  max-width: none;
}

/* Landing */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 0 1rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 19ch;
  margin: 0 0 0.45em;
}
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 44ch; margin-bottom: 0.6em; }
.hero .lead-note { font-size: 0.9375rem; max-width: 48ch; }
.hero .auth { margin-top: 1.25rem; }
.hero .auth-heading { font-size: 1rem; font-weight: 600; margin: 0 0 0.9rem; }
.hero .auth-lead { display: none; }
.hero .auth-providers, .hero .auth-alt { justify-content: center; }
.signed-in-note { margin-top: 1.5rem; font-size: 1.1rem; }

.auth { margin-top: 1.5rem; }
.auth-heading { font-size: 1.25rem; margin-top: 0; }
.auth-providers {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.auth-alt { display: flex; flex-wrap: wrap; gap: 1.25rem; max-width: none; }

/* Workspace illustration: one window, three panes. Content is decorative and hidden from assistive tech. */

.shot { margin: 2.5rem 0 0; }
.win {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.45;
}
.win p { max-width: none; }
.win-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.win-tag {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-soft);
  border-radius: 999px;
  padding: 0.05em 0.6em;
}
.win-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1.1fr); }
.pane { padding: 0.9rem 1rem 1.1rem; border-right: 1px solid var(--line); min-width: 0; }
.pane:last-child { border-right: 0; }
.pane-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin: 0 0 0.75rem; }
.pane-head::before, .rooms dt::before, .room-panel h3::before, .room-tag::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--room);
  flex: none;
}
@media (max-width: 48rem) {
  .win-panes { grid-template-columns: 1fr; }
  .pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .pane:last-child { border-bottom: 0; }
}

.tree { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 0.8125rem; }
.tree li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.2rem 0.5rem; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.tree .in1 { padding-left: 1.5rem; }
.tree .in2 { padding-left: 2.5rem; }
.tree .is-active { background: var(--bg-soft); font-weight: 600; }
.tree-mod { color: var(--room); font-weight: 700; }

.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.msg { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start; }
.msg p { margin: 0 0 0.35rem; }
.who {
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.who-person { background: var(--bg-soft); color: var(--ink); }
.who-agent { background: var(--room); color: var(--on-violet); }
.diff { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); display: flex; gap: 0.6rem; }
.add { color: var(--teal); }
.del { color: var(--alert); }
.pane[data-room="agents"] { display: flex; flex-direction: column; }
.ask { margin: auto 0 0; padding-top: 0; border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; color: var(--ink-soft); }

.run-name { margin: 0 0 0.6rem; font-weight: 600; }
.run-name .mono { color: var(--ink-soft); font-weight: 400; }
.bar { height: 0.4rem; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 0 0 0.9rem; }
.bar span { display: block; width: 55%; height: 100%; background: var(--room); border-radius: 999px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.steps li { display: flex; align-items: center; gap: 0.6rem; }
.steps li::before { content: ""; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps .done::before { background: var(--room); border-color: var(--room); }
.steps .now::before { border-color: var(--room); }
.step-state { margin-left: auto; color: var(--ink-soft); font-size: 0.75rem; text-align: right; }

.shot figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.75rem; text-align: center; }

/* What a studio holds: three columns, a dot and a sentence each. */

.landing h2 { margin-top: 3.5rem; }
.rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 0; }
.rooms > div { display: block; }
.rooms dt { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.125rem; margin-bottom: 0.3rem; }
.rooms dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 48rem) {
  .rooms { grid-template-columns: 1fr; gap: 1.25rem; }
}

.phase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; max-width: var(--measure); }
.phase-list li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.phase-list .pill { justify-self: start; }
.phase-list strong { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.phase-list p { margin: 0; color: var(--ink-soft); }

/* Studio list: a table in a rounded frame. */

.list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.list th {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-soft);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.list td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list td:first-child a { font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.list td:first-child a:hover { color: var(--violet); text-decoration: underline; }
.room-tag { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 1rem; white-space: nowrap; }

@media (max-width: 40rem) {
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .list tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .list tbody tr:last-child { border-bottom: 0; }
  .list td { display: block; border: 0; padding: 0.15rem 1rem; }
  .list td::before { content: attr(data-label) ": "; color: var(--ink-soft); }
  .list td:first-child::before { content: none; }
  .room-tag { margin-right: 0.6rem; }
}

.after-list { margin-top: 1.25rem; }

/* Studio detail */

.studio-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; align-items: center; margin: 0; }
.control { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0 0 1em; max-width: none; }
.control-note { color: var(--ink-soft); font-size: 0.875rem; }
.studio-explain { margin-top: 0.5rem; }
.studio h2 { font-size: 1.35rem; margin-top: 2.2em; }
.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.room-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1rem; }
.room-panel h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.room-panel p { max-width: none; }
.room-panel .control { margin-bottom: 0; }
@media (max-width: 56rem) {
  .room-grid { grid-template-columns: 1fr; }
}
.studio-record { color: var(--ink-soft); font-size: 0.9375rem; margin-top: 2.5rem; }

/* Platform operator: two views, quiet tables, one review panel. */

.tabs { display: flex; gap: 0.5rem; margin: 0 0 1.5rem; }
.tab { padding: 0.45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-weight: 500; }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tab:hover { border-color: var(--ink-soft); }
.operator h3 { margin-top: 2rem; }
.spend { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.5rem; }
.spend-bar { max-width: 28rem; margin: 0 0 1.5rem; }
.spend-bar span { background: var(--violet); width: 0; }
.spend-bar .is-over { background: var(--alert); }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; max-width: var(--measure); }
.alerts li { border-left: 3px solid var(--amber); padding-left: 0.9rem; overflow-wrap: anywhere; }
.alerts li strong { font-weight: 600; }
.list .mono { font-family: var(--mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.rollout-actions { white-space: nowrap; }
.review { max-width: 60rem; margin: 1rem 0 0; min-width: 0; }
.review p { max-width: none; overflow-wrap: anywhere; }
.review .mono { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }
.review .field { min-width: 0; max-width: 100%; }
.review select { width: 100%; max-width: 100%; }
.components { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.35rem 1rem; margin: 0.75rem 0 1rem; }
.components > div { display: contents; }
.components dt { font-weight: 600; }
.components dd { margin: 0; font-family: var(--mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.raw { font-family: var(--mono); font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-soft); border-radius: 8px; padding: 0.75rem 1rem; max-height: 24rem; overflow: auto; }
@media (max-width: 40rem) {
  .components { grid-template-columns: 1fr; gap: 0.15rem; }
  .components dd { margin-bottom: 0.5rem; }
  .rollout-actions { white-space: normal; }
}

/* Setup and resources: what runs now versus what was requested, and the quote panel. */

.allocation { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0.4rem 1rem; margin: 0 0 1.25rem; max-width: var(--measure); }
.allocation > div { display: contents; }
.allocation dt { font-weight: 600; }
.allocation dd { margin: 0; }
.allocation .is-failed { color: var(--alert); }
.restore { margin-top: 1.5rem; max-width: var(--measure); }
.restore h3 { margin-top: 0; }
.restore .is-failed { color: var(--alert); }
.backup-choice { border: 0; padding: 0; margin: 0 0 0.75rem; min-inline-size: 0; }
.backup-choice legend { padding: 0; margin-bottom: 0.4rem; }
.backup-row { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0; border-top: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; }
.backup-row:last-child { border-bottom: 1px solid var(--line); }
.backup-row input { margin: 0.3rem 0 0; accent-color: var(--violet); flex: none; }
.quote { max-width: 34rem; margin: 1rem 0; }
.quote p { max-width: none; }
.quote .control { margin: 0.75rem 0 0.35rem; }
@media (max-width: 40rem) {
  .allocation { grid-template-columns: 1fr; gap: 0.15rem; }
  .allocation dd { margin-bottom: 0.6rem; }
}

/* Account */

.identity { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.avatar {
  width: 4rem; height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.avatar-initials {
  display: grid;
  place-items: center;
  background: var(--violet);
  color: var(--on-violet);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.identity-name { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.identity-email { color: var(--ink-soft); margin: 0; }

/* Prose pages */

.prose h2 { font-size: 1.25rem; margin-top: 1.8em; }

/* Footer */

.site-footer {
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 1.5rem var(--gutter) 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--violet); text-decoration: underline; }
.site-footer p { margin: 0; }

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

.startup { max-width: 42rem; margin: 5rem auto; text-align: center; }
.startup h2 { font-size: clamp(1.7rem,4vw,2.7rem); }
.startup-mark { display: flex; justify-content: center; gap: .45rem; height: 3rem; margin-bottom: 2rem; }
.startup-mark span { width: .75rem; border-radius: .25rem; background: #0072cc; animation: studio-start 1.4s ease-in-out infinite alternate; }
.startup-mark span:nth-child(2) { background: #5a4be8; animation-delay: .2s; }
.startup-mark span:nth-child(3) { background: #0b7d70; animation-delay: .4s; }
.startup-steps { display: grid; gap: .8rem; text-align: left; margin: 2rem auto; width: fit-content; }
.startup-steps li { padding-left: .5rem; opacity: .6; }
.startup-steps [data-state="current"] { font-weight: 700; opacity: 1; }
.startup-steps [data-state="done"] { color: #0b7d70; opacity: 1; }
@keyframes studio-start { to { transform: scaleY(.5); } }
@media (prefers-reduced-motion: reduce) { .startup-mark span { animation: none; } }

.referral-panel { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid currentColor; max-width: 70ch; }
.referral-panel form { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.referral-panel input { display: block; width: 100%; min-width: 0; margin: .5rem 0; }
.referral-panel li { margin: .75rem 0; overflow-wrap: anywhere; }

/* Studio cards and grouped settings share the app's neutral surfaces. */
.site-head { grid-template-columns: 1fr auto; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.studio-card { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.studio-card:hover { border-color: var(--ink-soft); color: var(--ink); }
.studio-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.studio-card-head strong { font-size: 1.25rem; overflow-wrap: anywhere; }
.studio-card-action { display: flex; justify-content: space-between; font-weight: 600; }
.add-studio { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1.25rem; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.add-studio > span { font-size: 1.75rem; }
.referral-promo { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.referral-promo h2 { font-size: 1.5rem; margin: 0 0 .4rem; }
.referral-promo p { margin: 0; color: var(--ink-soft); }
.referral-promo .button { flex-shrink: 0; }
.referral-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.referral-metrics > div { padding: 1.25rem; background: var(--bg-soft); border-radius: 12px; }
.referral-metrics dt { color: var(--ink-soft); }
.referral-metrics dd { font-size: 2rem; font-weight: 650; margin: .5rem 0 0; }
.referral-panel label { display: block; margin: 1.5rem 0 .75rem; }
.referral-panel label input { display: block; width: 100%; margin-top: .5rem; }
.cashout-balance { font-weight: 600; margin-top: 1.5rem; }
.studio { max-width: 48rem; margin-inline: auto; }
.studio-title { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.studio-title h1 { margin: 0; }
.studio-open .button { padding: .85rem 1.5rem; font-size: 1.1rem; }
.settings-list { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin-top: 2rem; }
.settings-list a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.settings-list a + a { border-top: 1px solid var(--line); }
.settings-list a:hover { background: var(--line); }
.settings-back { margin-top: 1rem; }
.studio section > h2 { margin-top: 1.5rem; }
.embedded-settings .site-head, .embedded-settings .site-footer, .embedded-settings .studio-open { display: none; }
.embedded-settings main { width: 100%; padding-block: 2rem; }
@media (max-width: 600px) {
  .site-head { display: flex; flex-wrap: wrap; }
  .site-nav { gap: 1rem; flex-wrap: wrap; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-card { gap: 1rem; padding: 1.25rem; }
  .referral-promo { align-items: flex-start; flex-direction: column; }
  .referral-metrics { grid-template-columns: 1fr; gap: .5rem; }
  .referral-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .referral-metrics dd { font-size: 1.6rem; margin: 0; }
}
