:root {
  --uw-header: 104px;
  --uw-bg: #07090c;
  --uw-panel: #0b0e12;
  --uw-panel-2: #10141a;
  --uw-line: rgba(235, 239, 244, .085);
  --uw-line-strong: rgba(235, 239, 244, .16);
  --uw-text: #f4f1e9;
  --uw-muted: #89939f;
  --uw-gold: #d8b86e;
  --uw-radius: 7px;
  --uw-ease: cubic-bezier(.16, 1, .3, 1);
}

html { background: #07090c; }
body.uw-active {
  padding-top: var(--uw-header);
  background: #07090c;
  color: var(--uw-text);
}
body.uw-active > .app {
  height: calc(100dvh - var(--uw-header)) !important;
  max-height: calc(100dvh - var(--uw-header)) !important;
  padding: 7px !important;
  gap: 7px !important;
  background: #07090c;
}

.uw-chrome {
  height: var(--uw-header);
  border-bottom: 1px solid rgba(216, 184, 110, .17);
  background: rgba(7, 9, 12, .92);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .32), inset 0 -1px rgba(255, 255, 255, .018);
  backdrop-filter: blur(30px) saturate(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(1.08);
}

.uw-primary {
  height: 58px;
  grid-template-columns: 146px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 9px 5px;
  border-bottom-color: rgba(255, 255, 255, .065);
}

.uw-brand {
  padding: 0 9px;
  border-right-color: rgba(255, 255, 255, .075);
  transition: opacity .2s ease;
}
.uw-brand:hover { opacity: .78; }
.uw-brand span {
  color: #f0dfbc;
  font-size: 1.04rem;
}
.uw-brand small {
  margin-top: 4px;
  color: #697480;
  font-size: .43rem;
}

.uw-studios {
  grid-template-columns: repeat(6, minmax(78px, 1fr));
  gap: 3px;
}
.uw-studio {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 7px;
  padding: 4px 8px;
  border-color: transparent;
  border-radius: 6px;
  color: #828c98;
  transition: color .28s var(--uw-ease), background .28s var(--uw-ease), border-color .28s var(--uw-ease), transform .28s var(--uw-ease);
}
.uw-studio::after {
  right: 10px;
  bottom: 2px;
  left: 42px;
  height: 2px;
  border-radius: 2px;
  transform: scaleX(.2);
  transition: opacity .3s ease, transform .42s var(--uw-ease);
}
.uw-studio:hover {
  color: #e4e8eb;
  background: rgba(255, 255, 255, .026);
  transform: translateY(-1px);
}
.uw-studio.active {
  color: #f7f5ef;
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, .018));
}
.uw-studio > i {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 7%, rgba(255, 255, 255, .015));
  font-size: .62rem;
  transition: box-shadow .28s ease, border-color .28s ease, transform .36s var(--uw-ease);
}
.uw-studio.active > i {
  border-color: color-mix(in srgb, var(--accent) 62%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 13%, transparent);
  transform: translateY(-1px);
}
.uw-studio strong { font-size: .57rem; }
.uw-studio small { display: none; }

.uw-global-actions {
  gap: 4px;
  padding-left: 7px;
  border-left-color: rgba(255, 255, 255, .075);
}
.uw-icon {
  width: 35px;
  height: 35px;
  border-color: rgba(255, 255, 255, .075);
  border-radius: 6px;
  background: rgba(255, 255, 255, .022);
  color: #b7c0c9;
  font-size: .78rem;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .24s var(--uw-ease);
}
.uw-icon:hover {
  color: #f5f3ec;
  border-color: rgba(255, 255, 255, .17);
  background: rgba(255, 255, 255, .055);
  transform: translateY(-1px);
}

.uw-contextbar {
  height: 46px;
  grid-template-columns: 170px minmax(200px, 270px) minmax(150px, 1fr) auto 72px 126px;
  gap: 6px;
  padding: 5px 9px;
}
.uw-tool-current,
.uw-reader-toggle,
.uw-truth-button,
.uw-ref-form {
  height: 36px;
  border-color: rgba(255, 255, 255, .08);
  border-radius: 6px;
  background: rgba(255, 255, 255, .022);
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.uw-tool-current:hover,
.uw-reader-toggle:hover,
.uw-truth-button:hover,
.uw-ref-form:focus-within {
  border-color: color-mix(in srgb, var(--uw-accent) 34%, rgba(255, 255, 255, .08));
  background: color-mix(in srgb, var(--uw-accent) 4%, rgba(255, 255, 255, .028));
}
.uw-tool-current { padding: 0 9px; }
.uw-tool-current > i {
  width: 3px;
  height: 20px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--uw-accent) 32%, transparent);
}
.uw-tool-current small,
.uw-truth-button small,
.uw-reader-toggle small { font-size: .41rem; }
.uw-tool-current strong,
.uw-truth-button strong { font-size: .57rem; }

.uw-ref-form {
  grid-template-columns: auto minmax(0, 1fr) 32px;
  background: rgba(2, 4, 7, .52);
}
.uw-ref-form input {
  height: 34px;
  font-size: .63rem;
}
.uw-ref-form button {
  width: 27px;
  height: 27px;
  overflow: hidden;
  margin-right: 3px;
  padding: 0;
  color: transparent;
  font-size: 0;
}
.uw-ref-form button::before {
  content: '→';
  color: #c7f2ea;
  font-size: .68rem;
}

.uw-focus-summary {
  gap: 7px;
  padding: 0 5px;
}
.uw-focus-summary span { font-size: .41rem; }
.uw-focus-summary strong { font-size: .62rem; }
.uw-focus-summary small { font-size: .55rem; }
.uw-handoff { gap: 3px; }
.uw-handoff button {
  height: 28px;
  max-width: 118px;
  overflow: hidden;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, .075);
  border-radius: 5px;
  color: #98a3af;
  text-overflow: ellipsis;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.uw-handoff button:nth-child(n + 3) { display: none; }
.uw-reader-toggle { padding: 0 9px; }
.uw-reader-toggle span { font-size: .56rem; }
.uw-reader-toggle small { display: none; }
.uw-truth-button { padding: 0 9px; }
.uw-truth-button > i { width: 6px; height: 6px; }

.uw-motion {
  position: fixed;
  z-index: 20100;
  top: var(--uw-header);
  right: 22px;
  left: 22px;
  height: 2px;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}
.uw-motion > i {
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--uw-accent), #e1c47f);
  box-shadow: 0 0 20px color-mix(in srgb, var(--uw-accent) 34%, transparent);
}
.uw-motion > span {
  position: absolute;
  top: 8px;
  right: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 5px;
  background: rgba(8, 11, 14, .9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
  opacity: 0;
  transform: translateY(-5px);
}
.uw-motion small {
  color: var(--uw-muted);
  font: 500 .43rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.uw-motion strong {
  color: #f2eee5;
  font: 600 .6rem/1 'JetBrains Mono', monospace;
}
.uw-motion.run { opacity: 1; }
.uw-motion.run > i { animation: uwProgress .68s var(--uw-ease) both; }
.uw-motion.run > span { animation: uwMotionLabel .68s var(--uw-ease) both; }
@keyframes uwProgress {
  0% { width: 0; opacity: 0; }
  14% { opacity: 1; }
  72% { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
@keyframes uwMotionLabel {
  0%, 100% { opacity: 0; transform: translateY(-5px); }
  18%, 72% { opacity: 1; transform: translateY(0); }
}

.uw-tool-menu,
.uw-command,
.uw-panel,
.uw-compare {
  border-color: rgba(216, 184, 110, .19);
  background: rgba(9, 12, 16, .985);
  box-shadow: 0 34px 110px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .035);
}
.uw-tool-menu {
  top: calc(var(--uw-header) + 7px);
  border-radius: 8px;
  transform: translateY(-7px) scale(.985);
  transform-origin: top left;
  transition: opacity .22s ease, transform .34s var(--uw-ease);
}
.uw-tool-menu.open { transform: translateY(0) scale(1); }
.uw-tool-menu > div > button { border-radius: 6px; }
.uw-tool-menu > div > button:hover,
.uw-tool-menu > div > button.active { background: rgba(255, 255, 255, .035); }

.uw-backdrop {
  inset: var(--uw-header) 0 0;
  background: rgba(2, 4, 7, .57);
  backdrop-filter: blur(10px) saturate(.9);
  -webkit-backdrop-filter: blur(10px) saturate(.9);
  animation: uwFadeIn .22s ease both;
}
.uw-command,
.uw-panel,
.uw-compare { animation: uwPanelIn .38s var(--uw-ease) both; }
.uw-command { animation-name: uwCommandIn; }
.uw-command.is-opening,
.uw-panel.is-opening,
.uw-compare.is-opening { opacity: 0; }
@keyframes uwFadeIn { from { opacity: 0; } }
@keyframes uwPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes uwCommandIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.992); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.uw-command {
  top: calc(var(--uw-header) + 18px);
  border-radius: 9px;
}
.uw-panel {
  top: calc(var(--uw-header) + 7px);
  border-radius: 9px;
}
.uw-panel-head > button,
.uw-presentation > header button,
.uw-panel-footer button,
.uw-action-grid button,
.uw-note-form > button,
.uw-compare > header button,
.uw-compare-footer button {
  border-radius: 5px;
}
.uw-inspector-hero,
.uw-evidence,
.uw-inspector-block,
.uw-note-form,
.uw-note-list article { border-radius: 6px; }

@media (max-width: 1180px) {
  .uw-primary { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .uw-studios { grid-template-columns: repeat(6, minmax(56px, 1fr)); }
  .uw-studio { grid-template-columns: 24px minmax(0, 1fr); padding-inline: 5px; }
  .uw-studio > i { width: 23px; height: 23px; }
  .uw-contextbar { grid-template-columns: 154px minmax(180px, 240px) minmax(130px, 1fr) auto 64px 40px; }
  .uw-truth-button { width: 40px; justify-content: center; padding: 0; }
  .uw-truth-button > span { display: none; }
}

@media (max-width: 760px) {
  :root { --uw-header: 110px; }
  .uw-primary { height: 60px; padding: 5px; }
  .uw-studios { gap: 1px; }
  .uw-studio {
    min-height: 49px;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 3px 1px;
  }
  .uw-studio > i { width: 21px; height: 21px; }
  .uw-studio strong { max-width: 48px; font-size: .4rem; }
  .uw-studio::after { right: 6px; left: 6px; }
  .uw-global-actions { gap: 2px; padding-left: 2px; }
  .uw-icon { width: 32px; height: 43px; }
  .uw-icon:nth-child(2),
  .uw-icon:nth-child(3) { display: none; }
  .uw-contextbar {
    height: 50px;
    grid-template-columns: 116px minmax(0, 1fr) 36px;
    gap: 4px;
    padding: 5px;
  }
  .uw-tool-current,
  .uw-ref-form,
  .uw-truth-button { height: 40px; }
  .uw-ref-form input { height: 38px; }
  .uw-tool-menu { top: calc(var(--uw-header) + 5px); }
  .uw-motion { right: 7px; left: 7px; }
  .uw-motion > span { display: none; }
  .uw-panel { height: min(84dvh, 760px); border-radius: 10px 10px 0 0; }
  body.uw-active > .app { padding: 4px !important; gap: 4px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .uw-motion { display: none !important; }
  .uw-command,
  .uw-panel,
  .uw-compare,
  .uw-backdrop { animation: none !important; }
}

/* Parables: narrative workspace rather than a stack of cards. */
body.uw-active #PARABLEMODE {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  grid-template-rows: minmax(0, 1fr) !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 110, .14);
  border-radius: 7px;
  background: #090d12;
}
body.uw-active #PARABLEMODE > .studymode-head { display: none !important; }
body.uw-active #PARABLEMODE .parable-main {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: clamp(248px, 20vw, 292px) minmax(440px, 1fr) clamp(278px, 23vw, 332px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #090d12;
}
body.uw-active #PARABLEMODE :is(#PARABLELIST, #PARABLESTAGE, #PARABLERAIL) {
  min-width: 0;
  min-height: 0;
  height: 100% !important;
  max-height: none !important;
  align-self: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.uw-active #PARABLEMODE #PARABLELIST,
body.uw-active #PARABLEMODE #PARABLERAIL {
  overflow: hidden !important;
  background: #0b0f14 !important;
}
body.uw-active #PARABLEMODE #PARABLELIST { border-right: 1px solid rgba(255, 255, 255, .075) !important; }
body.uw-active #PARABLEMODE #PARABLERAIL { border-left: 1px solid rgba(255, 255, 255, .075) !important; }
body.uw-active #PARABLEMODE #PARABLESTAGE { overflow: hidden !important; }

.parable-library-premium {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  overflow: hidden;
}
.parable-library-premium > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 15px 10px;
}
.parable-library-premium > header span,
.parable-stage-toolbar > div:first-child span,
.parable-story-heading > span,
.parable-story-context > span,
.parable-story-detail > div > span,
.parable-story-witnesses > header span,
.parable-graph-workspace > header > div:first-child > span,
.parable-compare-column > header span,
.parable-evidence-rail section > header span,
.parable-rail-focus > span {
  color: var(--parable-tone, #d8b86e);
  font: 650 .46rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.parable-library-premium > header strong {
  color: #77828e;
  font: 550 .48rem/1 'JetBrains Mono', monospace;
}
.parable-search-premium {
  height: 38px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  margin: 0 12px 9px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 6px;
  background: rgba(3, 6, 9, .62);
  transition: border-color .2s ease, box-shadow .25s ease;
}
.parable-search-premium:focus-within {
  border-color: rgba(216, 184, 110, .35);
  box-shadow: 0 0 0 3px rgba(216, 184, 110, .055);
}
.parable-search-premium > span { color: #707b87; font-size: .8rem; }
.parable-search-premium input {
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e8e9e7;
  font-size: .67rem;
}
.parable-gospel-segment,
.parable-view-tabs {
  display: grid;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 6px;
  background: rgba(255, 255, 255, .018);
}
.parable-gospel-segment {
  grid-template-columns: repeat(5, 1fr);
  margin: 0 12px 9px;
}
.parable-gospel-segment button,
.parable-view-tabs button {
  min-width: 0;
  height: 29px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7e8995;
  font: 600 .48rem/1 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: color .2s ease, background .22s ease, box-shadow .22s ease;
}
.parable-gospel-segment button.act,
.parable-view-tabs button.act {
  color: #f5f1e7;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .075), 0 6px 16px rgba(0, 0, 0, .18);
}
.parable-lens-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 0 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
}
.parable-lens-list > button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #bbc2c8;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .22s var(--uw-ease);
}
.parable-lens-list > button:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .027); }
.parable-lens-list > button.act {
  border-color: color-mix(in srgb, var(--parable-tone) 30%, transparent);
  background: color-mix(in srgb, var(--parable-tone) 8%, rgba(255, 255, 255, .015));
}
.parable-lens-list button > i {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--parable-tone);
  opacity: .72;
}
.parable-lens-list button span { min-width: 0; }
.parable-lens-list button strong,
.parable-lens-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parable-lens-list button strong { font-size: .61rem; }
.parable-lens-list button small { margin-top: 3px; color: #697480; font-size: .47rem; }
.parable-lens-list button b { color: #697480; font: 550 .5rem/1 'JetBrains Mono', monospace; }
.parable-library-list {
  min-height: 0;
  overflow: auto;
  padding: 6px;
  scrollbar-color: rgba(216, 184, 110, .26) transparent;
}
.parable-library-row {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #d8dce0;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .22s var(--uw-ease);
}
.parable-library-row:hover { background: rgba(255, 255, 255, .03); transform: translateX(2px); }
.parable-library-row.act {
  border-color: color-mix(in srgb, var(--parable-tone) 28%, transparent);
  background: color-mix(in srgb, var(--parable-tone) 8%, rgba(255, 255, 255, .017));
}
.parable-library-row > i { width: 3px; height: 28px; border-radius: 2px; background: var(--parable-tone); opacity: .45; }
.parable-library-row.act > i { opacity: 1; box-shadow: 0 0 13px color-mix(in srgb, var(--parable-tone) 42%, transparent); }
.parable-library-row span { min-width: 0; }
.parable-library-row strong,
.parable-library-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parable-library-row strong { color: #eeeae1; font-size: .68rem; }
.parable-library-row small { margin-top: 4px; color: #737e8a; font-size: .5rem; }
.parable-library-row em { color: #79838e; font: 500 .47rem/1 'JetBrains Mono', monospace; font-style: normal; }
.parable-empty { padding: 28px 12px; color: #76818c; font-size: .65rem; text-align: center; }

.parable-stage-premium {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 49px minmax(0, 1fr);
  overflow: hidden;
  background: #090d12;
}
.parable-stage-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .012);
}
.parable-stage-toolbar > div:first-child span,
.parable-stage-toolbar > div:first-child strong { display: block; }
.parable-stage-toolbar > div:first-child span { color: #7d8792; font: 550 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.parable-stage-toolbar > div:first-child strong { margin-top: 4px; color: #d9b96f; font: 600 .53rem/1 'JetBrains Mono', monospace; }
.parable-stage-nav { display: flex; gap: 4px; }
.parable-stage-nav button {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  background: rgba(255, 255, 255, .022);
  color: #bac2ca;
  cursor: pointer;
}
.parable-view-tabs { grid-template-columns: repeat(3, minmax(68px, 1fr)); min-width: 230px; }
.parable-stage-content {
  min-height: 0;
  overflow: auto;
  scrollbar-color: rgba(216, 184, 110, .24) transparent;
}
.parable-stage-content > * { animation: parableWorkspaceIn .46s var(--uw-ease) both; }
@keyframes parableWorkspaceIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.parable-story-workspace { min-height: 100%; }
.parable-story-hero {
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 26%);
  align-items: end;
  gap: 28px;
  padding: 27px clamp(20px, 3.2vw, 48px) 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--parable-tone) 24%, rgba(255, 255, 255, .06));
  background: linear-gradient(145deg, color-mix(in srgb, var(--parable-tone) 9%, #0a0e13), #0a0e13 62%);
}
.parable-story-heading h2,
.parable-graph-workspace > header h2,
.parable-compare-column h2 {
  margin: 9px 0 8px;
  color: #f4ecdc;
  font: 560 clamp(1.8rem, 3vw, 3rem)/.98 'Cormorant Garamond', serif;
}
.parable-story-heading p,
.parable-graph-workspace > header p {
  max-width: 68ch;
  margin: 0;
  color: #b8c0c8;
  font-size: .78rem;
  line-height: 1.58;
}
.parable-story-context {
  padding-left: 18px;
  border-left: 1px solid color-mix(in srgb, var(--parable-tone) 32%, rgba(255, 255, 255, .08));
}
.parable-story-context strong,
.parable-story-context small { display: block; }
.parable-story-context strong { margin-top: 8px; color: #efe8d9; font: 600 .76rem/1.2 'JetBrains Mono', monospace; }
.parable-story-context small { margin-top: 7px; color: #78838f; font-size: .57rem; line-height: 1.45; }
.parable-story-sequence {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(255, 255, 255, .065);
  border-bottom: 1px solid rgba(255, 255, 255, .065);
}
.parable-story-sequence > button {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  background: #0c1117;
  color: #9ba5af;
  text-align: left;
  cursor: pointer;
  transition: color .25s ease, background .3s ease;
}
.parable-story-sequence > button.act {
  color: #f4efe4;
  background: color-mix(in srgb, var(--parable-tone) 10%, #0c1117);
}
.parable-story-sequence button > i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  color: #76818d;
  font: 600 .53rem/1 'JetBrains Mono', monospace;
  font-style: normal;
}
.parable-story-sequence button.act > i {
  border-color: var(--parable-tone);
  color: var(--parable-tone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--parable-tone) 8%, transparent);
}
.parable-story-sequence small,
.parable-story-sequence strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parable-story-sequence small { color: #727d88; font: 550 .43rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.parable-story-sequence strong { margin-top: 6px; font-size: .67rem; }
.parable-story-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: 30px clamp(20px, 3.2vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, .065);
}
.parable-story-detail h3 { margin: 9px 0 8px; color: #f0e9db; font-size: 1rem; }
.parable-story-detail p { max-width: 70ch; margin: 0; color: #aab4be; font-size: .76rem; line-height: 1.66; }
.parable-story-detail blockquote {
  margin: 0;
  padding: 4px 0 4px 19px;
  border-left: 2px solid var(--parable-tone);
  color: #ded9cf;
  font: 500 1.04rem/1.42 'Cormorant Garamond', serif;
}
.parable-story-detail blockquote span { display: block; margin-bottom: 9px; color: #77828e; font: 600 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.parable-story-witnesses { padding: 22px clamp(20px, 3.2vw, 48px) 32px; }
.parable-story-witnesses > header,
.parable-evidence-rail section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.parable-story-witnesses > header strong,
.parable-evidence-rail section > header strong { color: #737e89; font: 550 .48rem/1 'JetBrains Mono', monospace; }
.parable-story-witnesses > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; }
.parable-story-witnesses button {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  background: rgba(255, 255, 255, .018);
  color: #dce0e2;
  text-align: left;
  cursor: pointer;
  transition: transform .25s var(--uw-ease), border-color .2s ease, background .2s ease;
}
.parable-story-witnesses button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--parable-tone) 34%, transparent); background: rgba(255, 255, 255, .032); }
.parable-story-witnesses button > span { color: var(--parable-tone); font: 600 .48rem/1 'JetBrains Mono', monospace; }
.parable-story-witnesses button > strong { flex: 1; margin: 9px 0; font-size: .65rem; line-height: 1.38; }
.parable-story-witnesses button > small { color: #727d88; font-size: .51rem; }

.parable-graph-workspace { min-height: 100%; padding: 25px clamp(18px, 2.6vw, 40px) 28px; }
.parable-graph-workspace > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 16px;
}
.parable-graph-workspace > header h2 { font-size: clamp(1.7rem, 2.4vw, 2.5rem); }
.parable-graph-workspace > header > div:last-child { text-align: right; }
.parable-graph-workspace > header > div:last-child strong { display: block; color: var(--parable-tone); font: 560 2rem/1 'Cormorant Garamond', serif; }
.parable-graph-workspace > header > div:last-child span { color: #77828d; font-size: .53rem; }
.parable-graph-workspace .parable-constellation {
  min-height: clamp(480px, 62vh, 700px) !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, .075) !important;
  border-radius: 7px !important;
  background: #080c11 !important;
}
.parable-graph-workspace > footer {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 10px;
  color: #7e8994;
  font-size: .54rem;
}
.parable-graph-workspace > footer span { display: flex; align-items: center; gap: 6px; }
.parable-graph-workspace > footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--parable-tone); }
.parable-graph-workspace > footer span:nth-child(2) i { background: #72808d; }
.parable-graph-workspace > footer button { margin-left: auto; min-height: 31px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 5px; background: transparent; color: #c8d0d7; font-size: .55rem; cursor: pointer; }

.parable-compare-workspace { min-height: 100%; padding: 18px clamp(16px, 2.2vw, 34px) 30px; }
.parable-compare-picker { display: flex; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.parable-compare-picker > span { flex: none; margin-right: 8px; color: #737e89; font: 600 .45rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.parable-compare-picker button {
  flex: none;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 5px;
  background: transparent;
  color: #929ca6;
  font-size: .53rem;
  cursor: pointer;
}
.parable-compare-picker button.act { border-color: rgba(216, 184, 110, .35); background: rgba(216, 184, 110, .08); color: #f1e6ce; }
.parable-compare-columns { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
.parable-compare-column { min-width: 0; padding: 26px 20px 10px; }
.parable-compare-column > header { min-height: 92px; }
.parable-compare-column h2 { font-size: clamp(1.55rem, 2.2vw, 2.3rem); }
.parable-compare-column > section { min-height: 112px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.parable-compare-column > section span { color: var(--parable-tone); font: 600 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.parable-compare-column > section p { margin: 8px 0 0; color: #adb6bf; font-size: .69rem; line-height: 1.58; }
.parable-compare-column > button { min-height: 33px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--parable-tone) 34%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--parable-tone) 7%, transparent); color: #e6e1d8; font-size: .56rem; cursor: pointer; }
.parable-compare-axis { display: grid; place-items: center; border-right: 1px solid rgba(255, 255, 255, .065); border-left: 1px solid rgba(255, 255, 255, .065); }
.parable-compare-axis span { color: #616c77; font: 550 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; writing-mode: vertical-rl; }

.parable-evidence-rail {
  height: 100%;
  overflow: auto;
  scrollbar-color: rgba(216, 184, 110, .22) transparent;
}
.parable-evidence-rail > section { padding: 15px; border-bottom: 1px solid rgba(255, 255, 255, .065); }
.parable-rail-focus {
  padding-top: 20px !important;
  background: linear-gradient(155deg, color-mix(in srgb, var(--parable-tone) 8%, #0b0f14), #0b0f14 70%);
}
.parable-rail-focus h3 { margin: 9px 0 7px; color: #f0e9dc; font: 560 1.55rem/1 'Cormorant Garamond', serif; }
.parable-rail-focus p { margin: 0 0 13px; color: #a8b1ba; font-size: .67rem; line-height: 1.52; }
.parable-rail-focus > button,
.parable-evidence-rail > footer button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 5px;
  background: rgba(255, 255, 255, .025);
  color: #d4d9de;
  font-size: .55rem;
  cursor: pointer;
}
.parable-witness-list { display: grid; gap: 1px; background: rgba(255, 255, 255, .06); }
.parable-witness-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 5px 8px;
  padding: 10px;
  border: 0;
  background: #0c1117;
  color: #cdd3d9;
  text-align: left;
  cursor: pointer;
}
.parable-witness-row > span { color: var(--parable-tone); font: 600 .47rem/1 'JetBrains Mono', monospace; }
.parable-witness-row > strong { grid-column: 1 / -1; font-size: .61rem; line-height: 1.35; }
.parable-witness-row > small { grid-column: 2; grid-row: 1; color: #6f7a85; font-size: .48rem; }
.parable-chapter-links { display: grid; gap: 4px; }
.parable-chapter-links button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 5px;
  background: transparent;
  color: #cfd4d9;
  text-align: left;
  cursor: pointer;
}
.parable-chapter-links button.act { border-color: color-mix(in srgb, var(--parable-tone) 34%, transparent); background: color-mix(in srgb, var(--parable-tone) 6%, transparent); }
.parable-chapter-links button strong { font-size: .61rem; }
.parable-chapter-links button span { color: #77828d; font-size: .5rem; }
.parable-chapter-links p { margin: 0; color: #7d8792; font-size: .61rem; line-height: 1.45; }
.parable-related-premium { display: grid; gap: 3px; }
.parable-related-premium > div { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 3px; }
.parable-related-premium button {
  min-width: 0;
  min-height: 43px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 5px;
  background: transparent;
  color: #cbd1d6;
  text-align: left;
  cursor: pointer;
}
.parable-related-premium > div > button:last-child { padding: 0; text-align: center; }
.parable-related-premium button span,
.parable-related-premium button strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parable-related-premium button span { color: #77828d; font-size: .45rem; text-transform: uppercase; }
.parable-related-premium button strong { margin-top: 4px; font-size: .59rem; }
.parable-truth-note { display: grid !important; grid-template-columns: 7px minmax(0, 1fr); gap: 10px; }
.parable-truth-note > i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #8dafef; box-shadow: 0 0 12px rgba(141, 175, 239, .38); }
.parable-truth-note strong { color: #cfd8e5; font-size: .6rem; }
.parable-truth-note p { margin: 6px 0 0; color: #7f8994; font-size: .57rem; line-height: 1.5; }
.parable-evidence-rail > footer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 12px 15px 18px; }

@media (max-width: 1180px) {
  body.uw-active #PARABLEMODE .parable-main {
    grid-template-columns: 236px minmax(390px, 1fr) 276px !important;
  }
  .parable-lens-list { grid-template-columns: 1fr; }
  .parable-lens-list button small { display: none; }
  .parable-story-hero { grid-template-columns: 1fr; gap: 16px; }
  .parable-story-context { display: none; }
}

@media (max-width: 900px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="parables"] {
    height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
    grid-template-rows: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="parables"] > .viz {
    height: 100% !important;
    min-height: 0 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="parables"] #PARABLEMODE { display: block !important; overflow: auto !important; }
  body.uw-active #PARABLEMODE .parable-main {
    height: max-content !important;
    min-height: 100% !important;
    align-self: start !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 330px 640px max-content !important;
    grid-template-areas: none !important;
    overflow: visible !important;
  }
  body.uw-active #PARABLEMODE :is(#PARABLELIST, #PARABLESTAGE, #PARABLERAIL) {
    min-height: 0 !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
  }
  .parable-library-premium { grid-template-columns: 1fr; }
  .parable-lens-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .parable-library-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .parable-story-sequence { grid-template-columns: 1fr 1fr; }
  .parable-story-detail { grid-template-columns: 1fr; }
  .parable-evidence-rail { height: auto; }
  body.uw-active #PARABLEMODE #PARABLELIST { height: 330px !important; max-height: 330px !important; }
  body.uw-active #PARABLEMODE #PARABLESTAGE { height: 640px !important; min-height: 640px !important; }
  body.uw-active #PARABLEMODE #PARABLERAIL { display: block !important; height: auto !important; }
  body.uw-active #PARABLEMODE #PARABLELIST { order: 1 !important; }
  body.uw-active #PARABLEMODE #PARABLESTAGE { order: 2 !important; }
  body.uw-active #PARABLEMODE #PARABLERAIL { order: 3 !important; }
}

@media (max-width: 620px) {
  body.uw-active #PARABLEMODE .parable-main { grid-template-rows: 410px 720px max-content !important; }
  body.uw-active #PARABLEMODE #PARABLELIST { height: 410px !important; max-height: 410px !important; }
  body.uw-active #PARABLEMODE #PARABLESTAGE { height: 720px !important; min-height: 720px !important; }
  .parable-lens-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parable-library-list { grid-template-columns: 1fr; }
  .parable-stage-premium { grid-template-rows: 108px minmax(0, 1fr); }
  .parable-stage-toolbar { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .parable-view-tabs { grid-column: 1 / -1; min-width: 0; }
  .parable-story-hero { min-height: 0; padding: 23px 18px; }
  .parable-story-heading h2 { font-size: 2rem; }
  .parable-story-sequence { grid-template-columns: 1fr; }
  .parable-story-sequence > button { min-height: 60px; }
  .parable-compare-columns { grid-template-columns: 1fr; }
  .parable-compare-axis { min-height: 34px; border: 0; border-top: 1px solid rgba(255, 255, 255, .065); border-bottom: 1px solid rgba(255, 255, 255, .065); }
  .parable-compare-axis span { writing-mode: initial; }
}

/* Location Atlas: keep the map workspace in the unified shell's only content row. */
body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="location"] {
  height: calc(100dvh - var(--uw-header)) !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  overflow: hidden !important;
}
body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="location"] > .viz {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  overflow: hidden !important;
}
body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="location"] #MAPV {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
}

@media (max-width: 980px) {
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="location"] #MAPV {
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

/* Final specificity pass: replaces the legacy right-rail geometry. */
@media (min-width: 901px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 84px minmax(0, 1fr) !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    grid-template-columns: 180px minmax(0, 1fr) 72px !important;
    grid-template-rows: 1fr !important;
    grid-template-areas: "title controls actions" !important;
    height: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;
    padding: 12px 16px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    padding: 10px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: 248px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 104px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 48px 12px !important;
    grid-template-areas: none !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    padding: 8px 10px 7px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
    display: none !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
    grid-column: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    height: 48px !important;
    overflow: hidden !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap {
    width: 100% !important;
    height: 100% !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 120px minmax(0, 1fr) !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 34px 68px !important;
    grid-template-areas: "title actions" "controls controls" !important;
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    padding: 9px 10px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    height: auto !important;
    overflow: visible !important;
    padding: 6px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-shell {
    height: auto !important;
    overflow: visible !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 300px 480px !important;
    height: auto !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar,
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar-shell {
    height: 300px !important;
    max-height: 300px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 112px 368px !important;
    height: 480px !important;
    min-height: 480px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 32px 49px 12px !important;
    grid-template-areas: none !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    padding: 7px 8px 6px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
    display: none !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: flex !important;
    height: 49px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap,
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
  }
}

/* Readability pass: premium density without sub-10px interface copy. */
:root {
  --uw-type-micro: 11px;
  --uw-type-label: 12px;
  --uw-type-control: 13px;
  --uw-type-body: 14px;
}

body.uw-active .app :is(input, select, textarea) {
  font-size: var(--uw-type-control) !important;
  line-height: 1.35;
}

body.uw-active .app :is(p, li, dt, dd) {
  font-size: max(var(--uw-type-label), .72rem);
}

.uw-brand small,
.uw-tool-current small,
.uw-truth-button small,
.uw-reader-toggle small,
.uw-focus-summary span {
  font-size: var(--uw-type-micro) !important;
  line-height: 1.2;
}

.uw-studio strong,
.uw-tool-current strong,
.uw-truth-button strong,
.uw-reader-toggle span,
.uw-focus-summary small,
.uw-handoff button {
  font-size: var(--uw-type-label) !important;
  line-height: 1.2;
}

.uw-focus-summary strong,
.uw-ref-form input {
  font-size: var(--uw-type-control) !important;
}

/* Timeline typography and vertical breathing room. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(
  .tl-searchbox-main input,
  .tl-context-segment button,
  .tl-stage-copy > strong,
  .tl-context-chip strong,
  .tl-console-window > strong
) {
  font-size: var(--uw-type-control) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(
  .tl-command-meta,
  .tl-command-meta strong,
  .tl-stage-copy > span,
  .tl-stage-copy > small,
  .tl-depthline,
  .tl-depthline > span,
  .tl-context-chip span,
  .tl-context-chip small,
  .tl-console-window > small,
  .tl-sub
) {
  font-size: var(--uw-type-label) !important;
  line-height: 1.3 !important;
}

@media (min-width: 901px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 96px minmax(0, 1fr) !important;
  }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 96px !important;
    min-height: 96px !important;
    max-height: 96px !important;
  }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-rows: 116px minmax(0, 1fr) !important;
  }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    grid-template-rows: 38px 52px 10px !important;
    gap: 4px !important;
    padding-block: 6px !important;
  }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    min-height: 52px !important;
    height: 52px !important;
    padding: 6px 9px !important;
  }
}

/* Parables: readable library, narrative, comparison and evidence copy. */
body.uw-active #PARABLEMODE :is(
  .parable-search-premium input,
  .parable-library-row strong,
  .parable-story-sequence strong,
  .parable-story-witnesses button > strong,
  .parable-witness-row > strong,
  .parable-chapter-links button strong,
  .parable-related-premium button strong,
  .parable-truth-note strong
) {
  font-size: var(--uw-type-control) !important;
  line-height: 1.4;
}

body.uw-active #PARABLEMODE :is(
  .parable-lens-list button strong,
  .parable-lens-list button small,
  .parable-library-row small,
  .parable-library-row em,
  .parable-stage-toolbar span,
  .parable-stage-toolbar strong,
  .parable-story-context small,
  .parable-story-sequence small,
  .parable-story-detail blockquote span,
  .parable-story-witnesses button > span,
  .parable-story-witnesses button > small,
  .parable-graph-workspace > footer,
  .parable-compare-picker,
  .parable-compare-picker button,
  .parable-compare-column > section span,
  .parable-compare-column > button,
  .parable-rail-focus > button,
  .parable-evidence-rail > footer button,
  .parable-witness-row > span,
  .parable-witness-row > small,
  .parable-chapter-links button span,
  .parable-related-premium button span,
  .parable-truth-note p
) {
  font-size: var(--uw-type-label) !important;
  line-height: 1.35;
}

body.uw-active #PARABLEMODE :is(
  .parable-story-heading p,
  .parable-story-detail p,
  .parable-compare-column > section p,
  .parable-rail-focus p,
  .parable-chapter-links p
) {
  font-size: var(--uw-type-body) !important;
  line-height: 1.65;
}

/* Genealogy: retain the compact canvas, but remove illegible metadata. */
body.uw-active #TREEMODE :is(
  .tree-searchbox input,
  .tree-view-tabs button,
  .tree-control-label,
  #TREEZOOMLABEL,
  .tree-chapter-strip span,
  .tree-node-k,
  .tree-node small,
  .tree-node-badges b
) {
  font-size: var(--uw-type-micro) !important;
  line-height: 1.2;
}

body.uw-active #TREEMODE :is(
  .tree-chapter-strip strong,
  .tree-node em,
  .tree-panel p
) {
  font-size: var(--uw-type-label) !important;
  line-height: 1.45;
}

/* Tradition: lift source and interpretation text to reading size. */
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) :is(
  .pt-library > header span,
  .pt-mini-stats,
  .pt-stage-toolbar > div:first-child span,
  .pt-profile-hero span,
  .pt-status span,
  .pt-tags span,
  .pt-catalog article i,
  .pt-view-intro span,
  .pt-era-ledger button > span small,
  .pt-era-ledger button > em,
  .pt-compare-grid article > header span,
  .pt-compare-grid dt,
  .pt-evidence-head,
  .pt-stance span,
  .pt-source-list a > i,
  .pt-source-list a small
) {
  font-size: var(--uw-type-micro) !important;
  line-height: 1.35;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) :is(
  .pt-library .patristic-list button > strong,
  .pt-library .patristic-list button > span,
  .pt-stage-toolbar > div:first-child strong,
  .pt-fact-strip strong,
  .pt-catalog article strong,
  .pt-catalog p,
  .pt-view-intro p,
  .pt-era-ledger button > span strong,
  .pt-compare-grid article > p,
  .pt-compare-grid dd,
  .pt-evidence-head strong,
  .pt-stance p,
  .pt-axis-list article strong,
  .pt-axis-list article p,
  .pt-source-list a strong,
  .pt-actions button
) {
  font-size: var(--uw-type-label) !important;
  line-height: 1.5;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero p {
  font-size: var(--uw-type-body) !important;
  line-height: 1.7;
}

@media (max-width: 900px) {
  :root {
    --uw-type-micro: 11.5px;
    --uw-type-label: 13px;
    --uw-type-control: 14px;
    --uw-type-body: 15px;
  }

  .uw-studio strong { font-size: var(--uw-type-micro) !important; }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 158px minmax(0, 1fr) !important;
  }

  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 158px !important;
    min-height: 158px !important;
    max-height: 158px !important;
  }
}

/* Timeline: one command bar, one stage control cluster. */
.timeline-overlay .tl-commandbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 410px) 34px 34px;
  align-items: center;
  gap: 5px;
}
.timeline-overlay .tl-searchbox-main {
  min-width: 0;
  position: relative;
}
body.expert-ui-ready .timeline-overlay .tl-searchbox-main input {
  width: 100%;
  height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, .085) !important;
  border-radius: 6px !important;
  background: rgba(3, 6, 9, .66) !important;
  color: #e8ebed !important;
  font-size: .64rem !important;
  box-shadow: none !important;
}
body.expert-ui-ready .timeline-overlay .tl-searchbox-main input:focus {
  border-color: rgba(216, 184, 110, .35) !important;
  box-shadow: 0 0 0 3px rgba(216, 184, 110, .05) !important;
}
.timeline-overlay .tl-context-segment {
  min-width: 0;
  height: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 6px;
  background: rgba(255, 255, 255, .015);
}
.timeline-overlay .tl-context-segment button {
  min-width: 0;
  height: 28px;
  padding: 0 5px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7f8995;
  font: 600 .46rem/1 'JetBrains Mono', monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background .22s ease, box-shadow .22s ease;
}
.timeline-overlay .tl-context-segment button:hover { color: #d8dde1; }
.timeline-overlay .tl-context-segment button.act {
  color: #f0eadd;
  background: rgba(216, 184, 110, .08);
  box-shadow: inset 0 0 0 1px rgba(216, 184, 110, .18);
}
.timeline-overlay .tl-command-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 5px;
  background: rgba(255, 255, 255, .02);
  color: #b9c1c9;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .24s var(--uw-ease);
}
.timeline-overlay .tl-command-icon:hover { color: #f3efe6; border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.timeline-overlay .tl-command-icon.accent { border-color: rgba(112, 223, 202, .24); background: rgba(112, 223, 202, .07); color: #a9eadc; }
.timeline-overlay .tl-command-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 2px 0;
  color: #747f8b;
  font-size: .5rem;
  line-height: 1.2;
}
.timeline-overlay .tl-command-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-overlay .tl-command-meta strong { color: #d4b873; font: 600 .48rem/1 'JetBrains Mono', monospace; }

.timeline-overlay .tl-stage-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.timeline-overlay .tl-stage-copy { min-width: 0; }
.timeline-overlay .tl-stage-copy > span,
.timeline-overlay .tl-stage-copy > strong,
.timeline-overlay .tl-stage-copy > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-overlay .tl-stage-copy > span { color: #d8b86e; font: 600 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.timeline-overlay .tl-stage-copy > strong { margin-top: 5px; color: #f0ece4; font-size: .69rem; }
.timeline-overlay .tl-stage-copy > small { margin-top: 4px; color: #717c88; font-size: .5rem; }
.timeline-overlay .tl-stage-summary .tl-stage-actions { display: flex; align-items: center; gap: 4px; }
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-summary .tl-stage-copy {
  grid-area: auto !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-summary .tl-stage-actions {
  grid-area: auto !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
}
body.expert-ui-ready .timeline-overlay .tl-stage-summary .tl-stage-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .085) !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, .022) !important;
  color: #bcc4cb !important;
  font-size: .63rem !important;
  box-shadow: none !important;
}
body.expert-ui-ready .timeline-overlay .tl-stage-summary .tl-stage-btn:hover { border-color: rgba(255, 255, 255, .17) !important; color: #f3f0e8 !important; transform: translateY(-1px); }
body.expert-ui-ready .timeline-overlay .tl-stage-summary .tl-stage-btn.cinema { border-color: rgba(216, 184, 110, .25) !important; color: #ead39b !important; }
body.expert-ui-ready .timeline-overlay .tl-stage-summary .tl-stage-btn.cinema.act { background: rgba(216, 184, 110, .12) !important; }
.timeline-overlay .tl-depthline {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) minmax(100px, auto);
  align-items: center;
  gap: 8px;
  color: #6f7a85;
  font-size: .46rem;
}
.timeline-overlay .tl-depthline > span { color: #b5bdc4; font: 600 .45rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.timeline-overlay .tl-depthline > i { height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .075); }
.timeline-overlay .tl-depthline > i > b { display: block; width: var(--tl-context-depth); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #70dfca, #d8b86e); }
.timeline-overlay .tl-depthline > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.uw-active .app[data-active-mode="timeline"] {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="timeline"] {
  height: calc(100dvh - var(--uw-header)) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="timeline"] > .viz {
  height: 100% !important;
  min-height: 0 !important;
}
body.uw-active .app[data-active-mode="timeline"] > .viz {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
}

@media (min-width: 901px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: 90px minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid rgba(216, 184, 110, .14) !important;
    border-radius: 7px !important;
    background: #080c11 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    display: grid !important;
    grid-template-columns: 155px minmax(0, 1fr) 74px !important;
    grid-template-areas: "title controls actions" !important;
    gap: 11px !important;
    padding: 9px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
    background: #0a0e13 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block {
    grid-area: title !important;
    align-self: center;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker { display: none !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
    margin: 0 !important;
    color: #f0eadc !important;
    font: 560 1.3rem/1 'Cormorant Garamond', serif !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
    display: block !important;
    margin-top: 7px !important;
    color: #737e89 !important;
    font-size: .48rem !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
    grid-area: controls !important;
    min-width: 0;
    align-self: center;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
    grid-area: actions !important;
    align-self: start !important;
    display: flex !important;
    justify-content: flex-end;
    gap: 4px !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-shell-btn, .tl-close) {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .085) !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .02) !important;
    color: #bac2ca !important;
    font-size: .68rem !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main { min-height: 0 !important; padding: 6px !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 96px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    height: 96px !important;
    min-height: 96px !important;
    max-height: 96px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 40px 8px !important;
    grid-template-areas: none !important;
    gap: 4px !important;
    padding: 4px 9px !important;
    overflow: hidden !important;
    border-bottom: 1px solid rgba(255, 255, 255, .065) !important;
    background: #0a0f15 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-summary {
    grid-row: 1 !important;
    grid-column: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy {
    display: block !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-area: auto !important;
    grid-row: 2 !important;
    grid-column: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    grid-row: 3 !important;
    grid-column: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 3px 7px !important;
    align-content: center !important;
    padding: 4px 8px !important;
    border-color: rgba(255, 255, 255, .075) !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .018) !important;
    box-shadow: none !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span { grid-column: 1; grid-row: 1; color: #d8b86e !important; font-size: .42rem !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; font-size: .55rem !important; text-overflow: ellipsis; white-space: nowrap; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small { grid-column: 1 / -1; grid-row: 2; overflow: hidden; color: #6d7883 !important; font-size: .42rem !important; text-overflow: ellipsis; white-space: nowrap; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap {
    min-height: 0 !important;
    height: 100% !important;
    border-radius: 0 !important;
    background: #071017 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="timeline"] {
    height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="timeline"] > .viz {
    height: 100% !important;
    min-height: 0 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: 142px minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 142px !important;
    min-height: 142px !important;
    max-height: 142px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 36px 90px !important;
    grid-template-areas: "title actions" "controls controls" !important;
    gap: 6px !important;
    padding: 7px !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block { grid-area: title !important; align-self: center; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker { display: none !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 { margin: 0 !important; font-size: 1.08rem !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sub { display: none !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-controls { grid-area: controls !important; min-width: 0; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions { grid-area: actions !important; display: flex !important; gap: 4px !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-shell-btn, .tl-close) { width: 32px !important; min-width: 32px !important; height: 32px !important; min-height: 32px !important; padding: 0 !important; border-radius: 5px !important; font-size: .62rem !important; }
  .timeline-overlay .tl-commandbar { grid-template-columns: minmax(0, 1fr) 34px 34px; grid-template-rows: 36px 36px; }
  .timeline-overlay .tl-searchbox-main { grid-column: 1; grid-row: 1; }
  .timeline-overlay .tl-context-segment { grid-column: 1 / -1; grid-row: 2; }
  .timeline-overlay #tlContextJump { grid-column: 2; grid-row: 1; }
  .timeline-overlay #tlContextAdvance { grid-column: 3; grid-row: 1; }
  .timeline-overlay .tl-command-meta { padding-top: 4px; }
  .timeline-overlay .tl-command-meta span:first-child { display: none; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main { min-height: 0 !important; padding: 4px !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell { height: 100% !important; min-height: 0 !important; grid-template-rows: 112px minmax(0, 1fr) !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 36px 52px 8px !important;
    grid-template-areas: none !important;
    gap: 4px !important;
    padding: 5px !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-summary { grid-row: 1 !important; grid-column: 1 !important; min-height: 0 !important; height: 100% !important; overflow: hidden !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy { display: block !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail { display: grid !important; grid-template-columns: repeat(4, minmax(150px, 1fr)) !important; gap: 4px !important; overflow-x: auto !important; overflow-y: hidden !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail { grid-area: auto !important; grid-row: 2 !important; grid-column: 1 !important; min-height: 0 !important; height: 100% !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline { grid-row: 3 !important; grid-column: 1 !important; min-height: 0 !important; height: 100% !important; overflow: hidden !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip { min-height: 50px !important; height: 50px !important; border-radius: 5px !important; }
  .timeline-overlay .tl-depthline > small { display: none; }
}

/* Genealogy: one tree, one focused inspector. */
body.uw-active .app[data-active-mode="genealogy"] {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
body.uw-active .app[data-active-mode="genealogy"] > .viz {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
}
body.uw-active #TREEMODE {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 110, .14);
  border-radius: 7px;
  background: #080c0b;
}
body.uw-active #TREEMODE > .treemode-head { display: none !important; }
body.uw-active #TREEMODE .treemode-main {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 25vw, 372px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.uw-active #TREEMODE .treemode-board {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 51px 46px minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden;
}
body.uw-active #TREEMODE .tree-controls {
  min-width: 0;
  display: block !important;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: #0b100f;
}
body.uw-active #TREEMODE .tree-commandbar {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(170px, 230px) minmax(380px, 1fr) auto !important;
  gap: 6px !important;
  align-items: center;
}
#TREEMODE .tree-searchbox {
  height: 37px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 6px;
  background: rgba(3, 7, 6, .62);
  transition: border-color .2s ease, box-shadow .22s ease;
}
#TREEMODE .tree-searchbox:focus-within {
  border-color: rgba(185, 218, 128, .34);
  box-shadow: 0 0 0 3px rgba(185, 218, 128, .05);
}
#TREEMODE .tree-searchbox > span { color: #778479; font-size: .78rem; }
body.uw-active #TREEMODE .tree-search {
  width: 100%;
  min-width: 0;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #e7eadf;
  font-size: .65rem;
  box-shadow: none;
}
body.uw-active #TREEMODE .tree-view-tabs {
  min-width: 0;
  height: 37px;
  display: grid;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
  gap: 2px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 6px;
  background: rgba(255, 255, 255, .015);
}
body.uw-active #TREEMODE .tree-view-tabs button {
  min-width: 0;
  min-height: 29px;
  height: 29px;
  padding: 0 5px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7e8a80;
  font-size: .45rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  transition: color .2s ease, background .22s ease;
}
body.uw-active #TREEMODE .tree-view-tabs button:hover { transform: none; color: #d8dfd1; }
body.uw-active #TREEMODE .tree-view-tabs button.act {
  color: #f2f1e8;
  background: rgba(185, 218, 128, .09);
  box-shadow: inset 0 0 0 1px rgba(185, 218, 128, .18);
}
body.uw-active #TREEMODE .tree-zoombar {
  min-height: 37px;
  height: 37px;
  gap: 3px;
  padding: 3px;
  border-color: rgba(255, 255, 255, .075);
  border-radius: 6px;
  background: rgba(255, 255, 255, .015);
  box-shadow: none;
}
body.uw-active #TREEMODE .tree-zoombar button {
  min-width: 29px;
  width: 29px;
  height: 29px;
  padding: 0;
  border-color: rgba(255, 255, 255, .075);
  border-radius: 4px;
  background: rgba(255, 255, 255, .02);
  color: #bdc6bb;
  font-size: .65rem;
  letter-spacing: 0;
}
body.uw-active #TREEMODE .tree-zoombar button:hover { transform: none; border-color: rgba(185, 218, 128, .28); }
body.uw-active #TREEMODE .tree-zoom-range { width: 70px; height: 3px; }
body.uw-active #TREEMODE #TREEZOOMLABEL { min-width: 34px; font-size: .45rem; letter-spacing: 0; }

body.uw-active #TREEMODE .tree-chapter-strip {
  min-height: 46px;
  height: 46px;
  gap: 4px;
  padding: 5px 7px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  border-radius: 0;
  background: #090e0d;
}
body.uw-active #TREEMODE .tree-chapter-strip::before {
  padding: 0 9px 0 4px;
  color: #82967c;
  font-size: .43rem;
  letter-spacing: 0;
}
body.uw-active #TREEMODE .tree-chapter-strip button,
body.uw-active #TREEMODE .tree-chapter-strip .empty {
  min-height: 34px;
  padding: 5px 8px;
  border-color: rgba(255, 255, 255, .07);
  border-radius: 5px;
  background: rgba(255, 255, 255, .018);
}
body.uw-active #TREEMODE .tree-chapter-strip button:hover,
body.uw-active #TREEMODE .tree-chapter-strip button.act {
  transform: none;
  border-color: rgba(216, 184, 110, .3);
  background: rgba(216, 184, 110, .07);
}
body.uw-active #TREEMODE .tree-chapter-strip strong { font-size: .62rem; }
body.uw-active #TREEMODE .tree-chapter-strip span { font-size: .42rem; letter-spacing: 0; }

body.uw-active #TREEMODE .treemode-stage {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  overflow: auto !important;
  border: 0;
  border-radius: 0;
  background: #070b0a;
  box-shadow: none;
  scroll-behavior: smooth;
}
body.uw-active #TREEMODE .tree-canvas::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 72px 72px;
  opacity: .72;
}
body.uw-active #TREEMODE .tree-stage-hud {
  top: 9px;
  left: 9px;
  gap: 4px;
}
body.uw-active #TREEMODE .tree-stage-hud span {
  min-height: 24px;
  padding: 0 7px;
  border-color: rgba(255, 255, 255, .075);
  border-radius: 5px;
  background: rgba(6, 10, 8, .82);
  color: #98a998;
  font-size: .43rem;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}
body.uw-active #TREEMODE .tree-gridline { stroke: rgba(255, 255, 255, .035); }
body.uw-active #TREEMODE .tree-phase-label { fill: rgba(184, 197, 181, .42); font-size: 9px; letter-spacing: .08em; }
body.uw-active #TREEMODE .tree-edge {
  stroke: rgba(174, 194, 159, .26);
  stroke-width: 1.2;
  animation: treeEdgeIn .48s ease both;
}
body.uw-active #TREEMODE .tree-edge.core { stroke: rgba(216, 184, 110, .58); stroke-width: 1.6; filter: none; }
body.uw-active #TREEMODE .tree-edge.path { stroke: rgba(237, 210, 148, .88); stroke-width: 2.4; filter: drop-shadow(0 0 6px rgba(216, 184, 110, .2)); }
body.uw-active #TREEMODE .tree-edge.related { stroke: rgba(185, 218, 128, .5); stroke-width: 1.7; filter: none; }
@keyframes treeEdgeIn { from { opacity: 0; } to { opacity: 1; } }

body.uw-active #TREEMODE .tree-node {
  border-color: rgba(255, 255, 255, .09);
  border-radius: 7px;
  background: color-mix(in srgb, var(--tone, #b9da80) 5%, #0c1210);
  color: #eef2e8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .025);
  transition: transform .3s var(--uw-ease), border-color .22s ease, box-shadow .25s ease, opacity .2s ease, background .22s ease;
  animation: treeNodeIn .42s var(--uw-ease) both;
}
body.uw-active #TREEMODE .tree-node:hover {
  transform: translate(-50%, -53%);
  border-color: color-mix(in srgb, var(--tone, #b9da80) 42%, rgba(255, 255, 255, .08));
  box-shadow: 0 18px 36px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .035);
}
body.uw-active #TREEMODE .tree-node.sel {
  border-color: rgba(235, 207, 145, .72);
  background: color-mix(in srgb, #d8b86e 11%, #0d1310);
  box-shadow: 0 0 0 3px rgba(216, 184, 110, .08), 0 20px 42px rgba(0, 0, 0, .36);
  animation: treeSelectIn .48s var(--uw-ease) both;
}
body.uw-active #TREEMODE .tree-node.lineage { border-color: rgba(216, 184, 110, .34); box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
body.uw-active #TREEMODE .tree-node.related { border-color: rgba(185, 218, 128, .28); background: color-mix(in srgb, #b9da80 7%, #0c1210); }
body.uw-active #TREEMODE .tree-node.bookfocus { box-shadow: 0 0 0 1px rgba(126, 168, 255, .18), 0 12px 28px rgba(0, 0, 0, .25); }
body.uw-active #TREEMODE .tree-node.chapterfocus { border-color: rgba(235, 207, 145, .65); background: color-mix(in srgb, #d8b86e 10%, #0c1210); box-shadow: 0 0 0 2px rgba(216, 184, 110, .08), 0 16px 34px rgba(0, 0, 0, .3); }
body.uw-active #TREEMODE .tree-node.chapterfocus::after {
  top: -8px;
  right: 7px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #17150e;
  font-size: .39rem;
  letter-spacing: 0;
}
body.uw-active #TREEMODE .tree-node-k { color: #83927f; font-size: .42rem; letter-spacing: .06em; }
body.uw-active #TREEMODE .tree-node strong { color: #f2eee3; font-size: 1.04rem; }
body.uw-active #TREEMODE .tree-node small { color: #91a18c; font-size: .44rem; letter-spacing: 0; }
body.uw-active #TREEMODE .tree-node em { overflow: hidden; color: #b0bab0; font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
body.uw-active #TREEMODE .tree-node-badges b { min-height: 15px; padding: 0 4px; border-radius: 4px; font-size: .36rem; letter-spacing: 0; }
@keyframes treeNodeIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes treeSelectIn {
  0% { opacity: .6; transform: translate(-50%, -50%) scale(.94); }
  65% { transform: translate(-50%, -50%) scale(1.025); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

body.uw-active #TREEMODE .treemode-rail {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid !important;
  grid-template-rows: 47px minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-left: 1px solid rgba(255, 255, 255, .075);
  background: #0b100e;
}
#TREEMODE .tree-rail-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
#TREEMODE .tree-rail-tabs button {
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #7d897e;
  font: 600 .49rem/1 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: color .2s ease, background .22s ease, box-shadow .22s ease;
}
#TREEMODE .tree-rail-tabs button.act {
  color: #eeeadd;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .065);
}
#TREEMODE .tree-rail-stack { min-height: 0; position: relative; overflow: hidden; }
#TREEMODE .tree-rail-stack > [data-tree-rail-panel] {
  position: absolute;
  inset: 0;
  display: none !important;
  width: 100%;
  height: 100%;
}
#TREEMODE .treemode-rail[data-tree-rail="stats"] [data-tree-rail-panel="stats"],
#TREEMODE .treemode-rail[data-tree-rail="profile"] [data-tree-rail-panel="profile"],
#TREEMODE .treemode-rail[data-tree-rail="lineage"] [data-tree-rail-panel="lineage"] {
  display: grid !important;
  animation: treeInspectorIn .36s var(--uw-ease) both;
}
@keyframes treeInspectorIn { from { opacity: 0; transform: translateX(7px); } to { opacity: 1; transform: translateX(0); } }
body.uw-active #TREEMODE .tree-panel {
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 11px;
  padding: 16px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #0b100e;
  box-shadow: none;
  scrollbar-color: rgba(216, 184, 110, .24) transparent;
}
body.uw-active #TREEMODE .tree-panel.emphasis { background: #0b100e; }
body.uw-active #TREEMODE .tree-profile-hero,
body.uw-active #TREEMODE .tree-radar,
body.uw-active #TREEMODE .tree-relation-card,
body.uw-active #TREEMODE .tree-proof-card,
body.uw-active #TREEMODE .tree-phase-card,
body.uw-active #TREEMODE .tree-stat {
  border-radius: 6px;
  background: rgba(255, 255, 255, .022);
  box-shadow: none;
}
body.uw-active #TREEMODE .tree-profile-hero { border-color: rgba(216, 184, 110, .18); background: linear-gradient(145deg, rgba(216, 184, 110, .07), rgba(255, 255, 255, .016)); }
body.uw-active #TREEMODE .tree-panel h3 { color: #f0eadc; font-size: 1.35rem; }
body.uw-active #TREEMODE .tree-panel p { color: #8f9a91; font-size: .62rem; line-height: 1.5; }

@media (max-width: 1080px) {
  body.uw-active #TREEMODE .tree-commandbar { grid-template-columns: 180px minmax(350px, 1fr) auto !important; }
  body.uw-active #TREEMODE .tree-zoom-range { display: none; }
}

@media (max-width: 860px) {
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="genealogy"] {
    height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
    grid-template-rows: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="genealogy"] > .viz {
    height: 100% !important;
    min-height: 0 !important;
  }
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="genealogy"] #TREEMODE { display: block !important; overflow: auto !important; }
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="genealogy"] #TREEMODE .treemode-main {
    height: calc(max(560px, 72dvh) + 440px) !important;
    min-height: calc(max(560px, 72dvh) + 440px) !important;
    align-self: start !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: max(560px, 72dvh) 440px !important;
    overflow: visible !important;
  }
  body.uw-active #TREEMODE .treemode-board { height: 100% !important; min-height: 560px; }
  body.uw-active #TREEMODE .tree-commandbar { grid-template-columns: minmax(150px, .65fr) minmax(330px, 1fr) auto !important; overflow-x: auto; }
  body.uw-active #TREEMODE .treemode-rail { height: 440px !important; min-height: 440px; border-top: 1px solid rgba(255, 255, 255, .075); border-left: 0; }
}

@media (max-width: 620px) {
  body.uw-active #TREEMODE .treemode-board { grid-template-rows: 92px 46px minmax(0, 1fr) !important; }
  body.uw-active #TREEMODE .tree-controls { padding: 5px; }
  body.uw-active #TREEMODE .tree-commandbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 37px 39px;
    overflow: visible;
  }
  #TREEMODE .tree-searchbox { grid-column: 1; grid-row: 1; }
  body.uw-active #TREEMODE .tree-zoombar { grid-column: 2; grid-row: 1; }
  body.uw-active #TREEMODE .tree-view-tabs { grid-column: 1 / -1; grid-row: 2; }
  body.uw-active #TREEMODE .tree-view-tabs button { font-size: .39rem; }
  body.uw-active #TREEMODE #TREEZOOMLABEL { display: none; }
  body.uw-active.analysis-open:not(.fullscreen-active) .app[data-active-mode="genealogy"] #TREEMODE .treemode-main {
    height: calc(max(560px, 72dvh) + 460px) !important;
    min-height: calc(max(560px, 72dvh) + 460px) !important;
    grid-template-rows: max(560px, 72dvh) 460px !important;
  }
  body.uw-active #TREEMODE .treemode-rail { height: 460px !important; min-height: 460px !important; }
}

/* Timeline V3: quiet plot, dedicated chronology console, zero label collisions. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
  --tl-stage-height: auto;
  color: #eef1ef;
  background: #070a0d !important;
}
body.uw-active:has(.app[data-active-mode="timeline"]) .uw-chrome {
  background: #07090c !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-ribbon,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-atlas,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-inspector,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-focus-dock,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-scene-strip {
  display: none !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-shell,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-close { display: none !important; }
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions { grid-template-columns: 34px !important; }
.timeline-overlay .tl-commandbar {
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 286px) 34px;
  gap: 6px;
}
.timeline-overlay .tl-context-segment { grid-template-columns: repeat(3, minmax(54px, 1fr)); }
.timeline-overlay .tl-command-meta { justify-content: flex-start; }
.timeline-overlay .tl-command-meta span { max-width: 100%; }

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 286px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 110, .13) !important;
  border-radius: 7px !important;
  background: #070b0f !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26) !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #071017 !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap {
  height: 100% !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, rgba(216, 184, 110, .025), transparent 24%),
    #071017 !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 286px !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, .075) !important;
  background: #0b0f13 !important;
  align-items: stretch !important;
}
.timeline-overlay .tl-console-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: linear-gradient(145deg, rgba(216, 184, 110, .06), transparent 58%);
}
.timeline-overlay .tl-console-head .tl-stage-copy { min-width: 0; display: block !important; }
.timeline-overlay .tl-console-head .tl-stage-copy > span,
.timeline-overlay .tl-console-head .tl-stage-copy > strong,
.timeline-overlay .tl-console-head .tl-stage-copy > small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-overlay .tl-console-head .tl-stage-copy > span {
  color: #b99555;
  font: 600 .42rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.timeline-overlay .tl-console-head .tl-stage-copy > strong {
  margin-top: 7px;
  color: #f1ece3;
  font: 600 .71rem/1.15 'DM Sans', sans-serif;
  display: -webkit-box !important;
  overflow: hidden;
  white-space: normal !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.timeline-overlay .tl-console-head .tl-stage-copy > small {
  margin-top: 5px;
  color: #79838b;
  font-size: .48rem;
}
.timeline-overlay .tl-console-head .tl-stage-actions {
  display: grid !important;
  grid-template-columns: repeat(2, 30px);
  gap: 4px !important;
}
body.expert-ui-ready .timeline-overlay .tl-console-head .tl-stage-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, .022) !important;
  color: #bfc6c9 !important;
  font-size: .61rem !important;
  box-shadow: none !important;
}
body.expert-ui-ready .timeline-overlay .tl-console-head .tl-stage-btn:hover {
  border-color: rgba(216, 184, 110, .28) !important;
  color: #f4e7c9 !important;
  transform: translateY(-1px);
}
body.expert-ui-ready .timeline-overlay .tl-console-head .tl-stage-btn.cinema {
  border-color: rgba(216, 184, 110, .22) !important;
  color: #e0c487 !important;
}
.timeline-overlay .tl-console-window {
  min-width: 0;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.timeline-overlay .tl-console-window > span,
.timeline-overlay .tl-console-window > strong,
.timeline-overlay .tl-console-window > small { display: block; overflow-wrap: anywhere; }
.timeline-overlay .tl-console-window > span { color: #727d85; font: 600 .4rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.timeline-overlay .tl-console-window > strong { margin-top: 7px; color: #dce1df; font-size: .61rem; line-height: 1.3; }
.timeline-overlay .tl-console-window > small { margin-top: 6px; color: #77828a; font-size: .49rem; line-height: 1.45; }
.timeline-overlay .tl-nearby {
  min-height: 0;
  height: 100%;
  align-self: stretch;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  overflow: hidden;
}
.timeline-overlay .tl-nearby > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: #89939a;
  font: 600 .43rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.timeline-overlay .tl-nearby > header small {
  min-width: 22px;
  padding: 4px 6px;
  border: 1px solid rgba(216, 184, 110, .16);
  border-radius: 4px;
  color: #d3b36e;
  text-align: center;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: minmax(68px, auto) !important;
  align-content: start !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 184, 110, .22) transparent;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 68px !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  gap: 4px 9px !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .055) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip:hover {
  background: rgba(216, 184, 110, .045) !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  color: #d2b46e !important;
  font: 600 .43rem/1.2 'JetBrains Mono', monospace !important;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  color: #e8ebe8 !important;
  font-size: .58rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: #717c83 !important;
  font-size: .45rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  min-width: 0 !important;
  height: 34px !important;
  display: grid !important;
  grid-template-columns: auto minmax(44px, 1fr) !important;
  gap: 8px !important;
  padding: 0 14px !important;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: #090d11;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > small { display: none !important; }

@media (min-width: 901px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 78px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    grid-template-columns: 132px minmax(0, 1fr) 34px !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    background: #0a0d11 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 { font-size: 1.16rem !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sub { margin-top: 5px !important; font-size: .43rem !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main { padding: 5px !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) 286px !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 286px !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    padding: 0 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head { grid-column: 1 !important; grid-row: 1 !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window { grid-column: 1 !important; grid-row: 2 !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby { grid-column: 1 !important; grid-row: 3 !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline { grid-column: 1 !important; grid-row: 4 !important; height: 34px !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: minmax(68px, auto) !important;
    gap: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    min-width: 0 !important;
    min-height: 68px !important;
    height: auto !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 4px 9px !important;
    padding: 11px 14px !important;
    border-radius: 0 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 128px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    height: 128px !important;
    min-height: 128px !important;
    max-height: 128px !important;
    grid-template-rows: 32px 82px !important;
    padding: 6px !important;
  }
  .timeline-overlay .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) 34px;
    grid-template-rows: 36px 36px;
  }
  .timeline-overlay .tl-searchbox-main { grid-column: 1; grid-row: 1; }
  .timeline-overlay .tl-context-segment { grid-column: 1 / -1; grid-row: 2; }
  .timeline-overlay #tlContextAdvance { grid-column: 2; grid-row: 1; }
  .timeline-overlay .tl-command-meta { display: none; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 162px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 162px !important;
    min-height: 162px !important;
    max-height: 162px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 58px minmax(0, 1fr) 26px !important;
    border-left: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .075) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head { grid-column: 1 !important; grid-row: 1 !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby { grid-column: 1 !important; grid-row: 2 !important; }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline { grid-column: 1 !important; grid-row: 3 !important; }
  .timeline-overlay .tl-console-head { padding: 9px 8px; align-items: center; }
  .timeline-overlay .tl-console-head .tl-stage-actions { grid-template-columns: repeat(4, 30px); }
  .timeline-overlay .tl-console-window { display: none; }
  .timeline-overlay .tl-nearby { grid-template-rows: 24px minmax(0, 1fr); }
  .timeline-overlay .tl-nearby > header { padding: 0 8px; }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: repeat(4, minmax(154px, 1fr)) !important;
    grid-auto-rows: minmax(52px, 1fr) !important;
    grid-auto-flow: column !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    min-width: 154px !important;
    min-height: 52px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    padding: 7px 8px !important;
    border-right: 1px solid rgba(255, 255, 255, .055) !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline { height: 26px !important; padding: 0 8px !important; }
}

@media (max-width: 430px) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell { grid-template-rows: 154px minmax(0, 1fr) !important; }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    height: 154px !important;
    min-height: 154px !important;
    max-height: 154px !important;
    grid-template-rows: 54px minmax(0, 1fr) 24px !important;
  }
  .timeline-overlay .tl-console-head .tl-stage-copy > small { display: none; }
  .timeline-overlay .tl-console-head .tl-stage-actions { grid-template-columns: repeat(4, 28px); }
  body.expert-ui-ready .timeline-overlay .tl-console-head .tl-stage-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
}

/* Tradition Studio V2: library index, focused reading surface and evidence rail. */
body.uw-active.analysis-open:not(.fullscreen-active) .app:is([data-active-mode="greekOrthodox"], [data-active-mode="syriacOrthodox"], [data-active-mode="catholic"]) {
  height: calc(100dvh - var(--uw-header)) !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  overflow: hidden !important;
}
body.uw-active.analysis-open:not(.fullscreen-active) .app:is([data-active-mode="greekOrthodox"], [data-active-mode="syriacOrthodox"], [data-active-mode="catholic"]) > .viz {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  overflow: hidden !important;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--patristic) 18%, rgba(255, 255, 255, .06)) !important;
  border-radius: 7px !important;
  background: #090c10 !important;
  box-shadow: 0 28px 76px rgba(0, 0, 0, .3) !important;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE)[aria-hidden="true"] {
  display: none !important;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) > .studymode-head { display: none !important; }
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 276px minmax(0, 1fr) 306px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0a0e12 !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--patristic) 26%, transparent) transparent;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:first-child { border-right: 1px solid rgba(255, 255, 255, .065) !important; }
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:last-child { border-left: 1px solid rgba(255, 255, 255, .065) !important; background: #090c10 !important; }

.pt-library { min-height: 100%; display: grid; align-content: start; }
.pt-library > header { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .055); }
.pt-library > header span,
.pt-library > header strong { display: block; }
.pt-library > header span { color: color-mix(in srgb, var(--patristic) 72%, #fff 28%); font: 600 .43rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-library > header strong { margin-top: 7px; color: #edf0ed; font: 600 .86rem/1.15 'DM Sans', sans-serif; }
.pt-tradition-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin: 12px 12px 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 6px;
  background: rgba(255, 255, 255, .014);
}
.pt-tradition-switch button,
.pt-view-tabs button {
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #737e84;
  font: 600 .42rem/1 'JetBrains Mono', monospace;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease, background .22s ease, box-shadow .22s ease;
}
.pt-tradition-switch button:hover,
.pt-view-tabs button:hover { color: #dce0de; }
.pt-tradition-switch button.act,
.pt-view-tabs button.act {
  color: #f1ece3;
  background: color-mix(in srgb, var(--patristic) 11%, rgba(255, 255, 255, .025));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--patristic) 24%, rgba(255, 255, 255, .05));
}
.pt-search-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 5px; padding: 10px 12px; }
body.expert-ui-ready .pt-search-row .patristic-search,
body.expert-ui-ready .pt-search-row select {
  width: 100%;
  height: 36px;
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 5px;
  outline: 0;
  background: #080b0f;
  color: #cfd5d2;
  font-size: .52rem;
  box-shadow: none;
}
body.expert-ui-ready .pt-search-row .patristic-search:focus,
body.expert-ui-ready .pt-search-row select:focus { border-color: color-mix(in srgb, var(--patristic) 42%, rgba(255, 255, 255, .1)); }
.pt-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 12px 10px; color: #687279; font-size: .43rem; }
.pt-mini-stats span { min-width: 0; text-align: center; white-space: nowrap; }
.pt-mini-stats strong { color: #cfd4d1; font: 600 .49rem/1 'JetBrains Mono', monospace; }
.pt-list-head { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-top: 1px solid rgba(255, 255, 255, .055); border-bottom: 1px solid rgba(255, 255, 255, .055); color: #7e898e; font: 600 .43rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-list-head small { color: color-mix(in srgb, var(--patristic) 70%, #bbb 30%); }
body.uw-active .pt-library .patristic-list { display: grid; gap: 0; padding: 0; }
body.uw-active .pt-library .patristic-list button {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 4px 10px;
  align-content: center;
  padding: 11px 14px 11px 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .22s ease;
}
body.uw-active .pt-library .patristic-list button:hover { background: rgba(255, 255, 255, .024); }
body.uw-active .pt-library .patristic-list button.act { background: color-mix(in srgb, var(--patristic) 7%, transparent); }
body.uw-active .pt-library .patristic-list button > i { grid-column: 1; grid-row: 1 / -1; width: 2px; height: 26px; align-self: center; border-radius: 2px; background: rgba(255, 255, 255, .08); }
body.uw-active .pt-library .patristic-list button.act > i { height: 42px; background: var(--patristic); box-shadow: 0 0 18px color-mix(in srgb, var(--patristic) 28%, transparent); }
body.uw-active .pt-library .patristic-list button > strong,
body.uw-active .pt-library .patristic-list button > span,
body.uw-active .pt-library .patristic-list button > small { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.uw-active .pt-library .patristic-list button > strong { color: #e4e8e5; font-size: .63rem; }
body.uw-active .pt-library .patristic-list button > span { color: #879198; font-size: .49rem; }
body.uw-active .pt-library .patristic-list button > small { color: #606b72; font: 500 .42rem/1.2 'JetBrains Mono', monospace; }

.pt-stage-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: rgba(10, 14, 18, .94);
  backdrop-filter: blur(18px);
}
.pt-stage-toolbar > div:first-child { min-width: 0; }
.pt-stage-toolbar > div:first-child span,
.pt-stage-toolbar > div:first-child strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-stage-toolbar > div:first-child span { color: color-mix(in srgb, var(--patristic) 72%, #fff 28%); font: 600 .42rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-stage-toolbar > div:first-child strong { margin-top: 6px; color: #e9ece9; font-size: .67rem; }
.pt-view-tabs { display: grid; grid-template-columns: repeat(3, minmax(70px, 1fr)); gap: 2px; padding: 3px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 6px; background: rgba(255, 255, 255, .014); }
.pt-view { min-width: 0; animation: ptReveal .48s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ptReveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.pt-profile-hero {
  min-height: 216px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 34px 34px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--patristic) 8%, transparent), transparent 52%),
    #0a0e12;
}
.pt-profile-hero > div:first-child { min-width: 0; max-width: 780px; }
.pt-profile-hero span { color: color-mix(in srgb, var(--patristic) 72%, #fff 28%); font: 600 .45rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-profile-hero h2 { margin: 10px 0 0; color: #f2eee6; font: 560 clamp(2rem, 3vw, 3.4rem)/.94 'Cormorant Garamond', serif; letter-spacing: 0; overflow-wrap: anywhere; }
.pt-profile-hero p { max-width: 68ch; margin: 17px 0 0; color: #99a29f; font-size: .68rem; line-height: 1.65; }
.pt-status { min-width: 112px; display: grid; grid-template-columns: 8px auto; gap: 4px 8px; align-items: center; padding: 12px; border-left: 1px solid color-mix(in srgb, var(--patristic) 30%, rgba(255, 255, 255, .05)); }
.pt-status i { grid-row: 1 / span 2; width: 7px; height: 7px; border-radius: 50%; background: var(--patristic); box-shadow: 0 0 12px color-mix(in srgb, var(--patristic) 42%, transparent); }
.pt-status span { color: #677179; font-size: .38rem; }
.pt-status strong { color: #d7ddd9; font: 600 .51rem/1 'JetBrains Mono', monospace; }
.pt-fact-strip { display: grid; grid-template-columns: .75fr 1fr 1.25fr; border-bottom: 1px solid rgba(255, 255, 255, .065); }
.pt-fact-strip > div { min-width: 0; min-height: 68px; display: grid; align-content: center; gap: 7px; padding: 12px 20px; border-right: 1px solid rgba(255, 255, 255, .055); }
.pt-fact-strip > div:last-child { border-right: 0; }
.pt-fact-strip span { color: #626d74; font: 600 .39rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-fact-strip strong { min-width: 0; color: #d3d8d5; font-size: .57rem; line-height: 1.35; overflow-wrap: anywhere; }
.pt-thesis { display: grid; gap: 18px; padding: 26px 34px; border-bottom: 1px solid rgba(255, 255, 255, .065); }
.pt-thesis > header,
.pt-catalog > header,
.pt-axis-list > header,
.pt-source-list > header,
.pt-actions > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #89938f; font: 600 .44rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-thesis > header small,
.pt-catalog > header small,
.pt-axis-list > header small,
.pt-source-list > header small { color: #626c72; }
.pt-thesis blockquote { max-width: 850px; margin: 0; padding: 0; border: 0; color: #e0d8c8; font: 520 1.18rem/1.5 'Cormorant Garamond', serif; }
.pt-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pt-tags span { padding: 5px 7px; border: 1px solid color-mix(in srgb, var(--patristic, #c69a70) 20%, rgba(255, 255, 255, .05)); border-radius: 4px; color: #87908e; background: rgba(255, 255, 255, .018); font: 500 .39rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-catalog { min-width: 0; padding: 24px 28px 30px; border-right: 1px solid rgba(255, 255, 255, .06); }
.pt-catalog:last-child { border-right: 0; }
.pt-catalog > div { display: grid; margin-top: 13px; }
.pt-catalog article { min-width: 0; min-height: 43px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.pt-catalog article i { color: color-mix(in srgb, var(--patristic) 62%, #888 38%); font: 500 .4rem/1 'JetBrains Mono', monospace; font-style: normal; }
.pt-catalog article strong { min-width: 0; color: #bec5c1; font-size: .53rem; line-height: 1.35; overflow-wrap: anywhere; }
.pt-catalog p { color: #727c81; font-size: .54rem; }

.pt-view-intro { min-height: 152px; display: grid; grid-template-columns: minmax(210px, .6fr) minmax(260px, 1fr) auto; align-items: end; gap: 28px; padding: 28px 30px; border-bottom: 1px solid rgba(255, 255, 255, .065); background: linear-gradient(145deg, color-mix(in srgb, var(--patristic) 7%, transparent), transparent 58%); }
.pt-view-intro span { color: color-mix(in srgb, var(--patristic) 72%, #fff 28%); font: 600 .43rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-view-intro h2 { margin: 8px 0 0; color: #eeeae2; font: 560 2.1rem/.96 'Cormorant Garamond', serif; }
.pt-view-intro p { margin: 0; color: #89938f; font-size: .61rem; line-height: 1.6; }
.pt-view-intro > strong { color: #aeb5b1; font: 600 .45rem/1.3 'JetBrains Mono', monospace; text-align: right; }
.pt-era-ledger { position: relative; display: grid; padding: 8px 0 34px; }
.pt-era-ledger::before { content: ''; position: absolute; top: 0; bottom: 0; left: 178px; width: 1px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--patristic) 38%, rgba(255, 255, 255, .06)) 8%, color-mix(in srgb, var(--patristic) 16%, rgba(255, 255, 255, .04)) 92%, transparent); }
.pt-era-ledger > button { position: relative; min-width: 0; min-height: 76px; display: grid; grid-template-columns: 148px 30px minmax(180px, 1fr) minmax(130px, .65fr); align-items: center; gap: 15px; padding: 8px 28px 8px 15px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .048); background: transparent; text-align: left; cursor: pointer; transition: background .22s ease; }
.pt-era-ledger > button:hover,
.pt-era-ledger > button.act { background: color-mix(in srgb, var(--patristic) 5%, transparent); }
.pt-era-ledger time { color: #798489; font: 500 .46rem/1.3 'JetBrains Mono', monospace; text-align: right; }
.pt-era-ledger button > i { position: relative; z-index: 1; width: 11px; height: 11px; border: 2px solid #0a0e12; border-radius: 50%; background: #6c757a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.pt-era-ledger button.act > i { background: var(--patristic); box-shadow: 0 0 0 4px color-mix(in srgb, var(--patristic) 14%, transparent), 0 0 20px color-mix(in srgb, var(--patristic) 28%, transparent); }
.pt-era-ledger button > span { min-width: 0; display: grid; gap: 5px; }
.pt-era-ledger button > span strong { color: #dde2df; font-size: .66rem; }
.pt-era-ledger button > span small { color: #778187; font-size: .49rem; line-height: 1.35; overflow-wrap: anywhere; }
.pt-era-ledger button > em { color: #626d73; font-size: .48rem; line-height: 1.4; font-style: normal; text-align: right; overflow-wrap: anywhere; }
.pt-empty { padding: 28px; color: #747e83; font-size: .6rem; }

.pt-compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-compare-grid > article { min-width: 0; min-height: 520px; padding: 26px 24px 32px; border-right: 1px solid rgba(255, 255, 255, .06); background: #0a0e12; }
.pt-compare-grid > article:last-child { border-right: 0; }
.pt-compare-grid > article.act { background: linear-gradient(180deg, color-mix(in srgb, var(--column-accent) 8%, transparent), #0a0e12 42%); }
.pt-compare-grid article > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 2px solid color-mix(in srgb, var(--column-accent) 42%, rgba(255, 255, 255, .04)); }
.pt-compare-grid article > header span { color: color-mix(in srgb, var(--column-accent) 76%, #fff 24%); font: 600 .42rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-compare-grid article > header small { color: #727c82; font: 500 .4rem/1 'JetBrains Mono', monospace; }
.pt-compare-grid h3 { margin: 24px 0 0; color: #ebe7df; font: 560 1.58rem/1 'Cormorant Garamond', serif; overflow-wrap: anywhere; }
.pt-compare-grid article > p { margin: 10px 0 0; color: #7f898d; font-size: .52rem; line-height: 1.45; }
.pt-compare-grid blockquote { min-height: 134px; margin: 24px 0 0; padding: 18px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .055); border-bottom: 1px solid rgba(255, 255, 255, .055); color: #d5cdbc; font: 520 .92rem/1.5 'Cormorant Garamond', serif; }
.pt-compare-grid dl { display: grid; margin: 18px 0; }
.pt-compare-grid dl > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.pt-compare-grid dt { color: #606b71; font: 600 .38rem/1.3 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-compare-grid dd { margin: 0; color: #9ca5a1; font-size: .48rem; line-height: 1.45; overflow-wrap: anywhere; }

.pt-inspector { min-height: 100%; display: grid; align-content: start; }
.pt-evidence-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #87918d; font: 600 .43rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-evidence-head > div { display: flex; align-items: center; gap: 7px; color: #d2d8d4; }
.pt-evidence-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--patristic); box-shadow: 0 0 13px color-mix(in srgb, var(--patristic) 40%, transparent); }
.pt-evidence-head strong { font-size: .44rem; }
.pt-stance,
.pt-axis-list,
.pt-source-list,
.pt-actions { padding: 17px 15px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pt-stance span { color: color-mix(in srgb, var(--patristic) 70%, #fff 30%); font: 600 .42rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.pt-stance p { margin: 10px 0 0; color: #8a9490; font-size: .53rem; line-height: 1.58; }
.pt-axis-list article { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .048); }
.pt-axis-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.pt-axis-list article strong { color: #d0d5d2; font-size: .54rem; }
.pt-axis-list article p { margin: 6px 0 0; color: #727d82; font-size: .49rem; line-height: 1.5; }
.pt-source-list > header,
.pt-actions > header { margin-bottom: 10px; }
.pt-source-list a { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 8px; min-height: 58px; border-bottom: 1px solid rgba(255, 255, 255, .048); color: inherit; text-decoration: none; }
.pt-source-list a > i { color: color-mix(in srgb, var(--patristic) 62%, #888 38%); font: 500 .4rem/1 'JetBrains Mono', monospace; font-style: normal; }
.pt-source-list a > span { min-width: 0; }
.pt-source-list a strong,
.pt-source-list a small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-source-list a strong { color: #bec5c1; font-size: .5rem; }
.pt-source-list a small { margin-top: 5px; color: #68737a; font-size: .42rem; }
.pt-source-list a > b { color: #657078; font-size: .55rem; }
.pt-source-list a:hover strong { color: #f0ece4; }
.pt-actions > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.pt-actions button { min-width: 0; min-height: 38px; padding: 7px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 5px; background: rgba(255, 255, 255, .018); color: #9ca5a1; font-size: .47rem; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.pt-actions button:hover { border-color: color-mix(in srgb, var(--patristic) 30%, rgba(255, 255, 255, .08)); background: color-mix(in srgb, var(--patristic) 6%, transparent); color: #ece9e2; }

@media (max-width: 1180px) {
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main { grid-template-columns: 250px minmax(0, 1fr) 272px !important; }
  .pt-profile-hero { padding-inline: 25px; }
  .pt-thesis { padding-inline: 25px; }
  .pt-view-intro { grid-template-columns: minmax(190px, .7fr) minmax(230px, 1fr); }
  .pt-view-intro > strong { display: none; }
}

@media (max-width: 900px) {
  body.uw-active.analysis-open:not(.fullscreen-active) .app:is([data-active-mode="greekOrthodox"], [data-active-mode="syriacOrthodox"], [data-active-mode="catholic"]) { overflow: auto !important; }
  body.uw-active.analysis-open:not(.fullscreen-active) .app:is([data-active-mode="greekOrthodox"], [data-active-mode="syriacOrthodox"], [data-active-mode="catholic"]) > .viz { height: auto !important; min-height: 100% !important; overflow: visible !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) { height: auto !important; min-height: 100% !important; overflow: visible !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main {
    height: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 410px auto auto !important;
    overflow: visible !important;
  }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel { height: auto !important; overflow: visible !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:first-child { height: 410px !important; overflow-y: auto !important; border-right: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .065) !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:last-child { border-left: 0 !important; border-top: 1px solid rgba(255, 255, 255, .065) !important; }
  .pt-profile-hero { min-height: 190px; padding: 25px 20px; }
  .pt-profile-hero h2 { font-size: 2.35rem; }
  .pt-thesis { padding: 22px 20px; }
  .pt-catalog { padding-inline: 20px; }
  .pt-view-intro { grid-template-columns: 1fr; gap: 14px; padding: 24px 20px; }
  .pt-era-ledger::before { left: 138px; }
  .pt-era-ledger > button { grid-template-columns: 108px 20px minmax(0, 1fr); padding-right: 15px; }
  .pt-era-ledger button > em { display: none; }
  .pt-compare-grid { grid-template-columns: 1fr; }
  .pt-compare-grid > article { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .065); }
  .pt-compare-grid blockquote { min-height: 0; }

  body.uw-active:not(.fullscreen-active) .app.study-open :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE)[aria-hidden="false"] {
    height: max-content !important;
    min-height: 100% !important;
    align-self: start !important;
    grid-template-rows: max-content !important;
    overflow: visible !important;
  }
  body.uw-active:not(.fullscreen-active) .app.study-open :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main {
    height: max-content !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 410px max-content max-content !important;
    overflow: visible !important;
  }
  body.uw-active:not(.fullscreen-active) .app.study-open :is(#GREEKORTHODOXLIST, #SYRIACORTHODOXLIST, #CATHOLICLIST) {
    height: 410px !important;
    min-height: 410px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.uw-active:not(.fullscreen-active) .app.study-open :is(#GREEKORTHODOXSTAGE, #SYRIACORTHODOXSTAGE, #CATHOLICSTAGE, #GREEKORTHODOXRAIL, #SYRIACORTHODOXRAIL, #CATHOLICRAIL) {
    height: max-content !important;
    min-height: max-content !important;
    overflow: visible !important;
  }
}

@media (max-width: 560px) {
  .pt-stage-toolbar { position: relative; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px; }
  .pt-view-tabs { width: 100%; }
  .pt-profile-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pt-status { width: 100%; min-width: 0; }
  .pt-fact-strip { grid-template-columns: 1fr; }
  .pt-fact-strip > div { min-height: 56px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
  .pt-catalog-grid { grid-template-columns: 1fr; }
  .pt-catalog { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .pt-era-ledger::before { left: 25px; }
  .pt-era-ledger > button { grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 10px; min-height: 86px; padding: 10px 14px; }
  .pt-era-ledger time { grid-column: 2; grid-row: 1; text-align: left; }
  .pt-era-ledger button > i { grid-column: 1; grid-row: 1 / span 2; }
  .pt-era-ledger button > span { grid-column: 2; grid-row: 2; }
  .pt-profile-hero h2 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active *,
  body.uw-active *::before,
  body.uw-active *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Studio Rail v2: a single calm navigation surface, not six competing buttons. */
body.uw-active .uw-primary {
  grid-template-columns: 170px minmax(0, 1fr) 88px !important;
  gap: 18px !important;
  height: 58px !important;
  padding: 7px 16px 6px !important;
}

body.uw-active .uw-brand {
  justify-content: flex-start !important;
  padding: 0 0 0 2px !important;
  border-right: 0 !important;
}

body.uw-active .uw-brand span {
  font-size: 1.12rem !important;
  letter-spacing: .015em;
}

body.uw-active .uw-studios {
  width: min(1120px, 100%);
  justify-self: center;
  align-items: stretch;
  gap: 3px !important;
  padding: 4px !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 14px !important;
  background: rgba(15, 19, 23, .72) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 8px 24px rgba(0, 0, 0, .18) !important;
  backdrop-filter: blur(20px) saturate(1.08);
}

body.uw-active .uw-studio {
  min-height: 38px !important;
  grid-template-columns: 24px minmax(0, auto) !important;
  justify-content: center;
  gap: 8px !important;
  padding: 4px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  transform: none !important;
}

body.uw-active .uw-studio:hover {
  background: rgba(255, 255, 255, .045) !important;
  color: #eef1ed !important;
}

body.uw-active .uw-studio.active {
  border-color: color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, .08)) !important;
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, .035)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 6px 18px color-mix(in srgb, var(--accent) 8%, transparent) !important;
}

body.uw-active .uw-studio::after,
body.uw-active .uw-studio.active::after {
  right: 18px !important;
  bottom: -1px !important;
  left: 18px !important;
  height: 1px !important;
  opacity: 0 !important;
  transform: scaleX(.55) !important;
  box-shadow: none !important;
}

body.uw-active .uw-studio.active::after {
  opacity: 1 !important;
  background: color-mix(in srgb, var(--accent) 72%, transparent) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 38%, transparent) !important;
}

body.uw-active .uw-studio > i {
  width: 22px !important;
  height: 22px !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .018) !important;
  font-size: .54rem !important;
}

body.uw-active .uw-studio.active > i {
  background: color-mix(in srgb, var(--accent) 16%, transparent) !important;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 16%, transparent) !important;
}

body.uw-active .uw-studio strong {
  font-size: .68rem !important;
  letter-spacing: .01em;
}

body.uw-active .uw-global-actions {
  align-self: center;
}

body.uw-active .uw-global-actions::before {
  content: none;
}

body.uw-active .uw-contextbar {
  border-top-color: rgba(255, 255, 255, .06) !important;
  background: rgba(7, 9, 11, .72) !important;
}

@media (max-width: 900px) {
  body.uw-active .uw-primary {
    grid-template-columns: 118px minmax(0, 1fr) 74px !important;
    gap: 8px !important;
    padding-inline: 8px !important;
  }
  body.uw-active .uw-studios {
    justify-self: stretch;
    width: 100%;
    padding: 3px !important;
    border-radius: 11px !important;
  }
  body.uw-active .uw-studio {
    flex: 0 0 88px;
    padding-inline: 6px !important;
  }
  body.uw-active .uw-global-actions::before {
    display: none;
  }
}

@media (max-width: 560px) {
  body.uw-active .uw-primary {
    grid-template-columns: 94px minmax(0, 1fr) 70px !important;
    gap: 4px !important;
    padding-inline: 6px !important;
  }
  body.uw-active .uw-studios {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }
  body.uw-active .uw-studio {
    flex-basis: 76px;
    border-radius: 8px !important;
    padding-inline: 4px !important;
  }
  body.uw-active .uw-studio strong {
    font-size: .48rem !important;
  }
  body.uw-active .uw-brand span {
    font-size: .9rem !important;
  }
}

/* Quiet Luxury Controls: one hierarchy for every clickable surface. */
body.uw-active .uw-primary {
  grid-template-columns: 148px minmax(0, 1fr) 74px !important;
  gap: 12px !important;
  padding: 6px 12px 5px !important;
}

body.uw-active .uw-brand {
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
  padding: 0 14px 0 4px !important;
}

body.uw-active .uw-studios {
  align-items: stretch;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.uw-active .uw-studio {
  position: relative;
  min-height: 38px !important;
  padding: 2px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body.uw-active .uw-studio::after {
  content: '';
  display: block !important;
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background .24s ease, box-shadow .24s ease;
}

body.uw-active .uw-studio.active {
  color: #f5f1e8 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.uw-active .uw-studio.active::after {
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 38%, transparent);
}

body.uw-active .uw-studio > i {
  width: 21px !important;
  height: 21px !important;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, rgba(255, 255, 255, .16)) !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--accent) 80%, #d9e0de) !important;
}

body.uw-active .uw-studio.active > i {
  background: color-mix(in srgb, var(--accent) 13%, transparent) !important;
  color: color-mix(in srgb, var(--accent) 88%, #fff) !important;
}

body.uw-active .uw-global-actions {
  justify-content: flex-end;
  gap: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

body.uw-active .uw-icon,
body.uw-active .uw-utility-toggle {
  width: 36px !important;
  height: 36px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #aab7b9 !important;
  font-size: .92rem !important;
  letter-spacing: .12em;
  transition: color .2s ease, background .2s ease, transform .2s var(--uw-ease) !important;
}

body.uw-active .uw-icon:hover,
body.uw-active .uw-utility-toggle:hover,
body.uw-active .uw-icon:focus-visible,
body.uw-active .uw-utility-toggle:focus-visible {
  background: rgba(255, 255, 255, .06) !important;
  color: #f5e8c8 !important;
  transform: translateY(-1px);
}

body.uw-active .uw-contextbar {
  grid-template-columns: 148px minmax(170px, 208px) minmax(0, 1fr) 128px !important;
  gap: 8px !important;
  padding: 4px 12px !important;
}

body.uw-active .uw-handoff,
body.uw-active .uw-reader-toggle {
  display: none !important;
}

body.uw-active .uw-tool-current,
body.uw-active .uw-ref-form,
body.uw-active .uw-truth-button {
  height: 35px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.uw-active .uw-tool-current {
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
}

body.uw-active .uw-ref-form {
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
}

body.uw-active .uw-ref-form input {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 0 !important;
  color: #f2eee4 !important;
}

body.uw-active .uw-ref-form input:focus {
  border-bottom-color: var(--uw-teal) !important;
  box-shadow: none !important;
}

body.uw-active .uw-ref-form button {
  min-width: 30px;
  border: 0 !important;
  background: transparent !important;
  color: var(--uw-teal) !important;
}

body.uw-active .uw-focus-summary {
  padding-inline: 8px;
}

body.uw-active .uw-truth-button {
  justify-content: flex-end;
  padding-inline: 8px !important;
}

body.uw-active .uw-tool-menu,
body.uw-active .uw-utility-menu {
  border: 1px solid rgba(209, 173, 105, .25) !important;
  border-radius: 14px !important;
  background: rgba(10, 14, 17, .98) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .045) !important;
}

body.uw-active .uw-tool-menu > div > button,
body.uw-active .uw-utility-menu button {
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background .2s ease, color .2s ease, transform .2s var(--uw-ease) !important;
}

body.uw-active .uw-tool-menu > div > button:hover,
body.uw-active .uw-utility-menu button:hover,
body.uw-active .uw-tool-menu > div > button:focus-visible,
body.uw-active .uw-utility-menu button:focus-visible {
  background: rgba(255, 255, 255, .06) !important;
  transform: translateX(2px);
}

body.uw-active .uw-tool-menu > div > button.active {
  background: color-mix(in srgb, var(--uw-accent) 9%, transparent) !important;
  box-shadow: inset 2px 0 var(--uw-accent) !important;
}

body.uw-active .uw-utility-menu {
  position: fixed;
  top: 58px;
  right: 12px;
  z-index: 20400;
  width: min(312px, calc(100vw - 24px));
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transition: opacity .2s ease, transform .24s var(--uw-ease);
}

body.uw-active .uw-utility-menu.open {
  opacity: 1;
  transform: none;
}

body.uw-active .uw-utility-menu > header {
  display: grid;
  gap: 4px;
  padding: 10px 11px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

body.uw-active .uw-utility-menu > header span {
  color: #f4e8c9;
  font: 600 .68rem/1 'DM Sans', system-ui, sans-serif;
}

body.uw-active .uw-utility-menu > header small {
  color: #819095;
  font: .55rem/1.35 'JetBrains Mono', monospace;
}

body.uw-active .uw-utility-menu > div {
  display: grid;
  gap: 2px;
  padding-top: 5px;
}

body.uw-active .uw-utility-menu button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 6px 9px;
  text-align: left;
  color: #dce6e4;
}

body.uw-active .uw-utility-menu button > i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(209, 173, 105, .32);
  border-radius: 6px;
  color: #d1ad69;
  font: 600 .62rem/1 'JetBrains Mono', monospace;
  font-style: normal;
}

body.uw-active .uw-utility-menu button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.uw-active .uw-utility-menu button strong {
  color: inherit;
  font: 600 .66rem/1.1 'DM Sans', system-ui, sans-serif;
}

body.uw-active .uw-utility-menu button small {
  overflow: hidden;
  color: #819095;
  font: .52rem/1.2 'JetBrains Mono', monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Reader controls read as one instrument: tabs, search and navigation stay quiet. */
body.uw-active .side-head {
  padding: 12px 14px 10px !important;
  border-bottom-color: rgba(209, 173, 105, .16) !important;
}

body.uw-active .side .reader-tools {
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

body.uw-active .side .tabs {
  min-width: 0 !important;
  flex: 0 1 auto !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.uw-active .side .tab {
  position: relative;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #839096 !important;
  font-size: .56rem !important;
  letter-spacing: .08em;
}

body.uw-active .side .tab::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

body.uw-active .side .tab.act {
  color: #f3dfb4 !important;
}

body.uw-active .side .tab.act::after {
  background: #d1ad69;
  box-shadow: 0 0 12px rgba(209, 173, 105, .3);
}

body.uw-active .side .reader-word-toggle {
  min-height: 31px !important;
  padding: 0 0 0 10px !important;
  border: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #91d8c8 !important;
  font-size: .52rem !important;
  box-shadow: none !important;
  transform: none !important;
}

body.uw-active .side .reader-word-toggle:hover,
body.uw-active .side .reader-word-toggle.act {
  background: transparent !important;
  color: #e5fff8 !important;
  box-shadow: none !important;
}

body.uw-active .side .focussearch {
  gap: 10px !important;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

body.uw-active .side .focussearch input,
body.uw-active .side .sbox input {
  height: 35px !important;
  padding-inline: 2px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.uw-active .side .focussearch input:focus,
body.uw-active .side .sbox input:focus {
  border-bottom-color: #72d8c4 !important;
}

body.uw-active .side .focussearch button {
  height: 30px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #8c9b9d !important;
  font-size: .5rem !important;
}

body.uw-active .side .focussearch button:hover {
  background: transparent !important;
  color: #f1e6c9 !important;
}

body.uw-active .side .rnav,
body.uw-active .side .sbox {
  gap: 7px !important;
  padding: 9px 14px !important;
  border-bottom-color: rgba(255, 255, 255, .08) !important;
  background: rgba(10, 14, 18, .92) !important;
}

body.uw-active .side .rnav select {
  height: 36px !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: .72rem !important;
}

body.uw-active .side .rnav button {
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #b4c1bf !important;
}

body.uw-active .side .rnav button:hover {
  background: rgba(114, 216, 196, .08) !important;
  color: #eafff8 !important;
}

body.uw-active .wordstudy-panel {
  margin: 0 14px 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .035) !important;
}

body.uw-active .wordstudy-close,
body.uw-active .modechrome-btn.close,
body.uw-active .studymode-actions .close {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #96a3a4 !important;
}

body.uw-active .wordstudy-close:hover,
body.uw-active .modechrome-btn.close:hover,
body.uw-active .studymode-actions .close:hover {
  background: rgba(255, 255, 255, .06) !important;
  color: #f5e7c5 !important;
}

/* Mode headers and right-side actions use text hierarchy instead of button walls. */
body.uw-active .app .modechrome-actions > button,
body.uw-active .app .modechrome-btn,
body.uw-active .app .studymode-actions > button,
body.uw-active .app .modebrief-btn,
body.uw-active .app .study-smallbtn,
body.uw-active .app .refspot-actions button {
  min-height: 31px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #aab7b9 !important;
  box-shadow: none !important;
  font-size: .52rem !important;
  letter-spacing: .06em;
  transition: color .2s ease, border-color .2s ease, background .2s ease !important;
}

body.uw-active .app .modechrome-actions > button:hover,
body.uw-active .app .modechrome-btn:hover,
body.uw-active .app .studymode-actions > button:hover,
body.uw-active .app .modebrief-btn:hover,
body.uw-active .app .study-smallbtn:hover,
body.uw-active .app .refspot-actions button:hover {
  transform: none !important;
  border-bottom-color: #d1ad69 !important;
  background: rgba(209, 173, 105, .06) !important;
  color: #f2e5c4 !important;
}

body.uw-active .app .modechrome-btn[data-active="true"],
body.uw-active .app .modebrief-btn.active,
body.uw-active .app .studymode-actions > button[aria-pressed="true"] {
  border-bottom-color: #d1ad69 !important;
  background: rgba(209, 173, 105, .08) !important;
  color: #f4e5c3 !important;
}

body.uw-active .app .modebrief-link {
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--uw-ease) !important;
}

body.uw-active .app .modebrief-link:hover {
  transform: translateX(2px) !important;
  background: rgba(255, 255, 255, .055) !important;
}

body.uw-active .vizhud-actions {
  gap: 0 !important;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

body.uw-active .vizhud-btn {
  min-height: 29px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #aab7b9 !important;
  font-size: .5rem !important;
  transition: color .2s ease, background .2s ease !important;
}

body.uw-active .vizhud-btn:first-child {
  padding-left: 0 !important;
}

body.uw-active .vizhud-btn:last-child {
  border-right: 0 !important;
}

body.uw-active .vizhud-btn:hover,
body.uw-active .vizhud-btn:focus-visible {
  transform: none !important;
  background: rgba(114, 216, 196, .07) !important;
  color: #e9fff8 !important;
}

@media (max-width: 560px) {
  body.uw-active .vizhud {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    top: 12px !important;
    left: 12px !important;
    padding: 11px !important;
    border-radius: 11px !important;
  }
  body.uw-active .vizhud-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.uw-active .vizhud-btn,
  body.uw-active .vizhud-btn:first-child {
    min-width: 0 !important;
    padding: 0 5px !important;
    border-right: 1px solid rgba(255, 255, 255, .08) !important;
    font-size: .44rem !important;
  }
  body.uw-active .vizhud-btn:nth-child(2n) {
    border-right: 0 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active .uw-primary {
    grid-template-columns: 108px minmax(0, 1fr) 74px !important;
  }
  body.uw-active .uw-contextbar {
    grid-template-columns: 125px minmax(0, 1fr) 38px !important;
  }
}

@media (max-width: 560px) {
  body.uw-active .uw-primary {
    grid-template-columns: 94px minmax(0, 1fr) 70px !important;
  }
  body.uw-active .uw-global-actions {
    gap: 0 !important;
  }
  body.uw-active .uw-icon,
  body.uw-active .uw-utility-toggle {
    width: 33px !important;
  }
  body.uw-active .uw-studio {
    flex-basis: 74px;
    padding-inline: 4px !important;
  }
  body.uw-active .uw-contextbar {
    grid-template-columns: 112px minmax(0, 1fr) 34px !important;
  }
  body.uw-active .uw-utility-menu {
    top: 60px;
    right: 8px;
    width: min(300px, calc(100vw - 16px));
  }
  body.uw-active .side .reader-tools {
    gap: 5px !important;
  }
  body.uw-active .side .tab {
    padding-inline: 7px !important;
    font-size: .49rem !important;
  }
  body.uw-active .side .reader-word-toggle {
    padding-left: 7px !important;
    font-size: .46rem !important;
  }
}

@media (max-width: 560px) {
  /* The legacy mobile rule has an extra :not() specificity; keep the archive rail readable. */
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-rows: 230px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-template-rows: 60px minmax(0, 1fr) 26px !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    min-height: 0 !important;
    grid-template-rows: 25px minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 48px !important;
    gap: 3px !important;
    padding: 2px 8px 7px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    width: 100% !important;
    min-height: 46px !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    padding: 5px 7px !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
    font-size: .48rem !important;
    line-height: 1.05 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
    max-width: none !important;
    font-size: .59rem !important;
    line-height: 1.1 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
    display: block !important;
    max-width: none !important;
    overflow: hidden !important;
    font-size: .42rem !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Final cascade guard for module controls declared later in this stylesheet. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header small,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window > span {
  font-size: var(--uw-type-micro) !important;
  line-height: 1.25 !important;
}

body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip :is(span, small) {
  font-size: var(--uw-type-micro) !important;
  line-height: 1.25 !important;
}

body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
  font-size: var(--uw-type-label) !important;
  line-height: 1.3 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) :is(
  .pt-tradition-switch button,
  .pt-view-tabs button,
  .pt-search-row input,
  .pt-search-row select
) {
  font-size: var(--uw-type-label) !important;
  line-height: 1.25 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) :is(
  .pt-tradition-switch button,
  .pt-view-tabs button
) {
  min-height: 36px;
}

/* Unified chrome v10: quiet hierarchy, one active accent, less visual noise. */
:root {
  --uw-header: 100px;
  --uw-bg: #080b0f;
  --uw-panel: #0c1117;
  --uw-panel-2: #111821;
  --uw-line: rgba(226, 234, 238, .08);
  --uw-line-strong: rgba(226, 234, 238, .14);
  --uw-muted: #84919b;
  --uw-nav-surface: rgba(255, 255, 255, .018);
}

body.uw-active {
  background: var(--uw-bg);
}

body.uw-active > .app {
  height: calc(100dvh - var(--uw-header)) !important;
  max-height: calc(100dvh - var(--uw-header)) !important;
  background: var(--uw-bg);
}

.uw-chrome {
  height: var(--uw-header);
  border-bottom: 1px solid rgba(226, 234, 238, .1);
  background: rgba(8, 11, 15, .94);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .34), inset 0 -1px rgba(255, 255, 255, .018);
  backdrop-filter: blur(28px) saturate(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
}

.uw-primary {
  height: 57px;
  grid-template-columns: 166px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 6px 12px 5px;
  border-bottom: 0;
}

.uw-brand {
  min-width: 0;
  padding: 0 13px 0 4px;
  border-right: 1px solid rgba(226, 234, 238, .1);
  border-radius: 0;
  opacity: .96;
}

.uw-brand span {
  color: #f1ecdf;
  font-size: 1rem;
  letter-spacing: .01em;
}

.uw-brand small {
  margin-top: 3px;
  color: #77848d;
  font-size: .46rem;
  letter-spacing: .16em;
}

.uw-studios {
  min-width: 0;
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(226, 234, 238, .08);
  border-radius: 8px;
  background: var(--uw-nav-surface);
}

.uw-studio {
  min-width: 0;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 7px;
  min-height: 42px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8b969e;
  transition: color .24s var(--uw-ease), background .24s var(--uw-ease), border-color .24s var(--uw-ease), transform .24s var(--uw-ease);
}

.uw-studio::after {
  right: 8px;
  bottom: 2px;
  left: 8px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .2s ease, transform .36s var(--uw-ease);
}

.uw-studio:hover {
  color: #e5eaec;
  background: rgba(255, 255, 255, .035);
  transform: none;
}

.uw-studio.active {
  color: #f4f2ec;
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, .08));
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.uw-studio.active::after {
  opacity: .9;
  transform: scaleX(1);
}

.uw-studio > i {
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, .12));
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--accent) 72%, #d9e0e4 28%);
  font-size: .58rem;
  transition: background .24s ease, border-color .24s ease, box-shadow .3s ease, transform .3s var(--uw-ease);
}

.uw-studio.active > i {
  border-color: color-mix(in srgb, var(--accent) 76%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 15%, transparent);
  transform: none;
}

.uw-studio strong {
  overflow: hidden;
  color: inherit;
  font-size: 12px !important;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-studio small { display: none; }

.uw-global-actions {
  gap: 3px;
  padding-left: 8px;
  border-left: 1px solid rgba(226, 234, 238, .1);
}

.uw-icon {
  width: 32px;
  height: 32px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: #94a0a7;
  font-size: .76rem;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .24s var(--uw-ease);
}

.uw-icon:hover {
  border-color: rgba(226, 234, 238, .12);
  background: rgba(255, 255, 255, .05);
  color: #f4f2ec;
  transform: translateY(-1px);
}

.uw-contextbar {
  height: 43px;
  grid-template-columns: 154px 190px minmax(0, 1fr) auto 74px 118px;
  gap: 5px;
  padding: 4px 12px 5px;
  border-top: 1px solid rgba(226, 234, 238, .06);
  background: rgba(4, 7, 10, .66);
}

.uw-tool-current,
.uw-reader-toggle,
.uw-truth-button,
.uw-ref-form {
  height: 34px;
  border-color: rgba(226, 234, 238, .09);
  border-radius: 6px;
  background: rgba(255, 255, 255, .018);
}

.uw-tool-current {
  padding: 0 8px 0 7px;
  border-left: 2px solid var(--uw-accent);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-right-color: transparent;
  border-radius: 0 6px 6px 0;
}

.uw-tool-current > i {
  width: 3px;
  height: 17px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--uw-accent) 32%, transparent);
}

.uw-tool-current small,
.uw-truth-button small,
.uw-reader-toggle small {
  color: #6f7c85;
  font-size: 10px !important;
  letter-spacing: .08em;
}

.uw-tool-current strong,
.uw-truth-button strong,
.uw-reader-toggle span {
  color: #dce5e8;
  font-size: 12px !important;
  font-weight: 650;
}

.uw-ref-form {
  background: rgba(255, 255, 255, .025);
}

.uw-ref-form label {
  color: #6f7c85;
  font: 600 10px/1 'JetBrains Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.uw-ref-form input {
  height: 32px;
  color: #edf2ef;
  font-size: 13px !important;
}

.uw-ref-form button::before {
  color: var(--uw-accent);
}

.uw-focus-summary {
  min-width: 0;
  gap: 8px;
  padding: 0 9px;
  border-left: 1px solid rgba(226, 234, 238, .08);
}

.uw-focus-summary span {
  color: var(--uw-accent);
  font-size: 10px !important;
  letter-spacing: .08em;
}

.uw-focus-summary strong {
  color: #e9eeed;
  font-size: 13px !important;
}

.uw-focus-summary small {
  min-width: 0;
  overflow: hidden;
  color: #77858d;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-handoff { gap: 2px; }

.uw-handoff button {
  height: 27px;
  max-width: 108px;
  padding: 0 7px;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  color: #829098;
  font-size: 11px !important;
}

.uw-handoff button:hover {
  border-color: rgba(226, 234, 238, .1);
  background: rgba(255, 255, 255, .04);
  color: #e9efed;
}

.uw-reader-toggle,
.uw-truth-button {
  padding: 0 8px;
}

.uw-reader-toggle:hover,
.uw-truth-button:hover,
.uw-ref-form:focus-within {
  border-color: color-mix(in srgb, var(--uw-accent) 30%, rgba(226, 234, 238, .1));
  background: color-mix(in srgb, var(--uw-accent) 4%, rgba(255, 255, 255, .025));
}

@media (max-width: 1180px) {
  .uw-primary { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 6px; padding-inline: 6px; }
  .uw-brand { justify-content: center; padding: 0; border-right: 0; }
  .uw-brand span { font-size: 0; }
  .uw-brand span::before { content: 'b'; color: #f1ecdf; font: 700 1.05rem/1 'Cormorant Garamond', serif; }
  .uw-brand small { display: none; }
  .uw-studios { grid-template-columns: repeat(6, minmax(70px, 1fr)); }
  .uw-contextbar { grid-template-columns: 148px minmax(170px, 220px) minmax(120px, 1fr) auto 62px 40px; padding-inline: 7px; }
  .uw-truth-button { width: 40px; justify-content: center; padding: 0; }
  .uw-truth-button > span { display: none; }
}

@media (max-width: 760px) {
  :root { --uw-header: 110px; }
  .uw-primary { height: 60px; grid-template-columns: 44px minmax(0, 1fr) auto; padding: 5px 4px; }
  .uw-brand { display: flex !important; }
  .uw-studios {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
  }
  .uw-studios::-webkit-scrollbar { display: none; }
  .uw-studio { flex: 0 0 72px; min-height: 48px; grid-template-columns: 1fr; gap: 3px; padding: 3px 2px; justify-items: center; }
  .uw-studio strong { max-width: 68px; font-size: 10px !important; text-align: center; }
  .uw-studio::after { right: 8px; left: 8px; }
  .uw-global-actions { gap: 1px; padding-left: 2px; }
  .uw-icon { width: 30px; height: 39px; }
  .uw-icon:nth-child(2),
  .uw-icon:nth-child(3) { display: none; }
  .uw-contextbar { height: 50px; grid-template-columns: 116px minmax(0, 1fr) 36px; gap: 4px; padding: 5px; }
  .uw-tool-current,
  .uw-ref-form,
  .uw-truth-button { height: 40px; }
  .uw-ref-form input { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .uw-studio,
  .uw-studio::after,
  .uw-studio > i,
  .uw-icon { transition: none !important; }
}

/* Crossref v12: compact canon atlas, calmer evidence hierarchy. */
body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell {
  inset: 0 !important;
  grid-template-rows: 88px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px 10px 10px !important;
  background: #080d12;
  animation: uwHeatmapIn .34s var(--uw-ease) both;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-head {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 11px 15px !important;
  border-radius: 10px !important;
  border-color: rgba(226, 234, 238, .1) !important;
  background: linear-gradient(135deg, #10171d 0%, #0b1116 62%, #0d171a 100%) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .035) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-head::before {
  content: '';
  width: 3px;
  position: absolute;
  inset: 13px auto 13px 0;
  border-radius: 0 3px 3px 0;
  background: #70dfca;
  box-shadow: 0 0 18px rgba(112, 223, 202, .22);
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-kicker {
  color: #70dfca !important;
  font-size: .48rem !important;
  letter-spacing: .16em !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-title {
  margin-top: 3px;
  color: #f1eee6 !important;
  font: 600 1.42rem/1.05 'Cormorant Garamond', serif !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-copy {
  max-width: 820px;
  margin-top: 4px;
  overflow: hidden;
  color: #aab8bc !important;
  font-size: .62rem !important;
  line-height: 1.35 !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-actions {
  align-self: center;
  gap: 4px;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-btn {
  min-height: 29px !important;
  padding: 0 9px !important;
  border-radius: 5px !important;
  border-color: rgba(226, 234, 238, .12) !important;
  background: rgba(255, 255, 255, .025) !important;
  color: #9ba9ad !important;
  font-size: .48rem !important;
  letter-spacing: .1em;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-btn:hover {
  border-color: rgba(112, 223, 202, .35) !important;
  background: rgba(112, 223, 202, .08) !important;
  color: #d8f5ed !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-main {
  min-height: 0;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr) !important;
  gap: 8px !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-boardwrap, .heatmode-inspector, .heatmode-rail) {
  border-radius: 11px !important;
  border-color: rgba(226, 234, 238, .09) !important;
  background: linear-gradient(180deg, #0d141a, #090e13 78%) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap {
  padding: 12px !important;
  overflow: auto;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-side {
  gap: 8px !important;
  grid-template-rows: minmax(0, 1fr) minmax(174px, .58fr) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardhead {
  gap: 8px !important;
  margin-bottom: 11px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lensbar {
  min-height: 36px;
  padding: 5px 7px !important;
  border-radius: 7px !important;
  border-color: rgba(226, 234, 238, .08) !important;
  background: rgba(255, 255, 255, .018) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lensbar span {
  color: #73848a !important;
  font-size: .46rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lensbar div { gap: 3px !important; }

body.uw-active .app[data-active-mode="heatmap"] .heat-lens {
  min-height: 26px !important;
  padding: 0 8px !important;
  border-radius: 5px !important;
  border-color: transparent !important;
  background: transparent !important;
  color: #7f9096 !important;
  font-size: .45rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lens.act {
  border-color: rgba(112, 223, 202, .28) !important;
  background: rgba(112, 223, 202, .1) !important;
  color: #bdf2e7 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-summary,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-insights {
  gap: 6px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-stat,
body.uw-active .app[data-active-mode="heatmap"] .heat-insight {
  padding: 9px !important;
  border-radius: 9px !important;
  border-color: rgba(226, 234, 238, .08) !important;
  background: rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-stat strong {
  color: #f0eee8 !important;
  font-size: 1.06rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-stat span,
body.uw-active .app[data-active-mode="heatmap"] .heat-insight small {
  color: #819196 !important;
  font-size: .45rem !important;
  line-height: 1.25;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-insight {
  gap: 6px !important;
  filter: saturate(.72);
}

body.uw-active .app[data-active-mode="heatmap"] .heat-insight-head strong,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation strong {
  color: #e8ecea !important;
  font-size: .7rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-insight-head span {
  color: #99d7ca !important;
  font-size: .45rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-spark i {
  background: linear-gradient(90deg, #70dfca, #cbb274) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-relations {
  gap: 6px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation {
  gap: 4px !important;
  padding: 9px !important;
  border-radius: 8px !important;
  border-color: rgba(226, 234, 238, .08) !important;
  background: rgba(255, 255, 255, .022) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation:hover,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation.act {
  border-color: rgba(112, 223, 202, .38) !important;
  background: rgba(112, 223, 202, .08) !important;
  box-shadow: 0 0 0 1px rgba(112, 223, 202, .08) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation small {
  color: #7f9096 !important;
  font-size: .46rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-grid { gap: 3px !important; }

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-corner, .heatmode-col, .heatmode-row, .heatmode-cell) {
  border-radius: 6px !important;
  min-width: 20px;
  min-height: 20px;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-col {
  min-height: 70px;
  color: #a9b6b9 !important;
  font-size: .45rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-row {
  min-width: 68px;
  color: #a9b6b9 !important;
  font-size: .45rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-row.current, .heatmode-col.current) {
  border-color: rgba(112, 223, 202, .38) !important;
  background: rgba(112, 223, 202, .1) !important;
  color: #d5f4ec !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell {
  filter: saturate(.78) brightness(1.04);
  transition: transform .16s var(--uw-ease), border-color .2s ease, box-shadow .2s ease, filter .2s ease;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell:hover,
body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell.sel {
  filter: saturate(1) brightness(1.12);
  border-color: rgba(112, 223, 202, .62) !important;
  box-shadow: 0 0 0 1px rgba(112, 223, 202, .2), 0 0 18px rgba(112, 223, 202, .12) !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-inspector, .heatmode-rail) {
  padding: 12px !important;
  gap: 9px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-card,
body.uw-active .app[data-active-mode="heatmap"] .heatcard {
  gap: 7px !important;
  padding: 11px !important;
  border-radius: 9px !important;
  border-color: rgba(226, 234, 238, .08) !important;
  background: rgba(255, 255, 255, .024) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-card.emphasis {
  border-color: rgba(112, 223, 202, .2) !important;
  background: linear-gradient(135deg, rgba(112, 223, 202, .09), rgba(255, 255, 255, .02)) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-card strong,
body.uw-active .app[data-active-mode="heatmap"] .heatcard h3 {
  color: #f0eee7 !important;
  font-size: 1.08rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-card p,
body.uw-active .app[data-active-mode="heatmap"] .heatcard p {
  color: #a9b7bb !important;
  font-size: .64rem !important;
  line-height: 1.45 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-link {
  padding: 8px !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .02) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-link.act {
  border-color: rgba(112, 223, 202, .32) !important;
  background: rgba(112, 223, 202, .08) !important;
}

@keyframes uwHeatmapIn {
  from { opacity: .01; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Chronos v12: archival Greek study desk, with one compact command line. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
  --tl-archive-ink: #eee9df;
  --tl-archive-muted: #879297;
  --tl-archive-gold: #c9a565;
  --tl-archive-teal: #77d7c2;
  background: #080b0d !important;
  color: var(--tl-archive-ink) !important;
  animation: uwChronosIn .42s var(--uw-ease) both;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
  border-bottom-color: rgba(201, 165, 101, .2) !important;
  background:
    repeating-linear-gradient(90deg, rgba(201, 165, 101, .025) 0, rgba(201, 165, 101, .025) 1px, transparent 1px, transparent 72px),
    linear-gradient(180deg, #111417, #0b0e10) !important;
  box-shadow: inset 0 -1px rgba(255, 255, 255, .025), 0 12px 28px rgba(0, 0, 0, .25) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block h2 {
  color: var(--tl-archive-ink) !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: .015em !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block h2::before {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--tl-archive-gold);
  box-shadow: 0 0 12px rgba(201, 165, 101, .3);
  transform: rotate(45deg);
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
  border-color: rgba(201, 165, 101, .22) !important;
  color: #bba77f !important;
  background: rgba(201, 165, 101, .045);
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
  grid-template-columns: minmax(0, 1fr) minmax(188px, 236px) 31px !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input {
  border-color: rgba(201, 165, 101, .16) !important;
  border-radius: 6px !important;
  background: #090c0e !important;
  color: var(--tl-archive-ink) !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input::placeholder {
  color: #68757a !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input:focus {
  border-color: rgba(201, 165, 101, .46) !important;
  box-shadow: 0 0 0 3px rgba(201, 165, 101, .08) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
  border-color: rgba(201, 165, 101, .16) !important;
  border-radius: 6px !important;
  background: rgba(201, 165, 101, .025) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button {
  color: #7f8a8e !important;
  font-size: .45rem !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button.act {
  color: #f0e5cc !important;
  background: rgba(201, 165, 101, .12) !important;
  box-shadow: inset 0 0 0 1px rgba(201, 165, 101, .22) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon {
  width: 31px;
  height: 31px;
  border-color: rgba(201, 165, 101, .22) !important;
  border-radius: 5px;
  color: var(--tl-archive-gold);
  background: rgba(201, 165, 101, .05);
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon:hover {
  border-color: rgba(201, 165, 101, .48) !important;
  background: rgba(201, 165, 101, .12) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  border-color: rgba(201, 165, 101, .22) !important;
  background: #090c0e !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .03) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
  background: #080e12 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap {
  position: relative;
  border-color: rgba(201, 165, 101, .13) !important;
  background:
    repeating-linear-gradient(0deg, rgba(201, 165, 101, .018) 0, rgba(201, 165, 101, .018) 1px, transparent 1px, transparent 36px),
    linear-gradient(180deg, #091115, #070b0e) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap::before {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(201, 165, 101, .045);
  border-radius: 9px;
  opacity: .8;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  border-left-color: rgba(201, 165, 101, .16) !important;
  background: #0d1113 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
  background: linear-gradient(135deg, rgba(201, 165, 101, .085), transparent 68%) !important;
  border-bottom-color: rgba(201, 165, 101, .16) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window > span {
  color: #aa8a50 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > strong {
  color: var(--tl-archive-ink) !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: .86rem !important;
  letter-spacing: .01em;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header {
  border-bottom-color: rgba(201, 165, 101, .12) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
  border-bottom-color: rgba(201, 165, 101, .1) !important;
  background: transparent !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip:hover {
  background: rgba(201, 165, 101, .055) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
  color: #c7a761 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
  color: #e9e4db !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: .7rem !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  background: #0b0f11 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > i > b {
  background: linear-gradient(90deg, var(--tl-archive-gold), var(--tl-archive-teal)) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn:hover {
  border-color: rgba(201, 165, 101, .42) !important;
  color: #f1e5c8 !important;
}

@keyframes uwChronosIn {
  from { opacity: .01; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 1181px) {
  body.uw-active .uw-contextbar {
    grid-template-columns: 148px 170px minmax(0, 1fr) auto 74px 118px;
  }
}

@media (max-width: 900px) {
  body.uw-active .app.analysis-open[data-active-mode="heatmap"] {
    grid-template-rows: 0 minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body.uw-active .app.analysis-open[data-active-mode="heatmap"] > .viz {
    grid-row: 2 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.uw-active .app.analysis-open[data-active-mode="heatmap"] > .side {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell {
    grid-template-rows: 96px minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-side {
    grid-template-rows: auto auto !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) 31px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 560px) {
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell {
    grid-template-rows: 118px minmax(0, 1fr) !important;
    padding: 6px !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-head {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: start;
    padding: 9px 11px !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-head .modechrome-actions {
    position: static;
    justify-self: end;
    align-self: end;
    margin-top: 3px;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-title {
    max-width: 100%;
    font-size: 1.18rem !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatmode-copy {
    max-width: 100%;
    font-size: .57rem !important;
  }

  body.uw-active .app[data-active-mode="heatmap"] .heatboard-summary,
  body.uw-active .app[data-active-mode="heatmap"] .heatboard-insights,
  body.uw-active .app[data-active-mode="heatmap"] .heatboard-relations {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
    font-size: 1rem !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button {
    font-size: .42rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell,
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
    animation: none !important;
  }
}

/* Unified Workspace 10x: one calm chrome, one interaction grammar. */
:root {
  --uw-header: 94px;
  --uw-bg: #07090b;
  --uw-panel: #0b1014;
  --uw-panel-2: #11171b;
  --uw-line: rgba(231, 236, 234, .1);
  --uw-line-strong: rgba(231, 236, 234, .18);
  --uw-text: #f1efe9;
  --uw-muted: #87939a;
  --uw-gold: #d1ad69;
  --uw-teal: #72d8c4;
  --uw-ease: cubic-bezier(.16, 1, .3, 1);
}

body.uw-active {
  padding-top: var(--uw-header);
  background:
    radial-gradient(circle at 50% -18%, rgba(114, 216, 196, .045), transparent 34%),
    #07090b;
}

body.uw-active .uw-chrome {
  height: var(--uw-header);
  border-bottom-color: rgba(209, 173, 105, .18);
  background: rgba(7, 9, 11, .9);
  box-shadow: 0 18px 58px rgba(0, 0, 0, .4), inset 0 -1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(28px) saturate(1.12);
}

body.uw-active .uw-primary {
  height: 50px;
  grid-template-columns: 142px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 5px 10px 4px;
}

body.uw-active .uw-brand {
  padding: 0 10px 0 5px;
  border-right-color: rgba(255, 255, 255, .1);
}
body.uw-active .uw-brand span {
  color: #f2dfba;
  font: 600 1.05rem/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .01em;
}
body.uw-active .uw-brand small { display: none; }

body.uw-active .uw-studios {
  min-width: 0;
  gap: 3px;
}
body.uw-active .uw-studio {
  min-width: 0;
  min-height: 36px;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #7f8a90;
  transition: background .24s var(--uw-ease), color .24s var(--uw-ease), border-color .24s ease, transform .24s var(--uw-ease);
}
body.uw-active .uw-studio:hover { transform: translateY(-1px); }
body.uw-active .uw-studio strong {
  overflow: hidden;
  color: inherit;
  font: 650 .65rem/1 'DM Sans', system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.uw-active .uw-studio > i {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  font-size: .55rem;
}
body.uw-active .uw-studio.active {
  color: #f5f1e8;
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, .018));
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: inset 0 -2px color-mix(in srgb, var(--accent) 78%, transparent);
}
body.uw-active .uw-studio::after { display: none; }

body.uw-active .uw-global-actions {
  gap: 3px;
  padding-left: 8px;
  border-left-color: rgba(255, 255, 255, .09);
}
body.uw-active .uw-icon {
  width: 33px;
  height: 33px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .018);
  color: #aeb9bd;
}

body.uw-active .uw-contextbar {
  height: 44px;
  grid-template-columns: 154px minmax(172px, 214px) minmax(0, 1fr) auto 66px 116px;
  gap: 6px;
  padding: 4px 10px;
  border-top-color: rgba(255, 255, 255, .045);
}
body.uw-active .uw-tool-current,
body.uw-active .uw-reader-toggle,
body.uw-active .uw-truth-button,
body.uw-active .uw-ref-form {
  height: 35px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .018);
}
body.uw-active .uw-tool-current strong,
body.uw-active .uw-truth-button strong { font-size: .59rem; }
body.uw-active .uw-focus-summary { gap: 6px; }
body.uw-active .uw-focus-summary small {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.uw-active .uw-handoff button { max-width: 110px; }

body.uw-active .uw-tool-menu {
  top: calc(var(--uw-header) + 7px);
  width: min(390px, calc(100vw - 16px));
  border-color: rgba(209, 173, 105, .26);
  border-radius: 8px;
  background: rgba(10, 14, 17, .985);
}
body.uw-active .uw-tool-menu > header {
  padding: 14px 15px 12px;
  border-bottom-color: rgba(255, 255, 255, .08);
}
body.uw-active .uw-tool-menu > div { padding: 7px; }
body.uw-active .uw-tool-menu > div > button {
  min-height: 45px;
  border-radius: 5px;
}

body.uw-active :is(.uw-panel, .uw-command, .uw-compare, .uw-presentation) {
  border-color: rgba(209, 173, 105, .22);
  background: rgba(9, 13, 16, .985);
  box-shadow: 0 30px 110px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .04);
}
body.uw-active .uw-panel-head { min-height: 64px; }
body.uw-active .uw-panel-head h2 { font-size: 1.1rem; }
body.uw-active .uw-evidence,
body.uw-active .uw-inspector-block,
body.uw-active .uw-inspector-hero { border-radius: 7px; }
body.uw-active .uw-evidence footer {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .075);
  color: #c9b98f;
  font-size: .62rem;
  line-height: 1.45;
}

/* Dense matrices are visual surfaces; only the focused proxy remains a control. */
body.uw-active .app[data-active-mode="heatmap"] .heatmode-grid.heatmap-virtual {
  position: relative;
  display: block !important;
  min-width: 0;
  min-height: 0;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #0b1116 !important;
}
body.uw-active .heatmap-virtual #HEATCANVAS {
  display: block;
  max-width: none;
  outline: none;
  cursor: crosshair;
  image-rendering: auto;
}
body.uw-active .heatmap-virtual #HEATCANVAS:focus {
  box-shadow: 0 0 0 2px rgba(114, 216, 196, .75), 0 0 26px rgba(114, 216, 196, .13);
}
body.uw-active .heatmap-focus-proxy {
  position: sticky;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: block;
  width: max-content;
  max-width: min(330px, calc(100% - 20px));
  min-height: 28px;
  margin: -60px 0 32px 10px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(114, 216, 196, .4);
  border-radius: 5px;
  background: rgba(7, 13, 16, .92);
  color: #d1f2ea;
  font: 600 .54rem/1 'JetBrains Mono', monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.uw-active .heatmap-focus-proxy:hover,
body.uw-active .heatmap-focus-proxy:focus-visible {
  background: rgba(114, 216, 196, .12);
  box-shadow: 0 0 0 3px rgba(114, 216, 196, .1);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.uw-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px;
  color: #b5c0c2;
  cursor: pointer;
  font: 600 .5rem/1 'JetBrains Mono', monospace;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.uw-file-action:hover {
  border-color: rgba(114, 216, 196, .4);
  background: rgba(114, 216, 196, .08);
  color: #d5f4ec;
}

/* Timeline and atlas: content first, chrome second. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
  min-width: 0;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-context-chip strong, .tl-console-window > strong, .tl-nearby strong) {
  overflow-wrap: anywhere;
  word-break: normal;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-stage-btn, .tl-context-segment button, .tl-command-icon) {
  min-width: 30px;
  min-height: 30px;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn {
  border-radius: 5px;
  transition: transform .22s var(--uw-ease), border-color .22s ease, background .22s ease;
}
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn:hover { transform: translateY(-1px); }

body.uw-active .app[data-active-mode="location"] #MAPV {
  background: #071014 !important;
}
body.uw-active .app[data-active-mode="location"] #MAPV .mapstage {
  background:
    radial-gradient(circle at 52% 48%, rgba(114, 216, 196, .11), transparent 30%),
    #071014 !important;
}
body.uw-active .app[data-active-mode="location"] #MAPV .maphud,
body.uw-active .app[data-active-mode="location"] #MAPV #MAPDETAILS {
  border-color: rgba(114, 216, 196, .18) !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .03);
}
body.uw-active .app[data-active-mode="location"] #MAPV .mapplace-card {
  min-height: 48px;
  border-radius: 6px;
  transition: transform .2s var(--uw-ease), background .2s ease, border-color .2s ease;
}
body.uw-active .app[data-active-mode="location"] #MAPV .mapplace-card:hover { transform: translateX(2px); }

/* Story Lab and Tradition use the same editorial hierarchy as Genealogy. */
body.uw-active #PARABLEMODE .parable-story-hero,
body.uw-active #PARABLEMODE .parable-story-detail,
body.uw-active #PARABLEMODE .parable-story-witnesses,
body.uw-active #PARABLEMODE .parable-graph-workspace,
body.uw-active #PARABLEMODE .parable-compare-workspace {
  border-color: rgba(209, 173, 105, .14) !important;
  background: linear-gradient(135deg, rgba(209, 173, 105, .055), rgba(255, 255, 255, .012)) !important;
}
body.uw-active #PARABLEMODE .parable-story-sequence button {
  min-height: 56px;
  border-radius: 5px;
  transition: transform .22s var(--uw-ease), border-color .2s ease, background .2s ease;
}
body.uw-active #PARABLEMODE .parable-story-sequence button:hover { transform: translateY(-2px); }
body.uw-active #PARABLEMODE .parable-story-sequence button.act {
  box-shadow: inset 0 -2px var(--parable-tone, #d1ad69), 0 14px 28px rgba(0, 0, 0, .18);
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-compare-grid article {
  border-radius: 7px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .03);
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-list button {
  min-height: 58px;
  border-radius: 5px;
}
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-status {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 900px) {
  :root { --uw-header: 104px; }
  body.uw-active .uw-primary {
    grid-template-columns: 108px minmax(0, 1fr) auto;
    height: 56px;
    padding-inline: 6px;
  }
  body.uw-active .uw-brand { padding-inline: 4px; }
  body.uw-active .uw-brand span { font-size: .98rem; }
  body.uw-active .uw-studios {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.uw-active .uw-studios::-webkit-scrollbar { display: none; }
  body.uw-active .uw-studio {
    flex: 0 0 82px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding-inline: 3px;
  }
  body.uw-active .uw-studio strong { max-width: 76px; font-size: .5rem; text-align: center; }
  body.uw-active .uw-contextbar {
    height: 48px;
    grid-template-columns: 125px minmax(0, 1fr) 38px;
    gap: 4px;
    padding: 4px 6px;
  }
  body.uw-active .uw-handoff,
  body.uw-active .uw-reader-toggle { display: none; }
  body.uw-active .uw-truth-button { width: 38px; padding: 0; }
  body.uw-active .uw-truth-button > span { display: none; }
  body.uw-active .heatmap-focus-proxy { margin-top: -58px; }
}

@media (max-width: 560px) {
  body.uw-active .uw-primary { grid-template-columns: 94px minmax(0, 1fr) 35px; }
  body.uw-active .uw-brand span { font-size: .88rem; }
  body.uw-active .uw-global-actions { padding-left: 3px; border-left: 0; }
  body.uw-active .uw-icon { width: 32px; height: 38px; }
  body.uw-active .uw-icon:nth-child(n + 2) { display: none; }
  body.uw-active .uw-studio { flex-basis: 74px; }
  body.uw-active .uw-studio strong { font-size: .46rem; }
  body.uw-active .uw-contextbar { grid-template-columns: 112px minmax(0, 1fr) 34px; }
  body.uw-active .uw-tool-current strong { font-size: .52rem; }
  body.uw-active .uw-ref-form input { font-size: .62rem; }
  body.uw-active .heatmap-focus-proxy { max-width: calc(100% - 20px); }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-rows: 230px minmax(0, 1fr) !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-template-rows: 60px minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    min-height: 0 !important;
    grid-template-rows: 25px minmax(0, 1fr) !important;
    overflow: hidden !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 48px !important;
    gap: 3px !important;
    padding: 2px 8px 7px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    width: 100% !important;
    min-height: 46px !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    padding: 5px 7px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
    font-size: .48rem !important;
    line-height: 1.05 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
    max-width: none !important;
    font-size: .59rem !important;
    line-height: 1.1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
    display: block !important;
    max-width: none !important;
    overflow: hidden !important;
    font-size: .42rem !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardhead {
    max-height: 285px !important;
    overflow: hidden !important;
  }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardhead .heatboard-insights,
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardhead .heatboard-relations {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active *,
  body.uw-active *::before,
  body.uw-active *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Final mobile hierarchy override: the old timeline rail uses an implicit desktop column. */
@media (max-width: 560px) {
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-rows: 230px minmax(0, 1fr) !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-area: 1 / 1 !important;
    width: 100% !important;
    height: 230px !important;
    min-height: 230px !important;
    grid-template-rows: 60px minmax(0, 1fr) 26px !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    grid-template-rows: 25px minmax(0, 1fr) !important;
    height: 144px !important;
    min-height: 0 !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-auto-rows: 48px !important;
    height: 119px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.uw-active:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    min-height: 46px !important;
  }
}

/* Fundamental Command Deck: a new visual system for the workspace chrome. */
:root {
  --uw-header: 120px;
  --uw-bg: #0c1111;
  --uw-panel: #12191a;
  --uw-panel-2: #172021;
  --uw-text: #f0ede5;
  --uw-muted: #9ca6a2;
  --uw-gold: #d6b979;
  --uw-teal: #79d1c0;
}

html,
body.uw-active {
  background: #0c1111 !important;
}

body.uw-active {
  color: var(--uw-text);
}

body.uw-active > .app {
  padding: 12px !important;
  gap: 10px !important;
  background:
    radial-gradient(circle at 84% 0%, rgba(111, 192, 177, .055), transparent 30%),
    #0c1111 !important;
}

body.uw-active .uw-chrome {
  height: var(--uw-header) !important;
  border-bottom: 1px solid rgba(214, 185, 121, .32) !important;
  background:
    linear-gradient(180deg, rgba(25, 34, 32, .985) 0%, rgba(15, 21, 21, .985) 64%, rgba(11, 16, 16, .99) 100%) !important;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .055) !important;
  backdrop-filter: blur(28px) saturate(1.16) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.16) !important;
}

body.uw-active .uw-primary {
  height: 70px !important;
  grid-template-columns: 196px minmax(0, 1fr) 82px !important;
  gap: 16px !important;
  padding: 9px 18px 8px !important;
  border-bottom: 1px solid rgba(231, 222, 202, .1) !important;
}

body.uw-active .uw-brand {
  position: relative;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 22px 0 12px !important;
  border-right: 0 !important;
  text-align: left !important;
}

body.uw-active .uw-brand::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--uw-gold), var(--uw-teal));
  box-shadow: 0 0 18px rgba(121, 209, 192, .18);
}

body.uw-active .uw-brand span {
  color: #eee2c7 !important;
  font-size: 1.38rem !important;
  line-height: 1 !important;
  letter-spacing: .005em !important;
}

body.uw-active .uw-brand small {
  display: block !important;
  margin-top: 0 !important;
  color: #7eaaa0 !important;
  font-size: .43rem !important;
  line-height: 1.1 !important;
  letter-spacing: .18em !important;
}

body.uw-active .uw-studios {
  width: 100% !important;
  max-width: 1200px !important;
  justify-self: stretch !important;
  align-items: stretch !important;
  gap: 5px !important;
  padding: 5px !important;
  border: 1px solid rgba(214, 185, 121, .25) !important;
  border-radius: 17px !important;
  background: rgba(10, 16, 16, .64) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 9px 30px rgba(0, 0, 0, .28) !important;
  backdrop-filter: blur(22px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.18) !important;
}

body.uw-active .uw-studio {
  min-width: 0 !important;
  min-height: 50px !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  justify-content: stretch !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  color: #9da9a5 !important;
  background: transparent !important;
  text-align: left !important;
  transform: none !important;
  transition: color .26s var(--uw-ease), background .26s var(--uw-ease), border-color .26s ease, box-shadow .3s var(--uw-ease), transform .26s var(--uw-ease) !important;
}

body.uw-active .uw-studio:hover {
  color: #f0eee6 !important;
  border-color: rgba(214, 185, 121, .22) !important;
  background: rgba(255, 255, 255, .055) !important;
  transform: translateY(-1px) !important;
}

body.uw-active .uw-studio.active {
  color: #172120 !important;
  border-color: rgba(239, 225, 192, .9) !important;
  background: linear-gradient(135deg, #e9dfc9 0%, #d5c8ab 100%) !important;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .66) !important;
}

body.uw-active .uw-studio::after,
body.uw-active .uw-studio.active::after {
  display: none !important;
}

body.uw-active .uw-studio > i {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, .16)) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, .02)) !important;
  color: color-mix(in srgb, var(--accent) 82%, #e3e9e5) !important;
  font-size: .62rem !important;
  box-shadow: none !important;
  transform: none !important;
}

body.uw-active .uw-studio.active > i {
  border-color: color-mix(in srgb, var(--accent) 62%, #647b72) !important;
  background: rgba(255, 255, 255, .42) !important;
  color: color-mix(in srgb, var(--accent) 84%, #182420) !important;
}

body.uw-active .uw-studio-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 2px;
}

body.uw-active .uw-studio-copy small {
  display: block !important;
  color: #637772 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .42rem !important;
  line-height: 1 !important;
  letter-spacing: .16em !important;
}

body.uw-active .uw-studio.active .uw-studio-copy small {
  color: #6a8278 !important;
}

body.uw-active .uw-studio-copy strong {
  display: block;
  max-width: none !important;
  overflow: hidden;
  color: inherit !important;
  font-size: .68rem !important;
  line-height: 1.05 !important;
  letter-spacing: .01em !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.uw-active .uw-global-actions {
  align-self: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding-left: 10px !important;
  border-left: 1px solid rgba(231, 222, 202, .12) !important;
}

body.uw-active .uw-icon,
body.uw-active .uw-utility-toggle {
  width: 34px !important;
  height: 38px !important;
  border: 1px solid rgba(214, 185, 121, .19) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .025) !important;
  color: #c9d1cb !important;
  font-size: .8rem !important;
  letter-spacing: .08em !important;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .22s var(--uw-ease) !important;
}

body.uw-active .uw-icon:hover,
body.uw-active .uw-utility-toggle:hover,
body.uw-active .uw-icon:focus-visible,
body.uw-active .uw-utility-toggle:focus-visible {
  color: #172120 !important;
  border-color: #e5d7b5 !important;
  background: #e5d7b5 !important;
  transform: translateY(-2px) !important;
}

body.uw-active .uw-contextbar {
  height: 50px !important;
  grid-template-columns: 170px 258px minmax(0, 1fr) 164px !important;
  gap: 0 !important;
  padding: 5px 18px !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(231, 222, 202, .09) !important;
  background: rgba(10, 15, 15, .74) !important;
}

body.uw-active .uw-tool-current,
body.uw-active .uw-ref-form,
body.uw-active .uw-truth-button {
  height: 38px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.uw-active .uw-tool-current {
  position: relative;
  justify-content: flex-start !important;
  padding: 0 16px 0 10px !important;
  border-right: 1px solid rgba(231, 222, 202, .11) !important;
}

body.uw-active .uw-tool-current::after {
  content: 'ACTIVE TOOL';
  position: absolute;
  top: 2px;
  left: 10px;
  color: #718881;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .38rem;
  letter-spacing: .16em;
  pointer-events: none;
}

body.uw-active .uw-tool-current > i {
  margin-top: 6px;
  height: 18px !important;
}

body.uw-active .uw-tool-current > span {
  padding-top: 8px;
}

body.uw-active .uw-tool-current small {
  display: none !important;
}

body.uw-active .uw-tool-current strong,
body.uw-active .uw-truth-button strong {
  font-size: .62rem !important;
  line-height: 1 !important;
}

body.uw-active .uw-ref-form {
  grid-template-columns: auto minmax(0, 1fr) 34px !important;
  padding: 0 14px !important;
  border-right: 1px solid rgba(231, 222, 202, .11) !important;
}

body.uw-active .uw-ref-form label {
  color: #718881 !important;
  font-size: .4rem !important;
  letter-spacing: .16em !important;
}

body.uw-active .uw-ref-form input {
  height: 30px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(231, 222, 202, .2) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f2eee4 !important;
  font-size: .7rem !important;
}

body.uw-active .uw-ref-form input:focus {
  border-bottom-color: var(--uw-teal) !important;
  box-shadow: 0 1px 0 var(--uw-teal) !important;
}

body.uw-active .uw-ref-form button {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--uw-teal) !important;
}

body.uw-active .uw-focus-summary {
  gap: 9px !important;
  padding: 0 18px !important;
}

body.uw-active .uw-focus-summary span,
body.uw-active .uw-truth-button small {
  color: #718881 !important;
  font-size: .4rem !important;
  letter-spacing: .16em !important;
}

body.uw-active .uw-focus-summary strong {
  color: #f1e6cf !important;
  font-size: .72rem !important;
}

body.uw-active .uw-focus-summary small {
  color: #8b9993 !important;
  font-size: .56rem !important;
}

body.uw-active .uw-truth-button {
  justify-content: flex-end !important;
  padding: 0 8px 0 14px !important;
  border-left: 1px solid rgba(231, 222, 202, .11) !important;
}

body.uw-active .uw-truth-button > span {
  gap: 2px;
}

body.uw-active .uw-truth-button strong {
  color: #dbe7dd !important;
}

body.uw-active > .app {
  border: 1px solid rgba(214, 185, 121, .2) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .035) !important;
}

@media (max-width: 900px) {
  :root { --uw-header: 116px; }
  body.uw-active .uw-primary {
    height: 66px !important;
    grid-template-columns: 124px minmax(0, 1fr) 42px !important;
    gap: 8px !important;
    padding: 8px 8px 6px !important;
  }
  body.uw-active .uw-brand {
    padding-left: 10px !important;
    padding-right: 6px !important;
  }
  body.uw-active .uw-brand span { font-size: 1rem !important; }
  body.uw-active .uw-brand small { font-size: .34rem !important; letter-spacing: .12em !important; }
  body.uw-active .uw-studios {
    justify-self: stretch !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }
  body.uw-active .uw-studio {
    flex: 0 0 94px !important;
    min-height: 48px !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding-inline: 7px !important;
  }
  body.uw-active .uw-studio > i { width: 26px !important; height: 26px !important; }
  body.uw-active .uw-studio-copy small { font-size: .38rem !important; }
  body.uw-active .uw-studio-copy strong { font-size: .55rem !important; }
  body.uw-active .uw-global-actions { padding-left: 4px !important; border-left: 0 !important; }
  body.uw-active .uw-icon { width: 36px !important; }
  body.uw-active .uw-icon:nth-child(n + 2) { display: none !important; }
  body.uw-active .uw-contextbar {
    height: 50px !important;
    grid-template-columns: 126px minmax(0, 1fr) 42px !important;
    padding: 5px 8px !important;
  }
  body.uw-active .uw-focus-summary { padding-inline: 10px !important; }
  body.uw-active .uw-focus-summary small { display: none !important; }
  body.uw-active .uw-truth-button { width: 42px !important; padding: 0 !important; border-left: 1px solid rgba(231, 222, 202, .11) !important; }
  body.uw-active .uw-truth-button > span { display: none !important; }
  body.uw-active > .app { padding: 8px !important; }
}

@media (max-width: 560px) {
  :root { --uw-header: 114px; }
  body.uw-active .uw-primary {
    height: 64px !important;
    grid-template-columns: 106px minmax(0, 1fr) 36px !important;
    gap: 4px !important;
    padding: 7px 6px 5px !important;
  }
  body.uw-active .uw-brand { padding-left: 8px !important; }
  body.uw-active .uw-brand span { font-size: .87rem !important; }
  body.uw-active .uw-brand small { font-size: .3rem !important; letter-spacing: .1em !important; }
  body.uw-active .uw-studios { gap: 4px !important; padding: 3px !important; border-radius: 12px !important; }
  body.uw-active .uw-studio {
    flex: 0 0 86px !important;
    min-height: 48px !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    padding-inline: 6px !important;
  }
  body.uw-active .uw-studio > i { width: 24px !important; height: 24px !important; font-size: .5rem !important; }
  body.uw-active .uw-studio-copy strong { font-size: .5rem !important; }
  body.uw-active .uw-studio-copy small { font-size: .35rem !important; }
  body.uw-active .uw-contextbar {
    height: 50px !important;
    grid-template-columns: 108px minmax(0, 1fr) 34px !important;
    padding: 5px 6px !important;
  }
  body.uw-active .uw-tool-current { padding-left: 7px !important; padding-right: 5px !important; }
  body.uw-active .uw-tool-current::after { left: 7px; font-size: .34rem; }
  body.uw-active .uw-tool-current > span { padding-top: 8px; }
  body.uw-active .uw-tool-current strong { font-size: .52rem !important; }
  body.uw-active .uw-ref-form { padding-inline: 8px !important; grid-template-columns: auto minmax(0, 1fr) 28px !important; }
  body.uw-active .uw-ref-form label { font-size: .35rem !important; }
  body.uw-active .uw-ref-form input { font-size: .62rem !important; }
  body.uw-active .uw-focus-summary { display: none !important; }
  body.uw-active .uw-truth-button { width: 34px !important; }
  body.uw-active > .app { padding: 6px !important; border-radius: 10px !important; }
}

/* Tradition Studio 10x: an archival reception desk with one clear reading flow. */
body.uw-active .app:is([data-active-mode="greekOrthodox"], [data-active-mode="syriacOrthodox"], [data-active-mode="catholic"]) {
  background:
    radial-gradient(circle at 72% 8%, rgba(212, 177, 108, .08), transparent 26%),
    #0b1112 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) {
  --tradition-ink: #eef0e8;
  --tradition-muted: #8e9c98;
  --tradition-line: rgba(223, 220, 198, .1);
  position: relative !important;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--patristic) 34%, rgba(229, 220, 194, .15)) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--patristic) 9%, transparent), transparent 38%),
    #0d1415 !important;
  box-shadow: 0 26px 72px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .04) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main {
  grid-template-columns: 294px minmax(0, 1fr) 326px !important;
  gap: 0 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel {
  background: #0e1617 !important;
  scrollbar-color: color-mix(in srgb, var(--patristic) 42%, transparent) transparent !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:first-child {
  border-right: 1px solid var(--tradition-line) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--patristic) 8%, transparent), transparent 35%),
    #0d1516 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .studymode-panel:last-child {
  border-left: 1px solid var(--tradition-line) !important;
  background: #0c1314 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library > header {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 19px 19px 16px !important;
  border-bottom: 1px solid var(--tradition-line) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--patristic) 11%, transparent), rgba(255, 255, 255, .012)) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library > header span {
  color: color-mix(in srgb, var(--patristic) 78%, #f8f0dc 22%) !important;
  font-size: .46rem !important;
  letter-spacing: .18em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library > header strong {
  color: #f0eee4 !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.45rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-tradition-switch {
  margin: 15px 15px 0 !important;
  padding: 3px !important;
  border: 1px solid rgba(229, 220, 194, .12) !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, .18) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-tradition-switch button {
  height: 34px !important;
  color: #72817e !important;
  font-size: .45rem !important;
  letter-spacing: .04em !important;
  border-radius: 6px !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-tradition-switch button.act {
  color: #16201e !important;
  background: linear-gradient(135deg, #e6d8b8, #c7b287) !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .55) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-search-row {
  grid-template-columns: minmax(0, 1fr) 88px !important;
  gap: 7px !important;
  padding: 14px 15px 12px !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-search-row .patristic-search,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-search-row select {
  height: 39px !important;
  border: 1px solid rgba(229, 220, 194, .12) !important;
  border-radius: 8px !important;
  background: #0a1112 !important;
  color: #dfe5df !important;
  font-size: .58rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-search-row .patristic-search::placeholder {
  color: #65746f !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-mini-stats {
  padding: 0 15px 14px !important;
  color: #687875 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-mini-stats strong {
  color: #e6dec9 !important;
  font-size: .58rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-list-head {
  height: 38px !important;
  padding-inline: 16px !important;
  border-top: 1px solid var(--tradition-line) !important;
  border-bottom: 1px solid var(--tradition-line) !important;
  color: #80918c !important;
  font-size: .44rem !important;
  letter-spacing: .12em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button {
  min-height: 82px !important;
  grid-template-columns: 5px minmax(0, 1fr) !important;
  gap: 5px 11px !important;
  padding: 12px 16px 12px 11px !important;
  border-bottom: 1px solid rgba(229, 220, 194, .065) !important;
  background: transparent !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button:hover {
  background: rgba(229, 220, 194, .045) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button.act {
  background: linear-gradient(90deg, color-mix(in srgb, var(--patristic) 12%, transparent), rgba(255, 255, 255, .02)) !important;
  box-shadow: inset 3px 0 var(--patristic) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button > i {
  width: 3px !important;
  height: 28px !important;
  background: rgba(229, 220, 194, .16) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button.act > i {
  height: 48px !important;
  background: var(--patristic) !important;
  box-shadow: 0 0 18px color-mix(in srgb, var(--patristic) 36%, transparent) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button > strong {
  color: #ecece4 !important;
  font-size: .68rem !important;
  line-height: 1.15 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button > span {
  color: #9ca9a3 !important;
  font-size: .54rem !important;
  line-height: 1.25 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library .patristic-list button > small {
  color: #6e7d78 !important;
  font-size: .44rem !important;
  letter-spacing: .04em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stage-toolbar {
  min-height: 72px !important;
  padding: 13px 22px !important;
  border-bottom: 1px solid var(--tradition-line) !important;
  background: rgba(15, 25, 25, .9) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .16) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stage-toolbar > div:first-child span {
  color: color-mix(in srgb, var(--patristic) 78%, #f8f0dc 22%) !important;
  font-size: .44rem !important;
  letter-spacing: .16em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stage-toolbar > div:first-child strong {
  color: #eee9dd !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-tabs {
  gap: 3px !important;
  padding: 4px !important;
  border: 1px solid rgba(229, 220, 194, .14) !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, .2) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-tabs button {
  height: 34px !important;
  border-radius: 6px !important;
  color: #7a8984 !important;
  font-size: .45rem !important;
  letter-spacing: .05em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-tabs button.act {
  color: #17211f !important;
  background: linear-gradient(135deg, #e7dbc0, #c7b58c) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .58), 0 5px 14px rgba(0, 0, 0, .24) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero {
  position: relative !important;
  isolation: isolate;
  min-height: 276px !important;
  padding: 40px 36px 32px !important;
  border-bottom: 1px solid var(--tradition-line) !important;
  background:
    linear-gradient(90deg, #0c1516 0%, rgba(12, 21, 22, .97) 43%, rgba(12, 21, 22, .62) 69%, rgba(12, 21, 22, .34) 100%),
    url('../../assets/tradition/patristic-manuscript-hero.png') 78% 52% / cover no-repeat !important;
  overflow: hidden;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 18%, color-mix(in srgb, var(--patristic) 20%, transparent) 48%, transparent 76%);
  opacity: .55;
  transform: translateX(-18%);
  animation: ptManuscriptSweep 9s ease-in-out infinite;
  pointer-events: none;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 680px !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero span {
  color: color-mix(in srgb, var(--patristic) 86%, #fff3d7 14%) !important;
  font-size: .47rem !important;
  letter-spacing: .18em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero h2 {
  max-width: 680px;
  margin-top: 13px !important;
  color: #f7f0df !important;
  font-size: clamp(2.6rem, 4vw, 4.45rem) !important;
  line-height: .88 !important;
  text-shadow: 0 5px 26px rgba(0, 0, 0, .34);
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero p {
  max-width: 60ch !important;
  margin-top: 19px !important;
  color: #c2cbc4 !important;
  font-size: .78rem !important;
  line-height: 1.7 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-status {
  position: relative;
  z-index: 1;
  min-width: 132px !important;
  padding: 13px 0 13px 16px !important;
  border-left: 1px solid color-mix(in srgb, var(--patristic) 52%, rgba(255, 255, 255, .1)) !important;
  background: linear-gradient(90deg, rgba(8, 13, 14, .3), transparent) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-status span {
  color: #a7b8ad !important;
  font-size: .41rem !important;
  letter-spacing: .14em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-status strong {
  color: #f0e5c8 !important;
  font-size: .55rem !important;
  letter-spacing: .04em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-fact-strip {
  background: #0f1919 !important;
  border-bottom: 1px solid var(--tradition-line) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-fact-strip > div {
  min-height: 78px !important;
  padding: 14px 22px !important;
  border-right: 1px solid var(--tradition-line) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-fact-strip span {
  color: #738781 !important;
  font-size: .41rem !important;
  letter-spacing: .14em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-fact-strip strong {
  color: #e9e5d9 !important;
  font-size: .68rem !important;
  line-height: 1.35 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis {
  gap: 20px !important;
  padding: 29px 36px !important;
  border-bottom: 1px solid var(--tradition-line) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--patristic) 6%, transparent), transparent 62%) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis > header,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog > header,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-axis-list > header,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list > header,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-actions > header {
  color: #80928c !important;
  font-size: .44rem !important;
  letter-spacing: .14em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis blockquote {
  max-width: 760px !important;
  color: #e8dfca !important;
  font-size: 1.42rem !important;
  line-height: 1.42 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-tags span {
  padding: 6px 9px !important;
  border-color: color-mix(in srgb, var(--patristic) 30%, rgba(255, 255, 255, .06)) !important;
  color: #b1bcb5 !important;
  background: rgba(255, 255, 255, .028) !important;
  font-size: .42rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog {
  padding: 27px 30px 34px !important;
  border-right: 1px solid var(--tradition-line) !important;
  background: rgba(255, 255, 255, .008) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog article {
  min-height: 50px !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  border-bottom-color: rgba(229, 220, 194, .08) !important;
  transition: padding .24s var(--uw-ease), background .24s ease;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog article:hover {
  padding-left: 6px;
  background: rgba(229, 220, 194, .03);
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog article i {
  color: color-mix(in srgb, var(--patristic) 75%, #ded2b5 25%) !important;
  font-size: .44rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog article strong {
  color: #cfd8d2 !important;
  font-size: .62rem !important;
  line-height: 1.35 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-evidence-head {
  min-height: 72px !important;
  padding: 15px 19px !important;
  border-bottom-color: var(--tradition-line) !important;
  color: #84958e !important;
  font-size: .44rem !important;
  letter-spacing: .14em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-evidence-head > div {
  color: #e6e0ce !important;
  font-size: .51rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stance,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-axis-list,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-actions {
  padding: 20px 19px !important;
  border-bottom-color: var(--tradition-line) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stance span {
  color: color-mix(in srgb, var(--patristic) 82%, #f1e6cc 18%) !important;
  font-size: .43rem !important;
  letter-spacing: .14em !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stance p,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-axis-list article p {
  color: #98a7a0 !important;
  font-size: .62rem !important;
  line-height: 1.65 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-axis-list article {
  padding: 15px 0 !important;
  border-bottom-color: rgba(229, 220, 194, .07) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-axis-list article strong {
  color: #e4e4da !important;
  font-size: .64rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list a {
  min-height: 72px !important;
  grid-template-columns: 29px minmax(0, 1fr) 16px !important;
  gap: 9px !important;
  border-bottom-color: rgba(229, 220, 194, .07) !important;
  transition: padding .22s var(--uw-ease), background .22s ease;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list a:hover {
  padding-inline: 6px;
  background: rgba(229, 220, 194, .035);
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list a > i {
  color: color-mix(in srgb, var(--patristic) 76%, #ded2b5 24%) !important;
  font-size: .45rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list a strong {
  color: #d9dfd9 !important;
  font-size: .6rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-source-list a small {
  margin-top: 6px !important;
  color: #7b8a84 !important;
  font-size: .46rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-actions > div {
  gap: 7px !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-actions button {
  min-height: 40px !important;
  border: 1px solid rgba(229, 220, 194, .12) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .026) !important;
  color: #aebbb3 !important;
  font-size: .51rem !important;
  transition: transform .22s var(--uw-ease), color .2s ease, border-color .2s ease, background .2s ease;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-actions button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--patristic) 48%, rgba(229, 220, 194, .15)) !important;
  color: #f3ead5 !important;
  background: color-mix(in srgb, var(--patristic) 10%, rgba(255, 255, 255, .035)) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro {
  min-height: 176px !important;
  padding: 32px 34px !important;
  border-bottom-color: var(--tradition-line) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--patristic) 10%, transparent), transparent 62%) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro h2 {
  color: #f1ecdf !important;
  font-size: 2.45rem !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro p {
  color: #9ba9a2 !important;
  font-size: .69rem !important;
  line-height: 1.65 !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-era-ledger {
  padding: 14px 0 38px !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-era-ledger > button {
  min-height: 84px !important;
  padding: 10px 30px 10px 18px !important;
  border-bottom-color: rgba(229, 220, 194, .07) !important;
  transition: background .22s ease, padding .22s var(--uw-ease);
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-era-ledger > button:hover,
body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-era-ledger > button.act {
  background: color-mix(in srgb, var(--patristic) 8%, transparent) !important;
}

body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-era-ledger button > span strong {
  color: #e3e8e2 !important;
  font-size: .7rem !important;
}

@keyframes ptManuscriptSweep {
  0%, 100% { opacity: .35; transform: translateX(-18%); }
  50% { opacity: .62; transform: translateX(18%); }
}

@media (max-width: 1180px) {
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .patristic-main { grid-template-columns: 258px minmax(0, 1fr) 286px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero { padding-inline: 27px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis { padding-inline: 27px !important; }
}

@media (max-width: 900px) {
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero {
    min-height: 248px !important;
    padding: 32px 22px 25px !important;
    background-position: 72% 48% !important;
  }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero h2 { font-size: 3rem !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis { padding-inline: 22px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog { padding-inline: 22px !important; }
}

@media (max-width: 560px) {
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) {
    border-radius: 10px !important;
  }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library > header { min-height: 76px; padding: 15px 15px 12px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-library > header strong { font-size: 1.22rem !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-stage-toolbar { padding: 11px 14px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero {
    min-height: 270px !important;
    padding: 32px 19px 22px !important;
    background:
      linear-gradient(180deg, rgba(12, 21, 22, .86) 0%, rgba(12, 21, 22, .95) 65%, #0c1516 100%),
      url('../../assets/tradition/patristic-manuscript-hero.png') 66% 18% / auto 58% no-repeat !important;
  }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero h2 { font-size: 2.7rem !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-profile-hero p { font-size: .72rem !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-status { width: 100%; min-width: 0 !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis { padding: 24px 19px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-thesis blockquote { font-size: 1.22rem !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-catalog { padding: 23px 19px 29px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro { padding: 25px 19px !important; }
  body.uw-active :is(#GREEKORTHODOXMODE, #SYRIACORTHODOXMODE, #CATHOLICMODE) .pt-view-intro h2 { font-size: 2rem !important; }
}

/* Mobile text workspaces use the reader as the primary surface. */
@media (max-width: 560px) {
  /* Keep the legacy canvas measurable during boot; remove its visual noise only after layout. */
  body.uw-active .app:is(
    [data-active-mode="reader"],
    [data-active-mode="original"],
    [data-active-mode="evidence"],
    [data-active-mode="exegesis"],
    [data-active-mode="sourceDesk"],
    [data-active-mode="textWitnesses"]
  ) .viz {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Canon Atlas 10x: a focused meaning map instead of a dense control wall. */
body.uw-active .app[data-active-mode="heatmap"] {
  --canon-ink: #eef1ec;
  --canon-muted: #8ea09e;
  --canon-teal: #71d7c5;
  --canon-gold: #d3b371;
  background:
    radial-gradient(circle at 20% 0%, rgba(113, 215, 197, .07), transparent 28%),
    #0a1011 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell {
  inset: 0 !important;
  grid-template-rows: 102px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px 12px 12px !important;
  border: 1px solid rgba(211, 179, 113, .2) !important;
  border-radius: 15px !important;
  background:
    linear-gradient(135deg, rgba(113, 215, 197, .045), transparent 36%),
    #0b1314 !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .04) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-head {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 16px 20px !important;
  border: 1px solid rgba(211, 179, 113, .22) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(100deg, rgba(17, 35, 34, .96), rgba(10, 19, 20, .97) 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 46px) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .04) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-head::before {
  inset: 13px auto 13px 0 !important;
  width: 4px !important;
  border-radius: 0 4px 4px 0 !important;
  background: linear-gradient(180deg, var(--canon-teal), var(--canon-gold)) !important;
  box-shadow: 0 0 20px rgba(113, 215, 197, .28) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-head::after {
  content: 'AT  ·  NT  ·  RECEPTION';
  position: absolute;
  right: 21px;
  bottom: 10px;
  color: rgba(190, 211, 202, .34);
  font: 500 .4rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  pointer-events: none;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-kicker {
  color: var(--canon-teal) !important;
  font-size: .47rem !important;
  letter-spacing: .18em !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-title {
  margin-top: 5px !important;
  color: #f0eadb !important;
  font: 600 1.72rem/1 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-copy {
  max-width: 820px !important;
  margin-top: 7px !important;
  color: #a9b9b5 !important;
  font-size: .6rem !important;
  line-height: 1.45 !important;
  -webkit-line-clamp: 2;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-actions {
  align-self: start !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-btn {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(229, 220, 194, .14) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .025) !important;
  color: #a7b8b2 !important;
  font-size: .45rem !important;
  letter-spacing: .1em !important;
}

body.uw-active .app[data-active-mode="heatmap"] .modechrome-btn:hover {
  border-color: rgba(113, 215, 197, .42) !important;
  background: rgba(113, 215, 197, .09) !important;
  color: #e1f4eb !important;
  transform: translateY(-1px);
}

body.uw-active .app[data-active-mode="heatmap"] #bHeatClose {
  min-width: 32px !important;
  padding-inline: 0 !important;
  color: #6e807d !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-main {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, .7fr) !important;
  gap: 10px !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-boardwrap, .heatmode-inspector, .heatmode-rail) {
  border: 1px solid rgba(229, 220, 194, .11) !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, #101a1b, #0b1213 86%) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .035) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap {
  position: relative;
  padding: 15px !important;
  overflow: auto !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap::before {
  content: '';
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(113, 215, 197, .08);
  border-radius: 10px;
  pointer-events: none;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardhead {
  position: relative;
  z-index: 1;
  gap: 9px !important;
  margin-bottom: 14px !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lensbar {
  min-height: 42px !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(229, 220, 194, .1) !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, .2) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lensbar span {
  color: #839490 !important;
  font-size: .43rem !important;
  letter-spacing: .12em !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lens {
  min-height: 30px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  color: #849691 !important;
  font-size: .45rem !important;
  letter-spacing: .06em !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-lens.act {
  border-color: rgba(113, 215, 197, .3) !important;
  background: linear-gradient(135deg, rgba(113, 215, 197, .16), rgba(211, 179, 113, .1)) !important;
  color: #d9f0e7 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-summary,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-insights,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relations {
  gap: 7px !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatboard-stat, .heat-insight, .heatboard-relation) {
  padding: 11px !important;
  border: 1px solid rgba(229, 220, 194, .09) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-stat strong {
  color: #f2ebda !important;
  font-size: 1.18rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-stat span,
body.uw-active .app[data-active-mode="heatmap"] .heat-insight small,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation small {
  color: #81938e !important;
  font-size: .44rem !important;
  line-height: 1.3 !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-insight-head strong,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation strong {
  color: #e7ebe4 !important;
  font-size: .72rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-insight-head span {
  color: var(--canon-teal) !important;
  font-size: .44rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heat-spark i {
  background: linear-gradient(90deg, var(--canon-teal), var(--canon-gold)) !important;
  box-shadow: 0 0 12px rgba(113, 215, 197, .18);
}

body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation:hover,
body.uw-active .app[data-active-mode="heatmap"] .heatboard-relation.act {
  border-color: rgba(113, 215, 197, .4) !important;
  background: linear-gradient(135deg, rgba(113, 215, 197, .1), rgba(255, 255, 255, .024)) !important;
  box-shadow: 0 0 0 1px rgba(113, 215, 197, .08), 0 10px 24px rgba(0, 0, 0, .16) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-grid {
  position: relative;
  z-index: 1;
  gap: 4px !important;
  padding: 7px !important;
  border: 1px solid rgba(229, 220, 194, .08) !important;
  border-radius: 11px !important;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(113, 215, 197, .02)),
    repeating-linear-gradient(0deg, rgba(229, 220, 194, .035) 0 1px, transparent 1px 33px) !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-corner, .heatmode-col, .heatmode-row, .heatmode-cell) {
  border-radius: 5px !important;
  border-color: rgba(229, 220, 194, .08) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-col,
body.uw-active .app[data-active-mode="heatmap"] .heatmode-row {
  color: #a7b8b3 !important;
  background: rgba(255, 255, 255, .025) !important;
  font-size: .45rem !important;
  letter-spacing: .04em !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-row.current, .heatmode-col.current) {
  border-color: rgba(113, 215, 197, .48) !important;
  background: linear-gradient(135deg, rgba(113, 215, 197, .14), rgba(211, 179, 113, .08)) !important;
  color: #e2f2ea !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell {
  filter: saturate(.72) brightness(1.02) !important;
  transition: transform .2s var(--uw-ease), filter .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell:hover,
body.uw-active .app[data-active-mode="heatmap"] .heatmode-cell.sel {
  filter: saturate(1) brightness(1.14) !important;
  border-color: rgba(113, 215, 197, .66) !important;
  box-shadow: 0 0 0 1px rgba(113, 215, 197, .2), 0 0 20px rgba(113, 215, 197, .14) !important;
  transform: translateY(-1px);
}

body.uw-active .app[data-active-mode="heatmap"] .heatmode-side {
  gap: 10px !important;
  grid-template-rows: minmax(0, 1fr) minmax(190px, .58fr) !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-inspector, .heatmode-rail) {
  padding: 15px !important;
  gap: 10px !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatrail-card, .heatcard) {
  gap: 8px !important;
  padding: 13px !important;
  border: 1px solid rgba(229, 220, 194, .09) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, .026) !important;
}

body.uw-active .app[data-active-mode="heatmap"] .heatrail-card.emphasis {
  border-color: rgba(113, 215, 197, .24) !important;
  background: linear-gradient(135deg, rgba(113, 215, 197, .1), rgba(211, 179, 113, .045)) !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatrail-card strong, .heatcard h3) {
  color: #f0ecdf !important;
  font-size: 1.12rem !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatrail-card p, .heatcard p) {
  color: #97a8a2 !important;
  font-size: .61rem !important;
  line-height: 1.6 !important;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-inspector button, .heatmode-rail button) {
  border-radius: 8px !important;
  border-color: rgba(229, 220, 194, .12) !important;
  color: #a9b9b2 !important;
  background: rgba(255, 255, 255, .026) !important;
  transition: transform .22s var(--uw-ease), border-color .2s ease, background .2s ease;
}

body.uw-active .app[data-active-mode="heatmap"] :is(.heatmode-inspector button, .heatmode-rail button):hover {
  transform: translateY(-1px);
  border-color: rgba(113, 215, 197, .4) !important;
  background: rgba(113, 215, 197, .08) !important;
}

@media (max-width: 900px) {
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-shell {
    grid-template-rows: auto minmax(0, 1fr) !important;
    padding: 7px !important;
  }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-head {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 15px !important;
  }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-head::after { display: none; }
  body.uw-active .app[data-active-mode="heatmap"] .modechrome-actions { justify-self: start; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-main {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(410px, auto) auto !important;
    gap: 8px !important;
  }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap { min-height: 410px !important; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-side {
    grid-template-rows: auto auto !important;
  }
}

@media (max-width: 560px) {
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-title { font-size: 1.55rem !important; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-copy { font-size: .57rem !important; }
  body.uw-active .app[data-active-mode="heatmap"] .modechrome-actions { flex-wrap: wrap; }
  body.uw-active .app[data-active-mode="heatmap"] .modechrome-btn { min-height: 30px !important; padding-inline: 8px !important; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap { padding: 9px !important; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-boardwrap::before { inset: 9px; }
  body.uw-active .app[data-active-mode="heatmap"] .heatmode-grid { min-width: 720px; }
}

/* Every reception line keeps the same hierarchy but its own visual language. */
body.uw-active #GREEKORTHODOXMODE .pt-profile-hero {
  background:
    linear-gradient(90deg, #0c1516 0%, rgba(12, 21, 22, .97) 43%, rgba(12, 21, 22, .61) 69%, rgba(12, 21, 22, .3) 100%),
    url('../../assets/tradition/greek-orthodox-reception.png') 78% 52% / cover no-repeat !important;
}

body.uw-active #SYRIACORTHODOXMODE .pt-profile-hero {
  background:
    linear-gradient(90deg, #0c1516 0%, rgba(12, 21, 22, .97) 43%, rgba(12, 21, 22, .61) 69%, rgba(12, 21, 22, .3) 100%),
    url('../../assets/tradition/syriac-orthodox-reception.png') 78% 52% / cover no-repeat !important;
}

body.uw-active #CATHOLICMODE .pt-profile-hero {
  background:
    linear-gradient(90deg, #0c1516 0%, rgba(12, 21, 22, .97) 43%, rgba(12, 21, 22, .61) 69%, rgba(12, 21, 22, .3) 100%),
    url('../../assets/tradition/catholic-reception.png') 78% 52% / cover no-repeat !important;
}

@media (max-width: 560px) {
  body.uw-active #GREEKORTHODOXMODE .pt-profile-hero {
    background:
      linear-gradient(180deg, rgba(12, 21, 22, .86) 0%, rgba(12, 21, 22, .95) 65%, #0c1516 100%),
      url('../../assets/tradition/greek-orthodox-reception.png') 66% 18% / auto 58% no-repeat !important;
  }
  body.uw-active #SYRIACORTHODOXMODE .pt-profile-hero {
    background:
      linear-gradient(180deg, rgba(12, 21, 22, .86) 0%, rgba(12, 21, 22, .95) 65%, #0c1516 100%),
      url('../../assets/tradition/syriac-orthodox-reception.png') 66% 18% / auto 58% no-repeat !important;
  }
  body.uw-active #CATHOLICMODE .pt-profile-hero {
    background:
      linear-gradient(180deg, rgba(12, 21, 22, .86) 0%, rgba(12, 21, 22, .95) 65%, #0c1516 100%),
      url('../../assets/tradition/catholic-reception.png') 66% 18% / auto 58% no-repeat !important;
  }
}

/* Reader bridge: the timeline and the text share one deliberate handoff. */
body.uw-active[data-uw-bridge="timeline"] .uw-contextbar {
  grid-template-columns: 154px minmax(172px, 214px) minmax(0, 1fr) 116px 164px !important;
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle {
  display: grid !important;
  min-width: 0;
  grid-template-columns: 6px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0 10px !important;
  border: 1px solid rgba(114, 216, 196, .24) !important;
  background: linear-gradient(135deg, rgba(114, 216, 196, .09), rgba(209, 173, 105, .05)) !important;
  color: #d8efe8 !important;
  text-align: left;
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle::before {
  content: '';
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--uw-teal), var(--uw-gold));
  box-shadow: 0 0 14px rgba(114, 216, 196, .2);
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle span,
body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle small {
  grid-column: 2;
  display: block !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle span {
  grid-row: 1;
  color: #d7f0e9 !important;
  font-size: .63rem !important;
  line-height: 1.05 !important;
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle small {
  grid-row: 2;
  margin-top: 3px;
  color: #7ca79d !important;
  font-size: .43rem !important;
  line-height: 1 !important;
}

body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle[aria-pressed="true"] {
  border-color: rgba(209, 173, 105, .55) !important;
  background: linear-gradient(135deg, rgba(209, 173, 105, .18), rgba(114, 216, 196, .08)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 7px 20px rgba(0, 0, 0, .22) !important;
}

body.uw-active[data-uw-bridge="reader"] .uw-contextbar {
  grid-template-columns: 154px minmax(172px, 214px) minmax(0, 1fr) minmax(148px, 190px) 164px !important;
}

body.uw-active[data-uw-bridge="reader"] .uw-handoff {
  display: flex !important;
  min-width: 0;
  align-items: center;
}

body.uw-active[data-uw-bridge="reader"] .uw-handoff button {
  width: 100%;
  max-width: none !important;
  border-color: rgba(209, 173, 105, .24) !important;
  background: rgba(209, 173, 105, .06) !important;
  color: #ddc78e !important;
}

body.uw-active[data-uw-bridge="reader"] .uw-handoff button:hover,
body.uw-active[data-uw-bridge="reader"] .uw-handoff button:focus-visible {
  border-color: rgba(209, 173, 105, .55) !important;
  background: rgba(209, 173, 105, .12) !important;
}

body.uw-active[data-uw-bridge="reader"] .uw-reader-toggle {
  display: none !important;
}

/* Desktop companion view keeps the historical canvas and the text in one frame. */
body.uw-active .app[data-active-mode="timeline"].timeline-reader-split {
  grid-template-columns: minmax(0, 1fr) minmax(370px, 430px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.uw-active .app[data-active-mode="timeline"].timeline-reader-split > .viz {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  display: grid !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"].timeline-reader-split > .side {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  display: grid !important;
  height: 100% !important;
  min-height: 0 !important;
  opacity: 1 !important;
  transform: translateX(0) !important;
  overflow: hidden !important;
  border-color: rgba(114, 216, 196, .2) !important;
  box-shadow: -18px 0 42px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .035) !important;
  animation: uw-reader-companion-in .46s var(--uw-ease) both;
}

body.uw-active .app[data-active-mode="timeline"].timeline-reader-split .timeline-overlay {
  min-width: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"].timeline-reader-split .timeline-overlay .tl-workbench {
  min-width: 0 !important;
}

@keyframes uw-reader-companion-in {
  from { opacity: .2; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

/* The local bridge sits beside the timeline depth meter, without adding another toolbar. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  grid-template-columns: auto minmax(44px, 1fr) auto !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > small {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
  min-width: 76px;
  min-height: 0 !important;
  max-height: 26px;
  height: 26px !important;
  align-self: center;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(114, 216, 196, .24);
  border-radius: 5px;
  background: rgba(114, 216, 196, .07);
  color: #d8efe8;
  cursor: pointer;
  transition: transform .22s var(--uw-ease), border-color .2s ease, background .2s ease;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge:hover,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge:focus-visible {
  border-color: rgba(209, 173, 105, .55);
  background: rgba(209, 173, 105, .13);
  transform: translateY(-1px);
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge span {
  color: #8bcec0;
  font: 600 .43rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge b {
  color: #e7dcc0;
  font: 600 .5rem/1 'JetBrains Mono', monospace;
}

@media (max-width: 900px) {
  body.uw-active[data-uw-bridge="timeline"] .uw-reader-toggle,
  body.uw-active[data-uw-bridge="reader"] .uw-handoff {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"].timeline-reader-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.uw-active .app[data-active-mode="timeline"].timeline-reader-split > .side {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
    min-width: 72px;
    max-height: 23px;
    height: 23px !important;
    padding-inline: 6px;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge span {
    font-size: .39rem;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge b {
    font-size: .44rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active .app[data-active-mode="timeline"].timeline-reader-split > .side {
    animation: none !important;
  }
}

/* Patriarch Studio: an independent succession desk with archival hierarchy. */
.modebtn[data-mode-key="patriarchs"] { --modeaccent: #d5a85f; }
.viz.patriarchsmode > canvas,
.viz.patriarchsmode .bbar,
.viz.patriarchsmode .mapv,
.viz.patriarchsmode .vizhud { display: none !important; }
.viz.patriarchsmode #PATRIARCHMODE { display: grid !important; }
body.uw-active #PATRIARCHMODE[aria-hidden="false"] {
  --patriarch-gold: #d5a85f;
  --patriarch-ivory: #f0e6cc;
  --patriarch-teal: #76c9bb;
  --patriarch-ink: #0b1013;
  --patriarch-panel: #10171a;
  --patriarch-line: rgba(213, 168, 95, .2);
  background:
    radial-gradient(circle at 72% 16%, rgba(213, 168, 95, .08), transparent 28%),
    linear-gradient(135deg, #0b1013 0%, #11191a 52%, #0b1113 100%) !important;
  color: var(--patriarch-ivory) !important;
  border-color: rgba(213, 168, 95, .3) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-head {
  border-bottom-color: var(--patriarch-line) !important;
  background: linear-gradient(90deg, rgba(8, 13, 15, .94), rgba(14, 23, 24, .78));
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-head .studymode-kicker,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-section-kicker {
  color: var(--patriarch-teal) !important;
  letter-spacing: .18em;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-main {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) 286px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  gap: 0 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-main > .studymode-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-color: var(--patriarch-line) !important;
  border-radius: 0 !important;
  background: rgba(8, 14, 16, .54) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHLIST {
  padding: 18px 14px 22px;
  border-right: 1px solid var(--patriarch-line) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHSTAGE {
  padding: 0;
  background: rgba(12, 19, 20, .7) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHRAIL {
  padding: 18px 14px 22px;
  border-left: 1px solid var(--patriarch-line) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid var(--patriarch-line);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-list-head strong,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-list-head small {
  display: block;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-list-head strong {
  margin-top: 5px;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--patriarch-ivory);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-list-head small {
  margin-top: 5px;
  color: rgba(240, 230, 204, .5);
  font-size: .68rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-index-count {
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 48px;
  border: 1px solid rgba(213, 168, 95, .35);
  color: var(--patriarch-gold);
  font: 600 1.12rem/1 var(--font-mono, monospace);
  background: rgba(213, 168, 95, .06);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-index-count small {
  margin: 3px 0 0;
  color: rgba(240, 230, 204, .5);
  font-size: .5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-search {
  display: grid;
  gap: 6px;
  padding: 14px 0 10px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-search span {
  color: rgba(240, 230, 204, .48);
  font: 600 .58rem/1 var(--font-mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-search input {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid rgba(240, 230, 204, .14);
  border-radius: 4px;
  padding: 0 10px;
  color: var(--patriarch-ivory);
  background: rgba(0, 0, 0, .22);
  outline: none;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-search input:focus {
  border-color: var(--patriarch-teal);
  box-shadow: 0 0 0 3px rgba(118, 201, 187, .12);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(240, 230, 204, .1);
  background: rgba(0, 0, 0, .2);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses button,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs button {
  border: 0;
  border-radius: 3px;
  min-height: 30px;
  padding: 0 4px;
  color: rgba(240, 230, 204, .52);
  background: transparent;
  font: 600 .58rem/1 var(--font-mono, monospace);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses button:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses button.active,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs button:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs button.active {
  color: var(--patriarch-ink);
  background: var(--patriarch-gold);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-list {
  display: grid;
  gap: 2px;
  padding-top: 10px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record:hover {
  border-color: rgba(213, 168, 95, .24);
  background: rgba(213, 168, 95, .06);
  transform: translateX(2px);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record.active {
  border-color: rgba(118, 201, 187, .38);
  background: linear-gradient(90deg, rgba(118, 201, 187, .12), rgba(213, 168, 95, .04));
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(213, 168, 95, .3);
  color: var(--patriarch-gold);
  font: 600 .55rem/1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy {
  min-width: 0;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy strong,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy small,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy strong {
  color: var(--patriarch-ivory);
  font-size: .77rem;
  font-weight: 600;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy small {
  margin-top: 4px;
  color: rgba(240, 230, 204, .48);
  font: .59rem/1.1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-copy em {
  margin-top: 4px;
  color: var(--patriarch-teal);
  font-size: .58rem;
  font-style: normal;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  gap: 3px;
  min-height: 48px;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid var(--patriarch-line);
  background: rgba(12, 19, 20, .9);
  backdrop-filter: blur(14px);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs button {
  min-width: 92px;
  padding: 0 13px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 302px;
  margin: 18px;
  overflow: hidden;
  border: 1px solid rgba(213, 168, 95, .34);
  background-image: linear-gradient(90deg, rgba(9, 14, 16, .96) 0%, rgba(9, 14, 16, .72) 38%, rgba(9, 14, 16, .08) 100%), var(--patriarch-hero, var(--patriarch-cover));
  background-position: center;
  background-size: cover;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .28);
  animation: patriarchReveal .55s ease both;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero::after,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--patriarch-gold), transparent);
  content: '';
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-copy,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 30px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero h2,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover h2 {
  margin: 10px 0 8px;
  color: var(--patriarch-ivory);
  font: 500 clamp(1.8rem, 4vw, 3.2rem)/.98 var(--font-display, Georgia, serif);
  letter-spacing: -.02em;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero p,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover p {
  max-width: 480px;
  margin: 0;
  color: rgba(240, 230, 204, .7);
  font-size: .9rem;
  line-height: 1.55;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-actions,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-meta,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-ref-row,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 19px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-actions button,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-actions button,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-open,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-ref-row button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(213, 168, 95, .34);
  border-radius: 3px;
  color: var(--patriarch-ivory);
  background: rgba(8, 14, 16, .62);
  font: 600 .62rem/1 var(--font-mono, monospace);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-actions button:first-child,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-actions button:first-child {
  color: var(--patriarch-ink);
  background: var(--patriarch-gold);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-actions button:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-actions button:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-open:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-ref-row button:hover {
  border-color: var(--patriarch-teal);
  transform: translateY(-1px);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-seal {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(213, 168, 95, .5);
  border-radius: 50%;
  color: var(--patriarch-gold);
  font-size: 1.8rem;
  background: rgba(8, 14, 16, .34);
  box-shadow: 0 0 0 8px rgba(213, 168, 95, .05);
  animation: patriarchPulse 4s ease-in-out infinite;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-line-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--patriarch-line);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-line-header strong {
  display: block;
  margin-top: 4px;
  color: var(--patriarch-ivory);
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.1rem;
  font-weight: 500;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-line-header > span {
  color: rgba(240, 230, 204, .48);
  font: .59rem/1.35 var(--font-mono, monospace);
  text-align: right;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-succession-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(15, minmax(104px, 1fr));
  min-width: 1100px;
  gap: 8px;
  padding: 18px 18px 26px;
  overflow-x: auto;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-succession-track::before {
  position: absolute;
  top: 35px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--patriarch-gold), rgba(118, 201, 187, .75), transparent);
  content: '';
  opacity: .8;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 92px;
  padding: 0 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  animation: patriarchNodeIn .45s ease both;
  animation-delay: calc(var(--node-index) * 24ms);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(213, 168, 95, .5);
  border-radius: 50%;
  color: var(--patriarch-gold);
  background: #101719;
  font: .54rem/1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node strong {
  color: var(--patriarch-ivory);
  font-size: .7rem;
  line-height: 1.2;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node small {
  color: rgba(240, 230, 204, .45);
  font: .55rem/1.2 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node.active {
  border-color: rgba(118, 201, 187, .36);
  background: rgba(118, 201, 187, .08);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-node.active > span {
  border-color: var(--patriarch-teal);
  color: var(--patriarch-ink);
  background: var(--patriarch-teal);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-section-kicker {
  display: block;
  color: var(--patriarch-gold);
  font: 600 .6rem/1.1 var(--font-mono, monospace);
  text-transform: uppercase;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-view,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-chronology-view {
  padding: 26px 30px 30px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover {
  min-height: 240px;
  margin-bottom: 0;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-meta {
  gap: 5px;
  margin-top: 14px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-meta span {
  padding: 6px 8px;
  border: 1px solid rgba(240, 230, 204, .18);
  color: rgba(240, 230, 204, .62);
  font: .57rem/1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr);
  gap: 24px;
  border-bottom: 1px solid var(--patriarch-line);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid h2,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-view h2,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-chronology-view h2 {
  margin: 8px 0 12px;
  color: var(--patriarch-ivory);
  font: 500 2rem/1.05 var(--font-display, Georgia, serif);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lead,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-note,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-note span {
  color: rgba(240, 230, 204, .63);
  font-size: .86rem;
  line-height: 1.6;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-statement {
  max-width: 640px;
  margin: 0;
  color: var(--patriarch-ivory);
  font: 500 1.1rem/1.45 var(--font-display, Georgia, serif);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-note {
  margin: 14px 0 0;
  color: rgba(240, 230, 204, .47);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-work-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-work-list > span:not(.patriarch-section-kicker) {
  padding: 8px 0;
  border-bottom: 1px solid rgba(240, 230, 204, .1);
  color: rgba(240, 230, 204, .68);
  font-size: .75rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-ref-row {
  padding: 18px 30px 24px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-chronology-track {
  position: relative;
  margin-top: 22px;
  padding-left: 20px;
  border-left: 1px solid rgba(213, 168, 95, .34);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-row {
  display: grid;
  grid-template-columns: 112px 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 0 22px;
  cursor: pointer;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-date strong,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-date span,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-copy span {
  display: block;
  font-family: var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-date strong {
  color: var(--patriarch-gold);
  font-size: .68rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-date span {
  margin-top: 5px;
  color: rgba(240, 230, 204, .42);
  font-size: .53rem;
  line-height: 1.3;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-node {
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border: 2px solid var(--patriarch-gold);
  border-radius: 50%;
  background: #11191a;
  box-shadow: 0 0 0 4px rgba(213, 168, 95, .08);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-row.active .patriarch-timeline-node {
  border-color: var(--patriarch-teal);
  background: var(--patriarch-teal);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-copy strong {
  color: var(--patriarch-ivory);
  font: 500 1.08rem/1.2 var(--font-display, Georgia, serif);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-copy span {
  margin-top: 5px;
  color: var(--patriarch-teal);
  font-size: .58rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-timeline-copy p {
  margin: 8px 0 0;
  color: rgba(240, 230, 204, .58);
  font-size: .78rem;
  line-height: 1.5;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(240, 230, 204, .12);
  border-radius: 4px;
  color: inherit;
  text-align: left;
  background: rgba(0, 0, 0, .16);
  cursor: pointer;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source:hover {
  border-color: rgba(118, 201, 187, .4);
  background: rgba(118, 201, 187, .06);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--patriarch-teal);
  box-shadow: 0 0 0 4px rgba(118, 201, 187, .1);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source strong,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source small {
  display: block;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source strong {
  color: var(--patriarch-ivory);
  font-size: .8rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source small {
  margin-top: 5px;
  color: rgba(240, 230, 204, .48);
  font: .58rem/1.35 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source em {
  color: var(--patriarch-gold);
  font: .54rem/1.2 var(--font-mono, monospace);
  font-style: normal;
  text-align: right;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-note {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding: 14px;
  border-left: 2px solid var(--patriarch-gold);
  background: rgba(213, 168, 95, .06);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-source-note strong {
  color: var(--patriarch-gold);
  font: 600 .62rem/1 var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: .1em;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-card,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-seat-card {
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid rgba(240, 230, 204, .12);
  border-radius: 4px;
  background: rgba(12, 20, 21, .8);
  animation: patriarchReveal .55s ease both;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-active {
  border-color: rgba(118, 201, 187, .35);
  box-shadow: inset 3px 0 var(--patriarch-teal);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-card h3 {
  margin: 8px 0 4px;
  color: var(--patriarch-ivory);
  font: 500 1.3rem/1.1 var(--font-display, Georgia, serif);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-card > p {
  margin: 0;
  color: rgba(240, 230, 204, .52);
  font-size: .7rem;
  line-height: 1.45;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-facts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-facts span {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(240, 230, 204, .1);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-facts small {
  color: var(--patriarch-teal);
  font: 600 .54rem/1 var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: .1em;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-facts strong {
  color: rgba(240, 230, 204, .74);
  font-size: .72rem;
  line-height: 1.35;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-truth-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
  color: var(--patriarch-teal);
  font: 600 .65rem/1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-truth-line span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--patriarch-teal);
  box-shadow: 0 0 0 4px rgba(118, 201, 187, .1);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-rail-card p {
  color: rgba(240, 230, 204, .52);
  font-size: .72rem;
  line-height: 1.5;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-seat-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(240, 230, 204, .1);
  color: rgba(240, 230, 204, .68);
  font-size: .69rem;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-seat-card > div:last-child {
  border-bottom: 0;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-seat-card small {
  color: var(--patriarch-gold);
  font: .54rem/1 var(--font-mono, monospace);
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-empty {
  padding: 18px 6px;
  color: rgba(240, 230, 204, .45);
  font-size: .72rem;
}

@keyframes patriarchReveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes patriarchNodeIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes patriarchPulse {
  50% { box-shadow: 0 0 0 11px rgba(213, 168, 95, .02); }
}

@media (max-width: 1100px) {
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-main {
    grid-template-columns: 220px minmax(0, 1fr) 246px !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-stage-tabs button { min-width: 0; padding: 0 9px; }
}

@media (max-width: 900px) {
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] {
    grid-template-rows: auto auto auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    height: 100% !important;
    overflow: auto !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-main {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(520px, auto) auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-main > .studymode-panel {
    overflow: auto !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHLIST,
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHRAIL {
    border: 0 !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHLIST { border-bottom: 1px solid var(--patriarch-line) !important; }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] #PATRIARCHRAIL { border-top: 1px solid var(--patriarch-line) !important; }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record {
    flex: 0 0 178px;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero,
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover {
    min-height: 300px;
    margin: 12px;
    background-position: 68% center;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-hero-copy,
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-cover-copy {
    padding: 22px;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid {
    grid-template-columns: 1fr;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-line-header {
    align-items: flex-start;
    flex-direction: column;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-line-header > span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] *,
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] *::before,
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Chronos Atlas: the timeline is a navigator first, a filter drawer second. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
  --chronos-ink: #f3efe6;
  --chronos-muted: #8d999b;
  --chronos-soft: #b7c0bd;
  --chronos-brass: #d1ae68;
  --chronos-teal: #76d2bf;
  --chronos-line: rgba(228, 217, 190, .14);
  grid-template-rows: 78px minmax(0, 1fr) !important;
  grid-template-columns: minmax(0, 1fr) !important;
  border: 1px solid rgba(209, 174, 104, .24) !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 74% 18%, rgba(118, 210, 191, .06), transparent 30%),
    #0a0f10 !important;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .05) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
  display: grid !important;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) auto !important;
  gap: 18px !important;
  min-width: 0 !important;
  min-height: 78px !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
  background:
    linear-gradient(90deg, rgba(209, 174, 104, .065), transparent 25%),
    rgba(13, 18, 19, .94) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap {
  min-width: 0 !important;
  align-self: center !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker {
  color: var(--chronos-teal) !important;
  font: 600 .53rem/1.1 'JetBrains Mono', monospace !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
  margin: 7px 0 0 !important;
  color: var(--chronos-ink) !important;
  font: 500 1.46rem/1 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: .01em !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
  display: block !important;
  margin-top: 6px !important;
  overflow: hidden !important;
  color: var(--chronos-muted) !important;
  font: .55rem/1.2 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
  min-width: 0 !important;
  align-self: center !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 228px) 34px !important;
  gap: 6px !important;
  min-width: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input {
  min-height: 36px !important;
  border: 1px solid rgba(228, 217, 190, .16) !important;
  border-radius: 6px !important;
  color: var(--chronos-ink) !important;
  background: rgba(3, 7, 8, .72) !important;
  font: 500 .68rem/1 'DM Sans', system-ui, sans-serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input::placeholder {
  color: rgba(183, 192, 189, .56) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  min-height: 36px !important;
  gap: 2px !important;
  padding: 3px !important;
  border: 1px solid rgba(228, 217, 190, .14) !important;
  border-radius: 6px !important;
  background: rgba(209, 174, 104, .035) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: var(--chronos-muted) !important;
  background: transparent !important;
  font: 600 .49rem/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button.act {
  color: #101515 !important;
  background: var(--chronos-brass) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border: 1px solid rgba(118, 210, 191, .3) !important;
  border-radius: 6px !important;
  color: var(--chronos-teal) !important;
  background: rgba(118, 210, 191, .07) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-meta {
  display: flex !important;
  justify-content: flex-end !important;
  min-height: 14px !important;
  padding-top: 4px !important;
  color: var(--chronos-muted) !important;
  font: .48rem/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
  align-self: center !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-shell-btn, .tl-close) {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid rgba(228, 217, 190, .16) !important;
  border-radius: 6px !important;
  color: var(--chronos-soft) !important;
  background: rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
  min-height: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-shell {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
  display: grid !important;
  grid-template-columns: 232px minmax(0, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  position: relative !important;
  top: auto !important;
  align-self: stretch !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar-shell {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  border: 1px solid var(--chronos-line) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(15, 23, 23, .97), rgba(8, 13, 14, .98)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero {
  display: grid !important;
  gap: 10px !important;
  padding: 16px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
  background: linear-gradient(145deg, rgba(209, 174, 104, .11), transparent 70%) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-kicker,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section-head > span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-group > span {
  color: var(--chronos-teal) !important;
  font: 600 .51rem/1.1 'JetBrains Mono', monospace !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-title-row,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section-head,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-inline-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-title-row h3 {
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font: 500 1.16rem/1.05 'Cormorant Garamond', Georgia, serif !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-badge {
  flex: 0 0 auto !important;
  padding: 5px 6px !important;
  border: 1px solid rgba(209, 174, 104, .3) !important;
  color: var(--chronos-brass) !important;
  font: .46rem/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero > p {
  display: -webkit-box !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--chronos-soft) !important;
  font: .67rem/1.45 'DM Sans', system-ui, sans-serif !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-meta {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: var(--chronos-muted) !important;
  font: .48rem/1.2 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-meta span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats span {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 8px 6px !important;
  border: 1px solid rgba(228, 217, 190, .1) !important;
  background: rgba(0, 0, 0, .18) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats strong {
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font: 600 .61rem/1.1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  overflow-wrap: anywhere !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats small {
  color: var(--chronos-muted) !important;
  font: .46rem/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-action,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more {
  min-height: 29px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(228, 217, 190, .14) !important;
  border-radius: 5px !important;
  color: var(--chronos-soft) !important;
  background: rgba(255, 255, 255, .025) !important;
  font: 600 .49rem/1 'JetBrains Mono', monospace !important;
  cursor: pointer !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-action.primary,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more:not(.quiet) {
  border-color: rgba(209, 174, 104, .3) !important;
  color: #121716 !important;
  background: var(--chronos-brass) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-action.quiet,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more.quiet {
  color: var(--chronos-muted) !important;
  background: transparent !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section {
  padding: 14px 12px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section-head small {
  color: var(--chronos-muted) !important;
  font: .47rem/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-ladder {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 3px !important;
  margin-top: 10px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  min-height: 43px !important;
  padding: 6px 4px !important;
  border: 1px solid rgba(228, 217, 190, .1) !important;
  border-radius: 4px !important;
  color: var(--chronos-muted) !important;
  background: rgba(255, 255, 255, .018) !important;
  text-align: left !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step.act {
  border-color: rgba(118, 210, 191, .32) !important;
  color: var(--chronos-teal) !important;
  background: rgba(118, 210, 191, .065) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step small {
  overflow: hidden !important;
  color: inherit !important;
  font: .43rem/1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step strong {
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font-size: .52rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more {
  width: 100% !important;
  margin-top: 9px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details {
  border-bottom: 1px solid var(--chronos-line) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  color: var(--chronos-ink) !important;
  cursor: pointer !important;
  list-style: none !important;
  font: 600 .57rem/1 'DM Sans', system-ui, sans-serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details summary::-webkit-details-marker {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details summary::after {
  content: '+' !important;
  color: var(--chronos-brass) !important;
  font: 600 .78rem/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details[open] summary::after {
  content: '−' !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details summary small {
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--chronos-muted) !important;
  font: .45rem/1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-detail-body {
  display: grid !important;
  gap: 14px !important;
  padding: 0 12px 13px !important;
  animation: chronosDetailsIn .2s ease both !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-group {
  display: grid !important;
  gap: 6px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-group > span {
  color: var(--chronos-muted) !important;
  font-size: .46rem !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 3px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-mode-btn {
  min-height: 32px !important;
  padding: 5px 6px !important;
  border: 1px solid rgba(228, 217, 190, .1) !important;
  border-radius: 4px !important;
  color: var(--chronos-soft) !important;
  background: rgba(255, 255, 255, .02) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile.act,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-mode-btn.act {
  border-color: rgba(209, 174, 104, .34) !important;
  color: var(--chronos-ink) !important;
  background: rgba(209, 174, 104, .11) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile strong,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-mode-btn strong {
  font-size: .53rem !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile small,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-mode-btn small {
  display: block !important;
  margin-top: 3px !important;
  color: var(--chronos-muted) !important;
  font-size: .44rem !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 276px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 1px solid var(--chronos-line) !important;
  border-radius: 10px !important;
  background: #080d0e !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: linear-gradient(180deg, rgba(118, 210, 191, .035), transparent 36%) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: auto !important;
  border-left: 1px solid var(--chronos-line) !important;
  background: rgba(13, 19, 19, .96) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 82px !important;
  padding: 16px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
  background: linear-gradient(145deg, rgba(209, 174, 104, .11), transparent 74%) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window > span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header span {
  color: var(--chronos-teal) !important;
  font: 600 .5rem/1.1 'JetBrains Mono', monospace !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > strong {
  display: block !important;
  margin-top: 6px !important;
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font: 500 1.16rem/1.05 'Cormorant Garamond', Georgia, serif !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > small {
  display: block !important;
  margin-top: 5px !important;
  color: var(--chronos-muted) !important;
  font: .49rem/1.2 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-actions {
  display: grid !important;
  grid-template-columns: repeat(4, 28px) !important;
  gap: 4px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 1px solid rgba(228, 217, 190, .14) !important;
  border-radius: 5px !important;
  color: var(--chronos-soft) !important;
  background: rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn.cinema.act {
  border-color: rgba(118, 210, 191, .35) !important;
  color: #0d1716 !important;
  background: var(--chronos-teal) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
  display: grid !important;
  gap: 6px !important;
  padding: 16px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window > strong {
  color: var(--chronos-ink) !important;
  font: 500 1.03rem/1.1 'Cormorant Garamond', Georgia, serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window > small {
  color: var(--chronos-muted) !important;
  font: .58rem/1.45 'DM Sans', system-ui, sans-serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
  min-height: 0 !important;
  padding: 14px 0 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 0 16px 10px !important;
  border-bottom: 1px solid var(--chronos-line) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header small {
  color: var(--chronos-brass) !important;
  font: .54rem/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
  display: grid !important;
  gap: 0 !important;
  max-height: 340px !important;
  overflow: auto !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 4px 8px !important;
  min-height: 58px !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(228, 217, 190, .08) !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip:hover {
  background: rgba(118, 210, 191, .06) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  color: var(--chronos-brass) !important;
  font: 600 .5rem/1.1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font: 500 .78rem/1.1 'Cormorant Garamond', Georgia, serif !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
  grid-column: 2 !important;
  grid-row: 2 !important;
  overflow: hidden !important;
  color: var(--chronos-muted) !important;
  font: .48rem/1.1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  display: grid !important;
  grid-template-columns: auto minmax(30px, 1fr) auto !important;
  gap: 7px !important;
  align-items: center !important;
  min-height: 42px !important;
  margin-top: auto !important;
  padding: 0 16px !important;
  border-top: 1px solid var(--chronos-line) !important;
  background: rgba(0, 0, 0, .18) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > span {
  color: var(--chronos-brass) !important;
  font: 600 .47rem/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > i {
  height: 2px !important;
  background: rgba(228, 217, 190, .12) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > small {
  max-width: 96px !important;
  overflow: hidden !important;
  color: var(--chronos-muted) !important;
  font: .43rem/1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-inspector,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-focus-dock,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-scene-strip,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-ribbon,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-atlas {
  display: none !important;
}

@keyframes chronosDetailsIn {
  from { opacity: .3; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    grid-template-columns: 220px minmax(0, 1fr) auto !important;
    gap: 10px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: 208px minmax(0, 1fr) !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) 238px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) minmax(156px, 190px) 32px !important;
  }
}

@media (max-width: 900px) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    min-height: 112px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) 34px !important;
    grid-template-rows: 36px 34px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox-main {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-meta {
    display: none !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    overflow: auto !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(620px, 1fr) !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: 0 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar-shell {
    height: auto !important;
    max-height: 284px !important;
    overflow: auto !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(390px, 1fr) auto !important;
    min-height: 620px !important;
    height: 620px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-height: 230px !important;
    border-top: 1px solid var(--chronos-line) !important;
    border-left: 0 !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    padding-top: 10px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-height: 120px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    min-height: 48px !important;
    padding: 8px 12px !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip:nth-child(n + 5) {
    display: none !important;
  }
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *,
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *::before,
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Timeline geometry must be last: legacy specificity otherwise reintroduces the rail. */
@media (min-width: 901px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: 248px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 104px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 48px 12px !important;
    grid-template-areas: none !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    padding: 8px 10px 7px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
    display: none !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
    grid-column: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    height: 48px !important;
    overflow: hidden !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }
}

@media (min-width: 901px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 1 !important;
    grid-row: 1 !important;
    border-left: 0 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 300px 480px !important;
    height: auto !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 112px 368px !important;
    height: 480px !important;
    min-height: 480px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 32px 49px 12px !important;
    grid-template-areas: none !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    padding: 7px 8px 6px !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
    display: none !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: flex !important;
    height: 49px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }
}

/* The legacy cockpit hides dock nodes with a stronger .tl-dock rule. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar.tl-dock {
  display: block !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar.tl-dock .tl-sidebar-shell {
  display: flex !important;
}

/* Match the high-specificity legacy cockpit rules while keeping the new grid. */
body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
  grid-template-columns: 232px minmax(0, 1fr) !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  grid-template-columns: auto minmax(30px, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  min-height: 64px !important;
  padding: 8px 16px !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(118, 210, 191, .24) !important;
  border-radius: 4px !important;
  color: var(--chronos-teal) !important;
  background: rgba(118, 210, 191, .055) !important;
  font: 600 .48rem/1 'JetBrains Mono', monospace !important;
  text-align: left !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge b {
  overflow: hidden !important;
  color: var(--chronos-ink) !important;
  font-weight: 500 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  grid-template-columns: minmax(0, 1fr) 276px !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  display: flex !important;
  flex-direction: column !important;
}

body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head .tl-stage-copy > strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  white-space: normal !important;
}

@media (max-width: 1100px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: 208px minmax(0, 1fr) !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) 238px !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(620px, 1fr) !important;
    height: auto !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(390px, 1fr) auto !important;
    height: 620px !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-column: 1 !important;
    grid-row: 2 !important;
    height: auto !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
  }
}

/* Patriarch dossier layer: portraits become evidence-led biography cards. */
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record.has-portrait .patriarch-record-mark {
  border-color: rgba(118, 201, 187, .38) !important;
  color: #9ce5d6 !important;
  background: rgba(118, 201, 187, .07) !important;
  font-size: .48rem !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-record.has-portrait.active .patriarch-record-mark {
  color: #101817 !important;
  background: var(--patriarch-teal) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-register {
  margin: 0 18px 24px !important;
  padding: 20px 0 0 !important;
  border-top: 1px solid var(--patriarch-line) !important;
  animation: patriarchReveal .55s ease both !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-register-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-register-head h3 {
  margin: 7px 0 0 !important;
  color: var(--patriarch-ivory) !important;
  font: 500 1.35rem/1.05 var(--font-display, Georgia, serif) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-register-head > span {
  color: rgba(240, 230, 204, .48) !important;
  font: .56rem/1.2 var(--font-mono, monospace) !important;
  text-align: right !important;
  text-transform: uppercase !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-register-lead {
  max-width: 720px !important;
  margin: 12px 0 18px !important;
  color: rgba(240, 230, 204, .6) !important;
  font-size: .78rem !important;
  line-height: 1.55 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 86px !important;
  padding: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(240, 230, 204, .12) !important;
  border-radius: 4px !important;
  color: inherit !important;
  background:
    linear-gradient(120deg, rgba(10, 17, 18, .96), rgba(10, 17, 18, .68)),
    url('/assets/patriarch/antiochene-succession-hero.png') center / cover !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: border-color .22s ease, transform .22s ease, background .22s ease !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-card:hover,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-card.active {
  border-color: rgba(118, 201, 187, .54) !important;
  background:
    linear-gradient(120deg, rgba(15, 40, 40, .94), rgba(10, 17, 18, .6)),
    url('/assets/patriarch/antiochene-succession-hero.png') center / cover !important;
  transform: translateY(-2px) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-mark {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  align-self: start !important;
  border: 1px solid rgba(213, 168, 95, .45) !important;
  border-radius: 50% !important;
  color: var(--patriarch-gold) !important;
  background: rgba(8, 14, 15, .72) !important;
  font: 600 .52rem/1 var(--font-mono, monospace) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy {
  display: grid !important;
  align-content: start !important;
  gap: 4px !important;
  min-width: 0 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy strong,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy small,
body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy em {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy strong {
  color: var(--patriarch-ivory) !important;
  font-size: .74rem !important;
  font-weight: 600 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy small {
  color: rgba(240, 230, 204, .5) !important;
  font: .55rem/1.1 var(--font-mono, monospace) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-copy em {
  color: var(--patriarch-teal) !important;
  font-size: .56rem !important;
  font-style: normal !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-profile-seal {
  position: absolute !important;
  top: 22px !important;
  right: 24px !important;
  display: grid !important;
  place-items: center !important;
  width: 58px !important;
  height: 58px !important;
  border: 1px solid rgba(213, 168, 95, .48) !important;
  border-radius: 50% !important;
  color: var(--patriarch-gold) !important;
  background: rgba(8, 14, 15, .42) !important;
  font: 600 .68rem/1 var(--font-mono, monospace) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 16px 30px !important;
  border-bottom: 1px solid var(--patriarch-line) !important;
  background: rgba(118, 201, 187, .035) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-metrics span {
  display: grid !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 9px !important;
  border: 1px solid rgba(240, 230, 204, .1) !important;
  background: rgba(0, 0, 0, .14) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-metrics small {
  color: var(--patriarch-teal) !important;
  font: 600 .55rem/1 var(--font-mono, monospace) !important;
  text-transform: uppercase !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-metrics strong {
  overflow: hidden !important;
  color: var(--patriarch-ivory) !important;
  font-size: .7rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid-rich {
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, .88fr) minmax(150px, .88fr) !important;
  gap: 20px !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-column {
  min-width: 0 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-list {
  display: grid !important;
  gap: 6px !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-list li {
  padding: 8px 0 8px 12px !important;
  border-left: 1px solid rgba(213, 168, 95, .42) !important;
  color: rgba(240, 230, 204, .68) !important;
  font-size: .72rem !important;
  line-height: 1.35 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-theme-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 18px !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-theme-row span {
  padding: 5px 7px !important;
  border: 1px solid rgba(118, 201, 187, .24) !important;
  color: var(--patriarch-teal) !important;
  font: .55rem/1 var(--font-mono, monospace) !important;
  text-transform: uppercase !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-strip {
  padding: 20px 30px !important;
  border-top: 1px solid var(--patriarch-line) !important;
  border-bottom: 1px solid var(--patriarch-line) !important;
  background: rgba(0, 0, 0, .12) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 15px !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-row {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 9px !important;
  min-width: 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(240, 230, 204, .1) !important;
  background: rgba(118, 201, 187, .035) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-year {
  color: var(--patriarch-gold) !important;
  font: 600 .6rem/1.2 var(--font-mono, monospace) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-row strong {
  display: block !important;
  color: var(--patriarch-ivory) !important;
  font-size: .72rem !important;
  line-height: 1.2 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-row p {
  margin: 6px 0 0 !important;
  color: rgba(240, 230, 204, .52) !important;
  font-size: .63rem !important;
  line-height: 1.4 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-evidence-banner {
  display: grid !important;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) !important;
  gap: 18px !important;
  align-items: center !important;
  margin: 18px 30px 0 !important;
  padding: 14px !important;
  border-left: 2px solid var(--patriarch-gold) !important;
  background: rgba(213, 168, 95, .06) !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-evidence-banner strong {
  display: block !important;
  margin-top: 6px !important;
  color: var(--patriarch-ivory) !important;
  font-size: .72rem !important;
  line-height: 1.35 !important;
}

body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-evidence-banner p {
  margin: 0 !important;
  color: rgba(240, 230, 204, .6) !important;
  font-size: .7rem !important;
  line-height: 1.5 !important;
}

@media (max-width: 1100px) {
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid-rich {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-lead {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-lenses {
    grid-template-columns: repeat(5, minmax(92px, 1fr)) !important;
    overflow-x: auto !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-register {
    margin-inline: 12px !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-portrait-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding-inline: 20px !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-dossier-grid-rich {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-event-list {
    grid-template-columns: 1fr !important;
  }
  body.uw-active #PATRIARCHMODE[aria-hidden="false"] .patriarch-evidence-banner {
    grid-template-columns: 1fr !important;
    margin-inline: 20px !important;
  }
}

/* Timeline overhaul: one calm archive workspace, one readable axis. */
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
  --tl-paper: #f0e8d8;
  --tl-muted: #87919a;
  --tl-line: rgba(235, 228, 211, .12);
  --tl-panel: #0c1218;
  --tl-panel-deep: #091016;
  position: relative !important;
  display: grid !important;
  grid-template-rows: 84px minmax(0, 1fr) !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  border: 1px solid rgba(215, 181, 108, .24) !important;
  border-radius: 12px !important;
  background: #080d12 !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay * {
  box-sizing: border-box;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) 72px !important;
  grid-template-areas: "title controls actions" !important;
  align-items: center !important;
  gap: 18px !important;
  width: 100% !important;
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--tl-line) !important;
  background: linear-gradient(180deg, rgba(17, 25, 31, .98), rgba(10, 16, 21, .98)) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap {
  grid-area: title !important;
  min-width: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker {
  display: block !important;
  margin-bottom: 6px !important;
  color: #70dfca !important;
  font: 600 9px/1 'JetBrains Mono', monospace !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
  margin: 0 !important;
  color: var(--tl-paper) !important;
  font: 500 25px/1 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
  display: block !important;
  margin-top: 5px !important;
  overflow: hidden !important;
  color: var(--tl-muted) !important;
  font: 11px/1.25 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
  grid-area: controls !important;
  min-width: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(236px, 340px) 36px !important;
  align-items: center !important;
  gap: 8px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox-main input {
  height: 38px !important;
  padding: 0 13px !important;
  border: 1px solid rgba(235, 228, 211, .14) !important;
  border-radius: 8px !important;
  outline: 0 !important;
  background: rgba(0, 0, 0, .2) !important;
  color: var(--tl-paper) !important;
  font: 13px/1 'Inter', system-ui, sans-serif !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox-main input::placeholder {
  color: #6f7c86 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
  height: 38px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 3px !important;
  padding: 3px !important;
  border: 1px solid rgba(235, 228, 211, .12) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .025) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button {
  height: 30px !important;
  min-width: 0 !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  color: #89959d !important;
  font: 600 10px/1 'JetBrains Mono', monospace !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button.act {
  color: #f1e6cc !important;
  background: rgba(215, 181, 108, .2) !important;
  box-shadow: inset 0 0 0 1px rgba(215, 181, 108, .36) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-shell-btn,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-close {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid rgba(235, 228, 211, .14) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .025) !important;
  color: #c6d0d1 !important;
  font-size: 15px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon.accent {
  border-color: rgba(112, 223, 202, .35) !important;
  background: rgba(112, 223, 202, .1) !important;
  color: #9de7d7 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
  grid-area: actions !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
  min-height: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
  background:
    linear-gradient(90deg, rgba(112, 223, 202, .018) 1px, transparent 1px) 0 0 / 48px 48px,
    #080d12 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-shell {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar-shell {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 10px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 1px solid rgba(235, 228, 211, .12) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(13, 22, 27, .98), rgba(9, 15, 20, .98)) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(215, 181, 108, .4) transparent !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero {
  flex: 0 0 auto !important;
  padding: 13px !important;
  border: 1px solid rgba(112, 223, 202, .24) !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, rgba(22, 47, 50, .72), rgba(12, 24, 29, .55)) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-kicker,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section-head span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-group > span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-filter-kicker {
  color: #70dfca !important;
  font: 600 9px/1.2 'JetBrains Mono', monospace !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-title-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 7px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-title-row h3 {
  max-width: 168px !important;
  margin: 0 !important;
  color: #f0e8d8 !important;
  font: 500 19px/1.08 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero p {
  display: -webkit-box !important;
  margin: 10px 0 !important;
  overflow: hidden !important;
  color: #a3afb3 !important;
  font: 12px/1.45 'Inter', system-ui, sans-serif !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-meta,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-meta {
  color: #93a0a5 !important;
  font: 10px/1.3 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats {
  margin-top: 8px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats span {
  display: grid !important;
  gap: 3px !important;
  padding: 8px !important;
  border: 1px solid rgba(235, 228, 211, .11) !important;
  background: rgba(0, 0, 0, .15) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats strong {
  color: #f0e8d8 !important;
  font: 600 14px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-stats small,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-section-head small,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-meta span:last-child {
  color: #7d8c92 !important;
  font: 9px/1.25 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr 34px !important;
  gap: 5px !important;
  margin-top: 9px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-action,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more {
  min-height: 32px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(235, 228, 211, .13) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .035) !important;
  color: #b8c2c1 !important;
  font: 600 10px/1 'JetBrains Mono', monospace !important;
  letter-spacing: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-action.primary,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-more:not(.quiet) {
  border-color: rgba(215, 181, 108, .5) !important;
  background: #d7b56c !important;
  color: #152025 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details {
  flex: 0 0 auto !important;
  border-top: 1px solid rgba(235, 228, 211, .1) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-details summary {
  min-height: 38px !important;
  padding: 0 3px !important;
  color: #e6e0d1 !important;
  font: 600 11px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-detail-body {
  padding: 4px 0 10px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-ladder {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step {
  min-width: 0 !important;
  min-height: 56px !important;
  padding: 7px !important;
  border: 1px solid rgba(235, 228, 211, .12) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .025) !important;
  text-align: left !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step.act {
  border-color: rgba(112, 223, 202, .35) !important;
  background: rgba(112, 223, 202, .08) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step span,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step small {
  display: block !important;
  color: #7e8d92 !important;
  font: 9px/1.2 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-step strong {
  display: block !important;
  margin: 4px 0 !important;
  color: #e7e1d3 !important;
  font: 600 10px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile {
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 7px !important;
  border: 1px solid rgba(235, 228, 211, .1) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .025) !important;
  text-align: left !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile.act {
  border-color: rgba(215, 181, 108, .38) !important;
  background: rgba(215, 181, 108, .09) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile strong,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile strong {
  color: #ded8ca !important;
  font: 600 10px/1.2 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tile small {
  margin-top: 4px !important;
  color: #79878c !important;
  font: 9px/1.2 'Inter', system-ui, sans-serif !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 104px minmax(0, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(235, 228, 211, .13) !important;
  border-radius: 10px !important;
  background: var(--tl-panel-deep) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 34px 48px 12px !important;
  gap: 4px !important;
  height: 104px !important;
  min-height: 104px !important;
  max-height: 104px !important;
  padding: 8px 10px 7px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(235, 228, 211, .1) !important;
  border-radius: 0 !important;
  background: #0d151b !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  align-items: center !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy > span {
  color: #70dfca !important;
  font: 600 9px/1 'JetBrains Mono', monospace !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy > strong {
  display: block !important;
  margin-top: 5px !important;
  overflow: hidden !important;
  color: #f0e8d8 !important;
  font: 600 14px/1 'Inter', system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy > small {
  display: block !important;
  margin-top: 4px !important;
  color: #86949a !important;
  font: 10px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-actions {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 1px solid rgba(235, 228, 211, .15) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .035) !important;
  color: #c8d0cc !important;
  font: 600 13px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn.cinema.act {
  border-color: rgba(215, 181, 108, .58) !important;
  background: rgba(215, 181, 108, .18) !important;
  color: #f1d995 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
  grid-row: 2 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby > header {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
  height: 48px !important;
  overflow: hidden !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  grid-template-rows: 17px 15px !important;
  gap: 2px 7px !important;
  align-content: center !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 5px 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(235, 228, 211, .12) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .025) !important;
  box-shadow: none !important;
  text-align: left !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span {
  grid-column: 1 !important;
  grid-row: 1 !important;
  color: #d7b56c !important;
  font: 600 9px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #e5e0d3 !important;
  font: 600 10px/1.15 'Inter', system-ui, sans-serif !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  overflow: hidden !important;
  color: #78868c !important;
  font: 9px/1.1 'JetBrains Mono', monospace !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
  grid-row: 3 !important;
  display: grid !important;
  grid-template-columns: max-content minmax(60px, 1fr) minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
  height: 12px !important;
  overflow: hidden !important;
  color: #77858b !important;
  font: 9px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > span {
  color: #a4b1ae !important;
  font: 600 9px/1 'JetBrains Mono', monospace !important;
  text-transform: uppercase !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > i {
  height: 2px !important;
  background: rgba(235, 228, 211, .13) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > i > b {
  background: linear-gradient(90deg, #70dfca, #d7b56c) !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > small {
  overflow: hidden !important;
  color: #77858b !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
  display: grid !important;
  grid-template-columns: max-content max-content !important;
  gap: 5px !important;
  align-items: center !important;
  min-height: 18px !important;
  padding: 0 7px !important;
  border: 1px solid rgba(112, 223, 202, .25) !important;
  border-radius: 5px !important;
  background: rgba(112, 223, 202, .06) !important;
  color: #93dfd0 !important;
  font: 9px/1 'JetBrains Mono', monospace !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge b {
  color: #e4e0d3 !important;
  font-weight: 600 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 0 10px 10px !important;
  background: #071017 !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-ribbon, .tl-atlas, .tl-focus-dock, .tl-scene-strip, .tl-inspector) {
  display: none !important;
}

body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-tip {
  z-index: 4 !important;
  max-width: 280px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(215, 181, 108, .32) !important;
  border-radius: 8px !important;
  background: rgba(8, 14, 18, .96) !important;
  color: #eee8dc !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .38) !important;
}

@media (max-width: 900px) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 120px minmax(0, 1fr) !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 34px 68px !important;
    grid-template-areas: "title actions" "controls controls" !important;
    gap: 7px !important;
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    padding: 9px 10px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
    font-size: 21px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) 36px !important;
    grid-template-rows: 38px 26px !important;
    gap: 5px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox-main {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-icon.accent {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    height: 26px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-segment button {
    height: 20px !important;
    font-size: 9px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-command-meta {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    height: auto !important;
    min-height: 0 !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-shell {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto 480px !important;
    gap: 7px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar {
    min-height: 0 !important;
    max-height: 300px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-sidebar-shell {
    height: 300px !important;
    max-height: 300px !important;
    padding: 8px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero {
    padding: 11px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-nav-hero p {
    -webkit-line-clamp: 2 !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-rows: 112px 368px !important;
    height: 480px !important;
    min-height: 480px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    grid-template-rows: 32px 49px 12px !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    padding: 7px 8px 6px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    flex: 0 0 160px !important;
    width: 160px !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    grid-template-columns: max-content minmax(36px, 1fr) auto !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline > small {
    display: none !important;
  }

  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay .tl-reader-bridge {
    grid-column: 3 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *,
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *::before,
  body.uw-active .app[data-active-mode="timeline"] .timeline-overlay *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Timeline geometry must be last: legacy specificity otherwise reintroduces the rail. */
@media (min-width: 901px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: 248px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 104px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 48px 12px !important;
    grid-template-areas: none !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    padding: 8px 10px 7px !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window { display: none !important; }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
    grid-column: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    height: 48px !important;
    overflow: hidden !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }
}

@media (max-width: 900px) {
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 300px 480px !important;
    height: auto !important;
    gap: 7px !important;
    overflow: visible !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 112px 368px !important;
    height: 480px !important;
    min-height: 480px !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 32px 49px 12px !important;
    grid-template-areas: none !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    padding: 7px 8px 6px !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-head {
    display: grid !important;
    grid-row: 1 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-console-window { display: none !important; }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-nearby {
    display: block !important;
    grid-row: 2 !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    display: flex !important;
    height: 49px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  body.uw-active.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-depthline {
    display: grid !important;
    grid-row: 3 !important;
    grid-column: 1 !important;
  }
}
