@import url('tokens.css');
@import url('fleet.css');
@import url('marketing.css');
@import url('ship-specs.css');
@import url('ambient-audio.css');
@import url('glass.css');
@import url('lending.css');
@import url('backdrop.css');
@import url('marketing-body.css');
@import url('javelin-motion.css');
@import url('journal-dialog.css');
@import url('companion.css');
@import url('ship-browser.css');
@import url('wishlist.css');
@import url('reputation.css');
@import url('org-fleet-summary.css');
@import url('fleet-statistics.css');
@import url('fleet-sharing.css');
@import url('membership-history.css');
@import url('profile-fleet.css');
@import url('user-directory.css');
@import url('account-inventory-ui.css');
@import url('community-milestones.css');
@import url('legal.css');
@import url('profile-cover-controls.css');

/* Foundation: the same scale, surfaces and interaction rules across every route. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select, textarea { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0 0 16px; }
h1, h2, h3 { color: var(--text); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.035em; }
h2 { font-size: 22px; letter-spacing: -.025em; }
h3 { font-size: 18px; letter-spacing: -.015em; }
p { color: var(--muted); }
small, .small { font-size: 14px; line-height: 1.6; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
img { max-width: 100%; }
.grow { flex: 1; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.muted, .section-meta { color: var(--muted); }
.gold { color: var(--accent); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.eyebrow { color: var(--accent); font-size: 12px; line-height: 1.5; letter-spacing: .11em; font-weight: 600; margin-bottom: 12px; }
.eyebrow span { color: var(--muted); font-weight: 400; }
.meta-note { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 16px 0 0; }
.section-meta { font-size: 13px; }
.text-link { color: var(--accent); font-size: 14px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link:has(svg) { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 17px; color: var(--text); background: var(--raised); border: 1px solid var(--control-line); border-radius: var(--radius-small); font-size: 14px; font-weight: 550; line-height: 1.4; text-align: center; text-decoration: none; }
.btn:hover:not(:disabled) { background: #263a54; border-color: var(--accent); }
.btn.primary { color: #11203a; background: var(--accent); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: #ccdcff; border-color: #ccdcff; }
.btn.subtle { background: transparent; border-color: var(--line); }
.btn.subtle:hover:not(:disabled) { background: var(--raised); border-color: var(--control-line); }
.btn.small { font-size: 13px; padding: 10px 13px; }
.chip, .pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.chip.gold { color: var(--accent); border-color: #50668b; background: #1c2b44; }
.chip.green { color: var(--green); border-color: #416b60; background: #162c29; }
.item-list { display: flex; flex-wrap: wrap; gap: 8px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); vertical-align: middle; flex-shrink: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid #536c91; border-radius: 50%; background: #263955; color: #d5e1fb; font-size: 14px; font-weight: 600; }
.avatar.large { width: 64px; height: 64px; font-size: 24px; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 20px; color: #102039; background: var(--focus); border-radius: 7px; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

/* Application chrome: quiet framing, visible navigation and usable controls. */
.demo-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px 24px; padding: 8px 28px; color: var(--muted); background: #0b111a; border-bottom: 1px solid var(--line); font-size: 12px; }
.demo-bar label { display: flex; align-items: center; gap: 10px; }
.demo-bar select { width: auto; min-height: 36px; padding: 6px 28px 6px 10px; font-size: 12px; border-color: #4f6686; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding: 16px 28px; background: var(--nav); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 44px; }
.brand img { width: 40px; height: 40px; flex-shrink: 0; }
.brand strong { display: block; font-size: 12px; letter-spacing: .09em; line-height: 1.5; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.toplinks { display: flex; align-items: center; gap: 18px; min-width: 0; }
.marketing-link { padding: 10px 0; font-size: 14px; color: var(--muted); }
.marketing-link:hover { color: var(--text); }
.pilot { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.pilot-label .muted { font-size: 12px; }
.lang, .notification-bell, .mobile-menu-btn, .ambient-header-toggle { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-small); color: var(--text); background: transparent; font-size: 13px; position: relative; }
.lang:hover, .notification-bell:hover, .mobile-menu-btn:hover, .ambient-header-toggle:hover { background: var(--raised); border-color: var(--control-line); }
.bell-count { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; color: #102039; background: var(--accent); border: 2px solid var(--nav); border-radius: 12px; font-size: 11px; font-weight: 700; }
.mobile-menu-btn, .nav-backdrop, .nav-mobile-header, .mobile-only { display: none; }
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: calc(100dvh - 140px); }
.sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 3px; min-height: calc(100dvh - 140px); max-height: 100dvh; padding: 24px 14px; overflow-y: auto; background: var(--nav); border-right: 1px solid var(--line); }
.nav-label { padding: 20px 14px 8px; color: var(--subtle); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.nav-label:first-of-type { padding-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-small); font-size: 14px; color: var(--muted); }
.nav-item span { min-width: 0; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: #1a2637; color: var(--text); }
.nav-item.active { color: #d6e3ff; background: #263b5c; box-shadow: inset 3px 0 var(--accent); }
.nav-count { margin-left: auto; padding: 0 7px; background: #30496e; color: #eef3fb; border-radius: 8px; font-size: 12px; }
.sidebar-bottom { margin-top: auto; padding: 32px 14px 0; color: var(--subtle); font-size: 12px; }
.content { width: 100%; max-width: var(--content-width); min-width: 0; padding: 40px clamp(24px, 3vw, 48px) 24px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading h1 { margin-bottom: 10px; }
.page-heading p { font-size: 15px; margin: 0; max-width: 64ch; }
.page-heading .button-row { flex-shrink: 0; padding-top: 3px; }
.panel, .setup-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; min-width: 0; }
.panel > :last-child, .setup-card > :last-child { margin-bottom: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.panel-header h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.panel-header .text-link { flex-shrink: 0; }
.detail-grid, .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.detail-grid > *, .columns > * { min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 36px 0 22px; }
.section-head h2 { margin: 0; }
.section-head p { max-width: 48ch; margin: 0; }
.notice { margin: 0 0 24px; border: 1px solid var(--line); border-left: 3px solid #7696cb; border-radius: 0 var(--radius-small) var(--radius-small) 0; padding: 15px 18px; color: var(--muted); background: #121d2b; font-size: 14px; line-height: 1.7; }
.empty { padding: 40px 24px; border: 1px dashed #5b7090; border-radius: var(--radius); text-align: center; color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* Dashboard: one primary story, a quiet personal brief, then crew activity. */
.dashboard-top, .dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(288px, 1fr); align-items: start; gap: 24px; margin-bottom: 32px; }
.dashboard-top > *, .dashboard-bottom > * { min-width: 0; }
.mission-feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mission-art figcaption { padding: 8px 24px 0; }
.mission-copy { padding: 20px 28px 28px; }
.mission-copy h2 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.035em; margin-bottom: 10px; }
.mission-copy > p { font-size: 15px; margin-bottom: 26px; }
.mission-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; }
.mission-schedule { display: flex; gap: 12px; align-items: center; }
.mission-schedule svg { color: var(--accent); width: 22px; height: 22px; }
.mission-schedule strong, .mission-schedule small { display: block; }
.mission-schedule strong { font-size: 14px; font-weight: 550; }
.mission-schedule small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.personal-brief { margin: 0; padding: 24px; }
.personal-brief .panel-header { margin-bottom: 14px; }
.brief-score { display: flex; flex-direction: column; padding: 8px 0 24px; }
.brief-score > span { font-size: 13px; color: var(--muted); }
.brief-score strong { color: var(--text); font-size: 46px; letter-spacing: -.05em; line-height: 1.35; font-weight: 550; font-variant-numeric: tabular-nums; }
.brief-score small { font-size: 12px; color: var(--muted); }
.brief-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.brief-line a { display: inline-flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 60px; min-height: 44px; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.brief-line a span { font-size: 14px; color: var(--accent); }
.connection-note { display: flex; gap: 6px; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 24px; }
.connection-note > .status-dot { margin-top: 9px; }
.connection-note strong { font-size: 13px; font-weight: 550; }
.connection-note p { font-size: 13px; margin: 6px 0 12px; }
.connection-note .btn { padding-left: 12px; padding-right: 12px; }
.dashboard-bottom .panel:last-child { margin-bottom: 0; }
.featured-column > .panel-header { min-height: 44px; margin-bottom: 16px; }
.featured-column .ship-grid { grid-template-columns: 1fr; }
.collection-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 12px; padding: 8px 4px; color: var(--accent); font-size: 14px; }
.collection-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.event-row { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.event-row:first-of-type { border-top: 0; padding-top: 0; }
.event-row:last-child { padding-bottom: 0; }
.date-box { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; min-height: 62px; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-small); }
.date-box strong { font-size: 23px; font-weight: 550; line-height: 1.3; }
.date-box span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.event-row h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.4; }
.event-row p { margin: 0; font-size: 12px; line-height: 1.6; }
.feed-item { display: flex; align-items: flex-start; gap: 14px; border-top: 1px solid var(--line); padding: 20px 0; }
.feed-item > div { flex: 1; min-width: 0; }
.feed-item p { font-size: 14px; margin: 0 0 5px; }
.feed-item p strong { color: var(--text); font-weight: 550; }
.feed-item small { color: var(--muted); font-size: 12px; }
.feed-item > svg, .feed-symbol { color: var(--subtle); margin-top: 10px; }
.feed-item .avatar { width: 36px; height: 36px; font-size: 12px; }
.news-panel .meta-note { padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }

/* Fleet components: compact manufacturer identity, useful content, common actions. */
.ship-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.ship-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.featured-column .ship-grid.compact { grid-template-columns: 1fr; margin-bottom: 0; }
.ship-card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ship-visual { position: relative; display: flex; align-items: center; justify-content: flex-start; min-height: 100px; padding: 20px 24px; background: #1a283a; border-bottom: 1px solid var(--line); }
.ship-visual img.manufacturer-logo { width: 112px; height: 56px; max-width: 55%; object-fit: contain; object-position: left center; }
.ship-info { flex: 1; display: flex; flex-direction: column; padding: 22px 24px; }
.ship-info .eyebrow { margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.ship-info h3 { font-size: 21px; line-height: 1.3; margin-bottom: 12px; }
.ship-info > p { margin-bottom: 24px; font-size: 14px; overflow-wrap: anywhere; }
.ship-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ship-bottom .text-link { font-size: 13px; }
.ship-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.featured-star { color: var(--accent); }
.ship-detail-image { display: flex; position: relative; align-items: center; justify-content: center; min-height: 170px; margin: 20px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.ship-detail-image img.manufacturer-logo { width: 140px; height: 90px; object-fit: contain; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 28px; }
.metric { min-width: 0; padding: 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric .label { font-size: 13px; color: var(--muted); }
.metric .value { margin: 5px 0; font-size: 34px; line-height: 1.3; font-weight: 550; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric .foot { color: var(--muted); font-size: 12px; }
.fleet-role-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.fleet-role-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.fleet-role-summary strong { color: var(--text); }
.private-statistics { margin-top: 32px; }
.stat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
.stat-list > div { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.stat-list span { color: var(--muted); font-size: 13px; }
.stat-list strong { font-size: 14px; font-weight: 550; }
.access-card { max-width: 660px; margin: 48px auto; padding: 40px; text-align: center; }
.access-card > svg { width: 36px; height: 36px; margin-bottom: 20px; color: var(--accent); }
.access-card .button-row { justify-content: center; }

/* Profile: a single masthead and a readable identity/activity hierarchy. */
.profile-masthead { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.profile-cover { background: var(--raised); }
.profile-cover .cig-artwork { max-width: 100%; }
.profile-cover .cig-artwork figcaption { padding: 8px 28px; }
.profile-identity { display: flex; align-items: center; gap: 22px; padding: 24px 28px 28px; }
.profile-identity h1 { margin: 0 0 12px; font-size: 36px; }
.profile-identity .eyebrow { font-size: 11px; margin-bottom: 7px; }
.profile-avatar { width: 80px; height: 80px; font-size: 28px; }
.profile-columns { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; }
.profile-columns > *, .profile-columns > div > * { min-width: 0; }
.profile-columns h2 { font-size: 18px; }
.profile-columns p { font-size: 14px; }
.profile-facts { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.profile-facts span, .profile-facts strong { display: block; font-size: 13px; }
.profile-facts span { color: var(--muted); margin-bottom: 4px; }
.profile-facts strong { font-weight: 550; }
.responsibility { display: flex; align-items: flex-start; gap: 12px; }
.responsibility svg { color: var(--accent); }
.responsibility strong { display: block; font-size: 14px; }
.responsibility small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.profile-management-column { min-width: 0; }
.profile-management-column > .panel:last-child { margin-bottom: 0; }
.profile-admin h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.profile-admin h2 svg { width: 18px; height: 18px; color: var(--accent); }
.profile-admin-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.5; }
.profile-admin-link span { min-width: 0; }
.profile-admin-link svg { width: 16px; height: 16px; }
.profile-admin-link:hover { color: var(--text); }

.profile-metrics { margin-bottom: 10px; }
.profile-metrics + .meta-note { margin: 0 0 28px; font-size: 12px; }
.profile-section { margin: 0 0 28px; }
.profile-section > .panel-header { min-height: 44px; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.achievement { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 16px 0; border-top: 1px solid var(--line); }
.achievement > span { font-size: 28px; color: var(--accent); line-height: 1.3; }
.achievement strong { font-size: 13px; font-weight: 550; }
.achievement small { font-size: 12px; color: var(--muted); }
.achievement.locked > span { color: var(--muted); }
.profile-ship-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.profile-ship-list { margin-bottom: 16px; }
.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.profile-header h2 { margin-bottom: 8px; }
.role-card { padding: 20px 0; border-top: 1px solid var(--line); }
.role-card p { margin: 8px 0 0; font-size: 14px; }

/* Communication: list rhythm shared with events and crew activity. */
.page-tabs, .category-list { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-tabs button, .page-tabs a, .category-list button { min-height: 44px; padding: 9px 15px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: var(--radius-small); font-size: 14px; }
.page-tabs button:hover, .page-tabs a:hover, .category-list button:hover { color: var(--text); background: var(--raised); }
.page-tabs button.active, .category-list button.active { background: #263b5c; color: #d6e3ff; border-color: #526e97; }
.page-tabs span { margin-left: 8px; font-variant-numeric: tabular-nums; }
.notification-list { padding-top: 4px; padding-bottom: 4px; }
.notification-item { display: flex; align-items: flex-start; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.notification-item:first-child { border-top: 0; }
.notification-symbol { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; color: var(--muted); background: var(--raised); border: 1px solid var(--line); }
.notification-item.unread .notification-symbol { color: var(--accent); border-color: #708db9; }
.notification-item.unread h3::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--accent); }
.notification-item h3 { font-size: 16px; line-height: 1.5; margin: 5px 0 8px; }
.notification-item p { font-size: 14px; margin-bottom: 12px; }
.notification-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.notification-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.chat-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); padding: 0; overflow: hidden; }
.conversation-list { padding: 20px 16px; border-right: 1px solid var(--line); }
.conversation { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-small); }
.conversation.active { background: #263b5c; }
.conversation strong { font-size: 14px; }
.conversation small { display: block; color: var(--muted); font-size: 12px; }
.conversation-main { min-width: 0; }
.conversation-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.message-log { display: flex; flex-direction: column; gap: 22px; min-height: 360px; padding: 28px 24px; }
.message-bubble { align-self: flex-start; max-width: 84%; padding: 15px 18px; border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius); background: #1b293b; overflow-wrap: anywhere; }
.message-bubble.mine { align-self: flex-end; border-radius: var(--radius) 0 var(--radius) var(--radius); background: #263c60; border-color: #435e86; }
.message-bubble small { font-size: 12px; color: #d0dff8; }
.message-bubble p { color: var(--text); font-size: 14px; margin: 5px 0 0; }
.message-composer { padding: 20px 24px 24px; border-top: 1px solid var(--line); }

/* Controls and forms use one accessible interaction vocabulary. */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 24px; margin-bottom: 24px; }
.toolbar .field { flex: 1; min-width: 200px; margin: 0; }
.toolbar .check { min-height: 44px; align-items: center; margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; color: var(--muted); font-size: 14px; min-width: 0; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: var(--radius-small); color: var(--text); background: #101925; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9cacbf; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); background: #1e2939; cursor: not-allowed; }
textarea { min-height: 104px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
input[type=file] { font-size: 13px; padding: 9px; }
input[type=file]::file-selector-button { min-height: 36px; padding: 6px 12px; margin-right: 12px; color: var(--text); background: var(--raised); border: 1px solid var(--control-line); border-radius: 5px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 12px 0; color: var(--text); font-size: 14px; cursor: pointer; }
.check small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 550; }
table select { min-width: 175px; }
.progress-track { margin: 16px 0; }
.progress-track progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--accent); }
.progress-track progress::-webkit-progress-bar { background: var(--line); }
.progress-track progress::-webkit-progress-value { background: var(--accent); }
.progress-track progress::-moz-progress-bar { background: var(--accent); }

/* Shop and onboarding share the same content and action hierarchy. */
.reward-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); margin-bottom: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.reward-copy { padding: 36px; }
.reward-copy h2 { max-width: 15ch; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.16; letter-spacing: -.04em; }
.reward-copy p { font-size: 15px; }
.reward-copy .eyebrow { margin-bottom: 20px; }
.reward-image { position: relative; display: flex; align-items: center; justify-content: center; padding: 32px; min-height: 280px; background: #1a283a; }
.reward-image > img:not(.community-mark) { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.reward-image.reward-brand { flex-direction: column; gap: 28px; }
.reward-image.reward-brand > img:not(.community-mark) { width: 75%; max-height: 180px; }
.reward-image-note { color: var(--muted); font-size: 12px; text-align: center; }
.setup-wrap { max-width: 840px; margin: 56px auto; padding: 0 24px; }
.stepper { display: flex; gap: 16px; margin: 24px 0 32px; }
.step { flex: 1; padding-top: 13px; border-top: 2px solid #536984; color: var(--muted); font-size: 13px; }
.step.active { color: var(--accent); border-color: var(--accent); }
.setup-card { padding: 36px; }
.setup-card h1 { font-size: 32px; }
.setup-card .button-row { margin-top: 28px; }
.setup-icon { color: var(--accent); font-size: 32px; margin-bottom: 18px; }

/* Public pages and original official artwork: no crop, tint, filter or distortion. */
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 56px; max-width: 1600px; margin: 0 auto; padding: 80px 6%; }
.hero-copy h1 { font-size: clamp(38px, 4.1vw, 64px); line-height: 1.1; letter-spacing: -.045em; margin-bottom: 24px; }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-copy > p { font-size: 16px; max-width: 48ch; }
.hero-copy .button-row { margin-top: 28px; }
.hero-copy .meta-note { font-size: 13px; margin-top: 20px; }
.landing-art { min-width: 0; }
.section { max-width: 1440px; margin: 0 auto; padding: 32px 6% 56px; }
.section .section-head { margin-top: 0; margin-bottom: 36px; }
.section .section-head h2 { font-size: 30px; max-width: 22ch; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.feature { border-top: 1px solid var(--line); padding-top: 24px; }
.feature .num { color: var(--accent); font-size: 13px; margin-bottom: 24px; }
.feature h3 { font-size: 21px; }
.feature p { font-size: 15px; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line); padding: 40px 0 0; }
.callout h3 { font-size: 26px; }
.callout p { max-width: 64ch; margin-bottom: 0; font-size: 15px; }
.callout .btn { flex-shrink: 0; }
.footer { display: flex; justify-content: space-between; gap: 24px; padding: 24px 6%; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.cig-artwork { margin: 0; min-width: 0; }
.cig-image-wrap { position: relative; line-height: 0; }
.cig-image { display: block; width: 100%; height: auto; object-fit: contain; }
.cig-artwork figcaption { font-size: 11px; color: var(--muted); line-height: 1.6; padding-top: 8px; }
.community-mark { position: absolute; top: 12px; right: 12px; width: 64px; max-width: 20%; height: auto; object-fit: contain; opacity: 1; }
.ship-visual .community-mark { width: 48px; max-width: 18%; top: 16px; right: 18px; }
.fan-notice { margin-top: 48px; padding: 24px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.65; }
.fan-notice > div { display: flex; align-items: flex-start; gap: 20px; }
.fan-notice-copy { flex: 1; min-width: 0; }
.fan-notice-links { overflow-wrap: anywhere; }
.fan-notice .community-mark { position: static; width: 72px; max-width: 72px; height: auto; flex-shrink: 0; }
.fan-notice p { font-size: 14px; margin: 0 0 12px; }
.fan-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
#app > .fan-notice { padding: 28px 6%; margin-top: 0; }

/* Native dialogs and transient feedback. */
dialog { max-width: min(660px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 48px); padding: 32px; color: var(--text); background: var(--panel); border: 1px solid var(--control-line); border-radius: 16px; overflow-y: auto; box-shadow: 0 24px 80px #0008; }
dialog::backdrop { background: #040810d9; }
dialog h2 { padding-right: 40px; font-size: 25px; }
dialog .button-row { margin-top: 24px; }
.dialog-close { display: grid; place-items: center; position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--panel); font-size: 24px; }
.dialog-close:hover { background: var(--raised); border-color: var(--control-line); }
.summary-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-line span { color: var(--muted); }
.summary-line strong { text-align: right; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: min(640px, calc(100vw - 32px)); padding: 16px 20px; background: #253c5c; color: var(--text); border: 1px solid #8ca8d3; border-radius: var(--radius-small); font-size: 14px; box-shadow: 0 8px 32px #0006; transform: translateX(-50%); visibility: hidden; }
#toast.visible { visibility: visible; }

/* Responsive behavior is consolidated here, rather than layered over old layouts. */
@media (min-width: 1700px) {
  :root { --sidebar-width: 252px; }
  .content { padding-top: 48px; }
}
@media (max-width: 1280px) {
  :root { --sidebar-width: 216px; }
  .content { padding: 32px 24px 20px; }
  .toplinks { gap: 12px; }
  .pilot-label { display: none; }
  .dashboard-top, .dashboard-bottom { grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); gap: 20px; }
  .mission-copy { padding: 20px 24px 24px; }
  .ship-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-columns { grid-template-columns: 240px minmax(0, 1fr); gap: 20px; }
  .profile-columns .ship-grid.compact { grid-template-columns: 1fr; }
  .achievement-grid { grid-template-columns: 1fr; gap: 0; }
  .achievement { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; }
  .achievement > span { grid-row: span 2; align-self: center; }
  .chat-layout { grid-template-columns: 190px minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .dashboard-top, .dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
  .personal-brief { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  .personal-brief .panel-header { grid-column: 1 / -1; }
  .brief-score { grid-column: 1; grid-row: 2 / span 3; border-right: 1px solid var(--line); justify-content: center; padding: 8px 20px 24px 0; }
  .brief-line { grid-column: 2; }
  .connection-note { grid-column: 1 / -1; margin-top: 16px; }
  .connection-note > div { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
  .connection-note p { flex-basis: 100%; margin: 0; }
  .featured-column .ship-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-columns { grid-template-columns: minmax(0, 1fr); }
  .profile-columns > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .profile-columns > aside > .panel { margin-bottom: 0; }
  .profile-columns .ship-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-identity { flex-wrap: wrap; }
  .profile-identity .button-row { margin-left: 102px; }
  .chat-layout { grid-template-columns: 1fr; }
  .conversation-list { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 20px; }
  .conversation-list .meta-note { margin-top: 10px; }
  .conversation { width: fit-content; min-width: 200px; }
  .reward-hero { grid-template-columns: 1fr; }
  .reward-image { min-height: 200px; padding: 28px; border-top: 1px solid var(--line); }
  .reward-image.reward-brand > img:not(.community-mark) { width: 220px; max-height: 120px; }
  .reward-copy h2 { max-width: 24ch; }
  .fleet-role-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-hero { gap: 32px; padding: 56px 5%; }
  .landing-hero .button-row { align-items: stretch; }
  .section-head { flex-wrap: wrap; }
  .section-head p { max-width: 64ch; }
}
@media (max-width: 1100px) {
  .topbar { min-height: 80px; padding: 14px 20px; gap: 16px; }
  .toplinks { gap: 10px; }
  .toplinks > .btn[data-action="logout"] { display: none; }
  .mobile-menu-btn { display: inline-grid; }
  .shell { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(320px, calc(100vw - 48px)); max-height: 100dvh; min-height: 100dvh; padding: 20px 16px; visibility: hidden; transform: translateX(-100%); border: 0; border-right: 1px solid var(--line); }
  .menu-open .sidebar { visibility: visible; transform: translateX(0); }
  .menu-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: #040810c9; border: 0; }
  .nav-mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: 13px; letter-spacing: .12em; }
  .nav-label:first-of-type { padding-top: 16px; }
  .sidebar-bottom { padding-top: 24px; }
  .content { padding: 32px 24px 20px; }
  .page-heading h1 { font-size: 32px; }
  .dashboard-top { grid-template-columns: minmax(0, 1.45fr) minmax(248px, 1fr); }
  .personal-brief { display: block; }
  .brief-score { border-right: 0; padding: 8px 0 24px; }
  .connection-note > div { display: block; }
  .connection-note p { margin: 6px 0 12px; }
  .detail-grid { gap: 20px; }
  .landing-hero { grid-template-columns: minmax(0, 1fr); padding: 48px 6%; }
  .hero-copy { max-width: 680px; }
  .hero-copy h1 { font-size: clamp(38px, 6vw, 56px); }
  .landing-art { max-width: 800px; }
  .three-col { gap: 24px; }
  .callout { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .demo-bar { flex-wrap: wrap; padding: 8px 16px; gap: 6px 12px; }
  .demo-bar > span { font-size: 11px; }
  .demo-bar label { margin-left: auto; }
  .topbar { padding: 12px 16px; min-height: 76px; }
  .toplinks { gap: 8px; }
  .brand { gap: 10px; }
  .brand strong { max-width: 150px; font-size: 10px; letter-spacing: .06em; }
  .brand span { font-size: 9px; letter-spacing: .06em; }
  .brand img { width: 34px; height: 34px; }
  .toplinks .marketing-link { display: none; }
  .toplinks .pilot { display: none; }
  .content { padding: 28px 20px 16px; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { font-size: 14px; }
  .page-heading .button-row { padding-top: 0; }
  .dashboard-top, .dashboard-bottom { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; gap: 24px; }
  .personal-brief { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .brief-score { border-right: 1px solid var(--line); padding-right: 16px; }
  .connection-note > div { display: block; }
  .panel, .setup-card { padding: 20px; }
  .panel-header { flex-wrap: wrap; margin-bottom: 18px; gap: 10px; }
  .panel-header h2 { font-size: 18px; }
  .mission-copy { padding: 18px 22px 24px; }
  .mission-copy h2 { font-size: 29px; }
  .mission-art figcaption { padding-left: 22px; padding-right: 22px; }
  .featured-column .ship-grid.compact, .ship-grid.compact, .profile-columns .ship-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ship-grid, .ship-grid.compact { gap: 16px; }
  .ship-info { padding: 20px; }
  .ship-info h3 { font-size: 19px; }
  .ship-visual { padding: 16px 20px; min-height: 92px; }
  .ship-visual img.manufacturer-logo { width: 90px; height: 52px; }
  .metrics { margin-bottom: 24px; }
  .metric { padding: 20px 16px; }
  .metric .value { font-size: 30px; }
  .metric .label { font-size: 12px; }
  .metric .foot { font-size: 11px; }
  .profile-columns > aside, .detail-grid, .columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .profile-columns { gap: 24px; }
  .profile-masthead { margin-bottom: 24px; }
  .profile-identity { padding: 22px; gap: 16px; }
  .profile-identity h1 { font-size: 30px; }
  .profile-avatar { width: 64px; height: 64px; font-size: 25px; }
  .profile-identity .button-row { margin-left: 80px; }
  .profile-cover .cig-artwork figcaption { padding-left: 22px; padding-right: 22px; }
  .profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .profile-facts > div:first-child { grid-column: 1 / -1; }
  .stat-list { gap: 22px; }
  .notification-item { flex-wrap: wrap; gap: 14px; }
  .notification-item .grow { flex-basis: calc(100% - 60px); }
  .notification-actions { flex-direction: row; margin-left: 56px; }
  .chat-layout { padding: 0; }
  .message-log { padding: 24px 20px; min-height: 280px; }
  .conversation-header, .message-composer { padding: 20px; }
  .message-bubble { max-width: 94%; }
  .event-row { gap: 14px; flex-wrap: wrap; }
  .event-row .grow { flex-basis: calc(100% - 68px); }
  .event-row > .btn { margin-left: 66px; }
  .toolbar { gap: 16px; }
  .toolbar .field { min-width: min(240px, 100%); }
  .reward-copy { padding: 26px 24px; }
  .reward-copy h2 { font-size: 32px; }
  .reward-image { min-height: 200px; }
  .stepper { gap: 12px; }
  .step { font-size: 12px; }
  .setup-wrap { margin: 32px auto; padding: 0 20px; }
  .setup-card h1 { font-size: 28px; }
  .landing-hero { padding: 40px 6%; gap: 32px; }
  .hero-copy h1 { font-size: 42px; }
  .section { padding-top: 24px; padding-bottom: 32px; }
  .section .section-head h2 { font-size: 28px; }
  .three-col { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .feature { padding-top: 24px; }
  .feature .num { margin-bottom: 12px; }
  .footer { flex-direction: column; gap: 12px; font-size: 12px; }
  .fan-notice { margin-top: 32px; }
  .fan-notice > div { gap: 16px; }
  .fan-notice .community-mark { width: 56px; max-width: 56px; }
  .community-mark { width: 56px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 23px; }
  .access-card { padding: 28px; margin: 24px auto; }
}
@media (max-width: 480px) {
  .topbar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .brand img { width: 32px; height: 32px; }
  .brand strong { max-width: 108px; font-size: 9px; }
  .brand span { display: none; }
  .toplinks { gap: 6px; }
  .toplinks > .btn { padding-left: 10px; padding-right: 10px; font-size: 12px; }
  .content { padding: 24px 16px 16px; }
  .page-heading h1 { font-size: 27px; }
  .ship-grid, .ship-grid.compact, .profile-columns .ship-grid.compact, .featured-column .ship-grid.compact { grid-template-columns: minmax(0, 1fr); }
  .ship-visual { min-height: 96px; }
  .ship-info h3 { font-size: 21px; }
  .personal-brief { gap: 0 16px; padding: 20px; }
  .brief-score strong { font-size: 40px; }
  .brief-score small { font-size: 11px; }
  .brief-line { font-size: 12px; gap: 8px; }
  .brief-line a { min-width: 35px; gap: 8px; }
  .mission-copy { padding: 18px 20px 24px; }
  .mission-footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  .mission-footer > .btn { width: 100%; }
  .mission-art figcaption { padding-left: 20px; padding-right: 20px; font-size: 10px; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric { padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .metric .value { font-size: 30px; }
  .metric .label, .metric .foot { font-size: 13px; }
  .profile-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-metrics .metric { padding: 16px 10px; border-bottom: 0; border-right: 1px solid var(--line); }
  .profile-metrics .metric:last-child { border-right: 0; }
  .profile-metrics .label { font-size: 11px; }
  .profile-metrics .value { font-size: 27px; }
  .profile-identity .button-row { margin-left: 0; width: 100%; }
  .profile-identity .button-row > .btn { width: 100%; }
  .profile-identity .grow { flex-basis: calc(100% - 80px); }
  .profile-identity h1 { font-size: 29px; }
  .profile-identity .eyebrow { font-size: 10px; }
  .profile-facts, .stat-list { grid-template-columns: minmax(0, 1fr); }
  .profile-ship-list > div { flex-wrap: wrap; }
  .notification-symbol { width: 36px; height: 36px; }
  .notification-actions { margin-left: 50px; flex-wrap: wrap; }
  .notification-item { gap: 14px; }
  .notification-item h3 { font-size: 15px; }
  .notification-item .grow { flex-basis: calc(100% - 50px); }
  .page-tabs, .category-list { gap: 4px; }
  .page-tabs button, .page-tabs a, .category-list button { padding: 9px 11px; font-size: 13px; }
  .section-meta { font-size: 12px; }
  .fan-notice > div { gap: 12px; }
  .fan-notice .community-mark { width: 48px; max-width: 48px; }
  .stepper { gap: 8px; }
  .step { font-size: 11px; }
  .hero-copy h1 { font-size: 38px; }
  .summary-line { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .btn, .chip, .nav-item.active, .avatar, .notification-symbol { border: 1px solid ButtonText; }
  .nav-item.active { outline: 2px solid Highlight; outline-offset: -2px; }
  .status-dot, .notification-item.unread h3::before { background: Highlight; }
  :focus-visible { outline-color: Highlight; }
}

/* Ship photography keeps the established card typography and spacing. */
.ship-visual.ship-photo { display: block; position: relative; padding: 0; min-height: 0; aspect-ratio: 5 / 3; overflow: hidden; background: #101823; }
.ship-photo .ship-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.ship-photo img.manufacturer-logo { position: absolute; left: 12px; bottom: 12px; width: 68px; height: 36px; max-width: 22%; object-fit: contain; object-position: left center; filter: drop-shadow(0 1px 3px #000); }
.reward-image { padding: 0; background: #101823; }
.reward-image > img:not(.community-mark) { width: 100%; max-height: none; height: auto; object-fit: contain; }
.message-bubble p, .loan-purpose { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Inline profile links remain identifiable without colour alone. */
.feed-item p a { text-decoration: underline; text-underline-offset: 3px; }

/* Keep the desktop rail full-height once the header has scrolled away. */
@media (min-width: 1101px) {
  .sidebar { height: 100dvh; }
}

/* One featured ship fills the section; two share the available space. */
.ship-grid.compact.featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.featured-grid > :only-child { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .ship-grid.compact.featured-grid { grid-template-columns: minmax(0, 1fr); }
}

.fan-notice .fan-copyright { margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); text-align: right; }

/* Wide featured sections use an editorial card, with imagery beside the details. */
.featured-grid { container: featured / inline-size; }
@container featured (min-width: 540px) {
  .featured-grid > .ship-card:only-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .featured-grid > .ship-card:only-child .ship-photo { aspect-ratio: auto; align-self: stretch; border-bottom: 0; border-right: 1px solid var(--line); }
  .featured-grid > .ship-card:only-child .ship-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}

/* Public footer follows the marketing content's shared horizontal axis. */
#app > .fan-notice { width: min(calc(100% - 2 * var(--marketing-gutter, clamp(20px, 4vw, 64px))), var(--marketing-width, 1240px)); margin: 0 auto; padding: 28px 0; }

/* The public header enters after scrolling; the opening belongs to the image. */
#app.marketing-view > .demo-bar { display: none; }
#app.marketing-view > .topbar { position: fixed; inset: 0 0 auto; z-index: 45; visibility: hidden; opacity: 0; transform: translateY(-100%); background: rgba(16,24,35,.96); transition: transform .28s ease, opacity .28s ease, visibility .28s; }
#app.marketing-view.marketing-nav-visible > .topbar, #app.marketing-view > .topbar:focus-within { visibility: visible; opacity: 1; transform: none; }
.marketing-page #about, .marketing-page #contact { scroll-margin-top: 112px; }
@media (prefers-reduced-motion: reduce) {
  #app.marketing-view > .topbar { transition: none; }
}

/* RSI profile images retain the established avatar sizes and shape. */
.avatar { overflow: hidden; }
.avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ambient-header-toggle { flex: 0 0 44px; }
@media (max-width: 380px) { .topbar .brand > div { display: none; } }

/* The hero music control leaves before the scrolling header enters. */
#app.marketing-view.marketing-nav-visible > .topbar { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  #app.marketing-view.marketing-nav-visible > .topbar { transition-delay: 0s; }
}

/* Offer and featured photography fill card frames; detail dialogs keep their full image. */
.ship-card .ship-photo .ship-image { object-fit: cover; }

.page-heading h1 .heading-availability { display:block; margin-top:8px; color:var(--muted); font-size:16px; font-weight:400; line-height:1.5; letter-spacing:normal; }

/* Result controls share an axis independently of the search/wishlist toolbar. */
.fleet-result-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px 24px;}
.ship-page-size {display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);white-space:nowrap;}
.ship-page-size select {width:86px;min-height:46px;padding:8px 10px;color:var(--text);}
@media(max-width:600px){.fleet-result-actions {width:100%;justify-content:space-between;gap:12px;}}

.account-hangar-links {display:flex;flex-wrap:wrap;gap:12px;margin:28px 0;}

/* Dashboard artwork credit stays within its image; other artwork is unchanged. */
.mission-feature .mission-art {position:relative;}
.mission-feature .mission-art .cig-image-wrap::after {content:"";position:absolute;inset:auto 0 0;height:76px;background:linear-gradient(transparent,rgba(2,8,16,.54));pointer-events:none;}
.mission-feature .mission-art figcaption {position:absolute;left:20px;right:20px;bottom:12px;z-index:1;padding:0;font-size:11px;line-height:1.5;color:#e0e7f0;text-align:left;text-shadow:0 1px 4px #020810,0 0 10px rgba(2,8,16,.8);}
@media(max-width:600px){.mission-feature .mission-art figcaption {left:14px;right:14px;bottom:10px;font-size:10px;}}
