/* Shell surfaces only. Authored documents keep their own palette. */
:root {
  color-scheme: light;
  --paper: #f5f3ef;
  --white: #fff;
  --ink: #292d31;
  --muted: #666c70;
  --line: #e3e2dc;
  --accent: #456b8a;
  --accent-hover: #365a77;
  --accent-tint: #eaf0f5;
  --accent-border: #b2c6d6;
  --on-accent: #fff;
  --header: #faf9f6;
  --canvas: #eeece7;
  --code: #f8f7f4;
  --hover: #f5f7f8;
  --hover-line: #b7c5cf;
  --placeholder: #70777e;
  --quote-ink: #4f6a80;
  --quote-bg: #f1f5f8;
  --danger: #a43c42;
  --danger-bg: #f7ebea;
  --danger-border: #edd9d7;
  --success: #4e7047;
  --success-bg: #edf2e9;
  --warning: #746044;
  --warning-bg: #f4efe5;
  --warning-border: #e5ddcc;
  --toast-bg: #292d31;
  --toast-ink: #fff;
  --backdrop: #25222c55;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #181c21;
  --white: #22282f;
  --ink: #e6ebef;
  --muted: #a8b2bd;
  --line: #46515e;
  --accent: #8cb9de;
  --accent-hover: #add2f0;
  --accent-tint: #2a3b4b;
  --accent-border: #597c99;
  --on-accent: #152231;
  --header: #1e242b;
  --canvas: #12171c;
  --code: #1b2128;
  --hover: #2c3540;
  --hover-line: #718599;
  --placeholder: #a2adb9;
  --quote-ink: #b7d0e5;
  --quote-bg: #283847;
  --danger: #ffb1ba;
  --danger-bg: #482b32;
  --danger-border: #8f5862;
  --success: #b0d6a7;
  --success-bg: #293e30;
  --warning: #e5c58f;
  --warning-bg: #3b3326;
  --warning-border: #776447;
  --toast-bg: #dce5ed;
  --toast-ink: #18212b;
  --backdrop: #0009;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
}
h1 {
  line-height: 1.15;
  font-family: var(--sans);
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
}
input,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.65;
}
input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 17px 0 7px;
}
label .muted {
  font-weight: 400;
  margin-left: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus,
textarea:focus {
  border-color: var(--accent);
}
::selection {
  background: var(--accent-tint);
}
button {
  border: 0;
  background: none;
}
button,
.button {
  transition:
    background 0.16s,
    border-color 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 37px;
  padding: 9px 15px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  line-height: 1.3;
  border: 1px solid transparent;
}
.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 2px 3px #45345b0c;
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.secondary {
  background: var(--white);
  border-color: var(--line);
}
.secondary:hover {
  background: var(--hover);
  border-color: var(--hover-line);
}
.subtle:hover {
  background: var(--accent-tint);
}
.danger {
  background: #9a4242;
  color: white;
  border-color: #9a4242;
}
.danger:hover:not(:disabled) {
  background: #803535;
}
.danger-text {
  color: var(--danger);
}
.full {
  width: 100%;
  justify-content: space-between;
}
.small-button {
  padding: 7px 12px;
  min-height: 31px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
.theme-toggle:hover {
  background: var(--hover);
}
.theme-toggle span {
  display: inline-flex;
}
.theme-toggle[aria-checked="false"] .theme-icon-moon,
.theme-toggle[aria-checked="true"] .theme-icon-sun {
  display: none;
}
.ui-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-button .ui-icon {
  width: 18px;
  height: 18px;
}
.icon-button {
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--accent-tint);
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.7px;
  color: var(--accent);
  margin-bottom: 13px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wordmark {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand-dot {
  color: var(--accent);
  display: none;
}
.artiflect-mark {
  display: inline-block;
  position: relative;
  color: var(--ink);
  width: 25px;
  height: 25px;
}
.artiflect-mark:before,
.artiflect-mark:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
}
.artiflect-mark:before {
  left: 0;
  top: 0;
  border-right: 0;
  border-bottom: 0;
}
.artiflect-mark:after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}
.tiny {
  width: 17px;
  height: 17px;
}
.tiny:before,
.tiny:after {
  width: 7px;
  height: 7px;
  border-width: 1.5px;
}
.mini-mark {
  color: var(--accent);
  font-size: 23px;
}
.avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent-tint);
  color: var(--quote-ink);
  font-size: 11px;
  border: 2px solid var(--white);
  border-radius: 50%;
  font-weight: 500;
}
.avatar.small {
  width: 25px;
  height: 25px;
  font-size: 9px;
  border-width: 1px;
}
.avatar.tiny-avatar {
  width: 20px;
  height: 20px;
  font-size: 8px;
}
.pill,
.version-mini {
  font-size: 10px;
  line-height: 1.5;
  background: var(--accent-tint);
  color: var(--quote-ink);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.sr-only {
  position: absolute !important;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  padding: 10px;
  background: var(--white);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
[hidden] {
  display: none !important;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--toast-bg);
  color: var(--toast-ink);
  border-radius: 7px;
  padding: 13px 18px;
  box-shadow: 0 7px 30px #30273c22;
  font-size: 12px;
  max-width: calc(100vw - 30px);
}
.error-toast {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  display: flex;
  gap: 20px;
  align-items: center;
}
.toast button {
  color: inherit;
  font-size: 20px;
}
.inline-error {
  padding: 13px 15px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: 6px;
  font-size: 12px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.library-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 10px;
}
.library-loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: library-loading-spin 0.8s linear infinite;
}
@keyframes library-loading-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .library-loading-spinner { animation: none; }
}
.empty-state {
  grid-column: 1/-1;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 9px;
  text-align: center;
}
.empty-symbol {
  display: inline-flex;
  color: var(--muted);
  margin-bottom: 20px;
}
.empty-symbol .ui-icon {
  width: 20px;
  height: 20px;
}
.empty-state h3 {
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
}
.empty-state p {
  font-size: 13px;
  color: var(--muted);
}
.library-notices {
  margin: 0 0 24px;
  padding: 14px 20px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-tint);
  font-size: 13px;
}
.library-notices li + li {
  margin-top: 4px;
}
.library-onboarding,
.library-search-empty {
  min-height: 0;
  padding: 32px;
  border-style: solid;
}
.library-onboarding h2,
.library-search-empty h2 {
  margin-bottom: 10px;
  font-size: 24px;
}
.library-onboarding > p,
.library-search-empty > p {
  max-width: 510px;
  font-size: 14px;
}
.library-onboarding .empty-symbol {
  color: var(--accent);
  padding: 12px;
  margin-bottom: 16px;
  background: var(--accent-tint);
  border-radius: 12px;
}
.library-onboarding .library-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
}
.library-empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.library-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin: 30px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-reset: workflow;
  text-align: left;
}
.library-workflow li {
  counter-increment: workflow;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 10px;
}
.library-workflow li::before {
  content: counter(workflow);
  grid-row: span 2;
  display: grid;
  place-items: center;
  align-self: start;
  height: 28px;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}
.library-workflow strong {
  font-weight: 600;
}
.library-workflow span {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}
.library-search-empty .button {
  margin-top: 20px;
}
.app-header {
  flex-shrink: 0;
  min-height: 52px;
  padding: 4px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.app-header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}
.app-header-nav > a {
  white-space: nowrap;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 0;
}
.user-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.user-row form {
  display: flex;
}
.user-row .icon-button {
  flex-shrink: 0;
}
.library-main {
  max-width: 1240px;
  margin: auto;
  padding: 43px 28px 40px;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.library-heading h1 {
  font: 620 27px/1.3 var(--sans);
  letter-spacing: -0.8px;
}
.library-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0 11px;
  width: 230px;
  height: 38px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 400;
}
.search input {
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.search input:focus {
  outline: none;
}
.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.artifact-grid > .artifact-count,
.artifact-grid > nav {
  grid-column: 1 / -1;
}
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 26px;
}
.artifact-card {
  display: block;
  min-width: 0;
  border-radius: 9px;
}
.card-preview {
  position: relative;
  aspect-ratio: 1.46;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow:
    0 3px 8px #252b3305,
    0 15px 35px #252b3306;
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    border-color 0.2s;
}
.artifact-card:hover .card-preview {
  transform: translateY(-2px);
  border-color: var(--hover-line);
  box-shadow:
    0 4px 10px #252b3308,
    0 13px 32px #252b3312;
}
/* The iframe element's color-scheme controls embedded prefers-color-scheme, too. */
.artifact-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 550px;
  border: 0;
  background: white;
  color-scheme: light;
  transform-origin: top left;
  pointer-events: none;
}
.artifact-thumbnail:not([srcdoc]) {
  visibility: hidden;
}
.thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--code);
}
.thumbnail-fallback strong {
  font-size: 17px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.thumbnail-fallback span {
  font-size: 12px;
}
.card-body {
  padding: 14px 2px 0;
}
.card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
}
.card-title h3 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 580;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-body > p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  padding: 28px 30px;
  box-shadow: 0 30px 120px #2d253c35;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(3px);
}
dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
dialog h2 {
  font: 600 20px/1.3 var(--sans);
  letter-spacing: -0.4px;
}
dialog header .eyebrow {
  margin-bottom: 8px;
}
dialog > p {
  font-size: 12px;
  margin: 13px 0 15px;
}
dialog footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
.save-dialog.share-dialog {
  width: min(650px, calc(100vw - 32px));
}
.share-link,
.access-fields,
.access-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.share-link input,
.access-name,
.access-principal {
  flex: 1;
  min-width: 0;
}
.share-link {
  margin: 20px 0;
}
.access-list {
  border-block: 1px solid var(--line);
  margin: 20px 0;
}
.access-row {
  padding: 14px 0;
  justify-content: space-between;
}
.access-row + .access-row {
  border-top: 1px solid var(--line);
}
.access-row small {
  display: block;
  color: var(--muted);
}
.access-row select {
  width: 140px;
}
.access-form .access-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: start;
}
.access-fields label {
  margin: 0 0 7px;
}
.access-fields input,
.access-fields select {
  width: 100%;
  height: 44px;
}
.share-link .button {
  align-self: stretch;
}
.access-form > .button {
  margin-top: 16px;
}
.access-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .access-form .access-fields {
    grid-template-columns: 1fr;
  }
}
.create-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
}
.create-dialog[open] {
  display: flex;
  flex-direction: column;
}
.create-dialog > header {
  flex-shrink: 0;
  padding: 20px 24px 16px;
}
.create-dialog > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.create-dialog-body {
  min-height: 0;
  padding: 0 24px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.create-intro {
  color: var(--muted);
  font-size: 13px;
}
.create-dialog label {
  margin-top: 14px;
}
.create-dialog .field-hint,
.create-dialog .security-note {
  font-size: 12px;
  line-height: 1.5;
}
.create-dialog .file-input {
  font-size: 13px;
}
.create-dialog .code-input {
  font-size: 12px;
}
.create-source {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.create-source summary {
  width: fit-content;
  color: var(--accent);
  font-weight: 550;
  cursor: pointer;
}
.create-source summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.create-dialog footer {
  flex-shrink: 0;
  flex-wrap: wrap;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.create-dialog footer .inline-error {
  flex-basis: 100%;
  margin: 0;
}
.save-dialog {
  width: 470px;
}
.code-input {
  font:
    11px/1.6 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  background: var(--code);
}
.file-input {
  padding: 8px;
  font-size: 11px;
  border-style: dashed;
}
.file-input::file-selector-button {
  background: var(--accent-tint);
  border: 0;
  color: var(--accent);
  padding: 6px 11px;
  border-radius: 4px;
  margin-right: 10px;
  cursor: pointer;
  font: inherit;
}
.field-hint {
  font-size: 9px;
  color: var(--muted);
  margin-top: 7px;
}
.security-note {
  font-size: 9px;
  color: var(--muted);
  margin-top: 11px;
}
.save-dialog label {
  margin-top: 22px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  padding: 42px 56px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f0eee7;
  position: relative;
  overflow: hidden;
}
.story-copy {
  margin: auto 0;
  padding: 60px 0;
  max-width: 475px;
}
.story-copy h1 {
  font-size: 51px;
  letter-spacing: -1.8px;
  line-height: 1.12;
}
.story-copy > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.9;
  color: #938b95;
  max-width: 330px;
  margin-top: 23px;
}
.story-note {
  margin: 60px 0 0 40px;
  border: 1px solid #d6cddc;
  background: #f4f1f6;
  width: 260px;
  padding: 25px 30px 30px;
  position: relative;
  transform: rotate(-4deg);
  box-shadow: 6px 6px 0 #e4dfdf;
}
.story-note:before {
  content: "";
  position: absolute;
  right: -5px;
  top: -5px;
  width: 18px;
  height: 18px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}
.note-mark {
  color: #afa1bf;
  font: 45px/1 var(--serif);
}
.story-note p {
  font: 27px/1.18 var(--serif);
  color: #766285;
  letter-spacing: -0.4px;
}
.note-line {
  display: block;
  width: 43px;
  height: 1px;
  background: #c4b7d0;
  margin-top: 21px;
}
.login-story footer {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #a69caa;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 70px 45px;
}
.login-card {
  width: 335px;
}
.login-card h2 {
  font: 32px/1.2 var(--serif);
  letter-spacing: -1px;
}
.login-card > .muted {
  font-size: 12px;
  margin: 12px 0 33px;
}
.login-card input {
  font-size: 13px;
  padding: 12px;
}
.login-card .primary {
  margin-top: 26px;
  padding: 13px 15px;
}
.login-help {
  font-size: 10px;
  color: #aaa3ad;
  margin-top: 26px;
  text-align: center;
}
.login-bottom {
  position: absolute;
  bottom: 42px;
  font-size: 10px;
  color: #b5acb9;
}
.error-page {
  max-width: 700px;
  padding: 70px 40px;
  margin: auto;
}
.error-page p {
  margin: 25px 0;
  color: var(--muted);
}
.artifact-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.review-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.review-app > header,
.review-app > .notice-banner {
  flex-shrink: 0;
}
.review-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 6px 20px;
  gap: 4px 12px;
  background: var(--header);
  flex-wrap: wrap;
}
.artifact-heading {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.review-header h1 {
  min-width: 0;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 14px/1.4 var(--sans);
  max-width: 280px;
}
.version-badge {
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  font-size: 11px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 4px;
  align-items: center;
}
.header-actions .button {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 12px;
}
.header-actions .artifact-delete {
  margin-left: 6px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.saved-status {
  color: var(--muted);
  white-space: nowrap;
  margin-right: 4px;
  font-size: 11px;
}
.saved-status.unsaved {
  color: var(--warning);
}
.review-controls {
  display: flex;
  align-items: center;
  padding: 0;
  gap: 12px;
  width: 100%;
}
.mode-switch {
  display: inline-flex;
  border-radius: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  gap: 3px;
}
.mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
}
.mode-switch button.selected {
  color: var(--accent);
  background: var(--accent-tint);
  box-shadow: none;
}
.toolbar-hint {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
}
.toolbar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 8px;
}
.toolbar-right .button {
  min-height: 32px;
  font-size: 12px;
  padding: 7px 10px;
}
#comment-mode.selected {
  color: var(--accent);
  background: var(--accent-tint);
}
.notice-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--accent-border);
  background: var(--accent-tint);
  font-size: 11px;
  color: var(--quote-ink);
}
.notice-banner .button {
  font-size: 10px;
  min-height: 28px;
  padding: 6px 9px;
}
.history-banner {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.review-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.canvas-area {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 12px;
  background: var(--canvas);
}
.element-picker {
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
}
.element-picker > div {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.element-picker button {
  flex-shrink: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 7px;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  background: var(--accent-tint);
  color: var(--quote-ink);
  cursor: pointer;
}
.canvas-frame {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 2px;
  box-shadow:
    0 2px 5px #29303905,
    0 18px 40px #2930390a;
}
.selection-toolbar {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 16px);
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 5px 18px #45345b35;
}
.selection-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.selection-toolbar button:hover {
  background: var(--accent-tint);
}
.selection-toolbar button:focus-visible {
  outline-offset: -2px;
}
.comment-popover {
  position: absolute;
  z-index: 5;
  width: min(310px, calc(100% - 16px));
  padding: 12px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 8px 28px #45345b30;
}
.comment-popover-heading,
.comment-popover-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-popover-heading {
  color: var(--quote-ink);
  font-size: 10px;
}
.comment-popover-heading .icon-button {
  margin-left: auto;
  width: 22px;
  height: 22px;
  font-size: 16px;
}
.comment-popover blockquote {
  margin: 9px 0;
  padding: 7px 9px;
  max-height: 70px;
  overflow: auto;
  border-left: 2px solid var(--accent-border);
  background: var(--accent-tint);
  color: var(--quote-ink);
  font: 11px/1.45 var(--serif);
  overflow-wrap: anywhere;
}
.comment-popover textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  font-size: 11px;
  padding: 8px;
  background: var(--white);
  color: var(--ink);
}
.comment-popover-actions {
  justify-content: flex-end;
  margin-top: 8px;
}
.comment-popover-actions .button {
  min-height: 27px;
  padding: 6px 10px;
  font-size: 9px;
}
.canvas-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
  color-scheme: light;
  display: block;
}
.canvas-frame.show-source iframe {
  visibility: hidden;
}
.canvas-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  padding-top: 10px;
}
.source-panel {
  position: absolute;
  inset: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--code);
}
.source-panel textarea {
  min-height: 0;
  flex: 1;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 24px;
  font:
    12px/1.8 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: var(--ink);
  white-space: pre;
  tab-size: 2;
  overflow: auto;
}
.source-panel p {
  font-size: 9px;
  color: var(--muted);
  padding: 11px 20px;
  border-top: 1px solid var(--line);
}
.review-rail {
  border-left: 1px solid var(--line);
  background: var(--white);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 25px;
}
.rail-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--white);
  display: flex;
  border-bottom: 1px solid var(--line);
  height: 53px;
  padding: 0 20px;
  gap: 24px;
}
.rail-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  position: relative;
  padding: 15px 0;
  font-size: 13px;
}
.rail-tabs button.active {
  color: var(--accent);
  font-weight: 550;
}
.rail-tabs button.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}
.rail-heading {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding: 16px 18px;
  align-items: center;
}
.rail-heading label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.rail-heading h2 {
  letter-spacing: -0.4px;
  font-family: var(--sans);
  font-size: 16px;
}
.rail-heading select {
  color: var(--muted);
  background: var(--code);
  font-size: 12px;
  max-width: 110px;
  padding: 5px 8px;
}
.comment-threads {
  padding: 0 18px;
}
.comment-thread {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 12px;
  background: var(--white);
  padding: 15px 13px;
}
.comment-thread > header {
  display: flex;
  align-items: center;
  gap: 7px;
}
.thread-author {
  flex: 1;
  min-width: 0;
}
.comment-thread > header strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
}
.thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.comment-thread time {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}
.comment-thread > header .version-mini {
  font-size: 8px;
  padding: 2px 4px;
}
.thread-quote {
  display: block;
  background: var(--quote-bg);
  border-left: 2px solid var(--accent-border);
  text-align: left;
  padding: 8px 10px;
  width: 100%;
  margin: 13px 0 9px;
  overflow-wrap: anywhere;
  border-radius: 0 3px 3px 0;
  font-size: 12px;
  color: var(--quote-ink);
  font: 12px/1.6 var(--sans);
}
.thread-quote:hover {
  background: var(--accent-tint);
  color: var(--accent);
}
.comment-body {
  margin: 10px 0 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}
.thread-actions {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  margin-left: auto;
}
.thread-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 5px;
  color: var(--muted);
}
.thread-icon svg {
  flex-shrink: 0;
}
button.thread-icon:hover {
  color: var(--accent);
  background: var(--accent-tint);
}
.thread-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.resolved .thread-status {
  color: var(--success);
  background: var(--success-bg);
}
button.thread-delete:hover {
  color: var(--danger);
  background: var(--danger-bg);
}
.thread-reply {
  border-left: 1px solid var(--line);
  padding: 8px 0 0 10px;
  margin: 0 0 9px 12px;
}
.thread-reply header {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.thread-reply header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.thread-reply time {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
}
.thread-reply .comment-body {
  margin: 5px 0;
  font-size: 12px;
}
.reply-form {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 8px;
  gap: 4px;
}
.reply-input {
  flex: 1;
  border: 0;
  background: transparent;
  min-width: 0;
  font-size: 12px;
  padding: 7px 2px;
}
.reply-input::placeholder {
  color: var(--placeholder);
}
.comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 0 30px;
  color: var(--muted);
}
.comments-empty .empty-symbol {
  color: var(--muted);
  margin-bottom: 16px;
}
.comments-empty h3 {
  letter-spacing: -0.2px;
  color: var(--ink);
  font: 600 16px var(--sans);
}
.comments-empty p {
  line-height: 1.9;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}
.comment-compose {
  margin: 16px 18px 0;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.compose-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
}
.compose-heading strong {
  font-weight: 500;
}
.compose-heading > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.comment-compose textarea {
  margin-top: 11px;
  padding: 10px;
  background: var(--white);
  min-height: 87px;
  resize: vertical;
  border-color: var(--line);
  font-size: 13px;
}
.compose-footer {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.compose-footer > span {
  line-height: 1.5;
  color: var(--muted);
  font-size: 11px;
}
.compose-footer .button {
  padding: 7px 10px;
  min-height: 28px;
  font-size: 12px;
}
.quote-preview {
  margin-top: 9px;
  background: var(--accent-tint);
  display: flex;
  align-items: flex-start;
  padding: 8px 5px 8px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--accent-border);
  gap: 7px;
}
.quote-preview blockquote {
  margin: 0;
  flex: 1;
  font: 11px/1.5 var(--serif);
  color: var(--quote-ink);
  max-height: 65px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.quote-preview .icon-button {
  font-size: 16px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.version-history {
  padding: 16px 19px;
}
.history-item {
  display: flex;
  position: relative;
  text-align: left;
  gap: 13px;
  width: 100%;
  padding: 13px 4px 20px;
}
.history-item:before {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: -14px;
  width: 1px;
  background: var(--line);
}
.history-item:last-child:before {
  display: none;
}
.history-node {
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent-border);
  background: var(--accent-tint);
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.history-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.history-title {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.history-title .pill {
  font-size: 10px;
}
.history-content strong {
  color: var(--ink);
  font-weight: 400;
  font-size: 13px;
}
.history-meta {
  color: var(--muted);
  font-size: 11px;
}
.history-arrow {
  color: var(--muted);
  margin-left: auto;
}
.history-item:hover .history-content strong,
.history-item:hover .history-title {
  color: var(--accent);
}
.header-byline {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
/* The same navigation nodes stay bound when the desktop container becomes modal. */
.navigation-drawer[open],
.navigation-identity,
.navigation-footer,
.navigation-appearance {
  display: contents;
}
.navigation-heading,
.navigation-label {
  display: none;
}
.navigation-open,
.navigation-open body {
  overflow: hidden;
}
@media (max-width: 800px) {
  .navigation-drawer:not(:modal) {
    display: none;
  }
  .navigation-drawer:modal {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, calc(100vw - 24px));
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-width: none;
    margin: 0;
    padding: 16px;
    border-radius: 12px 0 0 12px;
    border-width: 0 0 0 1px;
    background: var(--white);
    color: var(--ink);
    box-shadow: -12px 0 40px #00000012;
    animation: navigation-enter 160ms ease-out;
  }
  .navigation-drawer::backdrop {
    background: #00000030;
    backdrop-filter: none;
  }
  .navigation-drawer .navigation-heading {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    margin-bottom: 16px;
    padding-left: 8px;
  }
  .navigation-heading h2 {
    font: 600 16px/1.4 var(--sans);
    letter-spacing: -0.2px;
  }
  .navigation-drawer .app-header-nav {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    margin: 0;
    font: 500 14px/1.4 var(--sans);
  }
  .navigation-drawer nav a,
  .navigation-drawer nav .button,
  .navigation-drawer nav button:not(.theme-toggle),
  .navigation-drawer nav .icon-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-decoration: none;
  }
  .navigation-drawer nav a:hover,
  .navigation-drawer nav button:not(.theme-toggle):hover {
    background: var(--hover);
  }
  .navigation-drawer nav button.danger-text {
    color: var(--danger);
  }
  .navigation-drawer .user-row {
    display: contents;
    font: inherit;
  }
  .navigation-drawer .navigation-identity {
    display: flex;
    order: -1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0 12px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .navigation-identity .avatar {
    flex-shrink: 0;
  }
  .navigation-drawer .user-name {
    max-width: none;
    min-width: 0;
    color: var(--ink);
    font: 500 14px/1.4 var(--sans);
  }
  .navigation-trigger,
  .navigation-drawer .navigation-heading .icon-button,
  .theme-toggle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .navigation-drawer .navigation-label {
    display: inline;
  }
  .navigation-drawer .navigation-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .navigation-drawer .navigation-appearance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    padding: 8px 0 8px 12px;
  }
  .navigation-drawer .theme-toggle {
    justify-content: center;
  }
  .app-header {
    flex-wrap: nowrap;
  }
  .library-tools .button,
  .library-tools .search {
    min-height: 44px;
  }
  .review-header {
    padding: 4px 12px;
  }
  #access-role,
  .header-byline {
    display: none;
  }
  .review-header .header-actions > .button,
  .review-controls .mode-switch button,
  .review-controls .toolbar-right .button {
    min-height: 44px;
  }
  .review-header .review-controls {
    flex-wrap: wrap;
    gap: 4px;
  }
  .review-controls .mode-switch {
    flex: 1;
    justify-content: space-between;
  }
  .review-controls .mode-switch button {
    padding-inline: 6px;
  }
  .review-controls .toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }
  .saved-status:not(.unsaved) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .review-controls #discard-button:disabled,
  .save-version-label {
    display: none;
  }
}
@keyframes navigation-enter {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@media (max-width: 1150px) {
  .toolbar-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .header-byline {
    display: none;
  }
  .review-header h1 {
    max-width: 230px;
  }
  .header-actions {
    gap: 5px;
  }
  .review-main {
    grid-template-columns: minmax(0, 1fr) 305px;
  }
  .canvas-area {
    padding: 20px 18px 12px;
  }
  .login-story {
    padding: 35px;
  }
  .story-copy h1 {
    font-size: 43px;
  }
}
@media (max-width: 900px) {
  .artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-heading {
    flex-wrap: wrap;
  }
  .library-tools {
    margin-left: auto;
  }
}
@media (max-width: 800px) {
  .artifact-shell {
    height: auto;
    min-height: 100dvh;
  }
  .review-app {
    overflow: visible;
  }
  .review-main {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  .canvas-area {
    padding: 18px;
  }
  .canvas-frame {
    flex: none;
    height: 65dvh;
    min-height: 300px;
  }
  .review-rail {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .comment-threads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  .comment-thread {
    margin-bottom: 0;
  }
  .comments-empty {
    grid-column: 1/-1;
  }
  .comment-compose {
    max-width: 650px;
    margin: 20px auto 0;
    padding: 18px;
  }
  .version-history {
    max-width: 650px;
    margin: auto;
  }
  .login-story {
    padding: 28px;
  }
  .story-copy h1 {
    font-size: 37px;
  }
  .story-note {
    margin-left: 5px;
    width: 230px;
  }
  .login-panel {
    padding: 45px 28px;
  }
  .login-card h2 {
    font-size: 28px;
  }
}
@media (max-width: 600px) {
  .app-header {
    padding: 4px 16px;
    gap: 14px;
  }
  .library-main {
    padding: 29px 20px 30px;
  }
  .library-heading {
    display: block;
    margin-bottom: 24px;
  }
  .library-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 21px;
    gap: 10px;
  }
  .library-tools .search {
    grid-column: 1/-1;
    grid-row: 1;
    width: 100%;
  }
  .library-onboarding,
  .library-search-empty {
    padding: 26px 20px;
  }
  .library-onboarding h2,
  .library-search-empty h2 {
    font-size: 22px;
  }
  .library-empty-actions {
    width: 100%;
  }
  .library-empty-actions .button {
    width: 100%;
  }
  .library-workflow {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 24px;
  }
  .search {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .library-tools .button {
    padding: 9px 10px;
  }
  .artifact-grid {
    grid-template-columns: 1fr;
    gap: 27px;
  }
  .card-body {
    padding-top: 12px;
  }
  .artifact-heading {
    flex-basis: 100%;
  }
  .review-header h1 {
    flex: 1;
    max-width: none;
  }
  .header-actions {
    width: 100%;
    flex-wrap: nowrap;
    margin: 0;
  }
  .header-actions .artifact-delete {
    margin-left: auto;
  }
  .canvas-area {
    padding: 13px 10px 12px;
  }
  .canvas-footer {
    font-size: 10px;
  }
  .comment-threads {
    display: block;
    padding: 0 17px;
  }
  .comment-thread {
    margin-bottom: 12px;
  }
  .notice-banner {
    flex-wrap: wrap;
    font-size: 12px;
    text-align: center;
    padding: 10px 12px;
    gap: 8px;
  }
  .source-panel textarea {
    padding: 15px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 145px;
    padding: 25px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .story-copy {
    padding: 24px 0 2px;
  }
  .story-copy .eyebrow,
  .story-copy > p,
  .story-note,
  .login-story footer {
    display: none;
  }
  .story-copy h1 {
    font-size: 29px;
  }
  .story-copy h1 br {
    display: none;
  }
  .login-panel {
    min-height: calc(100vh - 215px);
    padding: 50px 28px 75px;
    align-items: flex-start;
  }
  .login-bottom {
    bottom: 22px;
  }
  .login-card > .muted {
    margin-bottom: 24px;
  }
  .login-card h2 {
    font-size: 30px;
  }
  .save-dialog {
    width: calc(100vw - 24px);
    padding: 23px 20px;
  }
  .create-dialog > header,
  .create-dialog-body,
  .create-dialog footer {
    padding-inline: 18px;
  }
}
@media (max-width: 380px) {
  .app-header {
    padding-inline: 16px;
    gap: 8px;
  }
  .app-header .wordmark {
    font-size: 20px;
  }
  .app-header .brand {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Suggestions are feedback, never an editable projection of the artifact. */
.suggestion-compose {
  margin: 10px 0;
}
.suggestion-compose label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}
.suggestion-compose textarea {
  width: 100%;
  white-space: pre-wrap;
}
.suggestion-compose .muted {
  font-size: 12px;
  margin: 6px 0;
}
.suggestion-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.thread-quote:has(.suggestion-diff) {
  --suggestion-deleted-bg: #fbe5e5;
  --suggestion-deleted-ink: #832e36;
  --suggestion-inserted-bg: #e0f0e4;
  --suggestion-inserted-ink: #245c38;
  color: var(--ink);
  background: var(--white);
  border-left-color: var(--accent);
}
.thread-quote:has(.suggestion-diff):hover {
  background: var(--accent-tint);
}
.suggestion-diff {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.suggestion-diff del {
  background: var(--suggestion-deleted-bg);
  color: var(--suggestion-deleted-ink);
  text-decoration: line-through;
}
.suggestion-diff ins {
  background: var(--suggestion-inserted-bg);
  color: var(--suggestion-inserted-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:root[data-theme="night"] .thread-quote:has(.suggestion-diff) {
  --suggestion-deleted-bg: #502b33;
  --suggestion-deleted-ink: #ffd4d9;
  --suggestion-inserted-bg: #234331;
  --suggestion-inserted-ink: #c9efd4;
}
