:root {
  color: #172033;
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 20rem; min-height: 100vh; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0.2rem solid #263bc7;
  outline-offset: 0.2rem;
}
.sign-in-shell {
  display: grid;
  min-height: 100svh;
  padding: clamp(5rem, 11vh, 7rem) 1.5rem 3rem;
  place-items: start center;
  background: radial-gradient(circle at 50% 8%, rgb(79 102 246 / 8%), transparent 24rem), #fff;
}
.sign-in-panel { width: min(100%, 34rem); text-align: center; }
.sign-in-panel h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.sign-in-subtitle { margin: 0.85rem 0 2.5rem; color: #687084; font-size: 1.15rem; }
.project-create label, .passkey-create label { color: #4b5568; font-size: 0.9rem; font-weight: 650; }
.project-create input, .passkey-create input {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cfd6e2;
  border-radius: 0.6rem;
}
.inline-action input { flex: 1; }
#email-sign-in {
  display: grid;
  width: min(100%, 24rem);
  gap: 0.65rem;
  margin: 0 auto;
  text-align: left;
}
#email-sign-in label { color: #4b5568; font-size: 0.9rem; font-weight: 650; }
#email-sign-in input {
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cfd6e2;
  border-radius: 0.65rem;
  background: #fff;
}
.primary-action, .secondary-action button {
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 650;
}
.primary-action {
  margin-top: 0.45rem;
  border: 0;
  color: #fff;
  background: linear-gradient(100deg, #4d58e8, #0b7a99);
  box-shadow: 0 0.75rem 1.8rem rgb(52 91 214 / 22%);
}
.secondary-action { margin-top: 1rem; }
.passkey-sign-in-action { width: min(100%, 24rem); margin: 0 auto; }
.sign-in-primary {
  width: 100%;
  min-height: 3.25rem;
  margin: 0;
}
.secondary-action button { border: 1px solid #b9c3d5; color: #26345e; background: #fff; }
.sign-in-divider { margin: 1.9rem 0; color: #687084; font-size: 1.1rem; font-weight: 650; }
#sign-in-status { min-height: 1.5rem; margin: 1.35rem 0 0; color: #687084; }

.welcome-shell { display: grid; min-height: 100svh; padding: clamp(5rem, 11vh, 7rem) 1.5rem 3rem; place-items: start center; background: radial-gradient(circle at 50% 8%, rgb(79 102 246 / 8%), transparent 24rem), #fff; }
.welcome-panel { width: min(100%, 34rem); text-align: center; }
.welcome-panel h1 { margin: 0.5rem 0 1rem; font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.04em; line-height: 1.08; }
.welcome-panel > p:not(.brand-label):not(#passkey-status) { margin: 0 auto 2rem; max-width: 30rem; color: #4b5568; line-height: 1.55; }
.welcome-panel .primary-action { width: min(100%, 20rem); }
.quiet-link { color: #263bc7; font-weight: 650; }

.workspace-layout { display: flex; min-height: 100svh; }
.workspace-navigation {
  display: flex;
  position: sticky;
  top: 0;
  width: 14rem;
  height: 100svh;
  flex: 0 0 14rem;
  flex-direction: column;
  padding: 1.5rem 1rem;
  border-right: 1px solid #e1e5ee;
  background: #fff;
}
.workspace-brand { color: #263bc7; font-size: 1.1rem; font-weight: 750; letter-spacing: -0.03em; text-decoration: none; }
.workspace-navigation nav { display: grid; gap: 0.35rem; margin-top: 2.5rem; }
.workspace-nav-link { padding: 0.7rem 0.8rem; border-radius: 0.65rem; color: #26345e; font-weight: 650; text-decoration: none; }
.workspace-nav-link[aria-current="page"] { color: #263bc7; background: #eef0ff; }
/* The dock (docs/single-page-app-v1.md): the list, then the open projects. */
.app-view { flex: 1 1 auto; min-width: 0; }
.dock-projects { display: grid; gap: 0.15rem; margin: 0.35rem 0 0; padding: 0.35rem 0 0; border-top: 1px solid #edf0f5; list-style: none; }
.dock-projects:empty { display: none; }
.dock-entry { display: flex; align-items: center; gap: 0.15rem; min-width: 0; }
.dock-link { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-close { display: inline-grid; flex: none; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: 50%; color: #687084; background: transparent; font-size: 1.1rem; line-height: 1; place-items: center; }
.dock-close:hover { color: #172033; background: #eef0f5; }
.dock-full { width: min(100% - 2rem, 28rem); padding: 1.5rem; border: 1px solid #e1e5ee; border-radius: 1rem; color: #172033; background: #fff; box-shadow: 0 1rem 2.5rem rgb(30 43 80 / 18%); }
.dock-full::backdrop { background: rgb(23 32 51 / 40%); }
.dock-full h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.dock-full p { margin: 0 0 1rem; color: #4b5568; line-height: 1.5; }
.dock-full-list { display: grid; gap: 0.5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.dock-full-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.dock-full-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.dock-full-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }
.dock-full-actions .primary-action { margin-top: 0; }
.dock-full-actions .primary-action:disabled { cursor: default; opacity: 0.5; }
.account-menu { position: relative; margin-top: auto; }
.account-menu summary { display: flex; min-height: 3.35rem; align-items: center; gap: 0.65rem; padding: 0.45rem; border-radius: 0.75rem; color: #26345e; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: #f5f7fb; }
.account-avatar { display: grid; width: 2.35rem; height: 2.35rem; flex: 0 0 auto; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #4d58e8, #0b7a99); font-size: 0.78rem; font-weight: 760; place-items: center; }
.account-copy { display: grid; min-width: 0; }
.account-copy strong { overflow: hidden; font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { overflow: hidden; margin-top: 0.15rem; color: #7d8596; font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-popup {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 0;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e1e5ee;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.8rem 2rem rgb(30 43 80 / 14%);
}
.account-menu-popup { display: grid; gap: 0.15rem; }
.account-menu-link { min-height: 2.35rem; padding: 0.5rem 0.7rem; border-radius: 0.6rem; color: #26345e; font-size: 0.84rem; font-weight: 650; text-decoration: none; }
.account-menu-link:hover, .account-menu-link[aria-current="page"] { background: #f1f3f8; }
.account-menu-popup form, .account-menu-popup button { width: 100%; }
.account-menu-popup form { margin-top: 0.2rem; border-top: 1px solid #edf0f5; }
.account-shell { max-width: 48rem; }
.workspace-shell {
  flex: 1;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem);
}
.workspace-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.brand-label {
  margin: 0 0 0.35rem;
  color: #5965f2;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.workspace-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; }
.workspace-header p:last-child { margin: 0.5rem 0 0; color: #687084; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.workspace-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #e1e5ee;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgb(30 43 80 / 7%);
}
.workspace-card h2 { margin: 0 0 1rem; }
.workspace-card h3 { margin: 1.75rem 0 0.75rem; font-size: 1rem; }
.project-list, #passkey-list, #passkey-audit-list { display: grid; gap: 0.65rem; padding: 0; list-style: none; }
.project-list:empty::after { content: "No projects yet."; color: #687084; }
.project-list a { color: #263bc7; font-weight: 650; }
#project-create-status { min-height: 1.25rem; color: #687084; font-size: 0.9rem; }
.project-create, .passkey-create { display: grid; gap: 0.6rem; margin-top: 1.75rem; }
.inline-action { display: flex; gap: 0.6rem; }
.secondary-button, .quiet-action {
  min-height: 2.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid #b9c3d5;
  border-radius: 999px;
  color: #26345e;
  background: #fff;
  font-weight: 650;
}
.account-menu-popup .quiet-action { border: 0; border-radius: 0; color: #a23b48; text-align: left; }
#passkey-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
#passkey-status, #passkey-list-status, #passkey-audit-status { min-height: 1.25rem; color: #687084; font-size: 0.9rem; }
.welcome-panel #passkey-status { min-height: 1.5rem; margin: 1rem 0; color: #687084; }
.revoke-passkey { min-height: 2rem; padding: 0.3rem 0.75rem; }
#passkey-audit { margin-top: 2rem; border-top: 1px solid #e1e5ee; }
.audit-description { color: #687084; font-size: 0.9rem; line-height: 1.5; }
#passkey-audit-list li { padding: 0.75rem; border-radius: 0.65rem; background: #f5f7fb; }
.audit-event-heading { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 650; }
.audit-event-heading time { color: #687084; font-size: 0.78rem; font-weight: 400; }
.audit-evidence { display: grid; gap: 0.25rem; margin-top: 0.5rem; color: #4b5568; font-size: 0.78rem; }
.audit-evidence code { overflow-wrap: anywhere; color: #26345e; }
#passkey-audit-more { min-height: 2rem; padding: 0.3rem 0.75rem; }

.project-shell {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0;
}
.project-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.project-header h1 { margin: 0.6rem 0 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; }
.project-header p { margin: 0.5rem 0 0; color: #687084; }
.project-next-card { margin-bottom: 1.25rem; border-left: 0.3rem solid #344bc2; }
.project-next-card[hidden] { display: none; }
.project-next-card h2 { margin: 0.25rem 0 0.4rem; }
.project-next-card p:not(.brand-label) { margin: 0 0 1rem; line-height: 1.5; }
.back-link, .data-links a, .source-card a { color: #263bc7; font-weight: 650; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 1fr); gap: 1.25rem; align-items: start; }
.project-grid > * { min-width: 0; }
.pattern-reader-card { margin-bottom: 1.25rem; }
.reader-description { max-width: 48rem; color: #4b5568; line-height: 1.55; }
#pattern-attachment-form, #pattern-reader-form { display: grid; gap: 1rem; }
#pattern-attachment-form[hidden], #pattern-reader-form[hidden] { display: none; }
.reader-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
#pattern-attachment-form label, #pattern-reader-form label {
  display: grid;
  gap: 0.4rem;
  color: #4b5568;
  font-size: 0.9rem;
  font-weight: 650;
}
#pattern-attachment-form input, #pattern-reader-form select {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cfd6e2;
  border-radius: 0.6rem;
  color: #172033;
  background: #fff;
}
#pattern-attach, #pattern-start { justify-self: start; }
#pattern-reader-status { min-height: 1.25rem; color: #687084; }
#pattern-presentation { padding-top: 1.25rem; border-top: 1px solid #e1e5ee; }
.reader-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.reader-heading h3 { margin: 0; font-size: 1.5rem; }
#pattern-selected-size { margin: 0; color: #26345e; font-weight: 700; }
.reader-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reader-tracks section { min-width: 0; }
.reader-tracks h4 { margin: 1.5rem 0 0.65rem; }
.reader-tracks ol, .reader-tracks ul { display: grid; gap: 0.65rem; margin: 0; padding-left: 1.25rem; }
#pattern-presentation li { padding: 0.7rem; border-radius: 0.65rem; background: #f5f7fb; line-height: 1.5; }
.instruction-context { display: block; margin-bottom: 0.3rem; color: #687084; font-size: 0.78rem; }
#pattern-glossary { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 0.8rem; margin: 0; }
#pattern-glossary dt { font-weight: 700; }
#pattern-glossary dd { margin: 0; color: #4b5568; }
#pattern-more { margin-top: 1.25rem; }
.package-reader-card { margin-bottom: 1.25rem; }
#package-upload, #package-colors { display: grid; gap: 0.8rem; justify-items: start; }
#package-upload[hidden], #package-view[hidden] { display: none; }
#package-upload label, .package-size, #package-color-fields label { display: grid; gap: 0.4rem; color: #4b5568; font-size: 0.9rem; font-weight: 650; }
#package-size, #package-file, .color-role input:not([type="checkbox"]) { min-height: 2.75rem; padding: 0.4rem 0.7rem; border: 1px solid #cfd6e2; border-radius: 0.6rem; color: #172033; background: #fff; }
#package-items li { padding: 0.7rem; border-radius: 0.65rem; background: #f5f7fb; line-height: 1.5; }
#package-items .package-note { border-left: 0.3rem solid #8190b5; }
.package-pager { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
#package-glossary { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 0.8rem; margin: 0; }
#package-glossary dt { font-weight: 700; }
#package-glossary dd { margin: 0; color: #4b5568; }
#package-colors { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e1e5ee; }
#package-color-fields { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); width: 100%; }
.color-role { display: grid; gap: 0.45rem; margin: 0; padding: 0.8rem; border: 1px solid #e1e5ee; border-radius: 0.65rem; }
#package-instructions-title:focus-visible, .visual-zoom:focus-visible { outline: 3px solid #263bc7; outline-offset: 3px; }
.color-role legend { font-weight: 700; }
.color-role input[type="checkbox"] { width: 1.5rem; height: 1.5rem; margin: 0; }
.visual-chart { margin: 0; }
.visual-zoom { display: block; padding: 0; border: 1px solid #cfd6e2; border-radius: 0.4rem; background: #fff; cursor: zoom-in; }
.visual-image { display: block; max-width: 100%; height: auto; min-width: 8rem; image-rendering: pixelated; }
.visual-caption { margin-top: 0.4rem; font-weight: 650; }
.visual-attribution, .visual-notice { margin: 0.3rem 0 0; color: #4b5568; font-size: 0.85rem; }
.visual-unavailable { margin: 0; font-weight: 650; }
.visual-zoom-dialog { max-width: 95vw; max-height: 95vh; padding: 1rem; border: 1px solid #cfd6e2; border-radius: 0.8rem; }
.visual-zoom-dialog::backdrop { background: rgb(23 32 51 / 0.6); }
.visual-zoom-frame { overflow: auto; max-height: 80vh; }
.visual-zoom-image { display: block; width: min(80vw, 60rem); height: auto; image-rendering: pixelated; }
.visual-zoom-close { margin-bottom: 0.6rem; }
.visual-photos { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e1e5ee; }
.visual-photo { margin: 0.8rem 0 0; }
.visual-photo .visual-image { border: 1px solid #cfd6e2; border-radius: 0.4rem; }
#package-illustration { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e1e5ee; }
.visual-illustration { display: grid; gap: 0.6rem; justify-items: start; }
.visual-illustration-notice, .visual-illustration-status { margin: 0; color: #4b5568; line-height: 1.5; }
.visual-illustration-stage { width: 100%; max-width: 40rem; }
.visual-illustration-canvas { display: block; width: 100%; height: auto; border: 1px solid #cfd6e2; border-radius: 0.6rem; background: #f5f7fb; touch-action: none; }
.visual-illustration-canvas:focus-visible { outline: 3px solid #263bc7; outline-offset: 3px; }
.visual-colors { display: grid; gap: 0.4rem; margin: 0 0 0.4rem; padding: 0; list-style: none; }
.visual-color { display: flex; align-items: center; gap: 0.5rem; }
.visual-swatch { display: inline-block; flex: none; width: 1.25rem; height: 1.25rem; border: 1px solid #172033; border-radius: 0.3rem; }
.visual-swatch-unset { background: repeating-linear-gradient(45deg, #fff 0 3px, #9aa3b5 3px 5px); }
#package-status, #package-upload-status, #package-color-status { min-height: 1.25rem; color: #4b5568; }
.note-create, .note-search, #source-upload { display: grid; gap: 0.6rem; }
#note-create label, #note-search label, #source-upload label { color: #4b5568; font-size: 0.9rem; font-weight: 650; }
.note-create textarea {
  min-height: 9rem;
  resize: vertical;
  padding: 0.8rem;
  border: 1px solid #cfd6e2;
  border-radius: 0.6rem;
}
.note-create .primary-action { justify-self: start; }
.note-search { margin-top: 1.5rem; }
#note-search input, #source-upload input {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cfd6e2;
  border-radius: 0.6rem;
}
.data-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 0; }
.note-list { display: grid; gap: 0.75rem; padding: 0; list-style: none; }
#project-notes li { padding: 0.85rem; border-radius: 0.65rem; background: #f5f7fb; }
#project-notes time { display: block; margin-bottom: 0.45rem; color: #687084; font-size: 0.8rem; }
#project-notes pre, #inspection-report pre { margin: 0; overflow: auto; white-space: pre-wrap; word-break: break-word; }
#note-more { min-height: 2rem; margin-top: 0.25rem; padding: 0.3rem 0.75rem; }
#note-create-status, #note-list-status { min-height: 1.25rem; color: #687084; font-size: 0.9rem; }
.source-card > p { color: #4b5568; line-height: 1.55; overflow-wrap: anywhere; }
.source-card code { overflow-wrap: anywhere; }
#source-upload { margin: 1.25rem 0; }
#source-upload button { justify-self: start; }
#source-status { min-height: 1.25rem; color: #687084; }
#inspection-report { margin-top: 1rem; }
#inspection-report summary { cursor: pointer; color: #26345e; font-weight: 650; }
#inspection-report pre { max-height: 28rem; margin-top: 1rem; padding: 0.8rem; border-radius: 0.65rem; background: #f5f7fb; font-size: 0.8rem; }

.acknowledgement-shell, .consume-shell {
  display: grid;
  min-height: 100svh;
  padding: clamp(5rem, 11vh, 7rem) 1.5rem 3rem;
  place-items: start center;
  background: radial-gradient(circle at 50% 8%, rgb(79 102 246 / 8%), transparent 24rem), #fff;
}
.acknowledgement-panel, .consume-panel {
  width: min(100%, 34rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid #e1e5ee;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgb(30 43 80 / 7%);
  text-align: center;
}
.acknowledgement-panel h1, .consume-panel h1 { margin: 0; font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.04em; }
.acknowledgement-panel a, .consume-panel a { color: #263bc7; font-weight: 650; }
.acknowledgement-panel > p:not(.brand-label) { color: #4b5568; line-height: 1.55; }
.acknowledgement-detail { font-size: 0.9rem; }
#consume-status { min-height: 1.5rem; margin: 1rem 0; color: #687084; }

.pdf-review-card { margin-bottom: 1.25rem; }
.pdf-review-card[hidden] { display: none; }
.pdf-review-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pdf-review-header h2 { margin-bottom: 0.25rem; }
.pdf-review-state { padding: 0.4rem 0.75rem; border-radius: 999px; background: #fff2df; color: #785023; font-size: 0.82rem; font-weight: 700; }
.pdf-review-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr); gap: 1.5rem; }
.pdf-review-grid h3 { margin-top: 0.75rem; }
.pdf-review-grid ul { display: grid; gap: 0.65rem; padding: 0; list-style: none; }
#pdf-review .pdf-review-grid li { padding: 0.85rem; border: 1px solid #e1e5ee; border-radius: 0.7rem; background: #f9faff; }
.pdf-review-grid li strong, .pdf-review-grid li span { display: block; }
.pdf-review-grid li span, .pdf-review-footnote { color: #4b5568; font-size: 0.9rem; line-height: 1.5; }
#pdf-review .pdf-review-grid li a { display: inline-block; margin-top: 0.45rem; color: #263bc7; font-weight: 650; }
#pdf-review .pdf-review-grid li a + a { margin-left: 0.9rem; }
.pdf-review-footnote { margin-bottom: 0; }
#pdf-review .pdf-review-lines { margin: 1.25rem 0; }
#pdf-review .pdf-review-lines summary { cursor: pointer; font-weight: 700; }
#pdf-review .pdf-review-lines p { color: #4b5568; font-size: 0.9rem; line-height: 1.5; }
#pdf-review .pdf-review-lines ol { max-height: 28rem; overflow-y: auto; padding-left: 2.5rem; }
#pdf-review .pdf-review-lines li { padding: 0.45rem 0.2rem; overflow-wrap: anywhere; }
#pdf-review-notes { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e1e5ee; }
#pdf-review-notes[hidden], #pdf-review-line-form[hidden], #pdf-review-visual-form[hidden] { display: none; }
#pdf-review-notes h3 { margin-bottom: 0.35rem; }
#pdf-review #pdf-review-notes p { color: #4b5568; line-height: 1.5; }
#pdf-review-notes form { display: grid; gap: 0.5rem; max-width: 36rem; margin: 1rem 0; }
#pdf-review-notes textarea { min-height: 5rem; }
#pdf-review-notes input[type="file"] { box-sizing: border-box; max-width: 100%; }
#pdf-review .pdf-review-decisions { margin: 1rem 0; padding: 0.85rem 1rem; border: 1px solid #dce2f2; border-radius: 0.7rem; background: #f7f9ff; }
#pdf-review .pdf-review-decisions ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
#pdf-review #pdf-review-notes .pdf-review-decisions a { display: inline-block; box-sizing: border-box; min-height: 2.75rem; padding: 0.6rem 0.8rem; border-radius: 0.5rem; color: #263bc7; background: #fff; font-weight: 650; }
#pdf-review-notes form button { justify-self: start; }
#pdf-review .pdf-review-note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
#pdf-review .pdf-review-note-actions input { display: block; margin-top: 0.35rem; }
#pdf-review #pdf-review-notes section { margin-top: 1.25rem; }
#pdf-review #pdf-review-notes section ol { display: grid; gap: 0.6rem; padding-left: 1.6rem; }
#pdf-review #pdf-review-notes section li { overflow-wrap: anywhere; }
#pdf-review #pdf-review-notes section li button { margin-left: 0.4rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
/* Assistant pane, after Bionamic's personal assistant: a white card beside
   the page, one round toggle in the top-right corner, a borderless draft in
   a rounded prompt box with an icon send button. */
body.assistant-host { display: flex; align-items: stretch; min-height: 100vh; }
.assistant-page { flex: 1 1 auto; min-width: 0; }
.assistant-icon { display: block; width: 1rem; height: 1rem; }
.assistant-toggle { position: fixed; top: 11px; right: 14px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / 85%); color: #3d475c; cursor: pointer; }
.assistant-toggle .assistant-icon { width: 1.35rem; height: 1.35rem; }
.assistant-toggle:hover { background: #e6e9f0; color: #172033; }
.assistant-toggle.on { background: #cdddf4; color: #002b66; }
.assistant-toggle:focus-visible { outline: 3px solid #006aff; outline-offset: 2px; }
.assistant-dot { position: absolute; top: 1px; right: 2px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; background: #006aff; }
.assistant-dot[data-state="working"] { background: #b86e00; animation: assistant-breathe 1.4s ease-in-out infinite; }
@keyframes assistant-breathe { 50% { opacity: 0.35; } }
.assistant-resizer { flex: none; width: 6px; margin-left: -3px; cursor: col-resize; background: transparent; touch-action: none; }
.assistant-resizer:focus-visible { outline: none; }
.assistant-pane { position: sticky; top: 6px; display: flex; flex: none; flex-direction: column; box-sizing: border-box; width: var(--assistant-width, 400px); height: calc(100vh - 12px); margin: 6px 6px 6px 0; overflow: hidden; border: 1px solid #e1e5ee; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgb(23 32 51 / 6%), -6px 4px 18px rgb(23 32 51 / 8%); }
.assistant-pane[hidden] { display: none; }
body.assistant-modal-open { overflow: hidden; }
.assistant-header { flex: none; height: 48px; }
.assistant-body-area { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.assistant-empty { display: grid; flex: 1 1 auto; place-content: center; padding: 2rem; text-align: center; }
.assistant-empty[hidden] { display: none; }
.assistant-intro { margin: 0; color: #4b5568; font-size: 0.95rem; line-height: 1.5; }
.assistant-messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 20px; min-height: 0; margin: 0; padding: 1rem 0.9rem; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.assistant-messages:empty { display: none; }
.assistant-message { display: flex; flex-direction: column; color: #172033; font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }
.assistant-user { align-items: flex-end; padding-left: 15%; }
.assistant-user .assistant-body { box-sizing: border-box; max-width: 100%; padding: 8px 14px; border-radius: 18px; background: #e2ebf9; white-space: pre-wrap; }
#assistant-pane #assistant-messages p { margin: 0 0 0.5rem; }
#assistant-pane #assistant-messages p:last-child { margin-bottom: 0; }
#assistant-pane #assistant-messages div ul, #assistant-pane #assistant-messages div ol { margin: 0 0 0.5rem; padding-left: 1.25rem; }
#assistant-messages .assistant-body li { margin: 2px 0; }
#assistant-messages .assistant-body pre { margin: 0 0 0.5rem; padding: 0.6rem 0.75rem; overflow-x: auto; border-radius: 10px; background: #f1f3f7; color: #172033; }
.assistant-body code { padding: 1px 4px; border-radius: 4px; background: #f1f3f7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.assistant-body pre code { padding: 0; background: none; }
.assistant-working { display: flex; flex: none; align-items: center; gap: 8px; padding: 0 0.9rem 0.6rem; color: #4b5568; font-size: 0.85rem; }
.assistant-working[hidden] { display: none; }
.assistant-dots { display: inline-flex; gap: 3px; }
.assistant-dots span { width: 5px; height: 5px; border-radius: 50%; background: #8a93a6; animation: assistant-breathe 1.2s ease-in-out infinite; }
.assistant-dots span:nth-child(2) { animation-delay: 0.2s; }
.assistant-dots span:nth-child(3) { animation-delay: 0.4s; }
.assistant-stop { min-height: 1.5rem; padding: 2px 8px; border: 1px solid #cfd6e2; border-radius: 6px; background: #fff; color: #3d475c; font: inherit; cursor: pointer; }
.assistant-stop:disabled { cursor: default; opacity: 0.6; }
.assistant-error { margin: 0 0.75rem 0.5rem; padding: 8px 10px; border: 1px solid #a23b48; border-radius: 6px; color: #172033; font-size: 0.85rem; line-height: 1.4; }
.assistant-error:empty { display: none; }
.assistant-composer { flex: none; margin: 0 0.5rem 0.5rem; }
.assistant-prompt { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border: 1px solid #e1e5ee; border-radius: 12px; background: #fff; }
.assistant-prompt:focus-within { border-color: #7ba3db; }
#assistant-input { box-sizing: border-box; flex: 1 1 auto; min-width: 0; min-height: 36px; max-height: 180px; padding: 7px; border: 0; outline: 0; resize: none; background: transparent; color: #172033; font: inherit; font-size: 1rem; line-height: 22px; }
#assistant-input::placeholder { color: #6b7385; }
.assistant-send { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 8px; background: #006aff; color: #fff; cursor: pointer; }
.assistant-send:hover:not(:disabled) { background: #2b82ff; }
.assistant-send:disabled { cursor: default; opacity: 0.45; }
.assistant-send:focus-visible { outline: 3px solid #006aff; outline-offset: 2px; }
#pdf-review #pdf-review-notes .pdf-review-handoff { padding: 0.9rem 1rem; border: 1px solid #d9c7a2; border-radius: 0.7rem; background: #fffaf0; }
#pdf-review #pdf-review-notes .pdf-review-handoff h4 { margin-top: 0; }
#pdf-review #pdf-review-notes .pdf-review-handoff-state { color: #785023; font-weight: 700; }
#pdf-review #pdf-review-notes .pdf-review-handoff ol { display: grid; gap: 0.6rem; padding-left: 1.4rem; }
@media (prefers-reduced-motion: reduce) {
  .assistant-dot[data-state="working"], .assistant-dots span { animation: none; }
}
@media (max-width: 64rem) {
  .assistant-pane { position: fixed; inset: 0; z-index: 30; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
}

@media (max-width: 48rem) {
  .workspace-layout { display: block; }
  .workspace-navigation {
    width: 100%;
    height: auto;
    min-height: 0;
    flex: none;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-right: 0;
    border-bottom: 1px solid #e1e5ee;
  }
  .workspace-navigation nav { display: flex; align-items: center; gap: 0.35rem; min-width: 0; margin: 0; overflow-x: auto; }
  .workspace-nav-link { padding: 0.45rem 0.65rem; }
  .dock-projects { display: flex; gap: 0.25rem; margin: 0; padding: 0 0 0 0.35rem; border-top: 0; border-left: 1px solid #edf0f5; }
  .dock-link { max-width: 10rem; }
  .account-menu { margin: 0 0 0 auto; }
  .account-menu-popup { right: 0; bottom: auto; left: auto; width: 10rem; margin-top: 0.6rem; }
  .workspace-grid, .project-grid { grid-template-columns: 1fr; }
  .project-header { flex-wrap: wrap; gap: 1rem; }
  .reader-inputs, .reader-tracks, .pdf-review-grid { grid-template-columns: 1fr; }
  .pdf-review-header { align-items: start; flex-direction: column; }
  .inline-action { align-items: stretch; flex-direction: column; }
}
