/* Dark reading surfaces. All rules stay inside the existing detail dialog;
   source artwork, native app interfaces and the printable résumé stay intact. */
.detail-dialog {
  --paper: #080910;
  --surface: #10111c;
  --ink: #f4f3fa;
  --muted: #aaa8bb;
  --line: rgba(255,255,255,.14);
  --blue: #acb3ff;
  --action: #514dff;
  --action-hover: #645fff;
  --action-pressed: #4641ec;
  --focus: #b9b8ff;
  color-scheme: dark;
  background: radial-gradient(ellipse at 100% 0, rgba(79,51,143,.13), transparent 40%), var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 32px 110px rgba(0,0,0,.65);
  scrollbar-width: thin;
  scrollbar-color: #49465c #080910;
}
.detail-dialog::backdrop {
  background: rgba(1,2,8,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.detail-dialog .dialog-header {
  background: rgba(10,11,20,.94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.detail-dialog .dialog-header > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
}
.detail-dialog .dialog-close,
.detail-dialog .round-button {
  background: #191a28;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
}
.detail-dialog .dialog-close:hover,
.detail-dialog .round-button:hover { background: #29273c; }
.detail-dialog .dialog-body > h2 { font-weight: 500; }
.detail-dialog .case-category {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .035em;
}
.detail-dialog .case-subtitle { font-size: 18px; color: var(--muted); }
.detail-dialog .case-cover {
  background: #10111b;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}
.detail-dialog .case-summary { font-size: 17px; line-height: 1.8; }
.detail-dialog .case-context {
  color: var(--muted);
  background: #11121e;
  border-left: 2px solid #58517d;
  border-radius: 0 10px 10px 0;
  font-size: 12px;
  line-height: 1.8;
  padding: 14px 18px;
}
.detail-dialog .case-section h3 { font-size: 25px; font-weight: 500; }
.detail-dialog .case-section p { font-size: 15px; line-height: 1.9; color: #b9b6c9; }
.detail-dialog .case-section img,
.detail-dialog .ai-full-image { border-radius: 12px; }
.detail-dialog .case-facts { margin-top: 24px; padding-block: 18px; gap: 20px; }
.detail-dialog .case-facts dt { color: var(--muted); font-size: 10px; }
.detail-dialog .case-facts dd { color: #d7d4e4; font-size: 13px; }
.detail-dialog .case-entry { margin-block: 16px 24px; }
.detail-dialog .case-entry p { font-size: 13px; }
.detail-dialog .case-entry > span { font-size: 11px; color: var(--muted); }
.detail-dialog .case-actions { border-top-color: var(--line); }
.detail-dialog .case-source,
.detail-dialog .source-copy a { color: var(--blue); }
.detail-dialog .button-primary,
.detail-dialog .button-dark { background: var(--action); color: #fff; }
.detail-dialog .button-primary:hover,
.detail-dialog .button-dark:hover { background: var(--action-hover); }
.detail-dialog .button-secondary { border-color: #6861b5; color: #d2ceff; }
.detail-dialog .photo-view img { background: #05060b; border-radius: 12px; }
.detail-dialog .photo-caption { color: var(--muted); font-size: 12px; }
.detail-dialog .source-copy { color: #b9b6c9; font-size: 15px; line-height: 1.9; }
.detail-dialog :is(button,a,[tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* The viewer chrome follows the site; native apps own their light UI styles. */
.detail-dialog.prototype-dialog { border-radius: 20px; }
.detail-dialog .prototype-summary { color: var(--muted); font-size: 13px; }
.detail-dialog .prototype-eyebrow { color: var(--muted); font-size: 11px; }
.detail-dialog .prototype-entries button {
  color: #d5d2e3;
  background: transparent;
  border-color: transparent;
  border-radius: 9px;
}
.detail-dialog .prototype-entries button:hover { background: #171727; }
.detail-dialog .prototype-entries button[aria-pressed=true] {
  background: #24213e;
  color: #e4e0ff;
  border-color: #645c9b;
}
.detail-dialog .prototype-entries button :is(span,b) { color: #aaa5c6; }
.detail-dialog .prototype-entry-note {
  color: #aaa8bb;
  font-size: 12px;
  line-height: 1.8;
  min-height: 0;
}
.detail-dialog .prototype-observe { border-top-color: var(--line); padding-block: 16px; }
.detail-dialog .prototype-observe h3 { font-size: 12px; color: #c6c2d7; }
.detail-dialog .prototype-observe ul { color: var(--muted); font-size: 11px; line-height: 2; }
.detail-dialog .prototype-source { color: var(--blue); font-size: 12px; }
.detail-dialog .prototype-stage {
  background: #05060b;
  border-color: var(--line);
  border-radius: 12px;
}
.detail-dialog .prototype-toolbar {
  background: #11121d;
  border-bottom-color: var(--line);
}
.detail-dialog .prototype-current { color: #e0ddeb; font-size: 12px; }
.detail-dialog .prototype-toolbar :is(button,a) { color: var(--blue); }
.detail-dialog .prototype-toolbar :is(button,a):hover { background: #27243e; }
.detail-dialog .prototype-canvas,
.detail-dialog .prototype-canvas iframe { background: #05060b; }
.detail-dialog .prototype-loading-row {
  color: var(--muted);
  background: #11121d;
  border-top-color: var(--line);
}
.detail-dialog .prototype-footnote { color: #a5a1b6; font-size: 11px; line-height: 1.8; }
.detail-dialog .prototype-stage:fullscreen,
.detail-dialog .prototype-stage.is-expanded {
  background: #05060b;
  border: 0;
  border-radius: 0;
}
.detail-dialog .prototype-stage:fullscreen::backdrop { background: #05060b; }
.detail-dialog .prototype-stage:is(:fullscreen,.is-expanded) .prototype-toolbar {
  background: #11121d;
}

@media(max-width:600px) {
  .detail-dialog,
  .detail-dialog.prototype-dialog { border-radius: 16px; }
  .detail-dialog .case-subtitle { font-size: 16px; }
  .detail-dialog .case-summary { font-size: 16px; }
  .detail-dialog .case-section h3 { font-size: 22px; }
  .detail-dialog .case-section p { font-size: 14px; }
  .detail-dialog .case-context { padding: 12px 14px; }
  .detail-dialog .case-facts { gap: 14px; }
  .detail-dialog .prototype-current { font-size: 11px; }
  .detail-dialog .prototype-entry-note { font-size: 11px; }
  .detail-dialog .prototype-loading-row { font-size: 10px; }
  .detail-dialog .prototype-footnote { font-size: 10px; }
  .detail-dialog .source-copy { font-size: 14px; }
}
@media(prefers-reduced-transparency:reduce) {
  .detail-dialog .dialog-header { background: #0a0b14; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .detail-dialog::backdrop { background: #03040be8; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media(prefers-contrast:more) {
  .detail-dialog { --muted:#d6d3e2; --line:rgba(255,255,255,.4); --blue:#c3c8ff; }
  .detail-dialog .case-section p,
  .detail-dialog .source-copy,
  .detail-dialog .prototype-entry-note,
  .detail-dialog .prototype-footnote { color: #d6d3e2; }
  .detail-dialog .prototype-entries button[aria-pressed=true] { border-color: #b9b0ff; }
}
