:root {
  color-scheme: light;
  --ink: #0b0f14;
  --ink-2: #06090d;
  --ink-3: #1c2530;
  --mint: #72f1b8;
  --sage: #a9b4c0;
  --sage-dim: #6f7b88;
  --accent: #0b7a55;
  --accent-contrast: #ffffff;
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-elev-2: #f6f7f9;
  --bg-code: #f1f3f6;
  --border: #e6e8ec;
  --border-strong: #d5d9e0;
  --text: #0b0f14;
  --text-body: #2a313b;
  --text-muted: #5f6b7a;
  --text-dim: #98a2ae;
  --ring: rgba(11, 122, 85, 0.25);
  --warning: #94600c;
  --danger: #a23127;
  --nav-h: 80px;
  --content-w: 1120px;
  --gutter: max(24px, calc((100% - var(--content-w)) / 2));
  --radius: 16px;
  --font: "Google Sans Flex", "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
p { color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(114, 241, 184, 0.35); }
[hidden] { display: none !important; }

/* Polign chrome */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--gutter);
  background: var(--ink);
  color: #fff;
}
.topnav .brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.topnav .brand:hover, .footer-brand:hover { text-decoration: none; }
.topnav .brand svg, .footer-brand svg { width: 28px; height: 28px; display: block; }
.account-label {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--sage);
  font-size: 0.9rem;
  font-weight: 450;
}
.nav-right { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 10px; }
.account-nav-link, .staff-action {
  color: var(--sage);
  font-size: 0.9rem;
  font-weight: 450;
}
.account-nav-link { padding: 8px 10px; }
.account-nav-link:hover { color: #fff; text-decoration: none; }
.environment {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(114, 241, 184, 0.35);
  border-radius: 999px;
  color: var(--mint);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.session-action {
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 500 0.9rem/1 var(--font);
  white-space: nowrap;
}
.session-action:hover { background: rgba(255, 255, 255, 0.82); }
.staff-action { padding: 0 10px; border-color: transparent; background: transparent; color: var(--sage); }
.staff-action:hover { background: transparent; color: #fff; }

/* Account hero */
.account-main { min-height: 70vh; }
.account-hero {
  position: relative;
  overflow: hidden;
  padding: 86px var(--gutter) 96px;
  background: var(--ink);
  color: #fff;
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--content-w); margin: 0 auto; }
.account-hero .hero-art {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -30px;
  max-width: 74vw;
  aspect-ratio: 3 / 2;
  transform: scaleX(-1);
  background: url("./bloom.jpg") center / cover no-repeat;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 96%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 40%, transparent 96%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}
.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--mint);
  font-size: 0.9rem;
  font-weight: 450;
}
.kicker-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.account-hero h1 {
  max-width: 780px;
  margin-bottom: 26px;
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.account-hero h1 span { color: var(--sage); }
.account-hero .lede { max-width: min(660px, 100%); margin: 0; color: var(--sage); font-size: 1.125rem; line-height: 1.55; }

/* Main account surface */
.account-content { width: min(var(--content-w), calc(100% - 48px)); margin: 0 auto; padding: 64px 0 96px; }
body.authenticated .account-hero { display: none; }
body.authenticated .account-content { padding-top: 38px; }
.eyebrow, .step {
  margin: 0 0 8px;
  color: var(--accent);
  font: 500 0.75rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; font-weight: 500; }
.notice {
  margin: 0 0 20px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elev-2);
  color: var(--text-body);
  font-size: 0.9rem;
}
.notice.error { border-color: rgba(162, 49, 39, 0.45); background: rgba(162, 49, 39, 0.08); color: var(--danger); }

.guest-workflow { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 28px 0 64px; padding: clamp(26px, 4vw, 38px); border: 1px solid var(--border-strong); border-radius: 20px; }
.guest-workflow h2 { font-size: 1.45rem; }
.guest-workflow p:not(.eyebrow) { max-width: 650px; margin: 8px 0 0; }
.guest-workflow button { flex: 0 0 auto; margin: 0; }
.settings-shell { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: clamp(28px, 5vw, 68px); align-items: start; }
.settings-rail { position: sticky; top: calc(var(--nav-h) + 28px); }
.settings-rail > span { display: block; margin-bottom: 14px; color: var(--text-dim); font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.settings-rail nav { display: grid; gap: 3px; }
.settings-rail a { padding: 9px 11px; border-radius: 8px; color: var(--text-muted); font-size: 0.88rem; }
.settings-rail a:hover, .settings-rail a:focus { background: var(--bg-elev-2); color: var(--text); }
.settings-main { min-width: 0; }
.settings-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 34px 0 16px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.settings-heading h2 { font-size: 1.35rem; }
.settings-heading p:not(.eyebrow) { margin: 5px 0 0; font-size: 0.84rem; }
.journey-tabs { display: inline-flex; gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev-2); }
.journey-tab { min-height: 38px; margin: 0; padding: 0 16px; background: transparent; color: var(--text-muted); font-size: 0.84rem; }
.journey-tab.active { background: var(--text); color: var(--bg); }
.journey-tab:hover { opacity: 1; color: var(--text); }
.journey-tab.active:hover { color: var(--bg); }
.account-summary-strip { display: flex; align-items: center; gap: 24px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); scroll-margin-top: calc(var(--nav-h) + 24px); }
.summary-detail { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.account-identity { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.summary-label { flex: 0 0 auto; color: var(--accent); font: 500 0.67rem/1.2 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; }
.summary-detail strong { min-width: 0; color: var(--text); font: 500 0.84rem/1.35 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-company { grid-column: 2; color: var(--text-muted); font-size: 0.82rem; }
.plan-summary { flex: 0 0 auto; padding-left: 24px; border-left: 1px solid var(--border); }
.plan-summary h2 { margin: 0; font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.summary-change { min-height: auto; margin: 0 0 0 4px; padding: 3px 6px; border: 0; background: transparent; color: var(--accent); font-size: 0.76rem; font-weight: 500; }
.summary-change:hover { background: transparent; color: var(--text); opacity: 1; }
.design-partner-status { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--text); color: var(--mint); font: 500 0.64rem/1.2 var(--mono); letter-spacing: 0.03em; text-transform: uppercase; vertical-align: middle; }
.application-boundary { display: grid; gap: 5px; margin-top: 18px; padding: 15px; border-left: 3px solid var(--mint); background: var(--bg-elev-2); font-size: 0.84rem; }
.application-boundary span { color: var(--text-muted); }

.identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
}
.identity-bar .eyebrow { margin-bottom: 3px; }
.identity-bar h2 { font-size: 1.25rem; }
.detail { max-width: 52%; color: var(--text-muted); font: 400 0.8rem/1.5 var(--mono); overflow-wrap: anywhere; }

.panel, .organization-card, .operation-card, .settings-card {
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--bg-elev);
}
.panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: 56px;
  padding: clamp(28px, 4vw, 42px);
}
.panel > * { min-width: 0; }
.panel > div > p:not(.step) { margin: 12px 0 0; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading p:not(.step) { margin: 8px 0 0; }
.organizations { display: grid; gap: 22px; }
.organization-card { padding: clamp(22px, 3vw, 30px); }
.organization-title { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.organization-settings { display: grid; gap: 16px; margin-top: 18px; }
.settings-card { padding: 22px; scroll-margin-top: calc(var(--nav-h) + 24px); }

/* Forms and actions */
form { display: grid; gap: 10px; }
fieldset { min-width: 0; margin: 0 0 10px; padding: 0; border: 0; }
legend, label { font-size: 0.86rem; font-weight: 500; }
legend { margin-bottom: 10px; }
label { display: grid; gap: 5px; }
label span { color: var(--text-dim); font-weight: 400; }
.field-label { color: var(--text); font-weight: 500; }
.field-label small { color: var(--text-dim); font-size: 0.72rem; font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: 500 0.95rem/1 var(--font);
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
button:hover { opacity: 0.8; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button.secondary { border-color: var(--accent); background: transparent; color: var(--accent); }
button.secondary:hover { background: rgba(11, 122, 85, 0.06); opacity: 1; }
button.danger-action { border: 0; background: transparent; color: var(--danger); }
button.danger-action:hover { background: rgba(162, 49, 39, 0.07); opacity: 1; }
#purchase-submit { justify-self: start; min-height: 38px; padding: 0 16px; font-size: 0.84rem; }
.inline-action { min-height: 38px; margin: 0; padding: 0 15px; font-size: 0.84rem; }

/* Plan choice */
.purchase-panel { display: block; margin-bottom: 18px; padding: 20px; }
.purchase-suggestion { display: flex; align-items: baseline; gap: 14px; }
.purchase-suggestion .step { flex: 0 0 auto; margin: 0; }
.purchase-suggestion h2 { flex: 0 0 auto; font-size: 1.2rem; font-weight: 500; }
.purchase-suggestion > p:last-child { margin: 0; font-size: 0.86rem; }
.purchase-panel form { margin-top: 15px; }
.terms-version, .role, .billing-badge, .unsigned-badge, .grant-badge, .staging-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font: 500 0.7rem/1.2 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.terms-version { margin: 0; background: rgba(11, 122, 85, 0.09); color: var(--accent); text-transform: none; letter-spacing: 0; }
.agreement-documents { display: inline; }
.agreement-documents a { font-weight: 500; }
.purchase-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.purchase-plan { display: flex; flex-direction: column; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev-2); }
.purchase-plan h3 { font-size: 1rem; font-weight: 500; }
.purchase-plan-capacity { margin: 3px 0 10px; color: var(--text-muted); font-size: 0.75rem; }
.billing-choices { display: grid; gap: 7px; margin-top: auto; }
.free-plan-price { display: grid; gap: 4px; margin-top: auto; padding: 9px; border: 1px solid rgba(11, 122, 85, 0.25); border-radius: 9px; background: rgba(114, 241, 184, 0.09); }
.free-plan-price strong { font-size: 0.9rem; }
.free-plan-price small { color: var(--text-muted); font-size: 0.7rem; line-height: 1.35; }
.purchase-option { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elev); cursor: pointer; }
.purchase-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.purchase-option input { grid-row: 1 / 3; margin: 0; accent-color: var(--accent); }
.purchase-option span { color: var(--text-muted); font-size: 0.74rem; font-weight: 400; }
.purchase-option strong { min-width: 0; overflow-wrap: anywhere; font-size: 0.82rem; }
.purchase-option small { display: none; }
.agreement-check { display: flex; align-items: start; gap: 8px; width: fit-content; margin-top: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev-2); font-size: 0.8rem; }
.agreement-check input { flex: 0 0 auto; margin: 4px 0 0; accent-color: var(--accent); }
.agreement-check span { color: var(--text-body); font-weight: 400; line-height: 1.5; }
.purchase-availability { min-height: 22px; margin: 2px 0 0; font-size: 0.82rem; }

/* Billing and grants */
.role { background: rgba(11, 122, 85, 0.09); color: var(--accent); }
.billing-box, .application-box { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev-2); }
.application-box { margin-top: 12px; }
.organization-settings .billing-box, .organization-settings .application-box, .organization-settings .cancellation-box { margin-top: 0; padding: 22px; background: var(--bg-elev); }
.billing-heading, .grants-heading, .grant-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.billing-badge, .unsigned-badge, .grant-badge { background: var(--bg-code); color: var(--text-muted); }
.billing-badge[data-tone="ok"], .grant-badge[data-tone="ok"] { background: rgba(11, 122, 85, 0.1); color: var(--accent); }
.billing-badge[data-tone="warning"], .grant-badge[data-tone="warning"], .staging-badge { background: rgba(148, 96, 12, 0.1); color: var(--warning); }
.application-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(11, 122, 85, 0.1); color: var(--accent); font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.application-summary { margin: 8px 0 0; }
.billing-summary { margin: 6px 0 0; font-size: 0.86rem; }
.cancellation-summary { margin: 8px 0 0; color: var(--text-muted); font-size: 0.86rem; }
.billing-subscriptions { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.billing-subscriptions:empty { display: none; }
.billing-subscriptions li { display: grid; gap: 3px; padding-top: 11px; border-top: 1px solid var(--border); }
.billing-subscriptions span { color: var(--text-muted); font: 400 0.75rem/1.45 var(--mono); overflow-wrap: anywhere; }
.billing-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.billing-actions:not(:has(> :not([hidden]))) { display: none; }
.compact-action { min-height: 32px; padding: 5px 10px; font-size: 0.76rem; }
.billing-removed { color: var(--text-muted); font: 600 0.72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
.grants-heading p { margin: 5px 0 0; font-size: 0.84rem; }
.commercial-grants { display: grid; gap: 13px; margin-top: 15px; }
.grant-item { padding-top: 14px; border-top: 1px solid var(--border); }
.grant-item > p { margin: 6px 0; font-size: 0.84rem; }
.grant-reference { color: var(--text-muted); font: 400 0.7rem/1.5 var(--mono); overflow-wrap: anywhere; }
.grant-validity, .grant-boundary, .grant-empty { margin: 14px 0 0; font-size: 0.8rem; }
.grant-history-action { flex: 0 0 auto; min-height: 36px; margin: 0; padding: 0 13px; font-size: 0.78rem; }
.grant-history-action { margin-top: 7px; }
.grant-history { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 22px; }
.grant-history strong, .grant-history span { display: block; }
.grant-history span { margin-top: 2px; color: var(--text-muted); font-size: 0.75rem; }

/* Staff operations */
.capabilities { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.compact-panel, .record-panel { align-items: start; }
.operations-heading { margin: 54px 0 20px; }
.operations-grid { display: grid; grid-template-columns: minmax(0, 760px); gap: 18px; }
.operation-card { padding: clamp(24px, 4vw, 34px); }
.operation-card > p { margin: 8px 0 20px; font-size: 0.84rem; }
.advanced-operator-toggle { justify-self: start; display: inline-flex; gap: 8px; min-height: 32px; margin: 0; padding: 0 2px; border: 0; background: transparent; color: var(--text-muted); font-size: 0.82rem; }
.advanced-operator-toggle::before { content: "›"; font-size: 1.25rem; font-weight: 400; transform: rotate(0deg); transition: transform 140ms ease; }
.advanced-operator-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.advanced-operator-toggle:hover { background: transparent; color: var(--text); opacity: 1; }
.advanced-operator-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.staff-customer-queue { display: grid; gap: 8px; }
.staff-customer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 0; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); color: var(--text); text-align: left; }
.staff-customer-row:hover { border-color: var(--accent); background: rgba(11, 122, 85, 0.035); opacity: 1; }
.staff-customer-copy { display: grid; gap: 3px; }
.staff-customer-status, .staff-customer-context, .muted-copy { color: var(--text-muted); font-size: 0.8rem; }
.staff-customer-context { font: 400 0.7rem/1.4 var(--mono); }
.staff-customer-action { flex: 0 0 auto; color: var(--accent); font-size: 0.75rem; font-weight: 500; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compact-textarea { height: 44px; min-height: 44px; }
.operation-records { display: grid; gap: 10px; }
.operation-records + .operation-records { margin-top: 24px; }
.record-title { font-size: 1.05rem; }
.operation-record { padding-top: 12px; border-top: 1px solid var(--border); }
.operation-record p { margin: 4px 0; font-size: 0.75rem; }
.operation-record code { display: block; color: var(--text-muted); font: 400 0.68rem/1.5 var(--mono); overflow-wrap: anywhere; }
.record-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.small-action { min-height: 34px; margin: 0; padding: 0 12px; font-size: 0.75rem; }

/* Shared Polign footer */
.site-footer { border-top: 1px solid var(--border); padding: 64px var(--gutter) 40px; color: var(--text-muted); font-size: 0.875rem; }
.footer-inner { max-width: var(--content-w); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand { align-self: flex-start; color: var(--text); }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 32px 58px; }
.footer-links > div { display: grid; align-content: start; }
.footer-links span { margin-bottom: 14px; color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links a { margin-bottom: 10px; color: var(--text); font-size: 0.875rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom a { color: var(--text-muted); }

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .topnav { gap: 12px; }
  .account-nav-link { display: none; }
  .account-hero { padding-top: 70px; padding-bottom: 76px; }
  .account-hero .hero-art { width: 120vw; max-width: none; right: -30vw; opacity: 0.22; }
  .account-content { padding-top: 44px; }
  .settings-shell { grid-template-columns: 1fr; gap: 24px; }
  .settings-rail { position: static; }
  .settings-rail > span { margin-bottom: 8px; }
  .settings-rail nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 3px; }
  .settings-rail a { flex: 0 0 auto; }
  .settings-heading { align-items: stretch; flex-direction: column; }
  .panel { grid-template-columns: 1fr; gap: 24px; }
  .purchase-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-suggestion { align-items: flex-start; flex-direction: column; gap: 5px; }
  .journey-tabs { align-self: flex-start; }
  .identity-bar { align-items: start; flex-direction: column; }
  .account-service-grid { grid-template-columns: 1fr; }
  .guest-workflow { align-items: flex-start; flex-direction: column; }
  .detail { max-width: 100%; }
  .section-heading, .grants-heading, .grant-heading { align-items: stretch; flex-direction: column; }
  .organization-title { align-items: start; }
  .form-pair { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

@media (max-width: 600px) {
  .topnav { padding: 0 16px; }
  .topnav .brand span, .account-label { display: none; }
  .session-controls { gap: 7px; }
  .environment { display: none; }
  .session-action { min-height: 36px; padding: 0 14px; }
  .staff-action { padding: 0 5px; font-size: 0; }
  .staff-action::after { content: "Staff"; font-size: 0.8rem; }
  .environment-only { display: none; }
  .account-hero { padding-left: 20px; padding-right: 20px; }
  .account-hero h1 { font-size: 2.35rem; }
  .account-hero .lede { font-size: 1rem; }
  .account-content { width: calc(100% - 32px); padding-bottom: 72px; }
  .panel, .organization-card, .operation-card, .settings-card { border-radius: 16px; }
  .panel { padding: 24px; }
  .account-summary-strip { align-items: stretch; flex-direction: column; gap: 10px; }
  .plan-summary { padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .identity-bar { padding: 18px; }
  .billing-box, .grants-box { padding: 16px; }
  .billing-heading, .organization-title { flex-direction: column; }
  .purchase-options { grid-template-columns: 1fr; }
  .journey-tabs { width: 100%; border-radius: 14px; }
  .journey-tab { flex: 1; min-height: 44px; border-radius: 10px; }
  .footer-links { grid-template-columns: 1fr; }
  .site-footer { padding: 48px 20px 32px; }
}
