/* Application shell and compact views; base styles retain shared components. */
:root {
  --ink: #1d2a3d;
  --muted: #617087;
  --paper: #f4f6fa;
  --surface: #fff;
  --line: #dfe5ed;
  --green: #087d72;
  --green-soft: #def4ed;
  --amber: #865409;
  --amber-soft: #fff1d6;
  --red: #af3d50;
  --red-soft: #fce7eb;
  --blue: #355ca8;
  --shadow: 0 4px 18px #1d2a3d08;
  --sidebar-width: 218px;
}
html { scroll-behavior: auto; }
body { background: var(--paper); font-size: 14px; line-height: 1.5; }
h1, h2, .stat strong, .action-card h3, .change-card h3, .start-here strong { font-family: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { transition: background-color .15s, box-shadow .15s; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); padding: 28px 16px; color: #d3dfef; background: #122033; display: flex; flex-direction: column; }
.brand { padding: 0 8px; align-items: center; gap: 11px; color: #f1f6fc; font-size: 15px; line-height: 1.35; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; color: #6ce0cd; background: #203c49; border: 1px solid #386171; border-radius: 11px; }
.brand-mark svg { width: 23px; height: 23px; }
.nav-label { margin: 45px 14px 12px; color: #8b9fb9; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.view-nav { display: grid; gap: 6px; }
.view-nav a { min-height: 46px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 9px; color: #bdcce0; text-decoration: none; font-size: 12px; font-weight: 600; }
.view-nav a > span { width: 19px; text-align: center; font-size: 20px; font-weight: 400; line-height: 1; }
.view-nav a:hover { color: #fff; background: #1c3048; }
.view-nav a[aria-current] { background: #214443; color: #aff5e5; border-color: #315956; }
.sidebar-note { margin: auto 12px 4px; padding-top: 30px; color: #bdcce0; font-size: 18px; font-weight: 500; line-height: 1.5; letter-spacing: -.03em; }
.sidebar-note small { display: block; margin-top: 12px; color: #8b9fb9; font-size: 10px; letter-spacing: 0; }
.topbar { height: 64px; margin-left: var(--sidebar-width); padding: 0 32px; background: #ffffffed; border-color: var(--line); backdrop-filter: blur(12px); }
.workspace-label { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.workspace-label > span { color: var(--muted); }
.workspace-label > span::after { content: "/"; margin-left: 14px; color: #a6b1c0; }
.workspace-label strong { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 600; }
.topbar-actions { gap: 16px; }
.github-link { color: var(--muted); font-size: 12px; text-decoration: none; }
.github-link:hover { color: var(--green); }
main { width: auto; max-width: 1720px; min-height: calc(100vh - 145px); margin: 0 0 0 var(--sidebar-width); padding: 0 32px; }
.hero { padding: 30px 0 0; }
.hero-heading { grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.eyebrow { margin-bottom: 7px; font-size: 10px; color: var(--muted); letter-spacing: .16em; }
h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 720; line-height: 1.15; letter-spacing: -.045em; }
.heading-dot { color: var(--green); }
.hero-copy { max-width: 350px; font-size: 12px; line-height: 1.7; text-align: right; }
.stats { gap: 12px; margin-top: 22px; border: 0; border-radius: 0; overflow: visible; background: none; }
.stat, .stat:last-child, .stat:nth-child(-n+2) { min-height: 114px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.stat strong { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.stat span { margin-top: 8px; font-size: 10px; font-weight: 650; letter-spacing: .045em; }
.stat small { font-size: 10px; line-height: 1.35; }
.stats-note { max-width: none; font-size: 10px; margin: 9px 0 0; }
.section { padding: 30px 0; border: 0; scroll-margin-top: 82px; }
.section-heading { align-items: center; margin-bottom: 20px; gap: 16px; }
h2 { font-size: 23px; font-weight: 700; line-height: 1.35; letter-spacing: -.035em; scroll-margin-top: 82px; }
h2:focus:not(:focus-visible) { outline: none; }
.section-intro { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.section-copy { font-size: 11px; }
.action-section { background: none; }
.action-toolbar { gap: 7px; }
.filters, .action-filters, .matrix-filters { border: 1px solid var(--line); border-radius: 9px; background: #e9eef5; padding: 3px; }
.filter, .action-filter, .matrix-filter { padding: 8px 12px; font-size: 11px; min-height: 38px; color: var(--muted); }
.filter.active, .action-filter.active, .matrix-filter.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px #1d2a3d12; }
.start-here { margin: 0 0 18px; padding: 20px 22px; border: 1px solid #264e56; border-radius: 12px; color: #f2f7ff; background: linear-gradient(110deg, #173143, #173e43); box-shadow: none; }
.start-here > div { grid-template-columns: auto 1fr; gap: 6px 18px; }
.start-label { color: #8ee3d3; font-size: 10px; }
.start-here strong { font-size: 21px; font-weight: 650; }
.start-here p { font-size: 12px; line-height: 1.7; color: #d6e6eb; }
.start-here > a { background: #b1f3de; color: #173b36; text-decoration: none; font-size: 12px; }
.start-here > a:hover { background: #ceffef; }
.action-grid, .change-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.action-card, .change-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.action-card { border-top-width: 3px; }
.action-card.active { border-top-color: #2f9c8b; }
.action-card.waiting { border-top-color: #d4a149; }
.action-card.later { border-top-color: #a2afc1; background: var(--surface); }
.action-state { font-size: 10px; padding: 4px 8px; letter-spacing: 0; }
.action-state::before { width: 6px; height: 6px; }
.action-state.later, .priority-badge.low, .badge.manual { background: #edf1f6; color: var(--muted); }
.action-order { margin-top: 11px; font-size: 9px; letter-spacing: .035em; }
.priority-badge { padding: 3px 7px; }
.priority-badge.medium { background: #e7edff; }
.action-card h3 { margin: 11px 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.action-task { min-height: 0; font-size: 12px; line-height: 1.75; margin-bottom: 12px; overflow-wrap: anywhere; }
.audit-request-button { width: 100%; min-height: 40px; margin: 0 0 12px; padding: 8px 10px; border-color: #cee1dd; background: #eef8f5; color: #086c62; font-size: 11px; font-weight: 650; }
.audit-request-button:hover { background: #ddf2eb; }
.action-context, .action-evidence, .change-description { margin: 0; min-width: 0; border-top: 1px solid #edf0f5; }
.action-context > summary, .action-evidence > summary, .change-description > summary { min-height: 38px; padding: 9px 0; color: var(--muted); font-size: 11px; line-height: 1.6; cursor: pointer; overflow-wrap: anywhere; }
.action-context[open] { padding-bottom: 10px; }
.action-context .branch-summary { margin-top: 6px; }
.branch-summary, .variant-details > ul > li { background: #f0f4f8; overflow-wrap: anywhere; }
.action-details dt { font-size: 9px; }
.action-details dd { font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.action-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf0f5; font-size: 9px; }
.change-card h3 { min-height: 3em; font-size: 17px; font-weight: 650; line-height: 1.5; letter-spacing: -.02em; }
.change-card p { margin-bottom: 12px; font-size: 12px; line-height: 1.7; }
.change-meta { font-size: 10px; gap: 8px; overflow-wrap: anywhere; }
.badge { padding: 4px 7px; white-space: nowrap; font-size: 9px; }
.change-description { margin: 8px 0; }
.change-card .audit-request-button { margin-bottom: 0; }
.progress-line { height: 5px; margin: 16px 0 10px; background: #e8edf3; }
.progress-copy { gap: 10px; font-size: 10px; color: var(--muted); }
.progress-copy strong { color: var(--ink); font-weight: 600; }
.source-link { font-size: 10px; margin-top: 13px; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; align-items: center; gap: 14px; }
.pagination button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-size: 11px; }
.pagination button:hover:not(:disabled) { border-color: #83b5b0; background: #eef8f5; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.matrix-section { background: none; color: var(--ink); overflow: visible; }
.matrix-section .eyebrow, .matrix-intro, .search-control, .matrix-legend { color: var(--muted); }
.matrix-intro { max-width: 510px; margin-top: 8px; }
.matrix-controls { flex-wrap: wrap; }
.search-control { min-width: 210px; font-size: 10px; }
.search-control input { color: var(--ink); border-color: var(--line); background: #fff; padding: 9px 12px; font-size: 12px; }
.matrix-legend { margin: 0 0 16px; }
.matrix-wrap { border-color: var(--line); background: #fff; max-height: calc(100vh - 285px); min-height: 240px; }
th, td { border-color: #dce5ed; }
th { color: var(--muted); background: #eaf0f6; }
.matrix-wrap th:first-child, .matrix-wrap tbody th { background: #f8fafd; color: var(--ink); }
.matrix-wrap thead th:first-child { background: #eaf0f6; }
.matrix-wrap tbody tr:target th { background: #dceeea; }
.repo-sub, .repo-branches { color: var(--muted); }
.status-cell-complete { background: #eaf6ef; box-shadow: inset 3px 0 #73bc99; }
.status-cell-pr-open { background: #eaf1ff; box-shadow: inset 3px 0 #80a5dd; }
.status-cell-pending { background: #fff5df; box-shadow: inset 3px 0 #ddb76a; }
.status-cell-failed { background: #fcebf0; box-shadow: inset 3px 0 #d990a0; }
.status-cell-na { background: #f3f5f8; }
tbody tr:hover .status-cell { filter: brightness(.985); }
.target-details summary { color: var(--muted); }
.target-details[open] { max-height: 24rem; overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.status.na { color: #69778c; }
.revision-section { grid-template-columns: 1fr 1.4fr; gap: 48px; }
.revision-section > div > p:last-child { font-size: 13px; }
.revision-row { background: #fff; border-radius: 10px; font-size: 12px; }
.create-section { background: none; gap: 30px; }
.create-section p, .create-steps { font-size: 13px; }
.create-steps { background: #fff; padding: 24px 24px 24px 42px; border: 1px solid var(--line); border-radius: 12px; }
.privacy-note { background: #eaf0f7; padding: 16px; border-radius: 9px; }
.empty { padding: 30px 24px; background: #fff; border: 1px dashed #c7d3e0; border-radius: 12px; color: var(--muted); font-size: 13px; }
.action-grid > .empty, .change-grid > .empty { grid-column: 1 / -1; }
footer { margin-left: var(--sidebar-width); padding: 18px 32px; border-color: var(--line); flex-wrap: wrap; gap: 6px 20px; font-size: 10px; color: var(--muted); }
.audit-dialog { box-shadow: 0 24px 80px #0c203333; border-radius: 16px; }
.audit-dialog::backdrop { background: #101e32a6; backdrop-filter: blur(3px); }
.audit-dialog-heading h2 { font-size: 22px; }
.audit-field { font-size: 12px; }
.audit-dialog button { border-color: var(--line); border-radius: 8px; }
.audit-dialog .audit-primary:hover { background: #06655c; }
@media (min-width: 1700px) { main { padding-inline: 44px; } }
@media (max-width: 1250px) {
  .action-grid, .change-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: start; flex-direction: column; }
  .action-toolbar { width: 100%; max-width: none; display: flex; justify-content: space-between; align-items: center; }
  .matrix-controls { width: 100%; flex-direction: row; align-items: end; justify-content: space-between; }
  .hero-copy { max-width: 260px; }
}
@media (max-width: 960px) {
  :root { --sidebar-width: 0px; }
  .sidebar { position: static; width: auto; padding: 16px 20px 10px; }
  .brand { padding: 0; font-size: 14px; }
  .brand > span:last-child { display: block; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-label, .sidebar-note { display: none; }
  .view-nav { display: flex; overflow-x: auto; gap: 6px; padding: 12px 2px 4px; margin-top: 2px; scrollbar-width: thin; scrollbar-color: #526981 #122033; }
  .view-nav a { flex-shrink: 0; min-height: 44px; padding: 8px 12px; font-size: 11px; }
  .view-nav a > span { font-size: 17px; width: 16px; }
  .topbar { position: static; height: 52px; padding-inline: 22px; }
  main { padding-inline: 22px; min-height: calc(100vh - 240px); }
  .hero { padding-top: 24px; }
  .hero-heading { grid-template-columns: 1fr auto; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 14px; }
  .revision-section { grid-template-columns: 1fr; gap: 24px; }
  footer { padding-inline: 22px; }
}
@media (max-width: 640px) {
  .sidebar { padding-inline: 14px; }
  .topbar { padding: 0 16px; align-items: center; }
  .github-link { width: auto; font-size: 12px; overflow: visible; }
  .github-link::before { display: none; }
  main { padding-inline: 16px; }
  .hero-heading { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { text-align: left; max-width: none; font-size: 11px; }
  .hero-copy br { display: none; }
  .hero h1 { font-size: 30px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .stat, .stat:last-child, .stat:nth-child(-n+2) { min-height: 86px; padding: 12px; }
  .stat strong { font-size: 26px; }
  .stat small { display: none; }
  .stat span { font-size: 9px; letter-spacing: .025em; }
  .section { padding-block: 24px; }
  h2 { font-size: 21px; }
  .action-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .action-filters { flex-wrap: nowrap; width: 100%; }
  .action-filter { flex: 1 1 0; font-size: 9px; padding: 8px 5px; min-height: 44px; }
  .filter, .matrix-filter { min-height: 44px; }
  .action-grid, .change-grid { grid-template-columns: 1fr; }
  .start-here { padding: 16px; gap: 14px; }
  .start-here > div { grid-template-columns: 1fr; gap: 6px; }
  .action-card, .change-card { padding: 16px; }
  .action-context > summary, .action-evidence > summary, .change-description > summary { min-height: 44px; padding-block: 12px; }
  .audit-request-button { min-height: 44px; }
  .change-card h3 { min-height: 0; }
  .matrix-controls { flex-direction: column; align-items: stretch; }
  .matrix-filters, .search-control { width: 100%; }
  .matrix-card { border-color: var(--line); }
  .matrix-card > summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 76px; padding: 15px; cursor: pointer; }
  .matrix-card > summary::after { content: "+"; color: var(--muted); font-size: 20px; }
  .matrix-card[open] > summary::after { content: "−"; }
  .matrix-card > summary > span:first-child { flex: 1; min-width: 0; }
  .matrix-card > summary strong { font-size: 18px; overflow-wrap: anywhere; }
  .matrix-card > summary small { display: block; color: var(--muted); margin-top: 5px; font-size: 10px; overflow-wrap: anywhere; }
  .mobile-target-details { background: #fff; max-height: 28rem; overflow: auto; overscroll-behavior: contain; }
  .pagination { align-items: center; justify-content: center; }
  footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
