/* Shared business theme. System fonts keep the workspace readable and fully local. */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --primary: #0071e3;
  --primary-soft: #eaf3ff;
  --green: #248a55;
  --shadow: 0 8px 30px #1d1d1f08;
  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
body {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 36px;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 18px;
}
strong {
  font-weight: 700;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: #747b88;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
}
label {
  font-size: 15px;
  font-weight: 650;
}
input,
select,
textarea {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  border-color: #d9dce2;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: #989ba3;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px #0071e315;
}
button:focus-visible,
a:focus-visible {
  outline-color: #7ab7fa;
}
.button {
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 650;
  border-color: #dfe2e8;
  background: #fff;
  box-shadow: 0 1px 2px #1d1d1f04;
}
.button:hover {
  background: #f2f4f7;
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px #0071e318;
}
.button.primary:hover {
  background: #0077ed;
  border-color: #0077ed;
}
.button.small {
  min-height: 38px;
  font-size: 14px;
  padding: 7px 13px;
  border-radius: 10px;
}
.button.danger,
.danger-text {
  color: #c43b47;
}
.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 14px;
  font-weight: 650;
  color: var(--primary);
}
.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #737b88;
}
.icon-button:hover {
  background: #eaf3ff;
  color: var(--primary);
}
.icon-button svg,
.button svg {
  width: 19px;
  height: 19px;
}
.button:disabled,
.text-button:disabled {
  opacity: 0.42;
}
.segmented {
  border: 1px solid #e6e8ed;
  background: #eceef2;
  padding: 4px;
  border-radius: 12px;
}
.segmented button {
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  padding: 8px 16px;
  color: #747982;
}
.segmented button.active {
  color: #222831;
  background: white;
  box-shadow: 0 1px 5px #2027340d;
}
.count {
  background: #edf3fb;
  color: #5578a5;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  height: 24px;
  min-width: 24px;
}

/* Workspace chrome */
.sidebar {
  width: 244px;
  padding: 28px 16px 0;
  background: #f9fafbcc;
  border-right: 1px solid #e2e5ea;
  backdrop-filter: blur(24px);
  overflow-y: auto;
}
.sidebar .brand {
  margin: 0 12px 34px;
}
.brand {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.8px;
  gap: 12px;
}
.brand small {
  color: #7a8290;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.9px;
  margin-top: 5px;
}
.brand-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: linear-gradient(145deg, #1487f1, #0065ce);
  box-shadow: 0 5px 12px #0071e319;
  font-size: 22px;
}
.sidebar-label {
  font-size: 12px;
  font-weight: 650;
  color: #8b919c;
  padding-left: 14px;
  margin-bottom: 12px;
}
.nav-item {
  min-height: 48px;
  padding: 12px 14px;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 11px;
  color: #646e7b;
  margin-bottom: 7px;
}
.nav-item svg {
  width: 19px;
  height: 19px;
}
.nav-item.active {
  background: #e7f0fe;
  color: #006bd7;
  font-weight: 750;
}
.nav-item:hover {
  background: #edf2f9;
  color: #006bd7;
}
.sidebar-tip {
  border-color: #e2e8f2;
  border-radius: 16px;
  padding: 20px 16px;
  margin-top: 36px;
  background: linear-gradient(135deg, #edf3fc, #f7f9fd);
}
.tip-mark {
  color: #6b97d2;
  font-size: 27px;
}
.sidebar-tip strong {
  font-size: 14px;
  font-weight: 700;
}
.sidebar-tip p {
  font-size: 13px;
  line-height: 1.85;
  color: #7b8797;
}
.sidebar-tip .text-button {
  font-size: 13px;
}
.sidebar-bottom {
  padding-top: 24px;
}
.user-card {
  padding: 20px 0;
  gap: 10px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e8eff9;
  color: #4b77ad;
  font-size: 16px;
  font-weight: 650;
}
.user-card strong {
  font-size: 14px;
  font-weight: 700;
}
.user-card small {
  color: #818a98;
  font-size: 11px;
}
.user-card .icon-button {
  flex-shrink: 0;
  width: 28px;
}
.main-shell {
  margin-left: 244px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 82px;
  padding: 0 40px;
  background: #ffffffc9;
  backdrop-filter: blur(24px);
  border-color: #e5e7ec;
}
.breadcrumbs {
  font-size: 13px;
  font-weight: 550;
  color: #8c939d;
}
.breadcrumbs strong {
  color: #4c5562;
  font-weight: 650;
}
.topbar-right {
  gap: 18px;
}
.local-badge {
  font-size: 12px;
  font-weight: 550;
  color: #7f8996;
}
.local-badge i {
  width: 6px;
  height: 6px;
  background: #3baf76;
}
main {
  padding: 40px 40px 48px;
  max-width: 1680px;
}
.page-heading {
  margin-bottom: 30px;
  align-items: center;
}
.page-heading h1 {
  font-size: 36px;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 9px;
}
.page-heading .eyebrow {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}
.page-heading .muted {
  font-size: 15px;
  font-weight: 500;
  color: #7b818b;
}
.heading-actions {
  gap: 12px;
}
.main-footer {
  font-size: 12px;
  font-weight: 500;
  color: #9298a2;
  padding: 20px 40px;
  border-color: #e4e6ec;
}
.project-context {
  border-radius: 16px;
  padding: 16px 20px;
  border-color: #e5e7ec;
  box-shadow: 0 1px 3px #1d1d1f02;
  gap: 16px;
}
.project-context label {
  font-size: 13px;
  color: #7b8490;
  font-weight: 650;
}
.project-context select {
  font-size: 15px;
  padding: 8px 12px;
  width: 260px;
  border-radius: 10px;
}
.project-context .muted {
  font-size: 13px;
  color: #89919c;
}

/* Cards, totals and data tables */
.overview-banner {
  padding: 31px 32px;
  border-radius: 20px;
  background: linear-gradient(110deg, #edf3fc, #f8fafc);
  border: 1px solid #e3eaf4;
  margin-bottom: 30px;
}
.overview-banner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 9px;
}
.overview-banner p {
  font-size: 15px;
  color: #7a879b;
}
.banner-art {
  transform: rotate(-6deg);
}
.banner-art span {
  background: #d9e7fb;
  color: #83a5d2;
  border-radius: 12px;
  box-shadow: 0 5px 18px #264e8410;
}
.banner-art span:nth-child(2) {
  background: #e5eaf1;
  color: #9baabd;
}
.banner-art span:nth-child(3) {
  background: #e8edf5;
  color: #93a6bd;
}
.section-toolbar {
  gap: 16px;
  margin-bottom: 20px;
}
.section-toolbar h2 {
  font-size: 18px;
  font-weight: 700;
}
.search-field {
  max-width: 270px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 11px;
}
.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.project-card {
  min-height: 330px;
  padding: 24px;
  border-radius: 18px;
  border-color: #e4e7ed;
  box-shadow: 0 2px 8px #1d1d1f03;
}
.project-card:hover {
  border-color: #c4d7f0;
  box-shadow: 0 9px 28px #1a427b0a;
}
.project-card-top {
  margin-bottom: 20px;
}
.project-symbol {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #edf3ff;
  color: #7299ce;
}
.project-card:nth-child(3n + 2) .project-symbol {
  background: #edf5f1;
  color: #77a38b;
}
.project-card:nth-child(3n) .project-symbol {
  background: #f3f5f8;
  color: #8c9eb5;
}
.project-open {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.project-card p {
  font-size: 13px;
  color: #7e8794;
  margin: 8px 0 18px;
}
.project-metrics {
  gap: 15px;
  margin: 17px 0 21px;
}
.project-metrics small {
  font-size: 12px;
  font-weight: 550;
  color: #8a929e;
}
.project-metrics strong {
  font-size: 20px;
  font-weight: 700;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.project-metrics em {
  font-size: 12px;
  color: #9b7a3f;
}
.project-card-footer {
  font-size: 12px;
  color: #8b939e;
  padding-top: 15px;
}
.project-card-footer button {
  font-size: 12px;
}
.new-project-card {
  min-height: 330px;
  border-radius: 18px;
  background: #ffffff65;
  border-color: #d7dfe9;
  font-size: 15px;
  font-weight: 550;
  color: #8995a6;
}
.new-project-card .plus-circle {
  width: 40px;
  height: 40px;
  font-size: 26px;
  border-color: #d8e1ed;
  color: #839cbf;
}
.new-project-card:hover {
  background: #edf4ff;
  border-color: #93bdec;
}
.panel {
  border-radius: 17px;
  border-color: #e3e6ec;
  box-shadow: 0 2px 9px #1d1d1f03;
}
.panel-header {
  padding: 22px 25px;
}
.panel-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.panel-body {
  padding: 25px;
}
.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #c3cbd6 #f2f4f7;
}
.table-wrap::-webkit-scrollbar {
  height: 9px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #f2f4f7;
}
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #c3cbd6;
  border: 2px solid #f2f4f7;
}
table {
  font-size: 15px;
}
th {
  font-size: 13px;
  font-weight: 700;
  color: #757e8c;
  padding: 16px;
  background: #fafbfd;
}
td {
  padding: 21px 16px;
  color: #505967;
  font-size: 15px;
  font-weight: 550;
}
tbody tr:hover {
  background: #fafcff;
}
.cell-title {
  font-size: 16px;
  font-weight: 700;
  color: #2d3746;
  max-width: 250px;
}
.cell-title small {
  font-size: 13px;
  font-weight: 500;
  color: #8b929e;
  line-height: 1.7;
  margin-top: 5px;
}
.file-icon {
  width: 39px;
  height: 44px;
  background: #edf3fc;
  color: #7799c7;
  border-radius: 11px;
}
.cell-with-icon {
  gap: 13px;
}
.row-actions {
  gap: 10px 14px;
}
.row-actions .text-button {
  font-size: 14px;
}
.analysis-table .cell-title {
  min-width: 180px;
  max-width: 220px;
}
.analysis-table .row-actions {
  min-width: 145px;
  max-width: 180px;
  gap: 8px 13px;
}
.job-analysis-elapsed {
  font-size: 16px;
  font-weight: 700;
}
.job-end-time span {
  font-size: 12px;
  font-weight: 550;
}
.job-end-time strong {
  font-size: 15px;
  font-weight: 650;
}
.job-time-note {
  font-size: 12px;
}
.status {
  font-size: 12px;
  font-weight: 650;
  border-radius: 7px;
  padding: 5px 9px;
  background: #f0f2f5;
  color: #7d8592;
}
.status.running {
  background: #eaf3ff;
  color: #337bc4;
}
.status.succeeded,
.status.ready {
  background: #eaf6ee;
  color: #38825b;
}
.status.failed {
  background: #fff0f1;
  color: #b94c5b;
}
.status.queued,
.status.pending {
  background: #fbf3e6;
  color: #a88239;
}
.cost-link .text-button {
  font-size: 12px;
}
.stats {
  gap: 20px;
  margin-bottom: 26px;
}
.stat-card {
  border-radius: 17px;
  border-color: #e4e7ed;
  padding: 23px 25px;
  align-items: center;
  box-shadow: 0 2px 8px #1d1d1f03;
}
.stat-card .stat-label {
  font-size: 13px;
  font-weight: 600;
  color: #858d99;
}
.stat-card strong {
  font-size: 34px;
  font-weight: 750;
  line-height: 1.6;
}
.stat-card .cost-stat {
  font-size: 26px !important;
}
.stat-card small {
  font-size: 12px;
}
.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #edf3fe;
  color: #84a0c7;
}
.stat-card:nth-child(2) .stat-icon {
  background: #f8f3ea;
  color: #bba57b;
}
.stat-card:nth-child(3) .stat-icon {
  background: #edf5f0;
  color: #82a791;
}
.summary-strip {
  border-radius: 15px;
  font-size: 14px;
  font-weight: 500;
  padding: 19px 22px;
  border-color: #e4e7ed;
}
.summary-strip strong {
  font-weight: 700;
}
.script-export-bar {
  padding: 15px 18px;
  border-radius: 14px;
  font-size: 13px;
  background: #edf3fc;
  border-color: #dfe9f7;
  gap: 13px;
}
.script-export-bar .checkbox-label {
  font-size: 14px;
}
.script-export-bar .text-button {
  font-size: 13px;
}
.row-check,
.checkbox-label input {
  width: 17px;
  height: 17px;
}
.filter-select {
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 11px;
}
.empty-state {
  padding: 66px 24px;
  border-radius: 18px;
  border-color: #e4e7ed;
}
.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  background: #edf3fc;
  color: #8aa5ca;
  border-radius: 19px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
}
.empty-state p {
  font-size: 15px;
  color: #858e9c;
}
.loading {
  font-size: 15px;
  color: #7c8796;
}

/* Login surface */
.auth-screen {
  background: #fff;
}
.auth-story {
  background: linear-gradient(145deg, #f0f4fa, #eaf0fa);
  padding: 48px 9%;
}
.story-copy {
  margin: 66px 0 34px;
}
.story-copy .eyebrow {
  color: #8296b2;
  font-size: 11px;
}
.story-copy h1 {
  font-size: clamp(38px, 3.5vw, 56px);
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.04em;
}
.story-copy p {
  font-size: 16px;
  line-height: 1.95;
  color: #8190a5;
}
.story-film {
  padding: 20px;
  border-radius: 19px;
  border-color: #ffffffd9;
  background: #ffffff8f;
  box-shadow: 0 18px 54px #3250760b;
  transform: rotate(-2deg);
}
.film-top,
.film-caption {
  font-size: 11px;
  font-weight: 550;
  color: #8a96a9;
}
.film-art {
  background: linear-gradient(140deg, #d6e4f8, #e3eaf4);
  height: 155px;
  border-radius: 11px;
}
.film-play {
  color: #7092c1;
  background: #ffffff90;
  width: 49px;
  height: 49px;
  font-size: 16px;
}
.film-timeline i {
  background: linear-gradient(125deg, #dce5f4, #cbd9ec);
  height: 24px;
  border-radius: 3px;
}
.film-timeline i:nth-child(3n) {
  background: linear-gradient(25deg, #e4eaf1, #cedcf0);
}
.auth-story footer {
  font-size: 12px;
  color: #94a0b3;
}
.auth-panel {
  padding: 60px 40px;
}
.auth-box {
  max-width: 390px;
}
.auth-box h2 {
  font-size: 34px;
  font-weight: 750;
}
.auth-box > .muted {
  font-size: 15px;
}
.auth-tabs {
  margin: 28px 0 8px;
}
.auth-tabs button {
  font-size: 14px;
  padding: 10px 14px;
}
.auth-box form > label {
  margin: 23px 0;
}
.auth-box .primary {
  min-height: 48px;
  margin-top: 16px;
}
.auth-note {
  color: #9199a5;
  font-size: 13px;
  margin-top: 24px;
}

/* Dialogs, scripts, logs and upload progress */
dialog {
  border-radius: 20px;
  border-color: #e7ebf0;
  width: 620px;
  max-width: calc(100vw - 36px);
  box-shadow: 0 28px 100px #17263d2b;
}
dialog.wide {
  width: 940px;
}
dialog::backdrop {
  background: #1b26384a;
  backdrop-filter: blur(6px);
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 23px 28px;
  background: #ffffffed;
  backdrop-filter: blur(18px);
}
.modal-header h2 {
  font-size: 23px;
  font-weight: 750;
}
.modal-body {
  padding: 8px 28px 26px;
}
.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 18px 28px;
  background: #fffffff5;
  backdrop-filter: blur(18px);
}
.form-row input,
.form-row select {
  font-size: 15px;
}
.form-error,
.error-banner {
  font-size: 14px;
  border-radius: 11px;
  line-height: 1.75;
}
.modal-note {
  font-size: 13px;
  color: #677c99;
  background: #f0f5fc;
  border-radius: 11px;
  padding: 14px 16px;
  line-height: 1.8;
}
.inline-note {
  font-size: 13px;
  line-height: 1.8;
  color: #8a929f;
}
.result-meta {
  font-size: 13px;
  gap: 13px;
}
.result-box {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.95;
  padding: 22px;
  background: #f8f9fb;
  border-color: #e5e9ef;
  border-radius: 13px;
  color: #414c5e;
}
.prompt-detail {
  font-size: 13px;
  color: #828d9c;
}
.prompt-detail pre {
  font-size: 14px;
  line-height: 1.85;
  color: #6d7b8f;
}
.prompt-presets button {
  font-size: 12px;
  border-radius: 7px;
  padding: 7px 11px;
  color: #6786b2;
  background: #f5f8fc;
  border-color: #e1e9f4;
}
.runtime-list {
  max-height: clamp(140px, calc(90vh - 390px), 50vh);
  border-radius: 13px;
  border-color: #e3e9f2;
  background: #f8faff;
}
.runtime-entry {
  padding: 17px 19px;
  border-left-color: #a3bfe4;
}
.runtime-entry-meta {
  font-size: 12px;
  gap: 10px;
  color: #8490a2;
}
.runtime-level {
  font-size: 11px;
  font-weight: 750;
  background: #eaf2ff;
  color: #648bbd;
  border-radius: 5px;
  padding: 2px 6px;
}
.runtime-entry p {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.85;
  margin-top: 9px;
}
.runtime-entry small {
  font-size: 12px;
  line-height: 1.75;
  color: #8a94a4;
}
.runtime-note {
  font-size: 12px;
}
#runtime-summary {
  font-size: 13px;
  gap: 12px;
}
.runtime-empty {
  font-size: 14px;
}
.billing-attempt h3 {
  font-size: 16px;
}
.billing-attempt .muted {
  font-size: 13px;
}
.token-grid {
  font-size: 13px;
  padding: 18px;
  border-radius: 12px;
  background: #f6f8fc;
}
.token-grid strong {
  font-size: 18px;
  font-weight: 700;
}
.checkbox-label {
  font-size: 14px;
  gap: 10px;
}
.dropzone {
  padding: 43px 24px;
  border-color: #b9cfea;
  border-radius: 15px;
  background: #f8fbff;
}
.dropzone.dragover {
  background: #eaf3ff;
}
.upload-icon {
  width: 61px;
  height: 61px;
  border-radius: 18px;
  background: #eaf2ff;
  color: #6f96cb;
}
.dropzone strong {
  font-size: 18px;
  font-weight: 700;
}
.dropzone p {
  font-size: 13px;
  color: #8a98ab;
}
.chosen-file {
  background: #f6f9fd;
  border-color: #e4ebf5;
  border-radius: 13px;
}
.chosen-file strong {
  font-size: 15px;
  font-weight: 650;
}
.chosen-file small,
.upload-status {
  font-size: 13px;
  color: #8b97a9;
}
.progress-track {
  background: #e9eff7;
}
.upload-manager {
  width: 470px;
  right: 24px;
  bottom: 24px;
  border-radius: 18px;
  border-color: #dbe4f1;
  box-shadow: 0 16px 60px #203d6620;
}
.upload-manager header {
  padding: 19px 20px;
}
.upload-manager header strong {
  font-size: 17px;
  font-weight: 750;
}
.upload-manager header small {
  font-size: 12px;
}
.upload-entry {
  padding: 17px 20px;
}
.upload-entry-title {
  font-size: 14px;
}
.upload-entry-title strong {
  font-weight: 650;
}
.upload-entry-meta {
  font-size: 12px;
}
.upload-entry-error {
  font-size: 12px;
}
.upload-entry-actions .text-button,
.upload-manager footer .text-button {
  font-size: 13px;
}
.upload-empty {
  font-size: 14px;
}
.batch-selected {
  border-radius: 12px;
}
.batch-selected > strong,
.batch-selected small {
  font-size: 12px;
}
.batch-selected > div {
  font-size: 14px;
}
.batch-video-picker {
  border-radius: 12px;
}
.batch-video-picker .checkbox-label {
  font-size: 14px;
  padding: 3px 0;
}
.account-profile .avatar {
  width: 62px;
  height: 62px;
  font-size: 26px;
  border-radius: 19px;
}
.account-profile p {
  font-size: 14px;
}
.detail-line {
  font-size: 14px;
  padding: 12px 0;
}
.detail-line strong {
  font-weight: 650;
}
.toast {
  padding: 15px 21px;
  font-size: 14px;
  font-weight: 550;
  border-radius: 13px;
  background: #273448;
  box-shadow: 0 10px 35px #20304020;
}
.toast.error {
  background: #b24f60;
}

/* Inline legacy annotations should not undo the larger type scale. */
.cell-title small,
.stat-card .stat-label,
.project-metrics small,
.project-card p,
.runtime-entry-meta,
.runtime-entry small,
.upload-entry-meta,
.chosen-file small,
.detail-line,
.inline-note,
.result-meta,
.summary-strip,
.project-context label {
  color: #6e7785;
}

.muted[style*="font-size"],
.section-toolbar > .muted,
.toolbar-right .muted,
.modal-body p[style*="font-size"],
details summary[style*="font-size"] {
  font-size: 13px !important;
}

@media (max-height: 860px) {
  .sidebar-tip {
    display: none;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 220px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .main-shell {
    margin-left: 220px;
  }
  main {
    padding: 32px 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .main-footer {
    padding: 18px 28px;
  }
  .stat-card {
    padding: 20px;
  }
  .stat-card .cost-stat {
    font-size: 23px !important;
  }
  .story-copy h1 {
    font-size: 41px;
  }
  .auth-story {
    padding-left: 8%;
    padding-right: 8%;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .sidebar {
    width: 72px;
    padding: 22px 9px 0;
  }
  .sidebar .brand {
    margin: 0 4px 28px;
  }
  .brand-icon {
    width: 43px;
    height: 43px;
  }
  .sidebar .nav-item {
    font-size: 0;
    padding: 13px 0;
    gap: 0;
    min-height: 48px;
  }
  .sidebar .nav-item svg {
    width: 21px;
    height: 21px;
  }
  .main-shell {
    margin-left: 72px;
  }
  .topbar {
    height: 68px;
    padding: 0 18px;
  }
  .breadcrumbs {
    font-size: 12px;
    gap: 8px;
  }
  .topbar-right {
    gap: 6px;
  }
  .local-badge {
    display: none;
  }
  #upload-queue-toggle {
    padding: 7px 10px;
    min-height: 34px;
    font-size: 12px;
  }
  main {
    padding: 28px 20px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading .eyebrow {
    font-size: 10px;
    letter-spacing: 1.2px;
  }
  .page-heading .muted {
    font-size: 14px;
  }
  .page-heading .button {
    min-height: 40px;
    font-size: 14px;
    padding: 8px 13px;
  }
  .overview-banner {
    padding: 24px;
    border-radius: 17px;
  }
  .overview-banner h2 {
    font-size: 21px;
  }
  .overview-banner p {
    font-size: 14px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    padding: 22px;
    min-height: 310px;
  }
  .new-project-card {
    min-height: 165px;
  }
  .project-context {
    gap: 10px;
    padding: 14px;
  }
  .project-context label {
    font-size: 12px;
  }
  .project-context select {
    width: auto;
    min-width: 0;
    font-size: 14px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 17px 20px;
  }
  .stat-card > div {
    width: 100%;
  }
  .stat-card .stat-label {
    font-size: 13px;
  }
  .stat-card strong {
    font-size: 28px;
  }
  .stat-card .cost-stat {
    font-size: 25px !important;
  }
  .stat-card .stat-icon {
    display: none;
  }
  .script-export-bar {
    padding: 15px;
    gap: 12px;
  }
  .script-export-bar .checkbox-label {
    width: 100%;
  }
  .script-export-bar .text-button {
    margin-left: 0;
  }
  .summary-strip {
    font-size: 13px;
    padding: 16px;
    gap: 10px;
  }
  .search-field {
    max-width: 100%;
    font-size: 14px;
  }
  .section-toolbar {
    gap: 14px;
  }
  .section-toolbar h2 {
    font-size: 17px;
  }
  .segmented button {
    font-size: 13px;
    padding: 7px 11px;
  }
  th {
    font-size: 12px;
    padding: 14px;
  }
  td {
    font-size: 14px;
    padding: 18px 14px;
  }
  .cell-title {
    font-size: 15px;
  }
  .cell-title small {
    font-size: 12px;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-header h2 {
    font-size: 21px;
  }
  .modal-body {
    padding: 6px 20px 22px;
  }
  .modal-footer {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .modal-footer .button {
    min-height: 40px;
    font-size: 14px;
  }
  .runtime-list {
    max-height: clamp(140px, calc(90vh - 360px), 48vh);
  }
  .runtime-entry {
    padding: 14px;
  }
  .runtime-entry-meta {
    font-size: 11px;
    gap: 8px;
  }
  .token-grid {
    grid-template-columns: 1fr 1fr;
  }
  .auth-panel {
    padding: 42px 26px;
  }
  .auth-box h2 {
    font-size: 32px;
  }
  .upload-manager {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 92px);
  }
  .user-card {
    flex-direction: column;
  }
  .main-footer {
    padding: 18px 20px;
    font-size: 11px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .topbar,
  .modal-header,
  .modal-footer {
    background: #fff;
    backdrop-filter: none;
  }
}

.analysis-selection-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--blue-light, #eef5ff);
}
.analysis-selection-toolbar .checkbox-label {
  margin: 0;
}
.analysis-selection-toolbar .muted {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}

.manual-refresh {
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
}
.manual-refresh[aria-busy="true"] svg {
  animation: spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .manual-refresh[aria-busy="true"] svg {
    animation: none;
  }
}

/* Compact project overview and shared list pagination. */
.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
  gap: 14px;
}
.project-card {
  min-height: 0;
  padding: 16px;
  border-radius: 14px;
}
.project-card-top { margin-bottom: 10px; }
.project-symbol { width: 32px; height: 32px; border-radius: 9px; }
.project-symbol svg { width: 16px; height: 16px; }
.project-open { font-size: 16px; }
.project-card p {
  font-size: 12px;
  margin: 6px 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-metrics { gap: 9px 12px; margin: 10px 0 12px; }
.project-metrics small { font-size: 11px; }
.project-metrics strong { font-size: 16px; margin-top: 3px; }
.project-metrics em { font-size: 11px; }
.project-card-footer { padding-top: 10px; font-size: 11px; gap: 8px; }
.project-card-footer button { font-size: 11px; }
.new-project-card { min-height: 220px; border-radius: 14px; font-size: 13px; }
.new-project-card .plus-circle { width: 32px; height: 32px; font-size: 22px; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 0;
  font-size: 13px;
}
.pagination > .muted { margin-right: auto; }
.pagination label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.pagination select { width: auto; min-height: 36px; padding: 6px 28px 6px 10px; font-size: 13px; }
@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .new-project-card { min-height: 120px; }
  .pagination { gap: 8px; }
}

/* Hide optional promotional content throughout the workspace. */
.sidebar-tip,
.main-footer {
  display: none;
}
