/*
 * LinkCheck UI system — final presentation layer (2026-11 redesign).
 *
 * Loaded after every shared and page stylesheet so the shell, controls and
 * surfaces read as one product. Values come from design-system.css tokens;
 * this file only decides how shared components use them. Behaviour, markup
 * contracts and state classes are unchanged.
 */

/* ── Type ─────────────────────────────────────────────────────────── */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}
:where(h1, h2, h3, h4) { letter-spacing: -0.011em; }
:where(.dashboard-metric-value, .stat-value, .lc-admin-kpi-value, .lc-order-card-value, .mkt-price, td.num, .tabular) { font-variant-numeric: tabular-nums; }

/* ── Top navigation ───────────────────────────────────────────────── */
.app-nav {
    background: color-mix(in srgb, var(--lc-surface) 88%, transparent);
    border-bottom: 1px solid var(--lc-border);
    box-shadow: none;
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.app-nav-container { height: 60px; gap: 16px; }
html { scroll-padding-top: 76px; }
.app-nav-brand { gap: 10px; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.app-nav-brand svg { color: var(--lc-primary); width: 22px; height: 22px; }

/* Group labels stay in the accessibility tree; the dividers carry the grouping visually. */
.app-nav-group-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.app-nav-groups { gap: 2px; margin-left: 20px; align-items: center; }
.app-nav-group { padding: 0 6px; align-content: center; border-left-color: var(--lc-border); height: 24px; display: flex; align-items: center; }
.app-nav-group .app-nav-links { gap: 2px; }
.app-nav-links a {
    padding: 7px 11px;
    border-radius: var(--lc-radius-md);
    border: 0;
    color: var(--lc-text-muted);
    font-size: .875rem;
    font-weight: 550;
    line-height: 1.25;
    transition: background-color var(--lc-duration-fast) var(--lc-ease-standard), color var(--lc-duration-fast) var(--lc-ease-standard);
}
.app-nav-links a:hover { background: var(--lc-surface-hover); color: var(--lc-text); border-color: transparent; }
.app-nav-links a.active {
    background: var(--lc-primary-soft);
    color: var(--lc-primary);
    box-shadow: none;
    border-color: transparent;
}
.app-nav-user { gap: 8px; }
.app-nav-usage-pill,
.app-notif-btn,
.app-user-menu-btn,
.app-nav .app-theme-select {
    min-height: 36px;
    border-radius: var(--lc-radius-md);
    border: 1px solid var(--lc-border);
    background: var(--lc-surface);
    box-shadow: none;
}
.app-nav-usage-pill { padding: 0 10px; font-size: .75rem; font-weight: 600; color: var(--lc-text-secondary); }
.app-nav .app-notif-btn { width: 36px; height: 36px; min-width: 36px; }
.app-notif-btn:hover,
.app-user-menu-btn:hover,
.app-user-menu-btn[aria-expanded="true"] { background: var(--lc-surface-hover); border-color: var(--lc-border-strong); color: var(--lc-text); }
.app-notif-badge { top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--lc-surface); }
.app-user-menu-btn { padding: 2px 8px 2px 3px; font-weight: 600; }
.app-user-avatar { width: 28px; height: 28px; border-radius: 6px; font-size: .75rem; box-shadow: none; }
/* The same theme control lives in the account menu on desktop and in the mobile menu. */
@media (min-width: 1025px) {
    .app-nav-user > .app-theme-select:not(.app-theme-select-menu) { display: none; }
}

.app-user-dropdown,
.app-notif-dropdown {
    top: calc(100% + 8px);
    margin-top: 0;
    border-radius: var(--lc-radius-lg);
    border: 1px solid var(--lc-border);
    background: var(--lc-surface-raised);
    box-shadow: var(--lc-shadow-overlay);
    padding: 6px;
}
.app-notif-dropdown { padding: 0; }
.app-user-menu-item { border-radius: var(--lc-radius-sm); font-size: .875rem; }
.app-notif-header,
.app-notif-footer { border-color: var(--lc-border-subtle); }

/* ── Page header ──────────────────────────────────────────────────── */
.app-header {
    background: var(--lc-surface);
    border-top: 0;
    border-bottom: 1px solid var(--lc-border);
    padding: 22px 0 20px;
    margin-bottom: 24px;
}
.app-header-title {
    color: var(--lc-text);
    font-size: var(--lc-text-2xl);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.022em;
}
.app-header-subtitle {
    margin-top: 6px;
    max-width: 60rem;
    color: var(--lc-text-muted);
    font-size: .9rem;
    font-weight: 450;
    line-height: 1.5;
}
.app-header-actions { gap: 8px; }
.app-header-action,
.app-help-action {
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--lc-radius-md);
    border: 1px solid var(--lc-border);
    background: var(--lc-surface);
    color: var(--lc-text);
    font-size: .875rem;
    font-weight: 600;
    box-shadow: var(--lc-shadow-sm);
    backdrop-filter: none;
    transition: background-color var(--lc-duration-fast) var(--lc-ease-standard), border-color var(--lc-duration-fast) var(--lc-ease-standard), scale var(--lc-duration-fast) var(--lc-ease-out);
}
.app-header-action:hover,
.app-header-action:focus-visible,
.app-help-action:hover,
.app-help-action:focus-visible { background: var(--lc-surface-hover); border-color: var(--lc-border-strong); color: var(--lc-text); }
.app-help-action svg { width: 16px; height: 16px; color: var(--lc-text-muted); }
.app-header-action-primary {
    background: var(--lc-action);
    border-color: var(--lc-action);
    color: var(--lc-on-action);
}
.app-header-action-primary:hover,
.app-header-action-primary:focus-visible { background: var(--lc-action-hover); border-color: var(--lc-action-hover); color: var(--lc-on-action); }
.app-header-usage-wrap { border-radius: var(--lc-radius-lg); border: 1px solid var(--lc-border); background: var(--lc-surface); box-shadow: none; padding: 10px 12px; }
.app-usage-bar { height: 4px; border-radius: 999px; background: var(--lc-surface-muted); }
.app-usage-bar-fill { border-radius: 999px; background: var(--lc-action); }

@media (max-width: 640px) {
    /* Usage is context, not a task: one quiet line instead of a card on every phone page header. */
    .app-header-usage-wrap { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; }
    .app-header-usage { flex: 0 0 auto; font-size: .8125rem; color: var(--lc-text-muted); }
    .app-header-usage-wrap .app-usage-bar { flex: 1 1 auto; max-width: 160px; margin: 0; }
}

/* Account sub-navigation reads as tabs under the page header. */
.app-acct-tabs { background: var(--lc-surface); border-bottom: 1px solid var(--lc-border); }
.app-header:has(+ .app-acct-tabs) { margin-bottom: 0; border-bottom-color: transparent; padding-bottom: 8px; }
/* Every settings tab shares one content width, and single fields stop at a readable length. */
.lc-account-page :is(main[class*="max-w-"], main > div[class*="max-w-"]) { max-width: calc(72rem + 2 * var(--lc-page-gutter)); }
.lc-account-page :is(input:is([type="text"], [type="email"], [type="password"], [type="url"], [type="number"], [type="search"], :not([type])), select, textarea) { max-width: 40rem; }
.app-acct-tab-link { font-size: .875rem; font-weight: 550; padding-block: 12px; }
.app-acct-tab-active { color: var(--lc-primary); box-shadow: inset 0 -2px 0 var(--lc-primary); border-bottom-color: transparent; }
.app-acct-tab-inactive { color: var(--lc-text-muted); }
.app-acct-tab-inactive:hover { color: var(--lc-text); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.lc-button,
.btn,
.btn-primary,
.btn-secondary,
.btn-action,
.btn-cta {
    border-radius: var(--lc-radius-md);
    font-weight: 600;
    letter-spacing: 0;
    transition: background-color var(--lc-duration-fast) var(--lc-ease-standard), border-color var(--lc-duration-fast) var(--lc-ease-standard), color var(--lc-duration-fast) var(--lc-ease-standard), box-shadow var(--lc-duration-fast) var(--lc-ease-standard), scale var(--lc-duration-fast) var(--lc-ease-out);
}
.lc-button { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.lc-button:not([data-variant]),
.btn-primary { box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 1px 0 rgba(255, 255, 255, .08); }
.lc-button[data-variant="secondary"],
.btn-secondary { box-shadow: var(--lc-shadow-sm); }
.lc-button:focus-visible,
.btn:focus-visible { outline: 2px solid var(--lc-focus); outline-offset: 2px; }
.lc-button:disabled,
.btn:disabled,
.btn[aria-disabled="true"] { box-shadow: none; }

/* ── Form controls ────────────────────────────────────────────────── */
.lc-control,
.lc-commerce-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea),
.lc-account-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
.mkt-picker :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.auth-card :is(input:not([type="checkbox"]):not([type="radio"]), select) {
    border-color: var(--lc-border-strong);
    border-radius: var(--lc-radius-md);
    background-color: var(--lc-surface);
    color: var(--lc-text);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color var(--lc-duration-fast) var(--lc-ease-standard), box-shadow var(--lc-duration-fast) var(--lc-ease-standard);
}
.lc-control:hover,
.mkt-picker :is(input, select, textarea):hover { border-color: color-mix(in srgb, var(--lc-border-strong) 60%, var(--lc-text-muted)); }
.lc-control:focus,
.lc-commerce-page :is(input, select, textarea):focus,
.lc-account-page :is(input, select, textarea):focus,
.mkt-picker :is(input, select, textarea):focus,
.auth-card :is(input, select):focus {
    border-color: var(--lc-primary);
    box-shadow: 0 0 0 3px var(--lc-focus-ring);
    outline: none;
}
.lc-control:disabled,
:is(.lc-account-page, .lc-commerce-page, .mkt-picker) :is(input, select, textarea):is(:disabled, [readonly]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    background-color: var(--lc-surface-muted);
    color: var(--lc-text-muted);
    box-shadow: none;
    cursor: not-allowed;
}
.lc-label,
.mkt-picker-field label { font-weight: 600; color: var(--lc-text); }

/* ── Surfaces ─────────────────────────────────────────────────────── */
.lc-card,
.lc-section-card,
.dashboard-recovery,
.dashboard-metrics,
.mkt-picker,
.lc-order-card,
.stat-card {
    border-color: var(--lc-border);
    border-radius: var(--lc-radius-lg);
    box-shadow: var(--lc-shadow-sm);
}
.lc-card__header,
.lc-section-card__header { padding: 16px 20px; }
.lc-card__body,
.lc-section-card__body { padding: 20px; }
.lc-card__title,
.lc-section-card__title { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.lc-badge { font-weight: 600; min-height: 1.375rem; }
.lc-alert { border-radius: var(--lc-radius-lg); }

/* ── Dashboard summary ────────────────────────────────────────────── */
.dashboard-metric { transition: background-color var(--lc-duration-fast) var(--lc-ease-standard); }
.dashboard-metric:hover { background: var(--lc-surface-hover); }
.dashboard-metric-label { font-size: .8125rem; font-weight: 550; color: var(--lc-text-muted); }
.dashboard-metric strong { font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    /* Phones: the total spans the row, the rest sit two per row, so the summary fits the first screen. */
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-metrics > .dashboard-metric:nth-child(n) { grid-column: auto; padding: 14px 16px; min-width: 0; border-top: 1px solid var(--lc-border-subtle); border-right: 0; }
    .dashboard-metrics > .dashboard-metric:nth-child(even) { border-right: 1px solid var(--lc-border-subtle); }
    .dashboard-metrics:has(> .dashboard-metric:first-child:nth-last-child(odd)) > .dashboard-metric:first-child { grid-column: 1 / -1; border-top: 0; border-right: 0; }
    .dashboard-metrics:has(> .dashboard-metric:first-child:nth-last-child(odd)) > .dashboard-metric:nth-child(n + 2) { grid-column: auto; border-right: 0; }
    .dashboard-metrics:has(> .dashboard-metric:first-child:nth-last-child(odd)) > .dashboard-metric:nth-child(even) { border-right: 1px solid var(--lc-border-subtle); }
    .dashboard-metrics:not(:has(> .dashboard-metric:first-child:nth-last-child(odd))) > .dashboard-metric:nth-child(-n + 2) { border-top: 0; }
    .dashboard-metric strong { font-size: 1.5rem; }
}

/* ── Tables ───────────────────────────────────────────────────────── */
:where(.lc-admin-table-scroll, .links-table-wrap, .table-wrap) table thead th {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--lc-text-muted);
}

/* ── Marketplace ──────────────────────────────────────────────────── */
.listing-card {
    border-radius: var(--lc-radius-lg);
    border-color: var(--lc-border);
    padding: 18px 20px;
    box-shadow: var(--lc-shadow-sm);
    transition: border-color var(--lc-duration-fast) var(--lc-ease-standard), box-shadow var(--lc-duration-normal) var(--lc-ease-standard);
}
.listing-card:hover { transform: none; border-color: var(--lc-border-strong); box-shadow: var(--lc-shadow-md); }
.listing-card .mkt-card-title-row h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.listing-card .mkt-card-title-row h3 a { color: var(--lc-text); }
.listing-card .mkt-card-title-row h3 a:hover { color: var(--lc-primary); }
/* Prices read as facts, in the text colour; green stays reserved for good status. */
.price-tag,
.lc-commerce-page :is(.price-tag, .price-cell) { color: var(--lc-text); font-weight: 650; letter-spacing: -0.02em; }
.listing-card .price-tag { font-size: 1.375rem; }
.btn-cta,
.lc-commerce-page .btn-cta { border-radius: var(--lc-radius-md); font-size: .875rem; font-weight: 600; min-height: 36px; padding: 0 14px; justify-content: center; }
.btn-cta:hover,
.lc-commerce-page .btn-cta:hover { transform: none; box-shadow: none; }
.pill { border-radius: 6px; padding: 2px 8px; font-size: .6875rem; font-weight: 550; letter-spacing: 0; }
.mkt-tag { border-radius: 6px; font-weight: 550; }
.listing-card details > summary { font-size: .875rem; font-weight: 600; color: var(--lc-text); }
.view-toggle { border-radius: var(--lc-radius-md); border-color: var(--lc-border); }
.mkt-picker { padding: 20px 22px; }
.mkt-picker h2 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }
.mkt-picker-field label { font-size: .8125rem; }
@media (min-width: 1180px) {
    /* Six short fields fit in two rows, so listings start higher on the page. */
    #mktPickerForm > .mkt-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mkt-picker-submit { border-radius: var(--lc-radius-md); font-weight: 600; }
/* The planner is a disclosure: closed, it is one row above the listings. */
.mkt-picker:has(> .mkt-picker-disclosure:not([open])) { padding: 14px 22px; }
.mkt-picker-disclosure > summary.mkt-picker-head { margin-bottom: 0; }
.mkt-picker-disclosure > summary.mkt-picker-head::after { font-size: 1.35rem; }
.mkt-picker-disclosure[open] > summary.mkt-picker-head { margin-bottom: 1rem; }
.mkt-picker-disclosure > summary:focus-visible { outline: 2px solid var(--lc-focus-ring, var(--lc-primary)); outline-offset: 4px; border-radius: 6px; }
.mkt-picker-domain-row { margin: -.25rem 0 1rem; }
.mkt-picker-domain-row .mkt-picker-domain-link { margin-top: 0; }
@media (max-width: 640px) { .mkt-picker-disclosure > summary.mkt-picker-head { display: flex; } }

/* Listing detail: quiet stat tiles and a neutral price; colour is kept for status, not decoration. */
.mkt-listing-metrics > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 2px;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-lg);
    background: var(--lc-surface-subtle);
}
.mkt-listing-metrics > div > div:first-child { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em; color: var(--lc-text); font-variant-numeric: tabular-nums; }
.mkt-listing-metrics > div > div:last-child { font-size: .75rem; font-weight: 550; color: var(--lc-text-muted); }
.mkt-listing-order-price,
.lc-listing-mobile-price { color: var(--lc-text) !important; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.lc-commerce-page .bg-yellow-50.border-yellow-200 { background: var(--lc-surface-subtle); border-color: var(--lc-border); color: var(--lc-text-secondary); }

/* ── Backlinks table ──────────────────────────────────────────────── */
/* The domain is a label, not a status, so it no longer borrows the "live" green. */
.domain-cell a { color: var(--lc-text); font-weight: 550; }
.domain-cell a:hover { color: var(--lc-primary); }
.toolbar-actions .btn { font-weight: 550; }
.toolbar-actions .btn:not(.btn-primary):hover { background: var(--lc-surface-hover); border-color: var(--lc-border-strong); }
#linksTable tbody tr { transition: background-color var(--lc-duration-fast) var(--lc-ease-standard); }

/* ── Dark theme adjustments ───────────────────────────────────────── */
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) .app-nav { background: color-mix(in srgb, var(--lc-surface) 86%, transparent); border-bottom-color: var(--lc-border); }
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) .app-header { background: var(--lc-surface); border-bottom-color: var(--lc-border); }
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) :is(.app-header-action, .app-help-action) { background: var(--lc-surface-raised); border-color: var(--lc-border-strong); color: var(--lc-text); }
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) .app-header-action-primary { background: var(--lc-action); border-color: var(--lc-action); color: var(--lc-on-action); }
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) :is(.app-nav-usage-pill, .app-notif-btn, .app-user-menu-btn, .app-theme-select) { background: var(--lc-surface-raised); border-color: var(--lc-border); color: var(--lc-text-secondary); }
:is(html.dark-mode, html.dark, body.dark-mode, body.dark) .app-nav-links a.active { background: var(--lc-primary-soft); color: var(--lc-primary); }

@media (prefers-reduced-motion: reduce) {
    .app-nav-links a, .lc-button, .btn, .dashboard-metric { transition: none; }
}

/* Notifications: the unread count and its two housekeeping actions share one compact row. */
.lc-notif-toolbar { padding: 10px 14px; flex-wrap: nowrap; }
.lc-notif-toolbar .lc-page-toolbar-actions { flex-wrap: nowrap; }
.lc-notif-toolbar .lc-button { white-space: nowrap; }
.lc-notif-clear-read {
    border: 0; background: none; padding: 6px 4px; font: inherit; font-size: .875rem; font-weight: 550;
    color: var(--lc-text-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.lc-notif-clear-read:hover { color: var(--lc-danger, #b42318); }
.lc-notif-clear-read:focus-visible { outline: 2px solid var(--lc-primary); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 420px) {
    /* Keep count and actions on one row on phones: drop the button icon, tighten the gaps. */
    .lc-notif-toolbar { gap: 8px; padding: 8px 12px; }
    .lc-notif-toolbar .lc-page-toolbar-actions { gap: 4px; }
    .lc-notif-toolbar .lc-button svg { display: none; }
    .lc-notif-toolbar:has(#btnMarkSelected:not(.hidden)) { flex-wrap: wrap; }
}

/* Account credential sections fold into their heading row until needed. */
.lc-credential-section > summary h2 { margin: 0; }
.lc-credential-section > summary::after { margin-left: auto; }
.lc-credential-section > summary:focus-visible { outline: 2px solid var(--lc-primary); outline-offset: -2px; border-radius: 8px; }

/* Link details: diagnostics share one fold-out; the cards inside sit flat within it. */
.lc-technical-details > summary { align-items: flex-start; }
.lc-technical-details > summary::after { margin-top: .2rem; }
.lc-technical-details-body > :is(div, section) { box-shadow: none !important; border: 1px solid var(--lc-border); margin-bottom: 12px !important; }
.lc-technical-details-body > :last-child { margin-bottom: 0 !important; }
.lc-integrity-breakdown > summary { justify-content: flex-start; }

/* Outreach: rare sender tasks in one small menu. */
.outreach-sender-more { position: relative; }
.outreach-sender-more > summary { list-style: none; cursor: pointer; }
.outreach-sender-more > summary::-webkit-details-marker { display: none; }
.outreach-sender-more > summary::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.outreach-sender-more-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 13rem; padding: 6px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--lc-radius-md); box-shadow: var(--lc-shadow-md, 0 8px 24px rgba(15, 23, 42, .12));
    display: grid; gap: 2px;
}
.outreach-sender-more-item { text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: .875rem; color: var(--lc-text); cursor: pointer; }
.outreach-sender-more-item:hover, .outreach-sender-more-item:focus-visible { background: var(--lc-surface-muted, rgba(15, 23, 42, .05)); outline: none; }
@media (max-width: 640px) { .outreach-sender-more-menu { left: 0; right: auto; } }

/* Recovery: spacing between the queue and its summary cards; the secondary lists fold. */
.assurance-queue-card + .assurance-metrics { margin-top: 20px; }
.assurance-more-details > summary.assurance-more-summary { padding: 12px 4px; font-size: .9375rem; font-weight: 650; color: var(--lc-text); }
.assurance-more-details[open] > summary.assurance-more-summary { margin-bottom: 8px; }

/* Dashboard: one note replaces per-row "Connect" cells when no Google source is connected. */
.domain-performance-toolbar:has(.domain-sources-note) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.domain-sources-note { margin: 0; font-size: .8125rem; color: var(--lc-text-muted); }
.domain-sources-note a { color: var(--lc-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Outreach overview: performance panels fold while there is nothing to report. */
.outreach-activity > summary.outreach-activity-summary { padding: 12px 4px; font-size: .9375rem; font-weight: 650; color: var(--lc-text); }
.outreach-activity[open] > summary.outreach-activity-summary { margin-bottom: 8px; }

/* Alert settings: quiet-hour times appear only when quiet hours are on. */
.np-quiet-times[hidden] { display: none !important; }
.np-advanced > summary.np-advanced-summary { align-items: center; padding: 4px 0; }
.np-advanced[open] > summary.np-advanced-summary { margin-bottom: 1.25rem; }

/* A summary styled as a button still shows that it expands. */
details > summary.lc-button { list-style: none; }
details > summary.lc-button::-webkit-details-marker { display: none; }
details > summary.lc-button::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: none; }
details[open] > summary.lc-button::after { transform: rotate(-135deg) translateY(-1px); }
.lc-integrity-breakdown > .assurance-chronology { margin-top: .75rem; }

/* ══ Interaction feel ═════════════════════════════════════════════════════
 * Motion here is feedback, never decoration: it acknowledges a press, shows where a surface
 * came from and keeps the shell steady between pages. Durations stay within the motion tokens
 * (240ms at most) and all of it is switched off under prefers-reduced-motion.
 */

/* Headings break into even lines instead of leaving one word behind, and the text cursor carries the action colour. */
:where(h1, h2, h3, .app-header-title, .lc-dialog-title) { text-wrap: balance; }
:where(.app-header-subtitle, .lc-dialog-message, .lc-toast__message) { text-wrap: pretty; }
:where(input, textarea, [contenteditable]) { caret-color: var(--lc-primary); }

/* Page to page: the top bar holds still while the content cross-fades, so the app reads as one place.
   Each page opts in with one inline rule from includes/layout.php (renderViewTransitionOptIn); it cannot
   live here, because the browser decides before a stylesheet that is still downloading has arrived.
   public/js/page-transitions.js, loaded with that rule, limits when a transition may run. */
.app-nav { view-transition-name: lc-app-nav; }
/* The page does not take clicks while the cross-fade runs, so it is kept to the shortest motion step. */
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) { animation-duration: var(--lc-duration-fast); animation-timing-function: var(--lc-ease-standard); }

/* A slow page answers the click straight away with a thin bar under the browser chrome. */
.lc-nav-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10080;
    height: 2px;
    background: var(--lc-primary);
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
}
.lc-nav-progress.is-active {
    opacity: 1;
    transform: scaleX(.86);
    transition: transform 9s cubic-bezier(.05, .7, .1, 1), opacity var(--lc-duration-fast) linear;
}

/* Pressing a button gives a little under the pointer. */
:is(.lc-button, .btn, .btn-primary, .btn-secondary, .btn-action, .btn-cta, .app-header-action, .app-help-action, .lc-dialog-button, .assurance-action, .modal-btn):active:not(:disabled, [aria-disabled="true"]) { scale: .98; }

/* Menus arrive from their trigger instead of popping in. Closing stays immediate. */
/* translate/scale are used instead of transform: the phone layout already centres these panels with a transform. */
:is(.app-user-dropdown, .app-notif-dropdown).open {
    transition: opacity var(--lc-duration-fast) var(--lc-ease-out), translate var(--lc-duration-normal) var(--lc-ease-out), scale var(--lc-duration-normal) var(--lc-ease-out);
    @starting-style { opacity: 0; translate: 0 -6px; scale: .98; }
}
.app-mobile-menu.open {
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out), translate var(--lc-duration-normal) var(--lc-ease-out);
    @starting-style { opacity: 0; translate: 0 -8px; }
}
/* These panels are placed by script from their measured size, so they only fade. */
:is(.row-action-menu-panel, .status-help-popover).is-open,
:is(.dropdown-menu, .col-settings-panel, .tag-ac-dropdown, .adv-filters).show {
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out);
    @starting-style { opacity: 0; }
}
.bulk-bar.show {
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out), translate var(--lc-duration-slow) var(--lc-ease-out);
    @starting-style { opacity: 0; translate: 0 12px; }
}

/* Dialogs: the page dims first, then the surface settles into place. */
.lc-dialog-backdrop,
.lc-shortcut-overlay {
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out);
    @starting-style { opacity: 0; }
}
.lc-dialog { animation: lc-surface-enter var(--lc-duration-slow) var(--lc-ease-out); }
.modal-overlay.show { animation: lc-backdrop-enter var(--lc-duration-normal) var(--lc-ease-out); }
.modal-overlay.show > .modal { animation: lc-surface-enter var(--lc-duration-slow) var(--lc-ease-out); }
.lc-shortcut-panel {
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out), scale var(--lc-duration-slow) var(--lc-ease-out);
    @starting-style { opacity: 0; scale: .97; }
}
@keyframes lc-backdrop-enter { from { opacity: 0; } }
@keyframes lc-surface-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* Saving a listing: the heart settles into its filled state with a small overshoot. Nothing moves on page load. */
.mkt-fav-btn .fa-heart { transition: scale 320ms cubic-bezier(.34, 1.56, .64, 1); }
.mkt-fav-btn[aria-pressed="false"] .fa-heart { scale: .9; }

/* Shortcut panel: two-key shortcuts need a wider key column, and the jump list gets its own heading. */
.lc-shortcut-panel { max-height: calc(100vh - 32px); overflow-y: auto; }
.lc-shortcut-panel dl > div { grid-template-columns: 96px 1fr; }
.lc-shortcut-panel .lc-shortcut-group { margin: 16px 0 8px; color: var(--lc-text-muted); font-size: .6875rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }

/* Toasts: readable for as long as the pointer rests on them, and always dismissible. */
.lc-toast {
    align-items: flex-start;
    transform: translateY(10px) scale(.98);
    transition: opacity var(--lc-duration-normal) var(--lc-ease-out), transform var(--lc-duration-slow) var(--lc-ease-out);
}
.lc-toast.is-visible { transform: none; }
.lc-toast__icon { margin-top: -1px; }
.lc-toast__message { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lc-toast__action {
    flex: none;
    margin: -3px 0;
    padding: 3px 8px;
    border: 0;
    border-radius: var(--lc-radius-sm);
    background: transparent;
    color: var(--lc-primary);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}
.lc-toast__action:hover { background: var(--lc-primary-soft); }
.lc-toast__dismiss {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: -3px -8px -3px 0;
    border: 0;
    border-radius: var(--lc-radius-sm);
    background: transparent;
    color: var(--lc-text-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}
.lc-toast__dismiss::before { content: "\00d7"; }
.lc-toast__dismiss:hover { background: var(--lc-surface-hover); color: var(--lc-text); }
:is(.lc-toast__action, .lc-toast__dismiss):focus-visible { outline: 2px solid var(--lc-focus); outline-offset: 1px; }
@media (max-width: 640px) {
    .lc-toast__dismiss { width: 44px; height: 44px; margin: -12px -14px -12px 0; }
    .lc-toast__action { min-height: 44px; margin: -12px 0; }
}

/* Notification list: each link alert names its referring page; the first load shows the shape of the list. */
.app-notif-item .n-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--lc-text-secondary);
    font-size: var(--lc-text-xs, .75rem);
    font-weight: 550;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-notif-copy { min-width: 0; }
.app-notif-skeleton { display: grid; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--lc-border-subtle); }
.app-notif-skeleton .lc-skeleton { display: block; height: 10px; border-radius: 999px; }
.app-notif-skeleton .lc-skeleton:nth-child(1) { width: 42%; }
.app-notif-skeleton .lc-skeleton:nth-child(2) { width: 78%; }
.app-notif-skeleton .lc-skeleton:nth-child(3) { width: 24%; }

/* Disclosed content eases in when a person opens it; the shell marks the disclosure for that moment only, so
   sections that are already open when the page loads simply appear. Layout is final from the first frame:
   the content can be read and clicked straight away. Closing stays immediate. */
details:is(.lc-disclose, .lc-technical-details, .lc-integrity-breakdown, .lc-credential-section, .import-help, .np-advanced, .outreach-activity, .assurance-more-details)[data-lc-opening] > :not(summary) {
    animation: lc-disclose-open var(--lc-duration-normal) var(--lc-ease-out);
}
@keyframes lc-disclose-open { from { opacity: 0; translate: 0 -4px; } }

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) { animation: none !important; }
    .lc-nav-progress.is-active { transition: none; }
    :is(.lc-button, .btn, .btn-primary, .btn-secondary, .btn-action, .btn-cta, .app-header-action, .app-help-action, .lc-dialog-button, .assurance-action, .modal-btn):active { scale: none; }
    .lc-dialog, .modal-overlay.show, .modal-overlay.show > .modal { animation: none; }
    .lc-toast { transform: none; }
}
