:root {
  color-scheme: light;
  --page: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-blue: #edf4ff;
  --text: #182133;
  --muted: #627085;
  --line: #d7deea;
  --line-strong: #b9c5d6;
  --accent: #245ca8;
  --accent-hover: #194b91;
  --success: #19724a;
  --success-soft: #e6f5ed;
  --warning: #875910;
  --warning-soft: #fff4da;
  --danger: #a13838;
  --danger-soft: #fceaea;
  --radius: 10px;
  --shadow: 0 10px 28px rgb(30 48 78 / 8%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--page); }
body {
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgb(36 92 168 / 28%);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin-top: 0; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
}
.header-workspaces {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 740;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 16px;
  font-weight: 760;
}
.workspace-switcher {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #b9d1f3;
  border-radius: 8px;
  padding: 6px 11px;
  color: #164b91;
  background: #eaf3ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.workspace-switcher:hover { border-color: #8eb4e8; background: #dcecff; }

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 64px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  margin-bottom: 5px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.page-heading p, .dialog-heading p, .form-hint { margin-bottom: 0; color: var(--muted); }
.archive-heading { align-items: flex-start; }
.archive-heading > div { max-width: 880px; }
.archive-heading h1 { max-width: 760px; }
.eyebrow {
  margin-bottom: 7px !important;
  color: var(--accent) !important;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.operations-board {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #bfd0e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgb(30 48 78 / 9%);
}
.operations-board > .loading-state { padding: 32px 20px; }
.operations-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(118deg, #173d70, #245ca8 68%, #3774c6);
}
.operations-heading .eyebrow { color: #c9ddfb !important; }
.operations-heading h2 { margin-bottom: 4px; font-size: 24px; }
.operations-heading p { margin-bottom: 0; color: rgb(255 255 255 / 76%); font-size: 13px; }
.trial-summary {
  display: grid;
  min-width: 190px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 14px;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 10px;
  background: rgb(255 255 255 / 10%);
}
.trial-summary span { font-size: 12px; }
.trial-summary strong { grid-row: span 2; font-size: 30px; line-height: 1; }
.trial-summary small { color: #d6e5fa; }
.trial-summary.has-overdue { border-color: #ffd79f; background: rgb(137 54 17 / 45%); }
.operations-content { display: grid; grid-template-columns: minmax(280px, 0.68fr) minmax(420px, 1.32fr); }
.daily-goals { display: grid; gap: 14px; padding: 20px 22px; border-right: 1px solid var(--line); background: #f8faff; }
.daily-goal { padding: 14px 15px; border: 1px solid #d8e2f0; border-radius: 10px; background: #fff; }
.daily-goal > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.daily-goal span { color: var(--muted); font-size: 13px; }
.daily-goal strong { color: #173d70; font-size: 24px; }
.daily-goal strong small { color: var(--muted); font-size: 13px; }
.daily-goal.is-complete strong { color: var(--success); }
.goal-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 10px; background: #e3e9f2; }
.goal-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.daily-goal.is-complete .goal-track i { background: var(--success); }
.priority-list { padding: 16px 20px 18px; }
.priority-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.priority-title span { color: var(--muted); font-size: 12px; }
.priority-row {
  display: grid;
  width: 100%;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border: 0;
  border-top: 1px solid #e8ecf2;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.priority-row:hover { background: #f5f8fc; }
.priority-number { color: var(--accent); font-weight: 760; }
.priority-row strong, .priority-row small { display: block; }
.priority-row small { margin-top: 2px; color: var(--muted); }
.priority-row em { padding: 3px 7px; border-radius: 20px; color: #6c520d; background: var(--warning-soft); font-size: 11px; font-style: normal; white-space: nowrap; }
.priority-row.is-urgent em { color: var(--danger); background: var(--danger-soft); }
.qa-news-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4f9ff 0%, #eef6ff 100%);
  box-shadow: 0 10px 28px rgb(40 81 132 / 9%);
}
.qa-news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #d8e6f6;
}
.qa-news-heading > div { display: grid; gap: 2px; }
.qa-news-heading strong { color: #153c6c; font-size: 16px; }
.qa-news-heading em {
  padding: 4px 9px;
  border-radius: 999px;
  color: #1753a6;
  background: #dceaff;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}
.qa-news-kicker { color: #6b7f98; font-size: 10px; font-weight: 760; letter-spacing: .12em; }
.qa-news-list { display: grid; gap: 8px; padding: 10px; }
.qa-news-item { overflow: hidden; border: 1px solid #dce7f4; border-radius: 10px; background: #fff; }
.qa-news-item.is-unread { border-color: #bad5f3; box-shadow: inset 3px 0 0 #2c78d0; }
.qa-news-item.is-read > summary { background: #f8fafc; }
.qa-news-item.is-read .qa-news-number,
.qa-news-item.is-read .qa-news-open-label { color: #7a8796; }
.qa-news-item > summary {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.qa-news-item > summary::-webkit-details-marker { display: none; }
.qa-news-item > summary:hover { background: #f7faff; }
.qa-news-item[open] > summary { background: #f7faff; }
.qa-news-item > summary strong, .qa-news-item > summary small { display: block; }
.qa-news-item > summary strong { color: #1c314c; }
.qa-news-item > summary small {
  max-width: 62ch;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qa-news-number { color: #1764c0; font-weight: 800; }
.qa-news-open-label { color: #56708f; font-size: 11px; white-space: nowrap; }
.qa-news-item[open] .qa-news-open-label { color: #1764c0; }
.qa-news-detail { display: grid; gap: 10px; padding: 2px 14px 14px 88px; }
.qa-news-block { padding: 12px 14px; border-radius: 10px; }
.qa-news-block > span { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 780; letter-spacing: .04em; }
.qa-news-block > p { margin: 0; color: #26364a; font-size: 13px; line-height: 1.72; }
.qa-news-question { border: 1px solid #e0e8f1; background: #f7f9fc; }
.qa-news-question > span { color: #65758a; }
.qa-news-answer { border: 1px solid #cfe1f6; background: #f2f8ff; }
.qa-news-answer > span { color: #1753a6; }
.qa-news-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qa-news-actions time { color: var(--muted); font-size: 11px; }
.message-read-button { color: #0f5e42; border-color: #a7dcc8; background: #f0fbf6; }
.operations-empty { padding: 24px 8px; color: var(--muted); font-size: 13px; text-align: center; }
.header-actions, .heading-actions, .dialog-actions, .section-actions,
.attachment-actions, .record-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-button, .secondary-button, .text-button, .close-button,
.inline-button, .primary-small-button, .danger-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 660;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.primary-button, .primary-small-button { color: #fff; background: var(--accent); }
.primary-button:hover, .primary-small-button:hover { background: var(--accent-hover); }
.secondary-button, .close-button, .inline-button {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}
.secondary-button:hover, .close-button:hover, .inline-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}
.text-button { min-height: 36px; padding: 6px 9px; color: var(--accent); background: transparent; }
.inline-button, .primary-small-button, .danger-button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}
.danger-button { color: var(--danger); border-color: #efcaca; background: var(--danger-soft); }
.danger-text { color: var(--danger); }
button:disabled, .is-busy { cursor: wait; opacity: 0.58; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 14px;
}
.quick-action {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 5px 18px rgb(30 48 78 / 5%);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.quick-action:hover { border-color: #aabbd3; box-shadow: var(--shadow); }
.quick-action strong { font-size: 16px; }
.quick-action span { color: var(--muted); font-size: 12px; }
.quick-action.primary-action { color: #fff; border-color: var(--accent); background: var(--accent); }
.quick-action.primary-action span { color: rgb(255 255 255 / 78%); }
.quick-action.google-action { color: #164b91; border-color: #b9d1f3; background: #eaf3ff; }
.quick-action.cloud-action { color: #60420b; border-color: #ead09e; background: #fff6df; }
.quick-action.ledger-action { color: #126144; border-color: #a8d9c4; background: #eaf8f1; }
.quick-action.keyword-action { color: #633c92; border-color: #d2bce9; background: #f6effd; }
.quick-action.export-action { background: #fbfcfe; }

.module-panel {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.module-heading, .module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.module-heading h2 { margin-bottom: 3px; }
.module-heading p { margin-bottom: 0; color: var(--muted); }
.money-summary { display: flex; gap: 10px; }
.money-summary span { display: grid; min-width: 150px; gap: 2px; padding: 10px 13px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.money-summary strong { color: var(--success); font-size: 21px; }
.module-form { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #fafcff; }
.module-form label, .keyword-search { display: grid; align-content: start; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.module-form input, .module-form select, .keyword-search input, .batch-row select { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; color: var(--text); background: #fff; }
.module-form .wide-field { grid-column: span 3; }
.module-form .form-submit-row { grid-column: 1 / -1; }
.upload-drop { padding: 12px; border: 1px dashed #9eb5d6; border-radius: 9px; background: #f1f6fd; }
.data-list, .batch-list { padding: 0 22px 18px; }
.data-row { display: grid; grid-template-columns: minmax(260px, 1fr) 130px auto; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid #e7ebf1; }
.data-row.is-voided { opacity: .58; }
.data-row-main strong, .data-row-main span, .data-row-main small { display: block; }
.data-row-main span, .data-row-main small { color: var(--muted); font-size: 12px; }
.compact-list-summary {
  padding: 11px 22px;
  border-bottom: 1px solid var(--line);
  background: #fafcff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}
.compact-list-head, .compact-server-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, .9fr) minmax(120px, .85fr) minmax(120px, .85fr) 82px minmax(160px, 1.35fr) 82px;
  align-items: center;
  gap: 14px;
}
.compact-list-head {
  padding: 10px 0;
  color: var(--muted);
  background: #fafcff;
  font-size: 12px;
  font-weight: 720;
}
.server-row {
  padding: 13px 0;
  border-bottom: 1px solid #e7ebf1;
}
.server-row.is-voided { opacity: .58; }
.server-row code { color: #243753; font: 700 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.server-row .status-label { display: inline-flex; grid-area: auto; justify-self: start; }
.compact-server-sites { overflow: hidden; color: #536177; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.back-to-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 999px;
  background: rgba(29, 78, 216, .94);
  box-shadow: 0 12px 30px rgba(29, 78, 216, .26);
  color: #fff;
  font: 780 16px/1 system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.back-to-top--upper { top: max(88px, calc(env(safe-area-inset-top) + 72px)); }
.back-to-top--lower { bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px)); }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: #1d4ed8; transform: translateY(-1px); }
.back-to-top:focus-visible { outline: 3px solid rgba(59, 130, 246, .35); outline-offset: 3px; }
.money-value { color: var(--success); text-align: right; }
.data-actions { display: flex; justify-content: flex-end; gap: 6px; }
.module-attachments { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.module-attachments a { color: var(--accent); font-size: 12px; }
.effect-list { padding: 0 22px 18px; }
.effect-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid #e7ebf1;
}
.effect-row:last-child { border-bottom: 0; }
.effect-row h3 { margin-bottom: 2px; font-size: 16px; }
.effect-row p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.effect-number {
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 780;
}
.effect-number.qinglong { color: #116447; border-color: #9ed7c2; background: #e9f8f1; }
.effect-number.yifengyi { color: #1459a7; border-color: #a9c9ee; background: #edf5ff; }
.effect-number.haiwang { color: #243d75; border-color: #b9c7e6; background: #f0f4fc; }
.effect-number.skyscrm { color: #b42318; border-color: #f3b1a8; background: #fff1ee; }
.conversion-library { background: linear-gradient(180deg, #fff 0, #fbfdff 100%); }
.conversion-library-heading { align-items: flex-start; }
.conversion-library-heading > div { max-width: 900px; }
.conversion-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 22px 0;
}
.conversion-badges span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #b8d7c7;
  border-radius: 999px;
  padding: 4px 10px;
  color: #126144;
  background: #edf9f3;
  font-size: 12px;
  font-weight: 720;
}
.conversion-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px 22px;
}
.conversion-flow article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #cddaea;
  border-radius: 10px;
  padding: 14px;
  background: #f7faff;
}
.conversion-flow em {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}
.conversion-flow strong { display: block; margin-bottom: 5px; font-size: 14px; }
.conversion-flow p { margin: 0; color: var(--muted); font-size: 12px; }
.conversion-flow code, .conversion-card code {
  border-radius: 4px;
  padding: 1px 4px;
  color: #163f74;
  background: #e7f0fb;
  font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.conversion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 20px;
}
.conversion-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}
.conversion-card-danger { border-color: #edcaca; background: #fffafa; }
.conversion-card h3 { margin-bottom: 9px; font-size: 15px; }
.conversion-card ul { margin: 0; padding-left: 20px; color: #536177; font-size: 13px; }
.conversion-card li + li { margin-top: 5px; }
.conversion-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.conversion-compare > div { display: grid; gap: 4px; padding: 14px 16px; }
.conversion-compare > div + div { border-left: 1px solid var(--line); }
.conversion-compare span { color: var(--accent); font-size: 12px; font-weight: 780; }
.conversion-compare strong { font-size: 14px; }
.conversion-compare small { color: var(--muted); }
.conversion-footnote { margin: 16px 22px 20px; color: var(--muted); font-size: 12px; }
.void-label { color: var(--danger); font-size: 12px; }
.batch-row { display: grid; grid-template-columns: minmax(260px, 1fr) 130px; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #e7ebf1; }
.batch-row strong, .batch-row span { display: block; }
.batch-row span { color: var(--muted); font-size: 12px; }
.keyword-search { padding: 16px 22px 10px; }
.keyword-table-head, .keyword-table-row { display: grid; align-items: center; gap: 12px; padding: 12px 22px; }
.compact-keyword-row { grid-template-columns: minmax(220px, 1fr) minmax(130px, .45fr); }
.keyword-table-head { color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 750; }
.keyword-table-row { border-top: 1px solid #e7ebf1; font-size: 13px; }
.compact-tools { border-bottom: 1px solid var(--line); background: #fbfcfe; }
.compact-tools > summary { padding: 13px 22px; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 750; }
.compact-tools[open] > summary { border-bottom: 1px solid var(--line); }
.account-state-chip { display: inline-flex; padding: 2px 7px; border-radius: 999px; color: var(--accent); background: var(--surface-blue); font-size: 11px; }
.account-state-投放中, .account-state-可使用 { color: var(--success); background: var(--success-soft); }
.account-state-待验证, .account-state-有问题, .account-state-已停用 { color: var(--danger); background: var(--danger-soft); }
.target-highlight { animation: target-flash 2.8s ease-out; }
@keyframes target-flash { 0%, 28% { box-shadow: 0 0 0 4px rgb(232 157 44 / 50%); background: #fff9e9; } 100% { box-shadow: none; } }

.cloud-number { color: #6b470a; border-color: #e6c47d; background: #fff4d8; }
.cloud-resource-list { display: grid; gap: 9px; margin-top: 14px; }
.resource-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.resource-card > summary { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.6fr); align-items: center; gap: 18px; padding: 12px 14px; cursor: pointer; }
.resource-summary-main strong, .resource-summary-main code, .resource-summary-deployment small, .resource-summary-deployment strong { display: block; }
.resource-summary-main code { margin-top: 3px; color: #31435d; font-size: 13px; }
.resource-summary-deployment small { color: var(--muted); font-size: 11px; }
.resource-summary-deployment strong { overflow: hidden; color: #243753; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.resource-details { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.resource-details p { margin: 11px 0; }
.resource-deployment-focus { margin: 12px 0; padding: 12px; border-radius: 8px; background: #f3f7fd; }
.resource-deployment-focus span { color: var(--muted); font-size: 12px; font-weight: 700; }
.resource-deployment-focus pre { margin: 7px 0 0; white-space: pre-wrap; color: #18243a; font: 650 13px/1.65 system-ui, sans-serif; }
.resource-secondary-fields { border: 1px solid var(--line); border-radius: 8px; background: #fafcff; }
.resource-secondary-fields > summary { padding: 10px 12px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.resource-secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.collapsible-section-body { padding: 12px 13px; }
.cloud-files-section > summary { cursor: pointer; }
.cloud-files-section > summary::-webkit-details-marker { display: none; }
.collapse-label { color: var(--accent); font-size: 12px; font-weight: 720; }

.record-tabs {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  gap: 5px;
  margin: 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  background: #e9eef5;
}
.record-tab {
  flex: 0 0 auto;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 8px 20px;
  color: #526077;
  background: transparent;
  cursor: pointer;
  font-weight: 720;
}
.record-tab-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.record-tab span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin-left: 5px;
  place-items: center;
  border-radius: 12px;
  background: rgb(92 109 137 / 11%);
  font-size: 12px;
}
.record-tab.is-active { color: var(--accent); background: #fff; box-shadow: 0 2px 8px rgb(30 48 78 / 10%); }

.security-banner {
  margin: 22px 0 16px;
  padding: 12px 15px;
  border: 1px solid #ead6a5;
  border-radius: var(--radius);
  color: #704c12;
  background: var(--warning-soft);
  font-size: 14px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.summary-grid > div {
  display: flex;
  min-height: 84px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 22px;
}
.summary-grid > div + div { border-left: 1px solid var(--line); }
.summary-grid strong { font-variant-numeric: tabular-nums; font-size: 25px; line-height: 1.1; }
.summary-grid span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: flex-end; gap: 14px; margin: 22px 0 14px; }
.toolbar label, .form-grid label, .wide-field, .login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #35425a;
  font-size: 13px;
  font-weight: 660;
}
.search-field { flex: 1; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bdc8d7;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
}
textarea { min-height: 82px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #7f8999; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:disabled, textarea:disabled, select:disabled { color: var(--muted); background: #f0f3f7; }

.project-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.project-archive {
  overflow: clip;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(30 48 78 / 5%);
}
.project-archive[open] { border-color: #b9c9df; box-shadow: var(--shadow); }
.project-archive.is-archived { opacity: 0.75; }
.project-summary {
  display: grid;
  min-height: 82px;
  grid-template-columns: 74px minmax(230px, 1.4fr) minmax(175px, 0.8fr) minmax(130px, auto) 118px 88px;
  grid-template-areas: "number title deployment status upload expand";
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.project-summary::-webkit-details-marker { display: none; }
.project-summary:hover { background: #fbfcff; }
.project-number {
  grid-area: number;
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid #bfd0ea;
  border-radius: 8px;
  color: var(--accent);
  background: var(--surface-blue);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}
.project-title-block, .deployment-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.project-title-block { grid-area: title; }
.deployment-summary { grid-area: deployment; }
.project-title-block strong {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-title-block span, .deployment-summary span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deployment-summary strong {
  overflow: hidden;
  margin-top: 3px;
  color: #36435a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-label {
  grid-area: status;
  justify-self: start;
  max-width: 190px;
  overflow: hidden;
  border-radius: 7px;
  padding: 5px 9px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-label.done { color: var(--success); background: var(--success-soft); }
.status-label.problem { color: var(--danger); background: var(--danger-soft); }
.status-label.pending { color: #77510f; background: #fff0ca; }
.status-label.archived { color: var(--muted); background: #edf0f5; }
.summary-quick-upload { display: inline-flex; grid-area: upload; justify-self: stretch; }
.summary-upload-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}
.summary-upload-button:hover { background: var(--accent-hover); }
.expand-label {
  grid-area: expand;
  position: relative;
  padding-right: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 680;
  text-align: right;
}
.expand-label::after { position: absolute; top: 2px; right: 0; content: "⌄"; font-size: 16px; line-height: 1; }
.project-archive[open] .expand-label::after { transform: rotate(180deg); }

.archive-body { border-top: 1px solid var(--line); background: var(--surface-soft); }
.google-account-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid #c8d9ef;
  background: #eef5ff;
}
.google-account-control strong { display: block; color: #173f74; font-size: 14px; }
.google-account-control span { display: block; margin-top: 3px; color: #5d6f86; font-size: 12px; }
.overview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.overview-strip > div { min-width: 0; padding: 12px 15px; }
.overview-strip > div + div { border-left: 1px solid var(--line); }
.overview-strip span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.overview-strip strong, .overview-strip a {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-strip a { color: var(--accent); }
.archive-sections { display: grid; gap: 12px; padding: 14px; }
.archive-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.archive-section.is-editing { border-color: #9fb8dd; box-shadow: 0 0 0 3px rgb(36 92 168 / 8%); }
.section-heading {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.section-heading h3 { margin: 0; font-size: 15px; }
.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.section-note, .review-time { color: var(--muted); font-size: 12px; }
.upload-button { position: relative; }
.field-list { display: grid; }
.field-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(150px, 0.34fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 13px;
}
.field-row + .field-row { border-top: 1px solid #e6eaf0; }
.field-label { color: var(--muted); font-size: 13px; font-weight: 660; }
.field-display, .field-editor { min-width: 0; }
.field-editor input, .field-editor textarea { min-height: 38px; padding: 7px 9px; font-size: 14px; }
.field-editor textarea { min-height: 70px; }
.field-text, .field-link {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}
.preserve-lines { white-space: pre-wrap; }
.field-link { color: var(--accent); }
.empty-value { color: #8a95a5; }
.secret-text { letter-spacing: 0.08em; }
.field-actions { display: flex; min-width: 56px; justify-content: flex-end; gap: 6px; }
.boolean-value {
  display: inline-flex;
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--muted);
  background: #eef1f5;
  font-size: 12px;
  font-weight: 700;
}
.boolean-value.yes { color: var(--success); background: var(--success-soft); }
.switch-field { display: inline-flex; align-items: center; gap: 9px; color: #3b485d; font-size: 14px; }
.switch-field input, .confirm-field input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.attachments { padding: 10px 13px 12px; border-top: 1px solid var(--line); background: #fafbfe; }
.attachments h4 {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.attachment-empty { margin: 0; color: #8b96a6; font-size: 13px; }
.attachment-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; }
.attachment-item + .attachment-item { border-top: 1px solid #e5e9ef; }
.attachment-item > div:first-child { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.attachment-item strong {
  overflow: hidden;
  max-width: 520px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-item span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-state {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
  white-space: nowrap;
}
.file-state.pending { color: var(--warning); background: var(--warning-soft); }
.file-state.organized { color: var(--success); background: var(--success-soft); }
.google-upload-control { display: flex; align-items: center; gap: 8px; }
.google-upload-control select { min-width: 150px; min-height: 34px; padding: 5px 9px; font-size: 13px; }
.all-attachments { border-top: 0; }
.google-number { color: #185397; border-color: #b5cef1; background: #e8f2ff; }

.readiness-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.readiness-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 14px;
}
.readiness-groups h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.readiness-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.compact-readiness {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px;
}
.compact-readiness .readiness-item { border: 0; }
.compact-readiness .readiness-item + .readiness-item { border-top: 0; border-left: 1px solid #e6eaf0; }
.linked-account-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.linked-account-strip strong { color: var(--text); }
.relation-jump {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 680;
  text-align: left;
}
.relation-jump:hover { text-decoration: underline; }

.workflow-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.workflow-overview > div { min-width: 0; padding: 12px 14px; }
.workflow-overview > div + div { border-left: 1px solid var(--line); }
.workflow-overview span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.workflow-overview strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.workflow-pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}
.pipeline-step {
  display: grid;
  min-width: 110px;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 2px 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pipeline-step > span { display: grid; width: 24px; height: 24px; grid-row: span 2; place-items: center; border-radius: 50%; color: var(--muted); background: #eef1f5; font-size: 11px; font-weight: 760; }
.pipeline-step strong { font-size: 12px; white-space: nowrap; }
.pipeline-step small { color: var(--muted); font-size: 10px; }
.pipeline-step.is-active { border-color: #9bbce8; background: var(--surface-blue); }
.pipeline-step.is-active > span { color: #fff; background: var(--accent); }
.pipeline-step.is-done { border-color: #b7dfca; background: var(--success-soft); }
.pipeline-step.is-done > span { color: #fff; background: var(--success); }
.pipeline-step.has-problem { border-color: #efbcbc; background: var(--danger-soft); }
.pipeline-step.has-problem > span { color: #fff; background: var(--danger); }
.workflow-editor, .timeline-panel { border-bottom: 1px solid var(--line); }
.workflow-editor summary, .timeline-panel summary, .activity-panel summary {
  padding: 11px 14px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.workflow-form { padding: 0 14px 14px; }
.compact-form-grid, .keyword-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.compact-form-grid label, .inline-create-form label, .keyword-create-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #35425a;
  font-size: 12px;
  font-weight: 660;
}
.compact-form-grid input, .compact-form-grid select, .compact-form-grid textarea,
.inline-create-form input, .inline-create-form select,
.keyword-create-form input, .keyword-create-form select, .keyword-create-form textarea {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
}
.form-submit-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.timeline-list { border-top: 1px solid var(--line); }
.timeline-list article { padding: 11px 14px; font-size: 12px; }
.timeline-list article + article { border-top: 1px solid #e7ebf1; }
.timeline-list time { display: block; color: var(--muted); }
.timeline-list strong { display: block; margin: 2px 0 5px; }
.timeline-list p { margin: 2px 0; color: #4b586d; overflow-wrap: anywhere; }
.timeline-empty { padding: 12px 14px; }

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(120px, 0.55fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.relation-list { padding: 0 13px; }
.relation-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1fr) 120px minmax(160px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 12px;
}
.relation-row + .relation-row { border-top: 1px solid #e7ebf1; }
.relation-row a { color: var(--accent); overflow-wrap: anywhere; }
.relation-row select { min-height: 34px; padding: 5px 7px; font-size: 12px; }
.relation-row span { color: var(--muted); }
.relation-empty, .keyword-empty { padding: 13px 0; }

.keyword-create-form { padding: 13px; border-bottom: 1px solid var(--line); }
.keyword-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; }
.keyword-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px; }
.keyword-card.is-archived { opacity: 0.62; }
.keyword-card > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.keyword-card span { color: var(--muted); font-size: 11px; }
.keyword-card pre {
  max-height: 170px;
  overflow: auto;
  margin: 9px 0;
  border-radius: 7px;
  padding: 9px;
  background: #f4f6f9;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
.keyword-card > div:last-child { display: flex; gap: 7px; justify-content: flex-end; }
.readiness-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
}
.readiness-item + .readiness-item { border-top: 1px solid #e6eaf0; }
.readiness-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c4cad3;
}
.readiness-dot.ready { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.readiness-item div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.readiness-item strong { color: var(--text); font-size: 13px; }
.readiness-item span { color: var(--muted); font-size: 12px; }

.account-history {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.account-history summary { padding: 12px 14px; cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 680; }
.account-replacement { border-color: #cfd7e6; background: #f9fbff; }
.replacement-panel { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.replacement-panel > p { margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.replacement-form { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.history-list { border-top: 1px solid var(--line); }
.history-account { padding: 10px 14px; font-size: 13px; }
.history-account + .history-account { border-top: 1px solid #e6eaf0; }
.history-account span { color: var(--muted); }
.history-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.history-account-details { margin-top: 7px; }
.relation-row select:disabled { cursor: not-allowed; opacity: 0.72; }
.history-secrets { margin-top: 10px; border-top: 1px solid #e6eaf0; }
.history-secret-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}
.history-secret-row + .history-secret-row { border-top: 1px solid #edf0f4; }
.history-secret-row strong { overflow-wrap: anywhere; font-weight: 620; }
.activity-panel {
  margin: 0 14px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.activity-panel > .attachment-empty { padding-top: 9px; }
.activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity-heading h3 { margin: 0; font-size: 15px; }
.activity-heading span { color: var(--muted); font-size: 12px; }
.activity-list { margin-top: 9px; border-top: 1px solid var(--line); }
.activity-row {
  display: grid;
  grid-template-columns: 120px 140px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
}
.activity-row + .activity-row { border-top: 1px solid #edf0f4; }
.activity-row time, .activity-row span { color: var(--muted); }
.record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}
.loading-state, .error-state, .empty-state { padding: 66px 20px; color: var(--muted); text-align: center; }
.empty-state h2 { margin-bottom: 6px; color: var(--text); }

.form-dialog {
  width: min(860px, calc(100% - 28px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 80px rgb(15 23 42 / 28%);
}
.small-dialog { width: min(720px, calc(100% - 28px)); }
.form-dialog::backdrop { background: rgb(18 25 38 / 56%); }
.form-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-heading h2 { margin-bottom: 4px; font-size: 23px; }
.close-button { min-height: 34px; padding: 6px 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.wide-field { grid-column: 1 / -1; }
.confirm-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0;
  color: #3b485d;
  font-size: 14px;
  font-weight: 680;
}
.required { color: var(--danger); font-size: 11px; }
.dialog-actions { justify-content: flex-end; margin-top: 22px; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100% - 44px));
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #243248;
  box-shadow: var(--shadow);
}
.toast.error { background: #8a3030; }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { width: 100%; max-width: 430px; }
.login-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.login-panel .brand-mark { margin-bottom: 13px; }
.product-name { margin-bottom: 20px; color: var(--muted); font-weight: 700; }
.login-panel h1 { margin-bottom: 6px; font-size: 28px; }
.login-help, .security-note { color: var(--muted); }
.login-form { display: grid; gap: 15px; margin-top: 22px; }
.login-form .primary-button { margin-top: 4px; }
.security-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
.form-error:empty { display: none; }
.form-error { margin: 16px 0 0; padding: 9px 11px; border-radius: 8px; color: var(--danger); background: var(--danger-soft); }

@media (max-width: 1050px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-summary {
    grid-template-columns: 68px minmax(200px, 1fr) minmax(155px, 0.7fr) minmax(120px, auto) 112px;
    grid-template-areas: "number title deployment status upload";
  }
  .expand-label { display: none; }
  .overview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-strip > div:nth-child(4) { border-left: 0; }
  .overview-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .workflow-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-overview > div:nth-child(odd) { border-left: 0; }
  .workflow-overview > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .relation-row { grid-template-columns: 1fr 1fr 120px; }
  .relation-row span { grid-column: 1 / -1; }
  .module-form { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 900px) {
  .project-summary {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    grid-template-areas:
      "number title status"
      "number upload upload";
    gap: 8px 12px;
    padding: 12px;
  }
  .project-number { min-height: 38px; align-self: stretch; font-size: 13px; }
  .deployment-summary { display: none; }
  .status-label { max-width: 120px; }
  .summary-quick-upload { justify-self: start; }
  .summary-upload-button { width: auto; min-width: 132px; }
  .server-list { overflow-x: auto; }
  .compact-server-row { min-width: 1080px; }
  .conversion-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conversion-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-header { padding: 0 15px; }
  .page-shell { width: min(100% - 24px, 1440px); padding-top: 22px; }
  .page-heading, .toolbar, .record-footer, .section-heading, .attachment-item {
    align-items: stretch;
    flex-direction: column;
  }
  .heading-actions, .section-actions, .attachment-actions { width: 100%; flex-wrap: wrap; }
  .heading-actions > *, .section-actions > * { flex: 1; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-heading { align-items: stretch; flex-direction: column; }
  .trial-summary { min-width: 0; }
  .operations-content { grid-template-columns: 1fr; }
  .daily-goals { border-right: 0; border-bottom: 1px solid var(--line); }
  .priority-row { grid-template-columns: 54px minmax(0, 1fr); }
  .priority-row em { grid-column: 2; justify-self: start; }
  .qa-news-item > summary { grid-template-columns: 54px minmax(0, 1fr); }
  .qa-news-open-label { grid-column: 2; }
  .qa-news-detail { padding-left: 14px; }
  .qa-news-actions { align-items: flex-start; flex-direction: column; }
  .summary-grid > div:nth-child(3) { border-left: 0; }
  .summary-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-strip > div:nth-child(4) { border-left: 1px solid var(--line); }
  .overview-strip > div:nth-child(odd) { border-left: 0; }
  .overview-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-heading { gap: 10px; }
  .field-row { grid-template-columns: 1fr auto; gap: 7px 10px; }
  .field-label { grid-column: 1 / -1; }
  .field-editor { grid-column: 1 / -1; }
  .attachment-item > div:first-child { align-items: flex-start; flex-direction: column; gap: 1px; }
  .history-summary, .activity-row { grid-template-columns: 1fr; gap: 3px; }
  .readiness-groups { grid-template-columns: 1fr; gap: 14px; }
  .compact-readiness { grid-template-columns: 1fr; }
  .compact-readiness .readiness-item + .readiness-item { border-top: 1px solid #e6eaf0; border-left: 0; }
  .history-secret-row { grid-template-columns: 1fr auto auto; }
  .history-secret-row > span { grid-column: 1 / -1; }
  .form-dialog form, .login-panel { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .google-upload-control { width: 100%; align-items: stretch; flex-direction: column; }
  .inline-create-form { grid-template-columns: 1fr; }
  .resource-card > summary, .resource-secondary-grid { grid-template-columns: 1fr; }
  .resource-card > summary { gap: 8px; }
  .keyword-list { grid-template-columns: 1fr; }
  .relation-row { grid-template-columns: 1fr; gap: 4px; }
  .relation-row span { grid-column: auto; }
  .module-heading, .module-toolbar { align-items: stretch; flex-direction: column; }
  .money-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .money-summary span { min-width: 0; }
  .module-form { grid-template-columns: 1fr 1fr; padding: 16px; }
  .module-form .wide-field { grid-column: 1 / -1; }
  .data-row { grid-template-columns: 1fr auto; }
  .data-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .effect-row { grid-template-columns: 74px minmax(0, 1fr); gap: 12px; }
  .effect-row .primary-small-button { grid-column: 2; justify-self: start; }
  .conversion-library-heading .primary-small-button { align-self: flex-start; }
  .conversion-compare { grid-template-columns: 1fr; }
  .conversion-compare > div + div { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 480px) {
  .brand { font-size: 15px; }
  .header-workspaces { gap: 6px; }
  .workspace-switcher { min-height: 32px; padding-inline: 8px; font-size: 12px; }
  .page-heading h1 { font-size: 25px; }
  .project-summary {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-areas:
      "number title"
      "number status"
      "number upload";
  }
  .overview-strip { grid-template-columns: 1fr; }
  .google-account-control { align-items: stretch; flex-direction: column; }
  .overview-strip > div + div, .overview-strip > div:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .archive-sections { padding: 10px; }
  .quick-actions { grid-template-columns: 1fr; }
  .operations-heading, .daily-goals, .priority-list { padding-inline: 14px; }
  .quick-action { min-height: 82px; }
  .record-tabs { display: flex; }
  .record-tab { flex: 1; padding-inline: 10px; }
  .workflow-overview, .compact-form-grid, .keyword-create-form { grid-template-columns: 1fr; }
  .module-form, .money-summary { grid-template-columns: 1fr; }
  .conversion-flow { grid-template-columns: 1fr; padding-inline: 14px; }
  .conversion-grid { padding-inline: 14px; }
  .conversion-compare { margin-inline: 14px; }
  .conversion-footnote { margin-inline: 14px; }
  .workflow-overview > div + div, .workflow-overview > div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
}

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