/* Shared look: tokens, Geist fonts, the textured Graphite ground, buttons, glass, header, footer.
   Owned by the landing worker (shared-theme/); never fork it here.
   Aero Day and Aero Night are layered below. Graphite is data-theme="graphite". */
@import url("/theme/theme.css");

/* ---------- portal-only pieces ---------- */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-ico { width: 18px; height: 18px; flex: none; }
.em { color: var(--ink); font-weight: 500; }
.cap { text-transform: capitalize; }
.btn .ico { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-wash); border-color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .92rem; }
.inline-code { font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--well-code); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }

/* fields */
.stack > * + * { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: .86rem; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: .8rem; }
.field input, .field textarea, .select {
  min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--field-border); background: var(--well);
  color: var(--ink); font: 400 1rem var(--sans); transition: border-color .15s, background .15s; width: 100%;
}
.field textarea { min-height: 88px; padding: 12px 16px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:hover, .field textarea:hover, .select:hover { border-color: var(--hover-border); }
.field input:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--focus-border); background: var(--well-focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.check-field { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check-field input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sage); margin: 0; }
.field input[readonly] { color: var(--ink-2); background: var(--well-readonly); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.select { appearance: none; padding-right: 38px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select option { background: var(--option-bg); color: var(--ink); }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; padding-left: calc(16px + .4em) !important; }
.field-error { color: var(--danger); font-size: .88rem; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: .92rem; margin-bottom: 18px; background: var(--grant-bg); border: 1px solid var(--grant-line); color: var(--ink); }
.flash .ico { color: var(--sage); }
.flash-warn { background: var(--danger-wash); border-color: var(--danger-line); }
.flash-warn .ico { color: var(--danger); }

/* ---------- signed-out: sign up, sign in, code ---------- */
.auth-main { padding-top: clamp(40px, 9vh, 110px); padding-bottom: clamp(60px, 10vh, 120px); min-height: calc(100vh - 220px); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 440px); gap: clamp(36px, 7vw, 110px); align-items: center; }
.auth-copy > * + * { margin-top: 18px; }
.auth-title { font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 1; letter-spacing: -0.02em; max-width: 12ch; }
.auth-lede { color: var(--ink-2); max-width: 34ch; }
.auth-small { font-size: .92rem; }
.auth-steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 10px; max-width: 360px; }
.auth-steps li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
.auth-steps li .mono { color: var(--ink-3); font-size: .72rem; letter-spacing: .1em; }
.auth-card { padding: clamp(24px, 3vw, 34px); }
.card-title { font: 500 1.08rem/1.2 var(--sans); color: var(--ink); margin-bottom: 20px; }
.card-foot { margin-top: 20px; font-size: .9rem; color: var(--ink-2); text-align: center; }
.card-foot a, .card-row a { color: var(--ink); text-underline-offset: 3px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: .92rem; }
.oauth { display: grid; gap: 10px; }
.btn-oauth { width: 100%; justify-content: center; gap: 10px; }
.btn-github { background: var(--well); color: var(--ink); border-color: var(--field-border); }
.btn-github:hover { border-color: var(--hover-border); background: var(--well-focus); }
.btn-apple { background: #f3efe8; color: #0b0a09; }
.btn-apple:hover { background: #fffaf0; }
.or { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--ink-3); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.as-email { font-size: 1rem; padding: 14px 16px; border-radius: 14px; background: var(--well); border: 1px solid var(--line); margin-bottom: 16px; overflow-wrap: anywhere; }
.mail { white-space: pre-wrap; font-size: .85rem; color: var(--ink-2); margin: 10px 0 0; }
.auth-card .card + .card { margin-top: 12px; }

/* ---------- signed-in shell ---------- */
.app-head { gap: 16px; }
.ws-name { color: var(--ink-3); font-size: .9rem; padding-left: 16px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who-name { font-size: .92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-mail { font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 .78rem/1 var(--mono); letter-spacing: .04em; color: #1a1714; background: linear-gradient(160deg, #c9dcbf, var(--sage)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.1rem; }
.avatar-ghost { background: rgba(255, 255, 255, .06); color: var(--ink-2); border: 1px dashed var(--glass-stroke); box-shadow: none; }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-top: 40px; padding-bottom: 80px; align-items: start; min-width: 0; }
.side { position: sticky; top: 24px; display: grid; gap: 26px; min-width: 0; }
.app-main { min-width: 0; }
.side-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px 12px; }
.side-group { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: .95rem; transition: background .15s, color .15s; }
.side-link:hover { color: var(--ink); background: var(--hover-wash); }
.side-link.is-active { color: var(--ink); background: var(--glass); border: 1px solid var(--glass-stroke); padding: 9px 11px; -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.side-link.is-active .ico { color: var(--sage); }

.page-head { margin-bottom: 28px; }
.page-head > * + * { margin-top: 12px; }
.page-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.02; letter-spacing: -0.018em; }
.page-lede { font-size: 1rem; }
.cards { display: grid; gap: 16px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-wide { grid-column: 1 / -1; }
.app-main > .card + .card, .app-main > .card + section { margin-top: 16px; }
.card { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.card > * { max-width: 100%; }
.card-head { display: flex; align-items: center; gap: 10px; width: 100%; }
.card-head h2, .card-head h3 { font: 500 1.02rem/1.2 var(--sans); color: var(--ink); margin: 0; }
.card-head > .ico { color: var(--sage); }
.card-meta { margin-left: auto; font-size: .8rem; color: var(--ink-3); }
.head-action { margin-left: auto; }
.card .body { font-size: .95rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-title { font: 500 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }

.stat-row { display: flex; gap: 36px; }
.stat { display: flex; flex-direction: column; }
.stat-n { font-size: 2.6rem; line-height: 1; }
.stat-l { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }
.kv { margin: 0; display: grid; gap: 0; width: 100%; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }

/* install line (matches the landing page's) */
.install-cmd { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px 10px 18px; border-radius: 16px; background: var(--well-strong); border: 1px solid var(--field-border); }
.install-cmd code { flex: 1; min-width: 0; font-size: .92rem; color: var(--ink); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.install-copy { flex: none; }
.install-copy.copied { border-color: var(--sage); color: var(--sage); }
.install-note { font-size: .86rem; color: var(--ink-2); }
.install-note a { color: var(--ink); }

/* rows: machines, devices, members, tokens, sessions */
.rows { list-style: none; margin: 0; padding: 0; width: 100%; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.row-item:first-child { border-top: 0; padding-top: 4px; }
.row-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--well); border: 1px solid var(--line); color: var(--ink-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-main strong { font-weight: 500; font-size: .96rem; color: var(--ink); overflow-wrap: anywhere; }
.row-sub { font-size: .84rem; color: var(--ink-3); overflow-wrap: anywhere; }
.row-sub code { font-size: .82rem; color: var(--ink-2); }
.row-end { display: flex; align-items: center; gap: 12px; flex: none; }
.you { color: var(--ink-3); font-weight: 400; }
.tag { font-size: .78rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--glass-stroke); color: var(--ink-2); white-space: nowrap; }
.grants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.grant { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--grant-bg); color: var(--grant-fg); border: 1px solid var(--grant-line); }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.state-ok i { background: var(--sage); box-shadow: 0 0 0 3px rgba(163, 191, 152, .16); }
.state-mid i { background: #d8c08f; }
.state-off i { background: transparent; border: 1.5px solid var(--ink-3); }
.state-err i { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-wash); }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.role-form .select { min-height: 38px; font-size: .88rem; padding-left: 12px; width: auto; }

/* steps (link your Mac) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; }
.steps li { display: flex; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.steps strong { font-weight: 500; color: var(--ink); }
.step-n { color: var(--ink-3); font-size: .74rem; letter-spacing: .1em; padding-top: 4px; }

/* forms in cards */
.invite-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; width: 100%; }
.invite-form .grow { flex: 1 1 260px; }
.invite-form .btn { min-height: 48px; }

/* app icon tile */
.app-tile { display: block; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 30px -14px rgba(0, 0, 0, .8); image-rendering: pixelated; }
.app-tile-lg { width: 72px; height: 72px; border-radius: 18px; }
.auth-copy .app-tile { margin-bottom: 26px; }
.apps-line { display: flex; gap: 16px; align-items: center; }
.row-ico .brand-ico { width: 17px; height: 17px; color: var(--ink); }

/* profile */
.profile-form { display: grid; gap: 20px; width: 100%; }
.profile-id { display: flex; align-items: center; gap: 16px; }
.profile-name { font: 500 1.05rem/1.2 var(--sans); color: var(--ink); margin-bottom: 4px; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* downloads: pixel device art in the app icon's style, on the same graphite ground */
.pixel-tile { width: 88px; height: 88px; border-radius: 22px; padding: 8px; background: var(--pixel-bg); image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .2), 0 14px 30px -14px rgba(0, 0, 0, .45); }
.pixel-art { width: 100%; height: 100%; }
/* downloads */
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; margin-bottom: 8px; }
.dl-platform { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-3); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.dl-platform .ico { width: 14px; height: 14px; }
.dl-card { gap: 12px; }
.dl-card h2.dl-title { font-size: clamp(1.5rem, 2.2vw, 1.85rem); line-height: 1.1; width: 100%; text-wrap: balance; }
.dl-card .btn { margin-top: 6px; }

/* pairing */
.pair-card { flex-direction: row; align-items: center; gap: clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.pair-qr { flex: none; padding: 12px; border-radius: 20px; background: #f3efe8; }
.qr { width: 220px; height: 220px; image-rendering: pixelated; }
.pair-side { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.pair-code { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: .08em; color: var(--ink); }

/* billing */
.plan { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; width: 100%; padding: 18px 20px; border-radius: 18px; background: var(--well-soft); border: 1px solid var(--line); }
.plan-name { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; }
.plan-price { font-size: 2.4rem; line-height: 1; color: var(--sage); }
.plan-price-sub { font: 400 .95rem/1 var(--sans); color: var(--ink-2); }
.meter-wrap { width: 100%; display: grid; gap: 8px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; color: var(--ink-2); }
progress.meter { width: 100%; height: 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--well-strong); appearance: none; overflow: hidden; }
progress.meter::-webkit-progress-bar { background: var(--well-strong); border-radius: 999px; }
progress.meter::-webkit-progress-value { background: var(--sage); border-radius: 999px; }
progress.meter::-moz-progress-bar { background: var(--sage); border-radius: 999px; }

/* bot protection & billing plans */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.turnstile-wrap { display: flex; justify-content: flex-start; min-height: 65px; }
.billing-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; }
.plan-card { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--well-soft); border: 1px solid var(--line); align-content: space-between; }
.plan-card-current { border-color: var(--sage); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sage) 40%, transparent); }
.plan-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-card-head h3 { margin: 0; font-size: 1.2rem; }
.plan-card-price { margin: 0; font-size: 1.45rem; }
.plan-card-price span { font: 400 .85rem/1 var(--sans); color: var(--ink-2); }
.plan-features { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; color: var(--ink-2); }
.plan-card-foot { padding-top: 6px; }
@media (max-width: 960px) { .plan-grid { grid-template-columns: 1fr; } }

/* cloud hosts */
.cloud-stats { flex-wrap: wrap; gap: 24px 36px; }
.cloud-form { display: grid; gap: 16px; width: 100%; }
.cloud-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.cloud-span-2 { grid-column: 1 / -1; }
.cloud-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cloud-hosts { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; }
.cloud-host { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cloud-host:first-child { border-top: 0; padding-top: 4px; }
.cloud-host-head { display: flex; align-items: center; gap: 14px; }
.cloud-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding-left: 52px; }
.disclosure { display: inline-grid; gap: 10px; }
.disclosure > summary { list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open].disclosure-wide { flex: 1 1 100%; }
.disclosure-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 14px; border-radius: 16px; background: var(--well-soft); border: 1px solid var(--line); }
.disclosure-stack { flex-direction: column; align-items: stretch; }
.runs-block { padding-left: 52px; display: grid; gap: 8px; }
.runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.run-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--well); border: 1px solid var(--line); font-size: .86rem; }
.run-badges { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.run-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.run-prompt { color: var(--ink); overflow-wrap: anywhere; }
.run-error { color: var(--danger); font-size: .8rem; overflow-wrap: anywhere; }
.run-when { flex: none; font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--glass-stroke); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--grant-bg); color: var(--grant-fg); border-color: var(--grant-line); }
.badge-mid { background: var(--well); color: var(--ink); border-color: var(--field-border); }
.badge-info { background: color-mix(in srgb, var(--focus-border) 18%, transparent); color: var(--ink); border-color: color-mix(in srgb, var(--focus-border) 45%, transparent); }
.badge-warn { background: color-mix(in srgb, var(--plum) 16%, transparent); color: var(--plum); border-color: color-mix(in srgb, var(--plum) 42%, transparent); }
.badge-err { background: var(--danger-wash); color: var(--danger); border-color: var(--danger-line); }

/* danger zone */
.danger { border-color: var(--danger-card); }
.danger .card-head > .ico { color: var(--danger); }
.app-main > .danger + .danger { margin-top: 16px; }
.token-new { border-color: color-mix(in srgb, var(--sage) 45%, transparent); }

.acct-foot { padding-bottom: 56px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .auth-grid { grid-template-columns: 1fr; gap: 32px; }
  .auth-title { font-size: clamp(2.4rem, 9vw, 3.4rem); }
  .auth-steps { display: none; }
  .auth-main { padding-top: 32px; }
  .app-shell { grid-template-columns: 1fr; padding-top: 18px; gap: 22px; }
  .side { position: static; display: flex; gap: 4px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: none; }
  .side-group { display: flex; gap: 4px; }
  .side-label { display: none; }
  .side-link { white-space: nowrap; padding: 8px 12px; font-size: .9rem; }
  .side-link.is-active { padding: 7px 11px; }
  .ws-name { display: none; }
}
@media (max-width: 720px) {
  .cards-2 { grid-template-columns: 1fr; }
  .who-text { display: none; }
  .who .btn span { display: none; }
  .who .btn { padding: 0 12px; }
  .profile-fields { grid-template-columns: 1fr; }
  .cloud-form-grid { grid-template-columns: 1fr; }
  .cloud-actions, .runs-block { padding-left: 0; }
  .run-item { flex-wrap: wrap; }
  /* rows with a status and an action wrap under the text; a single tag or button stays inline */
  .row-item:has(.row-end > :nth-child(2)) { flex-wrap: wrap; }
  .row-item:has(.row-end > :nth-child(2)) .row-end { width: 100%; justify-content: space-between; padding-left: 52px; }
  .plan { flex-direction: column; align-items: flex-start; }
  /* the whole install line stays readable on a phone */
  .install-cmd { flex-wrap: wrap; padding: 14px 12px 12px 16px; row-gap: 10px; }
  .install-cmd code { flex: 1 1 100%; white-space: normal; overflow-wrap: normal; line-height: 1.5; }
  .install-copy { margin-left: auto; }
  .qr { width: 200px; height: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- theme toggle (auth header and signed-in header) ---------- */
.theme-switch { display: flex; align-items: center; flex: none; }
.theme-toggle {
  display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--glass-stroke); background: var(--pill, var(--glass)); color: var(--ink); cursor: pointer;
  font: 600 .88rem/1 var(--sans); box-shadow: var(--pill-shadow, var(--shadow));
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.theme-toggle:hover { border-color: var(--hover-border); }
.theme-ico { width: 18px; height: 18px; }
html[data-theme="day"] .theme-toggle.for-day,
html:not([data-theme]) .theme-toggle.for-day { display: inline-flex; }
html[data-theme="night"] .theme-toggle.for-night { display: inline-flex; }
html[data-theme="graphite"] .theme-toggle.for-graphite { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-toggle.for-day { display: none; }
  html:not([data-theme]) .theme-toggle.for-night { display: inline-flex; }
}
@media (max-width: 960px) { body.auth .theme-switch { margin-left: auto; } }
@media (max-width: 420px) {
  .app-head .theme-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .app-head .theme-toggle { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- Aero Day / Night. Palette matches the landing page (aero.css). Graphite restores the shared theme. ---------- */
:root, :root[data-theme="day"] {
  --paper: #e7f4ff; --paper-2: #ffffff; --paper-3: rgba(15, 39, 71, .12);
  --ink: #0f2747; --ink-2: #2c4a78; --ink-3: #23486f; --accent: #1f7a3a;
  --glass: rgba(255, 255, 255, .66); --glass-stroke: rgba(255, 255, 255, .72); --line: rgba(15, 39, 71, .16);
  --button: #ffffff; --button-fg: #0f2747;
  --sage: #1f7a3a; --moss-pale: #d7efd4; --plum: #a8325f;
  --sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --shadow: 0 24px 70px rgba(20, 60, 120, .22), inset 0 1px 0 rgba(255, 255, 255, .45);
  --pill: rgba(255, 255, 255, .42);
  --pill-shadow: 0 10px 30px rgba(20, 60, 120, .18), inset 0 1px 0 rgba(255, 255, 255, .55);
  --field-border: #5c7694;
  --well: rgba(255, 255, 255, .92); --well-strong: #ffffff; --well-focus: #ffffff;
  --well-readonly: rgba(255, 255, 255, .7); --well-soft: rgba(255, 255, 255, .62); --well-code: rgba(255, 255, 255, .88);
  --hover-border: #3f5d80; --focus-border: #0b5fd0; --focus-ring: rgba(11, 95, 208, .28);
  --option-bg: #ffffff; --hover-wash: rgba(255, 255, 255, .5);
  --grant-bg: rgba(31, 122, 58, .14); --grant-fg: #14612e; --grant-line: rgba(31, 122, 58, .28);
  --danger: #8d2a22; --danger-line: rgba(141, 42, 34, .45); --danger-wash: rgba(141, 42, 34, .08); --danger-card: rgba(141, 42, 34, .28);
  --pixel-bg: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(176, 220, 255, .9));
  color-scheme: light;
}
:root[data-theme="night"] {
  --paper: #0b1636; --paper-2: #121c42; --paper-3: rgba(200, 215, 255, .18);
  --ink: #eef4ff; --ink-2: #c5d4f5; --ink-3: #9aafd4; --accent: #9ee08d;
  --glass: rgba(12, 22, 52, .72); --glass-stroke: rgba(160, 190, 255, .3); --line: rgba(200, 215, 255, .18);
  --button: #eef4ff; --button-fg: #0b1a3a;
  --sage: #9ee08d; --moss-pale: #1c3a32; --plum: #f0b2cd;
  --sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .16);
  --pill: rgba(16, 28, 64, .42);
  --pill-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .16);
  --field-border: #7ea2e0;
  --well: rgba(255, 255, 255, .08); --well-strong: rgba(8, 16, 40, .74); --well-focus: rgba(255, 255, 255, .14);
  --well-readonly: rgba(255, 255, 255, .05); --well-soft: rgba(255, 255, 255, .06); --well-code: rgba(8, 16, 40, .62);
  --hover-border: #b7cff7; --focus-border: #d5e4ff; --focus-ring: rgba(213, 228, 255, .4);
  --option-bg: #0c1634; --hover-wash: rgba(255, 255, 255, .08);
  --grant-bg: rgba(158, 224, 141, .14); --grant-fg: #d4f5cb; --grant-line: rgba(158, 224, 141, .32);
  --danger: #f0b9b0; --danger-line: rgba(240, 185, 176, .45); --danger-wash: rgba(240, 185, 176, .1); --danger-card: rgba(240, 185, 176, .22);
  --pixel-bg: linear-gradient(180deg, rgba(24, 42, 92, .85), rgba(8, 16, 40, .92));
  color-scheme: dark;
}
:root[data-theme="graphite"] {
  --paper: #141311; --paper-2: #1c1a18; --paper-3: #34312d;
  --ink: #f3efe8; --ink-2: #b8b0a4; --ink-3: #8f877c; --accent: #d8d2c8;
  --glass: rgba(30, 28, 26, .55); --glass-stroke: rgba(255, 255, 255, .14); --line: rgba(255, 255, 255, .1);
  --button: #ece6da; --button-fg: #1a1714;
  --sage: #a3bf98; --moss-pale: #3f4a3a; --plum: #d4a3b6;
  --serif: "Geist Serif", ui-serif, Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 60px -30px rgba(0, 0, 0, .6);
  --pill: rgba(30, 28, 26, .55);
  --pill-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px -16px rgba(0, 0, 0, .5);
  --field-border: rgba(255, 255, 255, .14);
  --well: rgba(13, 12, 11, .62); --well-strong: rgba(13, 12, 11, .72); --well-focus: rgba(13, 12, 11, .8);
  --well-readonly: rgba(13, 12, 11, .35); --well-soft: rgba(13, 12, 11, .5); --well-code: rgba(13, 12, 11, .6);
  --hover-border: rgba(255, 255, 255, .26); --focus-border: var(--sage); --focus-ring: rgba(163, 191, 152, .18);
  --option-bg: #1c1a18; --hover-wash: rgba(255, 255, 255, .04);
  --grant-bg: rgba(163, 191, 152, .1); --grant-fg: #c3d6b9; --grant-line: rgba(163, 191, 152, .22);
  --danger: #f0b9b0; --danger-line: rgba(240, 185, 176, .45); --danger-wash: rgba(240, 185, 176, .1); --danger-card: rgba(240, 185, 176, .18);
  --pixel-bg: #191816 url("/theme/assets/graphite_dark.png") center / 400% auto;
  color-scheme: dark;
}

/* Fallbacks before /theme.js runs, and the same surfaces for an explicit theme. */
:root {
  --field-border: #5c7694;
  --well: rgba(255, 255, 255, .92); --well-strong: #ffffff; --well-focus: #ffffff;
  --well-readonly: rgba(255, 255, 255, .7); --well-soft: rgba(255, 255, 255, .62); --well-code: rgba(255, 255, 255, .88);
  --hover-border: #3f5d80; --focus-border: #0b5fd0; --focus-ring: rgba(11, 95, 208, .28);
  --option-bg: #ffffff; --hover-wash: rgba(255, 255, 255, .5);
  --grant-bg: rgba(31, 122, 58, .14); --grant-fg: #14612e; --grant-line: rgba(31, 122, 58, .28);
  --danger: #8d2a22; --danger-line: rgba(141, 42, 34, .45); --danger-wash: rgba(141, 42, 34, .08); --danger-card: rgba(141, 42, 34, .28);
  --pixel-bg: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(176, 220, 255, .9));
  --pill: rgba(255, 255, 255, .42);
  --pill-shadow: 0 10px 30px rgba(20, 60, 120, .18), inset 0 1px 0 rgba(255, 255, 255, .55);
}

html[data-theme="day"] body,
html:not([data-theme]) body { background: #d3edff; }
html[data-theme="night"] body { background: #0b1636; }
html[data-theme="graphite"] body { background: #141311; }

html[data-theme="day"] body::before,
html:not([data-theme]) body::before {
  animation: none; width: 100vw; height: 100vh; transform: none; image-rendering: auto;
  background:
    radial-gradient(ellipse 48% 32% at 82% 0%, rgba(255, 255, 255, .8), transparent 68%),
    radial-gradient(ellipse 36% 26% at 10% 100%, rgba(255, 210, 160, .38), transparent 72%),
    radial-gradient(ellipse 42% 30% at 32% 28%, rgba(255, 255, 255, .4), transparent 70%),
    linear-gradient(180deg, #b7e3ff 0%, #e7f6ff 20%, #d4efff 58%, #c5e6fc 100%);
}
html[data-theme="night"] body::before {
  animation: none; width: 100vw; height: 100vh; transform: none; image-rendering: auto;
  background:
    radial-gradient(1.2px 1.2px at 7% 14%, rgba(255, 255, 255, .9) 50%, transparent 52%),
    radial-gradient(1px 1px at 18% 32%, rgba(255, 255, 255, .65) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 28% 12%, rgba(255, 255, 255, .85) 50%, transparent 52%),
    radial-gradient(1px 1px at 41% 22%, rgba(220, 232, 255, .7) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 56% 9%, rgba(255, 255, 255, .9) 50%, transparent 52%),
    radial-gradient(1px 1px at 67% 27%, rgba(255, 255, 255, .55) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 78% 16%, rgba(255, 255, 255, .9) 50%, transparent 52%),
    radial-gradient(1px 1px at 88% 8%, rgba(255, 255, 255, .7) 50%, transparent 52%),
    radial-gradient(1px 1px at 12% 58%, rgba(255, 255, 255, .45) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 33% 48%, rgba(255, 255, 255, .5) 50%, transparent 52%),
    radial-gradient(1px 1px at 63% 52%, rgba(220, 232, 255, .45) 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 84% 44%, rgba(255, 255, 255, .6) 50%, transparent 52%),
    radial-gradient(1px 1px at 92% 68%, rgba(255, 255, 255, .4) 50%, transparent 52%),
    radial-gradient(1px 1px at 24% 76%, rgba(255, 255, 255, .35) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 48% 82%, rgba(255, 255, 255, .32) 50%, transparent 52%),
    radial-gradient(ellipse 80% 48% at 50% -8%, rgba(92, 132, 214, .48), transparent 62%),
    radial-gradient(ellipse 46% 28% at 82% 108%, rgba(28, 48, 110, .4), transparent 60%),
    linear-gradient(180deg, #0b1636 0%, #101c44 46%, #081228 100%);
}

html[data-theme="day"] .serif,
html[data-theme="night"] .serif,
html:not([data-theme]) .serif { font-weight: 300; letter-spacing: -0.03em; }
html[data-theme="day"] .auth-title,
html:not([data-theme]) .auth-title,
html[data-theme="day"] .page-title,
html:not([data-theme]) .page-title { text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
html[data-theme="night"] .auth-title,
html[data-theme="night"] .page-title { text-shadow: 0 2px 24px rgba(10, 20, 60, .55); }
html[data-theme="day"] .wordmark-text,
html[data-theme="night"] .wordmark-text,
html:not([data-theme]) .wordmark-text { font-family: var(--sans); letter-spacing: -0.01em; }

html[data-theme="day"] :focus-visible,
html:not([data-theme]) :focus-visible { outline-color: #0b5fd0; }
html[data-theme="night"] :focus-visible { outline-color: #9cc2ff; }

html[data-theme="day"] .btn-glass:hover,
html:not([data-theme]) .btn-glass:hover { border-color: rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .8); }
html[data-theme="night"] .btn-glass:hover { border-color: rgba(180, 205, 255, .5); background: rgba(255, 255, 255, .12); }
html[data-theme="graphite"] .btn-glass:hover { border-color: rgba(255, 255, 255, .3); background: rgba(44, 41, 38, .7); }

html[data-theme="day"] .site-head .wordmark,
html[data-theme="night"] .site-head .wordmark,
html:not([data-theme]) .site-head .wordmark {
  padding: 8px 16px 8px 11px; border-radius: 999px; background: var(--pill); border: 1px solid var(--glass-stroke);
  box-shadow: var(--pill-shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
html[data-theme="day"] .glass,
html[data-theme="night"] .glass,
html:not([data-theme]) .glass {
  border-radius: 28px;
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
}
html[data-theme="day"] .acct-foot,
html[data-theme="night"] .acct-foot,
html:not([data-theme]) .acct-foot {
  width: min(1200px, calc(100% - 48px)); margin: 8px auto 40px; padding: 18px 12px 16px;
  border: 1px solid var(--glass-stroke); border-radius: 24px; background: var(--glass); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
}
html[data-theme="day"] .btn-apple,
html:not([data-theme]) .btn-apple { background: #0f2747; color: #ffffff; }
html[data-theme="day"] .btn-apple:hover,
html:not([data-theme]) .btn-apple:hover { background: #173864; }
html[data-theme="night"] .btn-apple { background: #eef4ff; color: #0b1a3a; }
html[data-theme="night"] .btn-apple:hover { background: #ffffff; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #0b1636; --paper-2: #121c42; --paper-3: rgba(200, 215, 255, .18);
    --ink: #eef4ff; --ink-2: #c5d4f5; --ink-3: #9aafd4; --accent: #9ee08d;
    --glass: rgba(12, 22, 52, .72); --glass-stroke: rgba(160, 190, 255, .3); --line: rgba(200, 215, 255, .18);
    --button: #eef4ff; --button-fg: #0b1a3a;
    --sage: #9ee08d; --moss-pale: #1c3a32; --plum: #f0b2cd;
    --sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --serif: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --shadow: 0 24px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .16);
    --pill: rgba(16, 28, 64, .42);
    --pill-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .16);
    --field-border: #7ea2e0;
    --well: rgba(255, 255, 255, .08); --well-strong: rgba(8, 16, 40, .74); --well-focus: rgba(255, 255, 255, .14);
    --well-readonly: rgba(255, 255, 255, .05); --well-soft: rgba(255, 255, 255, .06); --well-code: rgba(8, 16, 40, .62);
    --hover-border: #b7cff7; --focus-border: #d5e4ff; --focus-ring: rgba(213, 228, 255, .4);
    --option-bg: #0c1634; --hover-wash: rgba(255, 255, 255, .08);
    --grant-bg: rgba(158, 224, 141, .14); --grant-fg: #d4f5cb; --grant-line: rgba(158, 224, 141, .32);
    --danger: #f0b9b0; --danger-line: rgba(240, 185, 176, .45); --danger-wash: rgba(240, 185, 176, .1); --danger-card: rgba(240, 185, 176, .22);
    --pixel-bg: linear-gradient(180deg, rgba(24, 42, 92, .85), rgba(8, 16, 40, .92));
    color-scheme: dark;
  }
  html:not([data-theme]) body { background: #0b1636; }
  html:not([data-theme]) body::before {
    animation: none; width: 100vw; height: 100vh; transform: none; image-rendering: auto;
    background:
      radial-gradient(ellipse 80% 48% at 50% -8%, rgba(92, 132, 214, .48), transparent 62%),
      linear-gradient(180deg, #0b1636 0%, #101c44 46%, #081228 100%);
  }
  html:not([data-theme]) .auth-title,
  html:not([data-theme]) .page-title { text-shadow: 0 2px 24px rgba(10, 20, 60, .55); }
  html:not([data-theme]) :focus-visible { outline-color: #9cc2ff; }
  html:not([data-theme]) .btn-glass:hover { border-color: rgba(180, 205, 255, .5); background: rgba(255, 255, 255, .12); }
  html:not([data-theme]) .btn-apple { background: #eef4ff; color: #0b1a3a; }
  html:not([data-theme]) .btn-apple:hover { background: #ffffff; }
}
@media (max-width: 720px) {
  html[data-theme="day"] .acct-foot,
  html[data-theme="night"] .acct-foot,
  html:not([data-theme]) .acct-foot { width: calc(100% - 24px); }
}

/* ---------- web app: guides, chat, decisions, fleet, routines, usage ---------- */
[hidden] { display: none !important; }
.nav-badge { margin-left: auto; min-width: 1.25rem; height: 1.25rem; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 .72rem/1 var(--sans); background: #1f7a3a; color: #ffffff; }
html[data-theme="night"] .nav-badge { background: #9ee08d; color: #10200f; }
html[data-theme="graphite"] .nav-badge { background: #a3bf98; color: #141311; }
.side-link { min-width: 0; }
.first-five { width: 100%; margin-bottom: 16px; }
.check-list { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 12px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.check-copy { min-width: 0; }
.check-copy a { color: var(--ink); font-weight: 560; text-underline-offset: 3px; }
.check-copy p { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; }
.check-toggle { width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--field-border); background: var(--well); color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.check-toggle:hover { border-color: var(--hover-border); }
.check-toggle[aria-pressed="true"] { background: #1f7a3a; border-color: #1f7a3a; color: #ffffff; }
html[data-theme="night"] .check-toggle[aria-pressed="true"] { background: #9ee08d; border-color: #9ee08d; color: #10200f; }
html[data-theme="graphite"] .check-toggle[aria-pressed="true"] { background: #a3bf98; border-color: #a3bf98; color: #141311; }
.check-toggle .ico { width: 16px; height: 16px; }
.how { width: 100%; margin: 0 0 18px; border-radius: 18px; border: 1px solid var(--glass-stroke); background: var(--glass); }
.how summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 560; color: var(--ink); }
.how summary::-webkit-details-marker { display: none; }
.how-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1f7a3a; color: #ffffff; font-size: .85rem; flex: none; }
html[data-theme="night"] .how-mark { background: #9ee08d; color: #10200f; }
html[data-theme="graphite"] .how-mark { background: #a3bf98; color: #141311; }
.how-body { padding: 0 16px 14px; color: var(--ink-2); display: grid; gap: 8px; }
.how-body p { margin: 0; }
.host-pill, .host-picker { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-width: 0; max-width: 100%; }
.host-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.host-name { font-weight: 560; color: var(--ink); overflow-wrap: anywhere; }
.host-picker-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.host-select { min-height: 40px; width: auto; max-width: 100%; }
.thread-tools { width: 100%; }
.chat-layout { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 16px; align-items: stretch; width: 100%; }
.chat-side, .chat-thread { min-width: 0; width: 100%; }
.convo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; width: 100%; }
.convo-link { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.convo-link[aria-current="page"], .convo-link:hover { background: var(--hover-wash); color: var(--ink); }
.messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; width: 100%; }
.bubble { max-width: min(100%, 62ch); padding: 12px 14px; border-radius: 18px; min-width: 0; }
.bubble-you { margin-left: auto; background: var(--well-strong); color: var(--ink); }
.bubble-clankie { background: var(--well); border: 1px solid var(--line); }
.bubble-who { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.bubble-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.is-pending { opacity: .8; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: 100%; align-items: end; }
.composer .field { min-width: 0; }
.composer-hint { margin: 0; font-size: .8rem; color: var(--ink-3); }
.starters, .starter-routines { display: grid; gap: 8px; width: 100%; }
.starter-btn { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; }
.starter-routine { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.starter-routine div { min-width: 0; }
.decision-list, .worker-list, .routine-list, .section-block { display: grid; gap: 12px; width: 100%; min-width: 0; }
.decision, .worker, .routine, .all-clear, .ship { width: 100%; }
.section-block { margin-top: 18px; }
.section-block > .sub-title { margin: 0; }
.ship .card-head h3 { min-width: 0; overflow-wrap: anywhere; }
.ship .badge { flex: none; }
.ship-target, .ship-meta, .ship-links { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; }
.ship-target { color: var(--ink); }
.ship-meta { color: var(--ink-2); font-size: .86rem; }
.ship-links a { color: var(--ink); }
.sha { font-family: var(--mono, ui-monospace, "SF Mono", Menlo, monospace); font-size: .82rem; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.decision-form, .drawer-form { width: 100%; display: grid; gap: 10px; }
.drawer, .report { width: 100%; }
.drawer summary, .report summary { cursor: pointer; }
.report summary { color: var(--ink); font-size: .92rem; }
.report p { margin: 8px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.meters { display: grid; gap: 14px; width: 100%; }
.meter-row { display: grid; gap: 6px; min-width: 0; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.meter-name { color: var(--ink); font-weight: 560; }
.meter-read { color: var(--ink-2); font-size: .86rem; }
.meter { width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink) 18%, transparent); color: #1f7a3a; appearance: none; }
.meter::-webkit-progress-bar { background: color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 999px; }
.meter::-webkit-progress-value { background: #1f7a3a; border-radius: 999px; }
.meter::-moz-progress-bar { background: #1f7a3a; border-radius: 999px; }
html[data-theme="night"] .meter { color: #9ee08d; }
html[data-theme="night"] .meter::-webkit-progress-value,
html[data-theme="night"] .meter::-moz-progress-bar { background: #9ee08d; }
html[data-theme="graphite"] .meter { color: #a3bf98; }
html[data-theme="graphite"] .meter::-webkit-progress-value,
html[data-theme="graphite"] .meter::-moz-progress-bar { background: #a3bf98; }
.meter-low { color: var(--danger); }
.meter-low::-webkit-progress-value,
.meter-low::-moz-progress-bar { background: var(--danger); }
@media (max-width: 960px) {
  .side { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 0 8px; }
  .side-group { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .chat-layout, .composer, .starter-routine { grid-template-columns: 1fr; }
  .chat-layout { align-items: start; }
  .starter-routine { flex-direction: column; align-items: stretch; }
  .bubble-you { margin-left: 0; }
  .side-link { flex: none; }
}
