:root {
  color-scheme: light;
  --navy-950: #071828;
  --navy-900: #0b2238;
  --navy-800: #123552;
  --navy-700: #17496c;
  --teal-700: #087b78;
  --teal-600: #0a918b;
  --teal-500: #18aaa1;
  --teal-100: #d8f2ef;
  --teal-50: #ecf9f7;
  --ink-950: #0d2034;
  --ink-800: #223a52;
  --ink-650: #4c6379;
  --ink-500: #708396;
  --line-strong: #c8d5e2;
  --line: #dbe4ec;
  --line-soft: #e8eef3;
  --canvas: #f2f6fa;
  --panel: #ffffff;
  --panel-subtle: #f7fafc;
  --panel-raised: #ffffff;
  --chrome: #071828;
  --cell-empty: #e7edf1;
  --chip-background: #e7f1f8;
  --danger: #bd3f45;
  --danger-soft: #fff0f0;
  --warning: #a56812;
  --warning-soft: #fff7e8;
  --success: #087b60;
  --success-soft: #e7f7f1;
  --shadow-sm: 0 1px 2px rgba(13, 32, 52, 0.06);
  --shadow-panel: 0 14px 34px rgba(16, 43, 67, 0.08);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --navy-950: #e9f5fa;
  --navy-900: #d9ebf2;
  --navy-800: #c9e0e9;
  --navy-700: #abd3df;
  --teal-700: #65d4cb;
  --teal-600: #54c6bd;
  --teal-500: #3bb7ae;
  --teal-100: #183b3c;
  --teal-50: #132e31;
  --ink-950: #e6f0f4;
  --ink-800: #d1e0e6;
  --ink-650: #9fb2ba;
  --ink-500: #7f939d;
  --line-strong: #3a4b54;
  --line: #293940;
  --line-soft: #223137;
  --canvas: #0b1116;
  --panel: #111a20;
  --panel-subtle: #162129;
  --panel-raised: #19252c;
  --chrome: #07131d;
  --cell-empty: #25343b;
  --chip-background: #1a3039;
  --danger: #ff8d91;
  --danger-soft: #351f23;
  --warning: #e7b465;
  --warning-soft: #32291a;
  --success: #65d3aa;
  --success-soft: #16342b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-panel: 0 16px 40px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink-950);
  background:
    radial-gradient(circle at 92% 8%, rgba(24, 170, 161, 0.07), transparent 25rem),
    var(--canvas);
}

body[data-authenticated="false"] {
  color: var(--ink-950);
  background:
    radial-gradient(circle at 14% 22%, rgba(124, 82, 91, 0.1), transparent 32rem),
    radial-gradient(circle at 78% 78%, rgba(121, 112, 59, 0.08), transparent 36rem),
    radial-gradient(circle at 58% 28%, rgba(14, 111, 107, 0.1), transparent 30rem),
    var(--canvas);
}

:root[data-theme="dark"] body[data-authenticated="false"] {
  background:
    radial-gradient(circle at 14% 22%, rgba(125, 38, 54, 0.3), transparent 32rem),
    radial-gradient(circle at 78% 78%, rgba(91, 80, 22, 0.18), transparent 36rem),
    radial-gradient(circle at 58% 28%, rgba(14, 111, 107, 0.2), transparent 30rem),
    linear-gradient(135deg, #06131e 0%, #081716 48%, #101013 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
summary,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(24, 170, 161, 0.34);
  outline-offset: 2px;
}

a {
  color: var(--teal-700);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

code,
.mono,
.identifier,
pre,
textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.12em 0.34em;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--navy-700);
  background: var(--panel-subtle);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--teal-700);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px 12px 18px;
  color: #f6fbff;
  background: rgba(7, 24, 40, 0.98);
  border-bottom: 1px solid rgba(169, 207, 222, 0.18);
  box-shadow: 0 7px 24px rgba(7, 24, 40, 0.14);
}

.brand-block,
.header-actions,
.detail-header,
.panel-heading,
.page-heading,
.snapshot-subsection-heading,
.subsection-heading,
.token-name-row,
.dialog-actions,
.project-next-actions {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 220px;
  gap: 12px;
}

.brand-mark {
  flex: 0 0 auto;
  border: 1px solid rgba(199, 224, 237, 0.4);
  border-radius: 11px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
}

.brand-block h1 {
  margin: 1px 0 0;
  font-size: 18px;
  font-weight: 690;
}

.brand-block .eyebrow {
  color: #79ded5;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.project-switcher {
  min-width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 9px;
}

.project-switcher > span {
  flex: 0 0 auto;
  color: #9fb5c7;
  font-size: 12px;
}

.project-switcher select {
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(183, 211, 225, 0.32);
  border-radius: 9px;
  color: #f6fbff;
  background: #12304a;
}

.app-layout {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
}

.admin-nav {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 10px;
  overflow-y: auto;
  background: var(--chrome);
  border-right: 1px solid rgba(163, 199, 217, 0.16);
}

.nav-item {
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #9eb2c4;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  transition: 140ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item[aria-current="page"] {
  color: #fff;
  background: linear-gradient(145deg, rgba(26, 165, 156, 0.3), rgba(21, 82, 113, 0.48));
  border-color: rgba(116, 220, 210, 0.42);
  box-shadow: inset 3px 0 0 #51d0c3;
}

.nav-item[aria-disabled="true"] {
  opacity: 0.42;
}

.nav-icon {
  font-size: 21px;
  line-height: 1;
}

.nav-item-settings {
  margin-top: auto;
}

.admin-main {
  min-width: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px clamp(18px, 2.5vw, 40px) 46px;
}

.admin-page {
  min-width: 0;
  animation: page-enter 180ms ease-out;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 2.5vw, 30px);
  margin-bottom: 24px;
  background: linear-gradient(115deg, var(--teal-50), var(--panel) 62%);
}
.profile-identity { display: flex; align-items: center; gap: 22px; min-width: 0; }
.profile-identity > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.profile-identity h2 { margin: 6px 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.25; }
.profile-identity p { margin-bottom: 4px; }
.profile-avatar {
  flex: 0 0 auto; display: grid; place-items: center; width: 80px; height: 80px;
  border-radius: 26px; background: var(--teal-700); color: var(--panel);
  font-size: 34px; font-weight: 700; border: 4px solid var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.verification-badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; font-size: 11px; color: var(--ink-650); background: var(--panel-subtle); }
.verification-badge[data-verified="true"] { color: var(--teal-700); background: var(--teal-50); border-color: var(--line-strong); }
.profile-stats { display: flex; gap: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-stat { display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--ink-650); }
.profile-stat strong { font-size: 26px; color: var(--ink-950); font-variant-numeric: tabular-nums; }
.profile-stat span { font-size: 12px; }
.device-summary-link { max-width: 290px; font-size: 12px; line-height: 1.8; text-decoration: none; overflow-wrap: anywhere; }
.home-activity { padding: 24px; margin-bottom: 32px; }
.home-activity .device-column-heading p { max-width: none; }
.home-activity .activity-summary { margin-top: 18px; }
.account-form { display: grid; gap: 20px; max-width: 800px; padding: 28px; margin-bottom: 24px; }
.account-form h3, .account-form p { margin: 0; }
.account-form > .button { justify-self: start; }
.avatar-editor { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; }
.avatar-editor-copy { display: grid; gap: 12px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.verification-address { overflow-wrap: anywhere; font-weight: 600; }
.verification-form { display: grid; gap: 12px; grid-template-columns: minmax(0, 240px) auto; align-items: end; justify-content: start; padding-top: 18px; border-top: 1px solid var(--line); }
#verification-code { font-family: var(--font-mono); letter-spacing: 0.2em; }
.smtp-panel { max-width: 960px; }
.smtp-panel .panel-heading { align-items: start; gap: 16px; }
.smtp-panel .panel-heading p { margin-top: 8px; }
.smtp-form { display: grid; gap: 20px; }
.smtp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.smtp-grid .field { min-width: 0; }
.smtp-wide { grid-column: 1 / -1; }
#smtp-test-note { overflow-wrap: anywhere; }
.registration-toggle { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.registration-toggle input { width: 20px; height: 20px; accent-color: var(--teal-700); }
.registration-link { color: var(--teal-700); text-align: center; padding: 18px 0 6px; }
.legacy-connection { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-650); }
.legacy-connection .connection-form { margin-top: 20px; }
.back-link { display: inline-block; margin-bottom: 15px; font-size: 13px; text-decoration: none; }
.project-files { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.project-file-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 16px; font-size: 13px; }
.project-file-row span:first-child { min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); }
.project-file-row span:last-child { white-space: nowrap; }
.project-file-row + .project-file-row { border-top: 1px solid var(--line-soft); }
.project-file-row button { min-width: 0; padding: 0; border: 0; color: var(--teal-700); background: transparent; text-align: left; font-family: var(--font-mono); overflow-wrap: anywhere; }
.file-preview-dialog { width: min(1000px, 94vw); max-height: 88vh; padding: 24px; color: var(--ink-950); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; }
.file-preview-dialog::backdrop { background: #0008; }
.file-preview-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.file-preview-heading h2 { font-size: 18px; overflow-wrap: anywhere; }
#file-preview-content { padding: 18px; border: 1px solid var(--line); background: var(--panel-subtle); max-height: 62vh; overflow: auto; font-size: 13px; line-height: 1.7; tab-size: 2; }
.project-sync-summary { padding: 18px 0; }
.user-list { display: grid; gap: 12px; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.user-row > div { min-width: 0; overflow-wrap: anywhere; }
.user-row p { margin-top: 5px; font-size: 12px; }

@media (max-width: 760px) {
  .profile-hero { gap: 18px; grid-template-columns: minmax(0, 1fr); }
  .profile-hero > .button { justify-self: start; }
  .profile-avatar { width: 56px; height: 56px; font-size: 26px; border-radius: 18px; }
  .profile-identity { gap: 14px; }
  .profile-stats { justify-content: space-between; gap: 10px; }
  .home-activity, .account-form { padding: 18px; }
  .avatar-editor { align-items: start; gap: 16px; }
  .smtp-grid, .verification-form { grid-template-columns: minmax(0, 1fr); }
  .verification-form .button { justify-self: start; }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-heading {
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  margin-bottom: 14px;
}

.page-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.2vw, 32px);
}

.page-heading > .button {
  flex-shrink: 0;
  white-space: nowrap;
}

.page-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-650);
  font-size: 14px;
}

.project-context-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -6px 0 14px;
  padding: 10px 13px;
  border: 1px solid #a7ded9;
  border-radius: 11px;
  color: var(--ink-650);
  background: var(--teal-50);
  font-size: 12px;
}

.project-context-bar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy-800);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-context-bar code {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-context-bar a {
  margin-left: auto;
  flex: 0 0 auto;
  font-weight: 700;
}

.surface,
.work-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.work-panel {
  min-width: 0;
  padding: 20px;
}

.project-sidebar,
.project-overview,
.device-workspace {
  min-height: 440px;
}

.panel-heading,
.detail-header,
.snapshot-subsection-heading,
.subsection-heading {
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  position: relative;
  min-height: 48px;
  margin-bottom: 14px;
}

.panel-heading h3,
.detail-header h3,
.snapshot-subsection h3 {
  margin: 0;
  font-size: 19px;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--ink-650);
  font-size: 12px;
}

.panel-heading p span + span:not(:empty)::before {
  content: " · ";
}

.panel-summary {
  min-width: max-content;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.panel-summary strong {
  color: var(--ink-800);
  font-size: 15px;
}

.panel-summary span {
  font-size: 12px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: end;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(140px, 0.65fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-subtle);
}

.filter-control {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.filter-control > span {
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.filter-control input,
.filter-control select {
  height: 38px;
  background: var(--panel-raised);
}

.project-search-control {
  width: min(520px, 100%);
  justify-self: end;
}

.filter-result {
  min-width: max-content;
  padding: 10px 4px;
  color: var(--ink-500);
  font-size: 11px;
  text-align: right;
}

.create-disclosure {
  position: relative;
  flex: 0 0 auto;
}

.create-disclosure > summary {
  list-style: none;
}

.create-disclosure > summary::-webkit-details-marker {
  display: none;
}

.create-project-form,
.token-form {
  position: absolute;
  z-index: 25;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 44px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-raised);
  box-shadow: 0 22px 58px rgba(13, 32, 52, 0.2);
}

.token-form {
  width: min(430px, calc(100vw - 44px));
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.field > span:first-child,
.field > label:first-child {
  color: var(--ink-650);
  font-size: 12px;
  font-weight: 680;
}

.optional {
  color: var(--ink-500);
  font-weight: 500;
}

input,
select,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink-950);
  background: var(--panel-raised);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 11px 12px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #a8bacb;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(24, 170, 161, 0.12);
}

.inline-input-action,
.secret-input-wrap {
  position: relative;
  display: flex;
  gap: 8px;
}

.secret-input-wrap input {
  padding-right: 46px;
}

.secret-input-wrap .icon-button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
}

.button,
.icon-button,
.session-button {
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 680;
  transition: 140ms ease;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  text-decoration: none;
}

.button:hover,
.icon-button:hover,
.session-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--teal-700);
  border-color: var(--teal-700);
  box-shadow: 0 7px 16px rgba(8, 123, 120, 0.18);
}

.button-primary:hover {
  background: #056e6b;
}

.button-secondary {
  color: var(--navy-800);
  background: var(--teal-50);
  border-color: #9ddbd5;
}

.button-ghost {
  color: var(--ink-800);
  background: var(--panel-raised);
  border-color: var(--line-strong);
}

.button-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #efbfc2;
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--navy-700);
  background: var(--panel-raised);
  border-color: var(--line-strong);
  font-size: 19px;
}

.header-icon-button,
.session-button {
  color: #dceaf2;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(183, 211, 225, 0.25);
}

.session-button {
  min-height: 38px;
  padding: 0 13px;
}

.header-settings-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.project-list {
  display: grid;
  gap: 8px;
}

.category-project-list {
  gap: 16px;
}

.project-category {
  min-width: 0;
}

.project-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  padding: 0 3px;
  color: var(--ink-650);
  font-size: 11px;
}

.project-category-heading strong {
  font-weight: 740;
}

.project-category-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--teal-50);
  text-align: center;
}

.project-category-items {
  display: grid;
  gap: 7px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.project-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 14px 15px;
  text-align: left;
  color: var(--ink-800);
  background: var(--panel-subtle);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: 140ms ease;
}

.project-item:hover {
  border-color: #9fcdc9;
  background: var(--teal-50);
}

.project-item[aria-selected="true"] {
  color: var(--navy-800);
  background: linear-gradient(90deg, var(--teal-50), var(--panel-raised));
  border-color: #65c4bb;
  box-shadow: inset 4px 0 0 var(--teal-600);
}

.project-item-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-500);
  font-size: 11px;
}

.empty-state,
.empty-copy {
  color: var(--ink-650);
  text-align: center;
}

.panel-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-subtle);
}

.panel-empty h3,
.panel-empty strong {
  margin: 0 0 8px;
  color: var(--ink-800);
}

.panel-empty p {
  margin: 0;
}

.empty-illustration {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  color: var(--teal-700);
  background: var(--teal-100);
  font: 700 30px Georgia, serif;
}

.project-overview {
  display: grid;
}

.detail-content {
  display: grid;
  gap: 18px;
}

.detail-header {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-header h3 {
  margin-bottom: 5px;
  font-size: 25px;
}

.identifier {
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.context-badge,
.count-chip,
.token-state,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.context-badge {
  padding: 6px 10px;
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1px solid #a7ded9;
}

.summary-grid,
.activity-summary {
  display: grid;
  gap: 12px;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-subtle);
}

.summary-card strong {
  display: block;
  margin-top: 7px;
  color: var(--navy-700);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.summary-label {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 670;
}

.project-next-actions {
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-radius: 11px;
  color: var(--ink-650);
  background: var(--teal-50);
}

.project-next-actions p {
  margin: 0;
  font-size: 13px;
}

.project-next-actions a {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}

.detail-card {
  width: 100%;
}

.snapshot-card {
  padding: 0;
  overflow: hidden;
}

.snapshot-subsection {
  padding: 25px 28px 28px;
}

.snapshot-subsection + .snapshot-subsection {
  border-top: 1px solid var(--line);
}

.embedded-snapshot-section {
  padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
}

.embedded-snapshot-section + .embedded-snapshot-section {
  border-top: 1px solid var(--line-soft);
}

.project-overview .key-value-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.snapshot-subsection-heading,
.subsection-heading {
  margin-bottom: 18px;
}

.key-value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.key-value-pair {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-subtle);
}

.key-value-pair dt {
  margin-bottom: 6px;
  color: var(--ink-500);
  font-size: 11px;
}

.key-value-pair dd {
  margin: 0;
  color: var(--ink-800);
  font-weight: 680;
  overflow-wrap: anywhere;
}

.history-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 8px;
  width: 2px;
  background: var(--line);
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
}

.history-node {
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid var(--panel);
  border-radius: 50%;
  background: var(--teal-600);
  box-shadow: 0 0 0 1px #8bd3cd;
}

.history-title {
  color: var(--ink-800);
  font-weight: 690;
}

.history-meta,
.history-time,
.muted,
.section-description {
  color: var(--ink-650);
}

.history-meta,
.history-time {
  margin-top: 4px;
  font-size: 12px;
}

.history-time {
  text-align: right;
}

.history-actions {
  margin-top: 9px;
}

.history-detail-button {
  min-height: 30px;
  padding: 5px 10px;
}

.snapshot-manifest {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-subtle);
}

.snapshot-manifest-summary,
.snapshot-manifest-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.snapshot-file-list {
  max-height: 320px;
  display: grid;
  gap: 0;
  margin: 10px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
}

.snapshot-file {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto 92px;
  gap: 12px;
  align-items: center;
  padding: 8px 6px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.snapshot-file:first-child {
  border-top: 0;
}

.snapshot-file-path {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-800);
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-file-size,
.snapshot-file-hash {
  color: var(--ink-500);
  text-align: right;
}

.snapshot-file-hash {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--panel-raised);
}

.count-chip {
  min-height: 26px;
  padding: 4px 10px;
  color: var(--navy-700);
  background: var(--chip-background);
}

.protocol-chip {
  color: var(--ink-650);
  background: var(--panel-subtle);
  border: 1px solid var(--line);
}

.activity-heading-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.scope-control {
  min-width: 190px;
  display: grid;
  gap: 5px;
}

.scope-control > span {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 680;
}

.scope-control select {
  height: 38px;
  background: var(--panel-raised);
}

.activity-section {
  min-height: 520px;
}

.section-description {
  max-width: 900px;
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.65;
}

.activity-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.activity-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-left: 3px solid #7ccdc5;
  border-radius: 8px;
  background: var(--panel-subtle);
}

.activity-summary strong {
  color: var(--navy-700);
  font-size: 21px;
}

.activity-summary span {
  color: var(--ink-500);
  font-size: 11px;
}

.activity-heatmap-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-subtle);
  scrollbar-width: thin;
}

.activity-heatmap {
  --activity-cell-size: 13px;
  --activity-cell-gap: 3px;
  width: max-content;
  min-width: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--activity-cell-size));
  grid-auto-columns: var(--activity-cell-size);
  gap: var(--activity-cell-gap);
  align-content: start;
}

.activity-cell {
  width: var(--activity-cell-size, 13px);
  height: var(--activity-cell-size, 13px);
  display: block;
  border: 1px solid rgba(70, 105, 128, 0.14);
  border-radius: 3px;
  background: var(--cell-empty);
}

.activity-cell[role="gridcell"] {
  cursor: pointer;
}

.activity-cell[role="gridcell"]:focus-visible,
.activity-cell[aria-selected="true"] {
  outline: 2px solid var(--navy-800);
  outline-offset: 2px;
}

.activity-cell.level-0 {
  background: var(--cell-empty);
}

.activity-cell.level-1 {
  background: #bee6df;
  border-radius: 50% 3px 3px 3px;
}

.activity-cell.level-2 {
  background: #78d0c4;
  border-radius: 50% 50% 3px 3px;
}

.activity-cell.level-3 {
  background: #2ea99d;
  box-shadow: inset 0 0 0 1px rgba(0, 82, 78, 0.14);
}

.activity-cell.level-4 {
  position: relative;
  background: #086f6c;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.activity-cell[role="gridcell"].level-4::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
}

.activity-cell-blank {
  visibility: hidden;
}

.activity-day-detail {
  min-height: 22px;
  margin: 10px 2px 0;
  font-size: 12px;
}

.activity-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 11px;
}

.activity-legend .activity-cell {
  --activity-cell-size: 11px;
}

.device-column-heading {
  align-items: flex-start;
}

.device-column-heading h3 {
  margin: 0;
  font-size: 19px;
}

.device-column-heading p:last-child {
  max-width: 330px;
}

.device-heatmap-list {
  display: grid;
  gap: 12px;
}

.device-heatmap-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-subtle);
}

.device-heatmap-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.device-heatmap-heading strong {
  color: var(--ink-800);
  font-size: 13px;
}

.device-heatmap-summary {
  color: var(--ink-500);
  font-size: 10px;
  text-align: right;
}

.device-heatmap-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--panel-raised);
  scrollbar-width: thin;
}

.device-heatmap {
  --activity-cell-size: clamp(5px, 1.3vw, 9px);
  --activity-cell-gap: 1px;
  min-width: max-content;
}

.device-heatmap-legend {
  margin-top: 7px;
}

.device-shards-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.device-shards-section > summary {
  cursor: pointer;
  font-weight: 600;
}

.device-token-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.token-filter-toolbar {
  margin-top: 12px;
}

.token-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-heading {
  margin-bottom: 10px;
}

.token-list {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.token-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
  padding: 15px 17px;
  background: var(--panel);
}

.token-item + .token-item {
  border-top: 1px solid var(--line-soft);
}

.token-item:hover {
  background: var(--panel-subtle);
}

.token-item.revoked {
  opacity: 0.62;
}

.token-name-row {
  gap: 9px;
}

.token-name {
  color: var(--ink-800);
  font-weight: 710;
}

.token-state {
  padding: 3px 8px;
  color: var(--success);
  background: var(--success-soft);
}

.token-item.revoked .token-state {
  color: var(--ink-650);
  background: #edf0f2;
}

.token-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--ink-500);
  font-size: 11px;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .context-badge,
:root[data-theme="dark"] .project-context-bar {
  border-color: rgba(101, 212, 203, 0.4);
}

:root[data-theme="dark"] .button-primary,
:root[data-theme="dark"] .skip-link,
:root[data-theme="dark"] .dialog-icon {
  color: #071828;
}

:root[data-theme="dark"] .button-primary:hover {
  background: #78ded5;
}

:root[data-theme="dark"] .button-danger,
:root[data-theme="dark"] .notice-error {
  border-color: rgba(255, 141, 145, 0.35);
}

:root[data-theme="dark"] .notice-success {
  border-color: rgba(101, 211, 170, 0.35);
}

:root[data-theme="dark"] .notice-warning {
  border-color: rgba(231, 180, 101, 0.35);
}

:root[data-theme="dark"] .token-item.revoked .token-state {
  color: var(--ink-650);
  background: #263239;
}

.connection-page {
  min-height: calc(100vh - 60px);
}

.connection-stage {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 30px 16px;
}

.connection-card {
  position: relative;
  width: min(460px, 100%);
  padding: 34px;
}

.connection-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
}

.theme-toggle {
  font-size: 18px;
}

.connection-brand {
  display: grid;
  justify-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.connection-brand img {
  margin-bottom: 16px;
  border-radius: 17px;
  box-shadow: 0 12px 28px rgba(6, 29, 43, 0.16);
}

.connection-brand h2 {
  margin: 2px 0 8px;
  font-size: 27px;
}

.connection-brand p:last-child {
  margin-bottom: 0;
}

.connection-form {
  display: grid;
  gap: 15px;
}

#login-form > button,
#passkey-login {
  width: 100%;
  min-height: 44px;
}

#passkey-login { margin-top: 14px; }
.management-setup-note { border-color: var(--teal-500); }
#account-security { scroll-margin-top: 96px; }
.user-row { flex-wrap: wrap; gap: 14px; }
.user-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.user-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.operation-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  color: var(--ink-950);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}
.operation-dialog::backdrop { background: rgba(3, 14, 24, 0.65); }
.operation-dialog .dialog-card { display: grid; justify-items: stretch; gap: 16px; text-align: left; }
.operation-dialog .dialog-card > p { margin-bottom: 0; }
.operation-dialog .dialog-actions { flex-wrap: wrap; }
.operation-error { color: var(--danger); }
#invitation-result { margin-top: 20px; }
#invitation-url { width: 100%; overflow-wrap: anywhere; }

.security-note {
  margin: 16px 0 0;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.6;
}

body[data-authenticated="false"] .app-layout {
  display: block;
  min-height: 100vh;
}

body[data-authenticated="false"] .admin-main {
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-card {
  color: #edf6fa;
  background: rgba(21, 35, 42, 0.84);
  border-color: rgba(180, 213, 224, 0.23);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-brand h2 {
  color: #f3f9fb;
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-brand .eyebrow {
  color: #68d5cb;
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-card .muted,
:root[data-theme="dark"] body[data-authenticated="false"] .connection-card .security-note,
:root[data-theme="dark"] body[data-authenticated="false"] .connection-card .field > span:first-child {
  color: #9db1bb;
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-card input {
  color: #f4f8fa;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(190, 215, 224, 0.26);
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-card input::placeholder {
  color: #7d919c;
}

:root[data-theme="dark"] body[data-authenticated="false"] .connection-card code {
  color: #a9dfda;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(190, 215, 224, 0.18);
}

body[data-authenticated="true"] .connection-page {
  min-height: 0;
}

body[data-authenticated="true"] .connection-stage {
  min-height: 0;
  place-items: start;
  padding: 0;
}

body[data-authenticated="true"] .connection-card {
  width: min(720px, 100%);
}

body[data-authenticated="true"] .connection-brand {
  justify-items: start;
  text-align: left;
}

body[data-authenticated="true"] .connection-brand img {
  display: none;
}

.status-badge {
  min-height: 38px;
  gap: 7px;
  padding: 0 12px;
  color: #d8e6ee;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(183, 211, 225, 0.25);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8ca0ad;
}

.status-ok .status-dot {
  background: #48d7a3;
  box-shadow: 0 0 0 4px rgba(72, 215, 163, 0.13);
}

.status-warning .status-dot {
  background: #f4bd58;
}

.status-error .status-dot {
  background: #f06d72;
}

.notice {
  position: sticky;
  top: 88px;
  z-index: 35;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-800);
  background: var(--panel-raised);
  box-shadow: 0 12px 28px rgba(13, 32, 52, 0.13);
}

.notice p {
  margin: 4px 0 0;
  font-size: 13px;
}

.notice pre {
  max-width: min(100%, 900px);
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 11px;
  background: var(--panel-subtle);
}

.notice-success {
  border-color: #98d9c0;
  background: var(--success-soft);
}

.notice-error {
  border-color: #edb6b9;
  background: var(--danger-soft);
}

.notice-warning {
  border-color: #ecd098;
  background: var(--warning-soft);
}

.token-dialog {
  width: min(580px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink-950);
  background: transparent;
}

.token-dialog::backdrop {
  background: rgba(5, 17, 27, 0.68);
  backdrop-filter: blur(5px);
}

.dialog-card {
  display: grid;
  justify-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-raised);
  box-shadow: 0 28px 70px rgba(7, 24, 40, 0.34);
  text-align: center;
}

.dialog-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-600);
  font-size: 25px;
}

.dialog-card h2 {
  margin-bottom: 8px;
}

.token-result-field {
  width: 100%;
  margin: 10px 0 18px;
  text-align: left;
}

.dialog-actions {
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: #fff;
  background: rgba(7, 24, 40, 0.52);
  backdrop-filter: blur(3px);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 110;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--danger);
}

@media (max-width: 1050px) {
  .project-sidebar,
  .project-overview,
  .device-workspace {
    min-height: auto;
  }

  .key-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-switcher {
    min-width: 220px;
  }

  .filter-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr) minmax(130px, 0.55fr);
  }

  .filter-result {
    grid-column: 1 / -1;
    padding: 0 2px;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .app-header {
    position: relative;
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .project-switcher {
    min-width: 0;
    flex: 1 1 auto;
  }

  .project-switcher > span {
    display: none;
  }

  .status-badge {
    display: none;
  }

  .app-layout {
    min-height: 0;
    display: block;
  }

  .admin-nav {
    position: sticky;
    top: 0;
    z-index: 38;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    padding: 6px 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(163, 199, 217, 0.16);
  }

  .nav-item {
    min-width: 62px;
    min-height: 50px;
  }

  .nav-item-settings {
    margin-top: 0;
    margin-left: auto;
  }

  .admin-main {
    padding: 18px 12px 34px;
  }

  .page-heading {
    align-items: flex-start;
    min-height: 0;
  }

  .library-toolbar,
  .filter-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .project-search-control,
  .token-search-control {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .token-filter-toolbar .filter-control:not(.token-search-control) {
    grid-column: auto;
  }

  .filter-result {
    grid-column: 1 / -1;
  }

  .activity-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .work-panel,
  .connection-card {
    padding: 18px;
    border-radius: 15px;
  }

  .summary-grid,
  .activity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-subsection {
    padding: 20px 18px;
  }

  .history-item {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .history-time {
    grid-column: 2;
    text-align: left;
  }

  .snapshot-file {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .snapshot-file-hash {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .create-project-form,
  .token-form {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .token-item {
    grid-template-columns: 1fr;
  }

  .token-heading-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .project-item-meta,
  .device-heatmap-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  .brand-block {
    min-width: 0;
  }

  .brand-block h1 {
    font-size: 16px;
  }

  .header-actions {
    gap: 7px;
  }

  .session-button {
    padding: 0 9px;
  }

  .page-heading h2 {
    font-size: 24px;
  }

  .summary-grid,
  .activity-summary,
  .key-value-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .library-toolbar,
  .filter-toolbar {
    grid-template-columns: 1fr;
  }

  .library-toolbar .create-disclosure,
  .filter-toolbar > * {
    grid-column: 1;
  }

  .library-toolbar .create-disclosure {
    justify-self: stretch;
  }

  .library-toolbar .create-disclosure > summary {
    width: 100%;
  }

  .filter-result {
    padding-bottom: 0;
  }

  .project-next-actions,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-actions .button {
    width: 100%;
  }

  .inline-input-action {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] {
  display: none !important;
}
/* Version-oriented project handoff: decisions first, immutable history second. */
.cloud-version-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; margin:20px 0; }
.cloud-version-choice { border:1px solid var(--border, #49616b); border-radius:12px; padding:18px; min-width:0; }
.cloud-version-choice.latest { border-color:var(--accent, #35a5a8); }
.cloud-version-choice h4 { margin:0 0 8px; }
.cloud-version-list { display:grid; gap:10px; margin:18px 0; }
.cloud-version-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; border:1px solid var(--border, #49616b); border-radius:10px; padding:16px; }
.cloud-version-row p { margin:6px 0; overflow-wrap:anywhere; }
.cloud-version-row .cloud-version-files { grid-column:1/-1; }
.cloud-version-files { max-height:420px; overflow:auto; margin-top:12px; padding:12px; background:var(--surface-muted, #17303a20); border-radius:6px; }
.cloud-version-files p { font-family:ui-monospace,monospace; font-size:12px; }
.cloud-version-warning { border-left:3px solid #d8a349; background:#d8a34912; padding:14px 18px; border-radius:4px; }
.cloud-version-state.failed { color:var(--danger, #d17568); }
.cloud-version-state.succeeded { color:var(--accent, #31a98f); }
.cloud-retention-note { margin:18px 0; }
@media(max-width:600px) { .cloud-version-row { grid-template-columns:1fr; } }
