:root {
    --shore-navy: #063b68;
    --shore-deep-navy: #052b50;
    --shore-blue: #075ab8;
    --shore-teal: #13b7a7;
    --shore-green: #16a34a;
    --shore-warning: #d97706;
    --shore-danger: #b91c1c;
    --shore-bg: #f5f8fb;
    --shore-surface: #ffffff;
    --shore-text: #0b2445;
    --shore-muted: #64748b;
    --shore-border: #dbe5f0;
    --shore-focus: rgba(7, 90, 184, .24);
    --shore-radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--shore-bg); }
html, body { margin: 0; width: 100%; min-height: 100%; overflow-x: hidden; }
body { font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; color: var(--shore-text); background: var(--shore-bg); line-height: 1.45; }
a { color: var(--shore-blue); }
a:hover { color: var(--shore-navy); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid var(--shore-focus);
    outline-offset: 2px;
}
code, pre, .code-editor, .code-input { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }
code, .wrap-code { overflow-wrap: anywhere; word-break: break-word; }
small, .muted { color: var(--shore-muted); }
.grow { flex: 1 1 auto; min-width: 0; }
.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; }
.mt-3 { margin-top: .75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.my-3 { margin-top: .75rem !important; margin-bottom: .75rem !important; }

/* Application shell */
.shore-appbar { background: linear-gradient(90deg, #062f57, #075ab8) !important; }
.shore-drawer { background: linear-gradient(180deg, #052b50, #073b6b) !important; color: #fff !important; }
.shore-main-content, .mud-main-content { padding-top: 76px; padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); padding-bottom: 48px; min-width: 0; }
.shore-page-shell { width: min(100%, 1800px); margin: 0 auto; min-width: 0; }
.shore-nav-menu { padding-bottom: 1.5rem; }
.shore-nav-menu .mud-nav-link { color: rgba(255, 255, 255, .88) !important; margin: 2px 10px; border-radius: 10px; min-height: 44px; }
.shore-nav-menu .mud-nav-link.active, .shore-nav-menu .mud-nav-link:hover { background: rgba(255, 255, 255, .14) !important; color: #fff !important; }
.shore-nav-label { color: rgba(255, 255, 255, .62); font-size: .74rem; letter-spacing: .08em; font-weight: 800; }
.shore-logo-mini { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.2rem; color: #fff; white-space: nowrap; }
.shore-logo-button { border: 0; background: transparent; padding: .35rem .5rem; min-height: 44px; cursor: pointer; }
.shore-logo-mini span span, .shore-logo-large span { color: var(--shore-teal); }
.shore-logo-mark { color: #42d392; transform: rotate(45deg); display: inline-block; }
.shore-logo-mark.big { font-size: 2rem; margin-right: .5rem; }
.shore-search { width: min(520px, 40vw); }
.logout-form { margin: 0; }
.appbar-text-action { min-height: 44px; }

/* General surfaces and headers */
.shore-card { border: 1px solid rgba(12, 40, 80, .09); border-radius: var(--shore-radius) !important; box-shadow: 0 12px 30px rgba(8, 38, 80, .07) !important; background: var(--shore-surface) !important; min-width: 0; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; min-width: 0; }
.page-header > div:first-child { min-width: 0; }
.page-header-actions { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.shore-title { font-weight: 800 !important; color: var(--shore-text); overflow-wrap: anywhere; }
.section-title-row, .management-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.section-title-row h2, .section-title-row h3, .management-card-header h2, .management-card-header h3 { margin-top: 0; margin-bottom: .35rem; }

/* Buttons and controls */
.shore-button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: .65rem .95rem; border: 1px solid transparent; border-radius: 10px; font-weight: 750; text-decoration: none; cursor: pointer; line-height: 1.15; white-space: normal; text-align: center; transition: filter .12s ease, transform .12s ease, background .12s ease; }
.shore-button:hover { text-decoration: none; filter: brightness(.97); }
.shore-button:active { transform: translateY(1px); }
.shore-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.shore-button.primary { background: var(--shore-blue); color: #fff; }
.shore-button.secondary, .shore-button.small, .shore-button.compact { background: #eef6ff; color: #075ab8; border-color: #cfe3f8; }
.shore-button.success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.shore-button.warning { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.shore-button.danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.shore-button.ghost { background: transparent; color: var(--shore-text); border-color: var(--shore-border); }
.shore-button.small, .shore-button.compact { min-height: 40px; padding: .48rem .7rem; font-size: .86rem; }

.ebb-input, input.ebb-input, select.ebb-input, textarea.ebb-input { display: block; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cfdbea; border-radius: 10px; padding: .68rem .82rem; color: var(--shore-text); background: #fff; outline: none; }
textarea.ebb-input { min-height: 88px; resize: vertical; }
.ebb-input:focus { border-color: var(--shore-blue); box-shadow: 0 0 0 3px var(--shore-focus); }
.ebb-input:disabled { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
.compact-input { min-width: min(260px, 100%); }
.compact-field { flex: 0 1 240px; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > span, .field > label, .management-editor label { font-weight: 700; color: #334155; }
.field small { display: block; }
.check-field, .inline-check, .toggle-field { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: #334155; }
.check-field input, .inline-check input, .toggle-field input, .source-choice input { width: 20px; height: 20px; flex: 0 0 auto; }
.filter-bar, .chip-row, .action-grid, .row-actions, .editor-actions, .form-actions, .secret-copy-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.filter-bar { margin-bottom: 1rem; align-items: flex-end; }
.row-actions { align-items: flex-start; }
.editor-actions, .form-actions { justify-content: flex-end; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #e7eef6; }
.split-actions { justify-content: flex-start; }
.wrap-actions { justify-content: flex-start; }
.vertical-actions { align-items: stretch; flex-direction: column; }
.vertical-actions .shore-button { width: 100%; }

/* Forms and CRUD layouts */
.management-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); gap: 1rem; align-items: start; }
.management-editor-panel { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow: auto; }
.management-list-panel, .management-editor-panel, .management-editor, .wide-editor { min-width: 0; }
.management-editor h2, .management-editor h3 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.form-grid.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full, .form-grid .span-2 { grid-column: 1 / -1; }
.code-input, .code-editor { white-space: pre; overflow: auto; }
.sticky-actions { position: sticky; bottom: 0; z-index: 2; background: rgba(255, 255, 255, .96); padding-bottom: .25rem; }
.management-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.management-card { min-width: 0; }
.management-card p, .management-card code, .management-card pre { overflow-wrap: anywhere; }
.responsive-split { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.35fr); gap: 1rem; align-items: start; }
.nested-editor { padding: 1rem; border: 1px solid var(--shore-border); border-radius: 12px; background: #f8fbff; }
.source-choice-grid { border: 1px solid var(--shore-border); border-radius: 12px; padding: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0 0; }
.source-choice-grid legend { font-weight: 800; padding: 0 .35rem; }
.source-choice { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem; border: 1px solid #e5edf6; border-radius: 10px; background: #fff; min-width: 0; }
.source-choice span { min-width: 0; }
.source-choice small { display: block; overflow-wrap: anywhere; }
.workspace-selector { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.workspace-selector label { font-weight: 750; }

/* Messaging and empty states */
.shore-alert, .management-message { border: 1px solid; border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.shore-alert.success, .management-message.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.shore-alert.error, .management-message.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.shore-alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.one-time-secret h2 { margin: 0 0 .35rem; }
.one-time-secret code { flex: 1 1 420px; padding: .7rem; border-radius: 8px; background: #fff; border: 1px solid #e5d78f; color: #3f2f00; }
.empty-state { text-align: center; padding: 2rem 1rem; color: #475569; }
.empty-state.compact { padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; }
.empty-state h2, .empty-state h3 { margin-top: 0; color: var(--shore-text); }
.validation-summary { color: var(--shore-danger); margin-bottom: .75rem; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.compact-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-card { display: flex; gap: .85rem; align-items: center; min-height: 104px; min-width: 0; }
.kpi-card > div:last-child { min-width: 0; }
.kpi-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #e8f5ff; color: var(--shore-blue); font-weight: 900; flex: 0 0 42px; }
.shore-kpi-value { font-weight: 800 !important; overflow-wrap: anywhere; }
.trend.positive { color: var(--shore-green); }
.trend.negative { color: #dc2626; }

/* Tables */
.table-shell { width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.shore-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.shore-table th { text-align: left; color: #64748b; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; padding: .8rem; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.shore-table td { padding: .75rem .8rem; border-bottom: 1px solid #eef2f7; vertical-align: top; min-width: 0; overflow-wrap: anywhere; }
.shore-table tr:hover td { background: #f8fbff; }
.shore-table.compact td { padding: .55rem .65rem; }

/* Chips/status/notices */
.filter-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .42rem .7rem; border-radius: 999px; background: #eef6ff; color: #075ab8; border: 1px solid #d6e9fb; font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }
.filter-chip.warn { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.filter-chip.danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.filter-chip.active { background: #dbeafe; color: #0b5cab; border-color: #60a5fa; font-weight: 800; }
.status-pill { display: inline-block; padding: .25rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.status-pill.good { background: #dcfce7; color: #166534; }
.status-pill.warn { background: #fef3c7; color: #92400e; }
.status-pill.bad { background: #fee2e2; color: #991b1b; }
.status-pill.info { background: #dbeafe; color: #1e40af; }
.notice-row { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #edf2f7; }
.notice-row p { margin: .15rem 0; color: #475569; }
.severity-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: .35rem; background: #94a3b8; flex: 0 0 auto; }
.sev-badge { display: inline-block; border-radius: 999px; padding: .2rem .5rem; font-weight: 800; color: #fff; min-width: 2rem; text-align: center; }
.severity-dot.s5, .sev-badge.s5 { background: #991b1b; }
.severity-dot.s4, .sev-badge.s4 { background: #dc2626; }
.severity-dot.s3, .sev-badge.s3 { background: #d97706; }
.severity-dot.s2, .sev-badge.s2 { background: #2563eb; }
.severity-dot.s1, .sev-badge.s1 { background: #64748b; }

/* Code, analysis and metadata */
pre { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem; overflow: auto; max-width: 100%; max-height: 560px; white-space: pre-wrap; word-break: break-word; }
.json-preview, .skill-preview { min-height: 120px; }
.analysis-answer { white-space: pre-wrap; overflow-wrap: anywhere; padding: .75rem 0; }
.metadata-list { display: grid; gap: .5rem; margin: 1rem 0 0; }
.metadata-list > div { display: grid; grid-template-columns: minmax(130px, .4fr) minmax(0, 1fr); gap: .75rem; padding: .5rem 0; border-top: 1px solid #edf2f7; }
.metadata-list dt { font-weight: 800; }
.metadata-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 750; }

/* Miscellaneous existing components */
.donut-text { width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(#16a34a 0 70%, #f59e0b 70% 88%, #dc2626 88% 100%); display: grid; place-items: center; color: #fff; font-size: 2rem; font-weight: 900; margin: 1rem auto; text-align: center; }
.donut-text span { display: block; font-size: .75rem; }
.wizard-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.wizard-step { border: 1px solid #e2e8f0; border-radius: 16px; padding: 1rem; background: #f8fafc; }
.wizard-step.active { border-color: var(--shore-blue); background: #eef6ff; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0; }
.diagnostic-grid span { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: .6rem; text-align: center; }
.mini-run-row { margin-top: .45rem; padding: .45rem .6rem; border-radius: 10px; background: #fff; border: 1px solid #e5edf6; font-size: .82rem; }
.mini-run-row small { display: block; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 42%) 1fr; background: linear-gradient(135deg, #f6fbff, #edf7f5); }
.login-brand-panel { padding: clamp(2rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, #fff 0%, #f4fbff 60%, #dff8f1 100%); }
.shore-logo-large { font-size: 2.4rem; font-weight: 900; margin-bottom: 1.5rem; }
.login-brand-panel h1 { font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; color: var(--shore-text); }
.login-brand-panel p { max-width: 520px; color: #334155; font-size: 1.1rem; }
.login-feature { background: #fff; border: 1px solid #e6eef7; border-radius: 18px; padding: 1rem; margin-top: 1rem; box-shadow: 0 10px 24px rgba(8, 38, 80, .06); }
.login-feature span { display: block; color: #64748b; }
.login-feature.green { background: #ecfdf5; }
.login-card-wrap { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(8, 38, 80, .14); padding: 2rem; }
.login-card label { display: block; margin-top: 1rem; font-weight: 700; }
.login-card input { width: 100%; min-height: 44px; padding: .8rem 1rem; border: 1px solid #d7e1ef; border-radius: 10px; margin-top: .35rem; }
.login-card button { width: 100%; min-height: 48px; padding: .9rem 1rem; border: 0; border-radius: 10px; margin-top: 1.25rem; background: var(--shore-blue); color: #fff; font-weight: 800; }
.login-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; padding: 10px 12px; border-radius: 8px; margin: 12px 0; font-size: .92rem; }
.login-help { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; padding: 10px 12px; border-radius: 10px; margin: 14px 0; font-size: .86rem; line-height: 1.4; }

/* MudBlazor dialogs must remain usable on every viewport. */
.mud-dialog { max-width: min(96vw, 900px) !important; max-height: min(92vh, 900px) !important; }
.mud-dialog-content { overflow: auto; }
.mud-dialog-actions { position: sticky; bottom: 0; z-index: 2; background: #fff; flex-wrap: wrap; }

@media (max-width: 1400px) {
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .source-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .management-layout { grid-template-columns: 1fr; }
    .management-editor-panel { position: static; max-height: none; overflow: visible; }
    .shore-search { display: none; }
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }
    .login-card-wrap { min-height: 100vh; padding: 1rem; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header-actions { justify-content: flex-start; width: 100%; }
    .responsive-split { grid-template-columns: 1fr; }
    .form-grid.two-column { grid-template-columns: 1fr; }
    .management-card-grid { grid-template-columns: 1fr; }
    .wizard-steps { grid-template-columns: 1fr; }
    .source-choice-grid { grid-template-columns: 1fr; }
    .mud-drawer.shore-drawer { width: min(88vw, 320px) !important; max-width: 320px !important; }
}

@media (max-width: 700px) {
    .shore-main-content, .mud-main-content { padding-left: 10px; padding-right: 10px; padding-bottom: 30px; }
    .kpi-grid, .compact-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .kpi-card { min-height: 92px; padding: .85rem !important; }
    .page-header-actions > *, .workspace-selector, .workspace-selector .ebb-input { width: 100%; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar > *, .filter-bar .field, .filter-bar .ebb-input, .compact-field { width: 100%; flex-basis: auto; }
    .editor-actions, .form-actions { align-items: stretch; }
    .editor-actions .shore-button, .form-actions .shore-button { flex: 1 1 100%; width: 100%; }
    .secret-copy-row { align-items: stretch; }
    .secret-copy-row > * { width: 100%; }

    .table-shell { overflow: visible; }
    table.shore-table.responsive, table.shore-table.responsive tbody, table.shore-table.responsive tr, table.shore-table.responsive td { display: block; width: 100%; }
    table.shore-table.responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    table.shore-table.responsive tbody { display: grid; gap: .8rem; }
    table.shore-table.responsive tr { border: 1px solid var(--shore-border); border-radius: 13px; background: #fff; overflow: hidden; box-shadow: 0 4px 12px rgba(8, 38, 80, .04); }
    table.shore-table.responsive tr:hover td { background: transparent; }
    table.shore-table.responsive td { display: grid; grid-template-columns: minmax(105px, 38%) minmax(0, 1fr); gap: .65rem; align-items: start; padding: .62rem .75rem; border-bottom: 1px solid #edf2f7; text-align: left; }
    table.shore-table.responsive td:last-child { border-bottom: 0; }
    table.shore-table.responsive td::before { content: attr(data-label); color: #64748b; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .045em; }
    table.shore-table.responsive td[data-label="Actions"] .row-actions { justify-content: flex-start; }
    table.shore-table.responsive td[data-label="Actions"] .shore-button { flex: 1 1 120px; }
    .metadata-list > div { grid-template-columns: 1fr; gap: .2rem; }
    .diagnostic-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .kpi-grid, .compact-kpis { grid-template-columns: 1fr; }
    .shore-logo-mini { font-size: 1rem; }
    .appbar-text-action .mud-button-label { font-size: 0; }
    .appbar-text-action .mud-icon-root { margin: 0 !important; }
    .login-card { padding: 1.25rem; }
    table.shore-table.responsive td { grid-template-columns: 1fr; gap: .25rem; }
    table.shore-table.responsive td::before { margin-bottom: .1rem; }
    .row-actions, .action-grid { align-items: stretch; }
    .row-actions .shore-button, .row-actions a.shore-button, .action-grid .shore-button, .action-grid a.shore-button { width: 100%; flex: 1 1 100%; }
}

@media (orientation: landscape) and (max-height: 520px) {
    .mud-dialog { max-height: 96vh !important; }
    .management-editor-panel { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ── Ask Manus: blocking modal overlay ──────────────────────────────────────── */
.shore-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 38, 80, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.shore-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(8, 38, 80, 0.22);
    padding: 2.5rem 2rem;
    max-width: min(480px, 92vw);
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.shore-modal-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #dbeafe;
    border-top-color: var(--shore-blue, #1d4ed8);
    border-radius: 50%;
    animation: shore-spin 0.85s linear infinite;
}
@keyframes shore-spin { to { transform: rotate(360deg); } }
.shore-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--shore-text, #0f172a);
}
.shore-modal-body {
    margin: 0;
    color: #475569;
    font-size: .95rem;
    line-height: 1.5;
}
.shore-modal-actions {
    margin-top: .5rem;
}

/* ── Ask Manus: Markdown-rendered answer panel ──────────────────────────────── */
.analysis-answer-rendered {
    padding: .75rem 0 1rem;
    line-height: 1.65;
    color: var(--shore-text, #0f172a);
    overflow-wrap: anywhere;
}
.analysis-answer-rendered h1,
.analysis-answer-rendered h2,
.analysis-answer-rendered h3,
.analysis-answer-rendered h4 {
    margin: 1.25rem 0 .4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--shore-text, #0f172a);
}
.analysis-answer-rendered h1 { font-size: 1.5rem; border-bottom: 2px solid #e2e8f0; padding-bottom: .35rem; }
.analysis-answer-rendered h2 { font-size: 1.2rem; border-bottom: 1px solid #e2e8f0; padding-bottom: .25rem; }
.analysis-answer-rendered h3 { font-size: 1.05rem; }
.analysis-answer-rendered h4 { font-size: .95rem; }
.analysis-answer-rendered p  { margin: .55rem 0; }
.analysis-answer-rendered ul,
.analysis-answer-rendered ol { margin: .55rem 0 .55rem 1.4rem; padding: 0; }
.analysis-answer-rendered li { margin: .25rem 0; }
.analysis-answer-rendered strong { font-weight: 800; }
.analysis-answer-rendered em { font-style: italic; }
.analysis-answer-rendered code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: .1em .35em;
    font-size: .88em;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
.analysis-answer-rendered pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
    max-height: 420px;
}
.analysis-answer-rendered pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .85em;
}
.analysis-answer-rendered table {
    width: 100%;
    border-collapse: collapse;
    margin: .75rem 0;
    font-size: .9rem;
}
.analysis-answer-rendered th,
.analysis-answer-rendered td {
    border: 1px solid #e2e8f0;
    padding: .45rem .7rem;
    text-align: left;
}
.analysis-answer-rendered th {
    background: #f1f5f9;
    font-weight: 800;
}
.analysis-answer-rendered tr:nth-child(even) td { background: #f8fafc; }
.analysis-answer-rendered blockquote {
    border-left: 4px solid var(--shore-blue, #1d4ed8);
    margin: .75rem 0;
    padding: .5rem 1rem;
    background: #eff6ff;
    border-radius: 0 8px 8px 0;
    color: #1e3a5f;
}
.analysis-answer-rendered hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}
.analysis-placeholder {
    color: #94a3b8;
    font-style: italic;
    padding: .75rem 0;
}
.answer-metadata {
    margin-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    padding-top: .75rem;
}
.answer-metadata summary {
    font-size: .85rem;
    color: #64748b;
    cursor: pointer;
    font-weight: 700;
    min-height: 32px;
    display: flex;
    align-items: center;
}



/* ═══════════════════════════════════════════════════════════════════════════
   Critical flag + Restriction column  (Notices.razor, TrendingNotices.razor)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Severity cell wrapper — keeps badge and C-flag inline */
.sev-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* "C" critical indicator — small red pill next to the severity badge */
.critical-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 1px 5px;
    line-height: 1.4;
    vertical-align: middle;
}

/* Row-level highlight for critical notices (Notices Board only) */
tr.notice-row-critical td {
    background: #fff8f8;
}
tr.notice-row-critical:hover td {
    background: #fef2f2;
}

/* Restriction value — number bold, unit muted */
.restriction-value {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}
.restriction-value small {
    font-weight: 400;
    color: #64748b;
    margin-left: 2px;
}

/* Muted dash for empty restriction cells */
.muted-dash {
    color: #94a3b8;
}
