#record-view-tools{display:flex;align-items:center;gap:9px;padding:10px 15px;border-bottom:1px solid var(--panel-line);flex-shrink:0}#record-query{width:100%;min-width:50px;font:13px Inter,sans-serif;border:0;background:transparent;outline:none;color:var(--panel-ink);height:28px}#record-query:focus{box-shadow:0 1px 0 var(--panel-ink)}.record-view-buttons{display:flex;gap:2px}.record-view-buttons button,#export-records{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;flex-shrink:0}.record-view-buttons button[aria-pressed=true],.record-view-buttons button:hover,#export-records:hover{background:var(--panel-hover)}#record-view-tools svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}.records-table{width:100%;border-collapse:collapse;font-size:12px}.records-table th{text-align:left;font-weight:500;padding:12px;color:var(--panel-muted);position:sticky;top:0;background:var(--surface,var(--panel-bg));z-index:1}.records-table th:last-child,.records-table td:last-child{text-align:right}.records-table td{border-top:1px solid var(--panel-line);padding:12px;vertical-align:top;line-height:1.5}.records-table td:first-child{font-size:11px;color:var(--panel-muted);max-width:92px}.records-table td:nth-child(2){min-width:140px}.records-table td button{text-align:left;width:100%}.records-table strong{font-size:13px;font-weight:500}.records-table small{display:block;font-size:11px;color:var(--panel-muted);margin-top:5px}.records-table tr:hover td{background:var(--panel-hover)}.records-table-scroll{overflow:auto}.conflict-feed-context{font-size:12px!important;line-height:1.55!important}.report-reference{font-size:12px!important;line-height:1.6!important}.related-record{text-align:left;width:100%;padding:12px 0;font-size:14px}.related-record>span{display:block;font-size:11px;color:var(--panel-muted);margin-top:5px}.record-enrichment .record-field strong{overflow-wrap:anywhere;max-width:66%;text-align:right}.record-enrichment .image-credit{margin:3px 0 15px!important;font-size:10px!important;line-height:1.5!important}.source-context h3{font-size:15px}.source-context>.image-credit{font-size:10px!important}

.records-table td:first-child,.records-table th:first-child{min-width:92px;width:92px}.records-table td:last-child{font-variant-numeric:tabular-nums}

/* A shared reading rhythm for facts, provenance, and related records. */
#detail-panel .detail-body{padding:20px}
#detail-panel .detail-body h2{margin-bottom:16px}
#detail-panel .detail-body>p{margin:0 0 16px;line-height:1.65}
#detail-panel .detail-related{margin-top:24px;padding-top:20px;border-color:var(--surface-line)}
#detail-panel .detail-related h3{margin:0 0 16px;font-size:15px;font-weight:500;line-height:1.45}
#detail-panel .record-field{display:grid;grid-template-columns:minmax(88px,.8fr) minmax(0,1.35fr);align-items:start;gap:16px;padding:12px 0;border-bottom:1px solid var(--surface-line);font-size:14px;line-height:1.55}
#detail-panel .record-field>span{color:var(--surface-muted);font-weight:400}
#detail-panel .record-field>strong{min-width:0;max-width:none;text-align:left;font-weight:400;white-space:pre-line;overflow-wrap:anywhere;color:var(--surface-ink)}
#detail-panel .record-details{margin-top:8px;border:0;border-bottom:1px solid var(--surface-line)}
#detail-panel .record-details>summary{padding:14px 0;color:var(--surface-muted);font-size:13px;cursor:pointer}
#detail-panel .record-details>div{padding:0 0 14px}
#detail-panel .record-details h4{font-size:13px;font-weight:500;margin:16px 0 8px}
#detail-panel .record-source-links{padding-top:16px;gap:10px}
#detail-panel .source-connections .detail-related{padding-top:20px}
#detail-panel .related-record{display:block;width:100%;padding:14px 12px;margin:0;border:0;border-radius:8px;box-shadow:none;text-align:left;background:transparent}
#detail-panel .related-record+.related-record{border-top:1px solid var(--surface-line);border-radius:0 0 8px 8px}
#detail-panel .related-record:hover,#detail-panel .related-record:focus-visible{background:var(--surface-hover)}
#detail-panel .related-record>strong{display:block;font-size:14px;line-height:1.5;font-weight:400;color:var(--surface-ink)}
#detail-panel .related-record>span{margin-top:5px;font-size:12px;line-height:1.5;color:var(--surface-muted)}
#detail-panel .record-tools{padding-top:16px;margin-top:24px}
#detail-panel .record-overview{margin:0 0 20px}
#detail-panel .overview-copy{overflow:hidden;max-height:6.6em;transition:max-height .26s cubic-bezier(.2,.7,.2,1)}
#detail-panel .overview-text{font-size:14px;line-height:1.65}
#detail-panel .overview-text p{font:inherit;margin:0 0 14px}
#detail-panel .overview-text p:last-child{margin-bottom:0}
#detail-panel .overview-toggle{font-size:13px;font-weight:450;color:var(--surface-ink);padding:8px 0 4px;margin-top:4px;text-decoration:underline;text-underline-offset:3px}
#detail-panel .overview-toggle:hover{color:var(--surface-muted)}
@media(prefers-reduced-motion:reduce){#detail-panel .overview-copy{transition:none}}

.lucide{display:inline-block;width:20px;height:20px;flex-shrink:0;fill:none!important;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
a>.lucide{width:13px;height:13px;margin-left:4px;vertical-align:-2px}
.back-button{display:inline-flex;align-items:center;gap:7px}.back-button>.lucide{width:15px;height:15px}
#story-exit .lucide,#voyage-exit .lucide,#date-close .lucide{width:18px;height:18px}
#story-prev .lucide,#story-next .lucide,.step-button .lucide{width:18px;height:18px}
.small-control .lucide,.dropdown-option .lucide{width:14px;height:14px}
#search-close{display:grid;place-items:center;width:30px;height:30px}
#search-close .lucide{width:18px;height:18px}
#detail-panel .record-tools{display:flex;flex-wrap:wrap;gap:8px}
#detail-panel .record-tools button,.journey-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:9px 11px;background:var(--surface-hover);color:var(--surface-ink);font-size:13px;font-weight:450;line-height:1.4;border:0;border-radius:8px;text-decoration:none;transition:background .15s}
#detail-panel .record-tools button:hover,.journey-actions button:hover{background:var(--surface-line);text-decoration:none}
#detail-panel .record-tools button>.lucide,.journey-actions button>.lucide{width:15px;height:15px}
#detail-panel .overview-toggle{display:inline-flex;align-items:center;gap:5px}
#detail-panel .overview-toggle>.lucide{width:14px;height:14px}
#story-follow,#story-ambient,#journey-start,#next-event{display:inline-flex;align-items:center;justify-content:center;gap:6px}
#story-follow>.lucide,#story-ambient>.lucide,#journey-start>.lucide,#next-event>.lucide{width:14px;height:14px}
.dropdown .dropdown-trigger{display:grid;grid-template-columns:minmax(0,1fr) 14px;align-items:center;gap:10px;padding-right:12px}
.dropdown-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dropdown-trigger>svg.lucide{width:14px;height:14px;justify-self:end;margin:0}

/* Action state pairs are explicit so primary text cannot inherit a secondary hover. */
:root{--action-bg:var(--surface-hover);--action-ink:var(--surface-ink);--action-hover:var(--surface-line);--primary-bg:var(--surface-ink);--primary-ink:var(--surface);--primary-hover:#414b53}
:root[data-theme=dark]{--primary-hover:#fff}
#detail-panel .record-tools button,.journey-actions button,.chat-actions button,.chat-error button{background:var(--action-bg);color:var(--action-ink)}
#detail-panel .record-tools button:hover,.journey-actions button:hover,.chat-actions button:hover,.chat-error button:hover{background:var(--action-hover);color:var(--action-ink)}
#voyage-resume,#ask-submit:not(:disabled){background:var(--primary-bg);color:var(--primary-ink)}
#voyage-resume:hover,#voyage-resume:focus-visible,#ask-submit:not(:disabled):hover{background:var(--primary-hover);color:var(--primary-ink)}
#voyage-resume:active,#ask-submit:not(:disabled):active{background:var(--primary-bg);color:var(--primary-ink)}
#voyage-resume:disabled{background:var(--action-bg);color:var(--surface-muted);cursor:default}
#detail-panel .record-tools button:focus-visible,.journey-actions button:focus-visible,.chat-actions button:focus-visible{outline:2px solid var(--surface-ink);outline-offset:2px}
@media(min-width:701px) and (max-width:900px){.atlas-brand{font-size:17px;letter-spacing:-.5px}.atlas-search{min-width:0;width:110px}.atlas-search>span{overflow:hidden;text-overflow:ellipsis}}
/* Narrative copy has one size, whether it came from the record, context or enrichment. */
#detail-panel .detail-body{--record-text-size:14px;--record-text-leading:1.65}
#detail-panel .detail-body>p:not(.image-credit):not(.data-note),#detail-panel .overview-text,#detail-panel .overview-text p,#detail-panel .knowledge-prose,#detail-panel .source-context>p:not(.image-credit),#detail-panel .detail-related>p:not(.image-credit):not(.data-note){font-family:Inter,sans-serif;font-size:var(--record-text-size)!important;line-height:var(--record-text-leading)!important;font-weight:400}

/* Browsing is one calm list; optional tools stay behind a single filter control. */
#feed-panel .panel-heading{gap:8px;border-bottom:0}
#feed-panel .panel-heading h2{flex:1}
#feed-panel .feed-views{display:flex;gap:16px;align-items:center;padding:0 18px 10px;flex:none;border-bottom:1px solid var(--surface-line)}
#feed-panel .feed-views button{height:28px;width:auto;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;font:400 13px/1 Inter,sans-serif;color:var(--surface-muted);position:relative}
#feed-panel .feed-views button[aria-pressed=true]{color:var(--surface-ink)}
#feed-panel .feed-views button[aria-pressed=true]:after{content:'';position:absolute;bottom:-11px;left:0;right:0;height:2px;background:var(--surface-ink);border-radius:1px}
#feed-options[hidden],#feed-options-open[hidden],#live-feed-state{display:none!important}
#feed-panel #record-view-tools{border-bottom:0;padding:6px 18px 12px}
#feed-panel .feed-range{border:0;padding-top:4px;padding-bottom:4px}
#feed-panel .feed-filters{padding-top:12px}
#feed-panel .record{border-bottom:0;padding:12px 18px}
#feed-panel .record+.record{border-top:0}
#feed-panel .record h3{font-size:14px;line-height:1.5;font-weight:400;letter-spacing:0;margin:0}
#feed-panel .record-meta{margin-bottom:4px}
#feed-panel .record-meta>span{display:none}
#feed-panel .record .type-pill{font-size:10px;font-weight:400;opacity:.8}
#feed-panel .record p{font-size:12.5px;line-height:1.5;margin:4px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#feed-panel .live-event{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:start;text-align:left}
#feed-panel .live-event>time{font:400 11px/1.6 Inter,sans-serif;color:var(--surface-muted);padding-top:2px}
#feed-panel .live-event-copy{min-width:0}
#feed-panel.live-feed-mode .feed-bottom{display:none}
#feed-panel .feed-bottom{border-top:0;padding-top:8px}
#feed-panel .live-event-new{animation:none}
#ask-history{padding:8px 16px!important}
#ask-history .chat-thread-row{grid-template-columns:minmax(0,1fr) auto;gap:12px;min-height:52px;padding:12px 2px;border-radius:6px}
#ask-history .chat-thread-row>svg{display:none}
#ask-history .chat-thread-row>span{display:contents}
#ask-history .chat-thread-row strong{font:400 14px/1.5 Inter,sans-serif;min-width:0}
#ask-history .chat-thread-row small{font:400 11px/1.5 Inter,sans-serif;margin:0;white-space:nowrap}
