:root {
  --paper: #f6f7f9;
  --ink: #182331;
  --line: #e3e7ed;
  --muted: #536171;
  --brand-primary: #6d28d9;
  --brand-strong: #5b21b6;
  --brand-soft: #f3e8ff;
  --violet: var(--brand-primary);
  --violet-soft: var(--brand-soft);
}
body {
  font-size: 15px;
  line-height: 1.55;
}
.sidebar {
  width: 208px;
  padding: 28px 16px 20px;
}
.workspace {
  margin-left: 208px;
}
.brand {
  margin: 0 8px 36px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 0.1em;
}
.brand-mark {
  transform: none;
}
.topbar {
  min-height: 56px;
  height: 56px;
  padding: 0 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-button {
  display: none;
}
.topbar .aria-button {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}
.agent-team {
  margin: 24px 0;
  scroll-margin-top: 76px;
}
.aria-priority .assistant-focus {
  max-width: 860px;
}
#ai-agents-title {
  scroll-margin-top: 76px;
}
.team-intro {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--muted);
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.agent-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.agent-name {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--brand-strong);
}
.agent-name svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.agent-name h3 {
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}
.agent-purpose {
  color: var(--muted);
  margin: 8px 0;
  font-size: 13px;
}
.agent-current {
  margin: 8px 0 16px;
  font-size: 14px;
}
.agent-card .button {
  margin-top: auto;
  min-height: 44px;
  white-space: normal;
  text-align: left;
}
.aria-context {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin: -8px 0 24px;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--brand-primary);
  font-size: 14px;
}
.aria-context-voice {
  display: flex;
  align-items: start;
  gap: 10px;
  min-width: 0;
}
.aria-context-voice > span {
  color: var(--brand-strong);
  padding-top: 3px;
}
.aria-context svg {
  width: 18px;
  height: 18px;
}
.aria-context p {
  margin: 0;
}
.aria-context strong {
  margin-right: 5px;
  color: var(--brand-strong);
}
.aria-context > .button {
  flex-shrink: 0;
  min-height: 44px;
}
@media (max-width: 1100px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .agent-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .agent-card {
    padding: 16px;
  }
  .aria-context {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  .aria-context > .button {
    margin-left: 25px;
  }
  .topbar .aria-button {
    padding: 8px;
    font-size: 13px;
  }
}
.top-actions {
  margin-left: auto;
}
.search-button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 36px;
}
main {
  max-width: 1440px;
  padding: 24px 32px 40px;
}
h1,
.page-heading h1 {
  font-size: 28px;
  line-height: 34px;
}
h2,
.panel h2 {
  font-size: 21px;
  line-height: 28px;
  letter-spacing: -0.025em;
}
.page-heading {
  margin-bottom: 24px;
  align-items: start;
}
.profile-strip {
  min-height: 56px;
  padding: 0 0 16px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
  background: none;
}
.profile-strip .avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.profile-strip p {
  font-size: 14px;
}
.profile-strip span {
  font-size: 12px;
}
.profile-link {
  font-size: 13px;
}
.primary-nav {
  display: grid;
  gap: 8px;
}
.primary-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}
.primary-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.primary-nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.primary-nav-link:hover {
  background: #f0f2f6;
  color: var(--ink);
}
.rail-utility {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 20px 10px 0;
  font-size: 12px;
}
.rail-utility a {
  min-height: 36px;
  display: flex;
  align-items: center;
}
.rail-utility p {
  color: var(--muted);
  margin: 8px 0 0;
}
.mobile-dock {
  display: none;
}
.daily-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 32px;
  align-items: start;
}
.daily-layout > *,
.task-layout > * {
  min-width: 0;
}
.assistant-focus {
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-primary);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 6px 24px rgba(25, 35, 49, 0.035);
}
.assistant-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.assistant-identity svg {
  width: 19px;
  height: 19px;
}
.assistant-focus h2 {
  font-size: 26px;
  line-height: 34px;
  margin: 0 0 12px;
  max-width: 30ch;
}
.focus-reason {
  color: var(--muted);
  max-width: 60ch;
}
.focus-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 24px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.focus-facts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.focus-facts strong {
  font-size: 19px;
  font-weight: 650;
}
.focus-actions {
  margin: 20px 0 0;
}
.focus-continuation {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.focus-continuation strong {
  font-size: 12px;
  color: var(--ink);
}
.focus-continuation p {
  margin: 5px 0 0;
  max-width: 70ch;
}
.quiet-section {
  margin: 24px 0;
}
.quiet-section h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
.quiet-section .section-head h2 {
  margin: 0;
}
.quiet-section .section-head {
  margin-bottom: 8px;
}
.quiet-section .text-link {
  font-size: 12px;
}
.daily-support > .quiet-section:first-child {
  margin-top: 0;
}
.quiet-section .work-row {
  padding: 14px 0;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
}
.quiet-section .work-icon {
  display: none;
}
.quiet-section .work-row p {
  font-size: 13px;
  margin: 4px 0 0;
}
.quiet-section .work-row strong {
  font-size: 14px;
  font-weight: 650;
}
.quiet-section .work-row .button {
  min-width: 0;
  font-size: 12px;
}
.appointment-brief {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.appointment-brief p {
  margin: 0;
}
.quiet-disclosure {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  border-radius: 0;
  margin: 16px 0;
  padding: 0;
}
.quiet-disclosure summary {
  padding: 16px 0;
  font-size: 14px;
  font-weight: 650;
}
.context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  gap: 16px;
}
.context-tools {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  min-width: 128px;
}
.context-tools summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
.context-tools summary::after {
  content: "+";
  font-size: 17px;
}
.context-tools[open] summary::after {
  content: "−";
}
.context-tools nav {
  display: grid;
  min-width: 220px;
  padding: 8px;
  background: white;
  box-shadow: 0 8px 30px #18233115;
  border: 1px solid var(--line);
  border-radius: 10px;
  position: absolute;
  z-index: 8;
  right: 0;
  top: 48px;
}
.context-tools nav a,
.context-tools nav button {
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  border-radius: 6px;
}
.context-tools nav a:hover {
  background: var(--paper);
}
.context-tools nav a[aria-current] {
  background: var(--violet-soft);
}
.list-toolbar {
  align-items: center;
  flex-wrap: wrap;
}
.list-toolbar input {
  flex: 1;
  min-width: 160px;
}
.list-toolbar select {
  max-width: 190px;
}
.people-list {
  border-top: 1px solid var(--line);
}
.people-columns,
.person-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(125px, 0.6fr) minmax(
      260px,
      1.4fr
    );
  gap: 20px;
  padding: 20px 8px;
  align-items: center;
}
.people-columns {
  font-size: 12px;
  color: var(--muted);
  padding-block: 12px;
}
.person-row {
  border-top: 1px solid var(--line);
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.person-cell strong {
  display: block;
  font-size: 14px;
}
.person-cell small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.person-stage {
  color: var(--muted);
  font-size: 13px;
}
.person-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}
.person-next strong {
  font-size: 13px;
  font-weight: 600;
}
.person-next .button {
  font-size: 12px;
}
.compact-plan {
  border: 0;
  border-left: 2px solid var(--brand-primary);
  background: white;
  box-shadow: none;
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
}
.compact-plan .eyebrow {
  font-size: 12px;
  margin: 0 0 6px;
  letter-spacing: 0;
}
.story-facts {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
}
.story-facts > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
}
.story-facts dt {
  color: var(--muted);
  font-size: 13px;
}
.story-facts dd {
  margin: 0;
  font-size: 14px;
}
.tool-links {
  display: grid;
  justify-items: start;
}
.guided-task {
  max-width: 1100px;
}
.guided-task > .button,
.guided-task > .text-link {
  margin-bottom: 20px;
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(220px, 1fr);
  gap: 28px;
  align-items: start;
}
.task-layout .assistant-focus h2 {
  font-size: 24px;
  line-height: 32px;
}
.conversation-prep {
  margin: 24px 0;
}
.conversation-prep label {
  font-weight: 650;
  display: block;
  margin-bottom: 8px;
}
.conversation-prep textarea {
  width: 100%;
  min-height: 105px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #a5afba;
  background: #faf9fc;
  border-radius: 10px;
  line-height: 1.6;
}
.conversation-prep .hint {
  font-size: 12px;
  margin-top: 6px;
}
.task-result {
  border-left: 3px solid #477858;
  padding: 0 0 0 16px;
  margin: 20px 0;
}
.task-result p {
  margin: 8px 0;
}
.task-layout aside details {
  margin-bottom: 16px;
}
.tools-dialog {
  width: min(860px, calc(100vw - 48px));
  max-width: 860px;
}
.tools-dialog .dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  border-bottom: 1px solid var(--line);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.tool-query {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #929caa;
  border-radius: 9px;
  min-height: 48px;
}
.directory-utilities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.directory-utilities a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.tools-dialog .dialog-head button {
  width: auto;
  min-width: 60px;
  min-height: 44px;
  font-size: 14px;
}
.sent-handoff {
  padding: 24px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.tool-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tool-group {
  min-width: 0;
}
.tool-group h3 {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 8px;
}
.tool-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.tool-group a:hover {
  color: var(--violet);
}
.tool-group a svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.tool-group a small {
  display: block;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.context-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.context-return svg,
[data-return] svg {
  transform: rotate(180deg);
}
.outcome-choices {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.preparation-status {
  margin: 20px 0;
  display: grid;
  gap: 16px;
}
.preparation-status dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.preparation-status dd {
  margin: 0;
  line-height: 1.55;
}
[hidden] {
  display: none !important;
}
.prototype-bar {
  position: static;
  margin-top: auto;
  padding: 10px 28px;
  background: transparent;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.prototype-bar button {
  min-height: 36px;
  font-size: 11px;
}
.button {
  min-height: 44px;
  border-radius: 8px;
}
.job-detail > .job-current {
  border-top: 3px solid var(--brand-primary);
  box-shadow: 0 6px 24px #18233108;
}
.job-current h2 {
  font-size: 24px;
  line-height: 32px;
}
.page-heading + .context-bar {
  margin-top: -8px;
}
@media (min-width: 851px) {
  main {
    animation: work-appear 160ms ease-out;
  }
}
@keyframes work-appear {
  from {
    opacity: 0.85;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1100px) {
  .daily-layout {
    gap: 24px;
    grid-template-columns: minmax(0, 1.55fr) minmax(210px, 1fr);
  }
  .people-columns,
  .person-row {
    grid-template-columns: minmax(180px, 1fr) 100px minmax(160px, 1fr);
    gap: 14px;
  }
  .assistant-focus {
    padding: 24px;
  }
}
@media (max-width: 850px) {
  .workspace {
    margin-left: 0;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 52px;
    min-height: 52px;
    padding: 0 16px;
  }
  .breadcrumb {
    max-width: 50vw;
    font-size: 12px;
  }
  .search-button {
    min-width: 44px;
    min-height: 40px;
  }
  .search-button .search-long,
  .search-button kbd {
    display: none;
  }
  .topbar .search-button .search-short {
    display: inline !important;
  }
  .topbar .search-button {
    width: auto;
    min-height: 48px;
    padding: 8px;
  }
  .sample-indicator {
    font-size: 11px;
  }
  main {
    padding: 16px 16px 24px;
  }
  .mobile-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 64px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
  }
  .mobile-dock .primary-nav-link {
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    border-radius: 8px;
  }
  .mobile-dock svg {
    width: 19px;
    height: 19px;
  }
  .profile-strip {
    min-height: 52px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  h1,
  .page-heading h1 {
    font-size: 24px;
    line-height: 30px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading .subheading {
    font-size: 13px;
    line-height: 20px;
  }
  .assistant-focus {
    padding: 20px;
  }
  .assistant-focus h2 {
    font-size: 23px;
    line-height: 30px;
  }
  .assistant-identity {
    margin-bottom: 12px;
    font-size: 12px;
  }
  .daily-layout,
  .task-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .focus-reason {
    font-size: 14px;
    line-height: 22px;
  }
  .focus-facts {
    margin: 16px 0;
    gap: 12px;
    padding: 12px 0;
  }
  .focus-facts strong {
    font-size: 18px;
  }
  .focus-facts span {
    font-size: 11px;
  }
  .focus-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .focus-actions .button {
    flex: none;
    width: auto;
  }
  .focus-continuation {
    margin-top: 16px;
    padding-top: 12px;
    font-size: 12px;
    line-height: 19px;
  }
  .quiet-section {
    margin: 24px 0;
  }
  .daily-support > .quiet-section:first-child {
    margin-top: 16px;
  }
  .quiet-section .work-row {
    flex-wrap: nowrap;
    align-items: center;
  }
  .quiet-section .work-row .button {
    width: auto;
    margin: 0;
    flex: none;
  }
  .quiet-section .work-row > .grow {
    min-width: 0;
  }
  .people-columns {
    display: none;
  }
  .person-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 18px 0;
  }
  .person-stage {
    padding-left: 52px;
    margin-top: -5px;
  }
  .person-next {
    padding-left: 52px;
  }
  .list-toolbar input {
    min-width: 100%;
  }
  .list-toolbar select {
    flex: 1;
    min-width: 130px;
    max-width: none;
  }
  .context-tools {
    min-width: 115px;
  }
  .context-tools nav {
    max-width: calc(100vw - 32px);
  }
  .context-bar {
    gap: 8px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .tool-groups {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tools-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tools-dialog .dialog-body {
    padding: 12px 20px;
  }
  .tools-dialog .dialog-head {
    padding: 12px 20px;
  }
  .tools-dialog .dialog-head button,
  .tools-dialog .directory-utilities .button,
  .tools-dialog .directory-utilities a {
    min-height: 48px;
  }
  .tool-directory[data-expanded="false"] .tool-groups {
    gap: 0;
  }
  .tool-directory[data-expanded="false"] .tool-group h3 {
    display: none;
  }
  .tool-directory[data-expanded="false"] .tool-group a {
    padding: 8px 0;
    min-height: 48px;
  }
  .tool-directory[data-expanded="false"] .tool-group a small {
    margin-top: 2px;
  }
  .tool-directory > .hint {
    margin: 8px 0;
  }
  .directory-utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 0;
    gap: 8px;
  }
  .directory-utilities .button,
  .directory-utilities a {
    font-size: 13px;
    line-height: 18px;
    text-align: left;
  }
  .prototype-bar {
    padding: 12px 16px;
    align-items: start;
  }
  .prototype-bar span {
    max-width: 210px;
  }
  .guided-task > .button,
  .guided-task > .text-link {
    margin-bottom: 12px;
  }
  .task-layout .assistant-focus h2 {
    font-size: 22px;
    line-height: 30px;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 350px) {
  .guided-task > .button,
  .guided-task > .text-link {
    margin-bottom: 4px;
  }
  .guided-task > .page-heading {
    margin-bottom: 8px;
  }
  .guided-task .assistant-focus {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .task-context-return {
    margin-bottom: 8px;
  }
  .task-parent-tools {
    margin: 16px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* R5 keeps the existing type and color system; decisions and work use less space. */
.page-heading {
  margin-bottom: 18px;
}
.decision-compact {
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: none;
}
.decision-compact h2 {
  font-size: 22px;
  line-height: 28px;
  margin: 8px 0;
}
.decision-compact .assistant-identity {
  font-size: 13px;
  margin: 0;
  flex-wrap: wrap;
  gap: 6px;
}
.decision-status {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}
.decision-compact .focus-reason {
  margin: 6px 0 12px;
  max-width: 76ch;
  font-size: 14px;
}
.decision-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 14px;
  margin: 8px 0 12px;
}
.decision-facts strong {
  font-weight: 650;
}
.decision-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 8px 16px;
}
.decision-controls > .button {
  min-height: 44px;
}
.decision-details {
  padding: 0;
  border: 0;
  background: none;
  margin: 0;
  flex: 1;
  min-width: 90px;
}
.decision-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
}
.decision-details > div {
  font-size: 14px;
  padding: 8px;
}
.decision-details p {
  margin: 0 0 8px;
}
.decision-details .button {
  min-height: 44px;
}
.aria-priority .assistant-focus {
  max-width: none;
}
.aria-overview > .page-heading {
  margin-bottom: 14px;
}
.agent-team {
  margin: 20px 0 12px;
}
.agent-team h2 {
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 4px;
}
.team-intro {
  font-size: 14px;
  line-height: 20px;
  margin: 0 0 10px;
}
.agent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
  border-bottom: 1px solid var(--line);
}
.agent-card {
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
.agent-card h3 {
  font-size: 14px;
  line-height: 20px;
  margin: 0;
  font-weight: 650;
}
.agent-status {
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  margin: 2px 0;
}
.agent-card .button {
  font-size: 14px;
  line-height: 19px;
  margin: 0;
  padding: 4px 0;
  min-height: 44px;
  max-width: 100%;
  justify-content: start;
}
.home-focus {
  max-width: none;
}
.home-support {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.home-support .quiet-section {
  margin: 20px 0 8px;
}
.home-support .work-row {
  padding: 8px 0;
}
.quiet-section .work-row .button {
  min-height: 44px;
  font-size: 13px;
}
.contact-status {
  font-size: 14px;
  margin: -4px 0 16px;
  color: var(--muted);
}
.deal-summary > .section-head {
  align-items: start;
}
.deal-summary > .section-head h2 {
  font-size: 21px;
  margin: 0 0 4px;
}
.deal-summary > .section-head p {
  margin: 0 0 12px;
  color: var(--muted);
}
.deal-summary .property-art {
  max-width: 420px;
}
.task-list .list-toolbar {
  margin: 0 0 12px;
}
.task-list .panel {
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  margin: 0 0 20px;
}
.task-list .panel > h2 {
  font-size: 17px;
  line-height: 24px;
  margin: 0 0 6px;
}
.task-list .work-row {
  padding: 10px 0;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid var(--line);
}
.task-list .work-icon {
  display: none;
}
.task-list .work-row .button {
  min-height: 44px;
}
.focused-lesson {
  max-width: 760px;
}
.focused-lesson h2 {
  font-size: 23px;
  line-height: 30px;
  margin: 8px 0 12px;
}
.focused-lesson blockquote {
  margin: 14px 0;
}
.focused-lesson .example-line {
  margin: 16px 0;
}
.aria-context {
  font-size: 14px;
  margin-bottom: 16px;
  padding-block: 4px;
}
.context-return,
.context-bar {
  margin-bottom: 12px;
}
.quiet-disclosure summary {
  min-height: 44px;
}
@media (max-width: 640px) {
  .aria-overview > .page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 12px;
  }
  .aria-overview > .page-heading .context-tools {
    min-width: 0;
    width: auto;
  }
  .aria-overview > .page-heading .context-tools summary {
    padding-inline: 9px;
  }
  .aria-overview > .page-heading h1 {
    font-size: 25px;
    line-height: 30px;
  }
  .aria-overview > .page-heading p {
    font-size: 14px;
    line-height: 20px;
    margin-top: 4px;
  }
  .decision-compact {
    padding: 14px;
  }
  .decision-compact h2 {
    font-size: 20px;
    line-height: 25px;
    margin: 6px 0;
  }
  .decision-compact .assistant-identity {
    font-size: 12px;
    line-height: 17px;
  }
  .decision-status {
    margin-left: 0;
  }
  .decision-controls {
    gap: 6px 8px;
  }
  .decision-controls > .button {
    font-size: 14px;
    padding-inline: 12px;
  }
  .decision-details {
    min-width: 68px;
  }
  .decision-facts {
    gap: 2px 10px;
    font-size: 13px;
    line-height: 19px;
    margin: 6px 0 10px;
  }
  .agent-team {
    margin: 16px 0 10px;
  }
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
  .agent-card {
    padding: 8px 0;
  }
  .agent-card h3 {
    font-size: 14px;
    line-height: 20px;
  }
  .agent-status {
    font-size: 12px;
    line-height: 17px;
  }
  .agent-card .button {
    font-size: 14px;
    line-height: 20px;
    min-height: 44px;
    padding: 3px 0;
  }
  .team-intro {
    font-size: 13px;
    line-height: 18px;
    margin-bottom: 8px;
  }
  .home-support {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .home-support .quiet-section {
    margin: 16px 0 8px;
  }
  .contact-status {
    margin: 0 0 12px;
  }
  .task-list .work-row {
    gap: 8px;
  }
  .task-list .work-row .button {
    width: auto;
    margin-left: 0;
  }
}

/* R5c: palette only; existing dimensions, content and state behavior remain. */
.button.primary:not(:disabled) {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 3px 7px #6d28d912;
}
.button.primary:not(:disabled):hover,
.button.primary:not(:disabled):active {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.primary-nav-link.active:hover,
.nav-link.active,
.subnav a.active,
.subnav .button.active,
.nav-children a[aria-current="page"],
.context-tools a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.nav-link.active svg,
.text-link,
.agent-card .button.quiet {
  color: var(--brand-strong);
}
.text-link:hover,
.agent-card .button.quiet:hover {
  color: var(--brand-primary);
}
.button.aria-button:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline-color: var(--brand-primary);
}
.button.primary[data-action="reset-confirm"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 3px 7px #bb263312;
}
.button.primary[data-action="reset-confirm"]:hover,
.button.primary[data-action="reset-confirm"]:active {
  background: #a8202d;
  border-color: #a8202d;
}
.button[data-action="work-cancel"],
.button[data-action="cancel-appointment"],
.button[data-action="discard-before-leaving"] {
  color: var(--red);
}

/* R6: named navigation, visible page sections and evidence-based first steps. */
.sidebar .brand {
  margin-bottom: 22px;
}
.primary-nav {
  gap: 2px;
}
.primary-nav-link {
  min-height: 44px;
  padding-block: 10px;
}
.close-menu {
  display: none;
}
.page-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: -4px 0 20px;
  border-bottom: 1px solid var(--line);
}
.page-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.page-sections a[aria-current="page"] {
  color: var(--brand-strong);
  border-color: var(--brand-primary);
}
.page-sections a:hover {
  color: var(--brand-strong);
}
.first-steps-row,
.first-step-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  background: var(--brand-soft);
  border-radius: 10px;
  font-size: 14px;
}
.first-steps-row strong,
.first-step-banner strong {
  color: var(--brand-strong);
}
.first-steps-row span {
  margin-left: 12px;
}
.first-steps-row .button,
.first-step-banner .button {
  min-height: 44px;
  color: var(--brand-strong);
}
.first-steps-row .button {
  flex-shrink: 0;
}
.first-step-banner p {
  margin: 4px 0 0;
}
.first-step-banner {
  scroll-margin-top: 76px;
}
.first-step-banner:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 4px;
}
.first-step-banner .actions {
  flex-shrink: 0;
}
.first-step-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  max-width: 780px;
}
.first-step-list li {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.first-step-list h2 {
  font-size: 18px;
  margin: 0 0 6px;
}
.first-step-list p {
  margin: 0 0 12px;
}
.step-complete {
  color: var(--green);
  font-weight: 650;
}
.destination-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.destination-list a {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
}
.destination-list strong {
  color: var(--brand-strong);
}
.destination-list span {
  color: var(--muted);
  font-size: 14px;
}
.list-actions {
  position: relative;
  margin-left: auto;
}
.list-actions summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.list-actions summary::after {
  content: "⌄";
  margin-left: 8px;
}
.list-actions[open] > div {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 8;
  background: white;
  border: 1px solid var(--line);
  padding: 12px;
  min-width: 220px;
  box-shadow: 0 8px 24px #18233112;
}
.list-actions[open] .button {
  display: flex;
  width: 100%;
}
.deals-overview > h2 {
  font-size: 18px;
  margin-top: 24px;
}
.aria-inline {
  color: var(--muted);
  font-size: 14px;
}
.aria-inline strong {
  color: var(--brand-strong);
  margin-right: 5px;
}
.deal-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-block: 1px solid var(--line);
}
.deal-list-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.deal-list-row h3 a {
  color: var(--brand-strong);
}
.deal-list-row p {
  margin: 4px 0;
  color: var(--muted);
}
.deal-list-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.deal-list-row .button {
  min-height: 44px;
}
@media (max-width: 850px) {
  .workspace {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .prototype-bar {
    z-index: auto;
    flex-wrap: wrap;
  }
  .prototype-bar span {
    min-width: 0;
    flex: 1 1 160px;
    max-width: none;
  }
  .prototype-bar button {
    flex: 0 0 auto;
  }
  .mobile-dock {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-dock .primary-nav-link {
    min-height: 48px;
    min-width: 0;
    font-size: 14px;
    padding: 5px 2px;
    gap: 2px;
  }
  .mobile-dock .primary-nav-link span {
    white-space: nowrap;
  }
  .mobile-dock svg {
    width: 17px;
    height: 17px;
  }
  .topbar {
    padding-inline: 12px;
    gap: 6px;
    min-height: 56px;
    height: 56px;
  }
  .topbar .menu-button {
    display: none;
  }
  .topbar .breadcrumb,
  .topbar .sample-indicator {
    display: none;
  }
  .topbar .top-actions {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
  }
  .topbar .aria-button {
    padding-inline: 8px;
    font-size: 14px;
    min-height: 44px;
    margin-left: auto;
  }
  .topbar .search-button {
    width: auto;
    min-width: 64px;
    flex-shrink: 0;
    padding: 6px;
    font-size: 14px;
    min-height: 44px;
  }
  .topbar .search-glyph,
  .topbar .aria-button .spark {
    display: none;
  }
  .sidebar,
  .sidebar.open,
  .shade {
    display: none;
  }
  .first-step-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .first-step-banner .actions {
    flex-wrap: wrap;
  }
  .first-steps-row span {
    display: block;
    margin: 2px 0 0;
    font-size: 13px;
  }
  .first-steps-row {
    gap: 8px;
    padding: 10px 12px;
  }
  .page-sections {
    gap: 0 14px;
    margin-bottom: 16px;
  }
  .page-sections a {
    font-size: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .all-tools-page > .page-heading {
    margin-bottom: 12px;
  }
  .all-tools-page > .aria-context {
    margin-bottom: 12px;
  }
  .all-tools-page .directory-utilities {
    display: flex;
    padding-top: 0;
  }
  .all-tools-page .tool-group h3 {
    margin-top: 8px;
  }
  .aria-overview > .page-heading {
    display: block;
  }
  .agent-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .agent-card {
    display: grid;
    grid-template-columns: minmax(110px, 0.9fr) minmax(0, 1.1fr);
    column-gap: 18px;
    padding: 14px 0;
  }
  .agent-card h3 {
    grid-column: 1;
    font-size: 15px;
    line-height: 21px;
    margin: 0;
  }
  .agent-card .agent-status {
    grid-column: 1;
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 19px;
  }
  .agent-card .button {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: start;
    text-align: left;
    min-height: 44px;
    font-size: 14px;
    line-height: 21px;
    padding-block: 5px;
  }
  .destination-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .deal-list-row {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .deal-list-row > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}
