/* ═══════════════════════════════════════════════════════════════════════════
   555AppGrowth — app.css
   SaaS Premium Light · Databox-inspired · Yellow accent
   Font: Manrope — geometric humanist SaaS font
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
    /* Brand */
    --y:         #FFE500;
    --y-hover:   #F5D800;
    --y-pale:    #FFFBCC;
    --y-soft:    rgba(255, 229, 0, .10);
    --y-border:  rgba(255, 229, 0, .45);
    --y-ink:     #665B00;

    /* Neutrals */
    --ink:       #0C111D;
    --ink-2:     #1A2235;
    --ink-3:     #344054;
    --muted:     #667085;
    --muted-2:   #98A2B3;
    --faint:     #D0D5DD;

    /* Surfaces */
    --bg:        #F9FAFB;
    --bg-2:      #F2F4F7;
    --white:     #FFFFFF;
    --line:      #EAECF0;
    --line-2:    #F2F4F7;

    /* Semantic — base palette */
    --green:      #16a34a; --green-bg:  #f0fdf4; --green-border: #86efac;
    --amber:      #b45309; --amber-bg:  #fffbeb; --amber-border: #fcd34d;
    --orange:     #c2410c; --orange-bg: #fff7ed; --orange-border: #fdba74;
    --red:        #dc2626; --red-bg:    #fef2f2; --red-border:   #fca5a5;
    --blue:       #1D4ED8; --blue-bg:   #EFF6FF; --blue-border:  #BFDBFE;

    /* Score tier palette — 4 levels
     *  Use these everywhere a score needs a colour.
     *  Excellent ≥85  · Good ≥70  · Attention ≥50  · Critical <50
     * ─────────────────────────────────────────────────────────── */
    --score-excellent:        #0d9264;
    --score-excellent-bg:     #ecfdf5;
    --score-excellent-border: #6ee7b7;
    --score-excellent-track:  #d1fae5;

    --score-good:        #16a34a;
    --score-good-bg:     #f0fdf4;
    --score-good-border: #86efac;
    --score-good-track:  #dcfce7;

    --score-attention:        #b45309;
    --score-attention-bg:     #fffbeb;
    --score-attention-border: #fcd34d;
    --score-attention-track:  #fef3c7;

    --score-critical:        #dc2626;
    --score-critical-bg:     #fef2f2;
    --score-critical-border: #fca5a5;
    --score-critical-track:  #fee2e2;

    /* App shell */
    --sidebar-w:        228px;
    --sidebar-mini-w:   60px;
    --topbar-h:         56px;

    /* Type */
    --font: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Radius */
    --r-xs:  4px;
    --r-sm:  8px;
    --r:     12px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-2xl: 28px;

    /* Shadow */
    --sh-xs: 0 1px 2px rgba(16,24,40,.05);
    --sh-sm: 0 1px 3px rgba(16,24,40,.10), 0 1px 2px rgba(16,24,40,.06);
    --sh:    0 4px 8px -2px rgba(16,24,40,.10), 0 2px 4px -2px rgba(16,24,40,.06);
    --sh-lg: 0 12px 24px -4px rgba(16,24,40,.08), 0 4px 8px -2px rgba(16,24,40,.03);
    --sh-xl: 0 24px 48px -12px rgba(16,24,40,.18);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }

/* ══════════════════════════════════════════════════════════════════════════
   APP SHELL — Sidebar + Topbar + Content
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Shell wrapper ────────────────────────────────────────────────────────── */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.app-topbar {
    grid-area: topbar;
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    box-shadow: var(--sh-xs);
}
.topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-2);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.topbar-breadcrumb a { color: var(--muted); transition: color .15s; }
.topbar-breadcrumb a:hover { color: var(--ink); }
.topbar-breadcrumb .sep { color: var(--faint); }
.topbar-breadcrumb .current { color: var(--ink-2); font-weight: 600; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.app-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    z-index: 200;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--topbar-h);
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    text-decoration: none;
}
.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: var(--ink-2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.sidebar-brand-logo svg { display: block; }
.sidebar-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.02em;
    white-space: nowrap;
}

/* Nav sections */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-section-label {
    padding: 8px 8px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted-2);
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    transition: background .15s, color .15s;
    text-decoration: none;
    position: relative;
}
.sidebar-link:hover {
    background: var(--bg-2);
    color: var(--ink-2);
}
.sidebar-link.active {
    background: var(--y-soft);
    color: var(--ink-2);
    font-weight: 700;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--y);
}
.sidebar-link-icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    opacity: .65;
}
.sidebar-link.active .sidebar-link-icon,
.sidebar-link:hover .sidebar-link-icon { opacity: 1; }
.sidebar-link-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--y);
    color: var(--y-ink);
    font-size: 10px;
    font-weight: 800;
}

/* Sidebar footer */
.sidebar-footer {
    border-top: 1px solid var(--line);
    padding: 12px 8px;
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background .15s;
}
.sidebar-user:hover { background: var(--bg-2); }
.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--y);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--y-ink);
    flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-role {
    font-size: 11px;
    color: var(--muted);
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.app-content {
    grid-area: content;
    min-width: 0;
    padding: 28px 32px 64px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
    line-height: 1;
}
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 15px; }

.btn-primary   { background: var(--y); color: var(--y-ink); border-color: var(--y); }
.btn-primary:hover { background: var(--y-hover); border-color: var(--y-hover); }

.btn-secondary { background: var(--white); color: var(--ink-3); border-color: var(--faint); box-shadow: var(--sh-xs); }
.btn-secondary:hover { background: var(--bg-2); border-color: var(--muted-2); }

.btn-ghost     { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink-2); }

.btn-danger    { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: #fee2e2; }

.btn-icon {
    min-height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: var(--r-sm);
}

/* ══════════════════════════════════════════════════════════════════════════
   CARD SYSTEM
   ══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
}
.card-sm { border-radius: var(--r-lg); }
.card-flat { box-shadow: none; }
.card-surface { background: var(--bg); border-color: var(--line-2); box-shadow: none; }

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.card-header-copy h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
    letter-spacing: -.015em;
}
.card-header-copy p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}
.card-body  { padding: 24px; }
.card-body-sm { padding: 16px 20px; }
.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   BADGES & CHIPS
   ══════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.badge-green  { background: var(--score-good-bg);       color: var(--score-good);       border: 1px solid var(--score-good-border); }
.badge-amber  { background: var(--score-attention-bg);  color: var(--score-attention);  border: 1px solid var(--score-attention-border); }
.badge-orange { background: var(--orange-bg);           color: var(--orange);           border: 1px solid var(--orange-border); }
.badge-red    { background: var(--score-critical-bg);   color: var(--score-critical);   border: 1px solid var(--score-critical-border); }
.badge-blue   { background: var(--blue-bg);             color: var(--blue);             border: 1px solid var(--blue-border); }
.badge-yellow { background: var(--y-pale);              color: var(--y-ink);            border: 1px solid var(--y-border); }
.badge-gray   { background: var(--bg-2);                color: var(--muted);            border: 1px solid var(--line); }

/* ── Score-tier utility classes ──────────────────────────────────────────────
 *  Apply these to any element that should reflect the 4-tier scoring system.
 *  Works on badges, chips, table cells, KPI values, etc.
 * ─────────────────────────────────────────────────────────────────────────── */
.score-excellent {
    background: var(--score-excellent-bg);
    color: var(--score-excellent);
    border-color: var(--score-excellent-border);
}
.score-good {
    background: var(--score-good-bg);
    color: var(--score-good);
    border-color: var(--score-good-border);
}
.score-attention {
    background: var(--score-attention-bg);
    color: var(--score-attention);
    border-color: var(--score-attention-border);
}
.score-critical {
    background: var(--score-critical-bg);
    color: var(--score-critical);
    border-color: var(--score-critical-border);
}

/* Score chip — inline score display (e.g. table cells, module headers) */
.score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 7px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.score-chip-lg {
    height: 28px;
    padding: 0 10px;
    font-size: 14px;
    border-radius: 8px;
}

/* Score ring track — coloured track matching tier */
.ring-track-excellent { color: var(--score-excellent-track); }
.ring-track-good      { color: var(--score-good-track); }
.ring-track-attention { color: var(--score-attention-track); }
.ring-track-critical  { color: var(--score-critical-track); }

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* ══════════════════════════════════════════════════════════════════════════
   METRIC / KPI COMPONENTS
   ══════════════════════════════════════════════════════════════════════════ */
.metric-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.metric-card:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.metric-card-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.metric-card-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}
.metric-card-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink-2);
    letter-spacing: -.02em;
}
.metric-card-sub {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

/* ── Ring chart ────────────────────────────────────────────────────────────── */
.ring-wrap {
    position: relative;
    display: grid;
    place-items: center;
}
.ring-wrap svg { display: block; transform: rotate(-90deg); }
.ring-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

/* ── Score bar ─────────────────────────────────────────────────────────────── */
.score-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 38px;
    align-items: center;
    gap: 10px;
}
.score-bar-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.score-bar-track {
    height: 6px;
    background: var(--line-2);
    border-radius: 999px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(.4,0,.2,1);
}
/* Dynamic fill colours via tier classes on the track element */
.score-bar-fill.tier-excellent { background: var(--score-excellent); }
.score-bar-fill.tier-good      { background: var(--score-good); }
.score-bar-fill.tier-attention { background: var(--score-attention); }
.score-bar-fill.tier-critical  { background: var(--score-critical); }
.score-bar-val { font-size: 13px; font-weight: 800; text-align: right; }

/* ══════════════════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════════════════ */
.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 13.5px;
}
.data-table th {
    background: var(--bg);
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
    color: var(--ink-3);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: rgba(255,229,0,.04); }
.data-table tbody tr.row-hidden { display: none; }
.td-url { min-width: 280px; word-break: break-all; }
.td-url a { font-size: 12.5px; font-weight: 600; color: var(--ink-3); transition: color .12s; }
.td-url a:hover { color: var(--ink); }

/* ══════════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════════════════════ */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--faint);
    border-radius: var(--r-sm);
    padding: 0 12px;
    min-height: 36px;
    transition: border-color .15s, box-shadow .15s;
}
.input-group:focus-within {
    border-color: var(--y);
    box-shadow: 0 0 0 3px var(--y-soft);
}
.input-group input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--ink);
    min-width: 0;
}
.input-group input::placeholder { color: var(--muted-2); }
.input-icon { color: var(--muted-2); flex-shrink: 0; }

.filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--faint);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.filter-pill:hover   { color: var(--ink-2); border-color: var(--muted-2); }
.filter-pill.active  { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY / UTILITY
   ══════════════════════════════════════════════════════════════════════════ */
.empty-box {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    background: var(--bg);
    border-radius: var(--r-lg);
    border: 1px dashed var(--line);
}
.alert {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-error  { background: var(--score-critical-bg);   border: 1px solid var(--score-critical-border);   color: #7f1d1d; }
.alert-warn   { background: var(--score-attention-bg);  border: 1px solid var(--score-attention-border);  color: #78350f; }
.alert-success{ background: var(--score-good-bg);       border: 1px solid var(--score-good-border);       color: #14532d; }
.alert-info   { background: var(--blue-bg);             border: 1px solid var(--blue-border);             color: #1e3a8a; }

.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ══════════════════════════════════════════════════════════════════════════
   AUDIT-SPECIFIC — Page-level components
   ══════════════════════════════════════════════════════════════════════════ */

/* Audit hero header */
.audit-hero {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.audit-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 320px; height: 100%;
    background: linear-gradient(270deg, rgba(255,229,0,.05) 0%, transparent 100%);
    pointer-events: none;
}
.audit-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 10px;
}
.audit-hero-eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--y);
}
.audit-hero h1 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 8px;
}
.audit-hero-url {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--muted);
    transition: color .15s;
}
.audit-hero-url:hover { color: var(--ink); }
.audit-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}
.audit-hero-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Issue strip */
.issue-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}
.issue-box {
    padding: 13px 16px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.issue-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
}
.issue-box.issue::after  { background: var(--score-critical); }
.issue-box.opport::after { background: var(--score-excellent); }
.issue-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    margin-bottom: 5px;
}
.issue-text {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    line-height: 1.45;
}

/* Priority list */
.priority-list { display: grid; gap: 8px; }
.priority-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 15px 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
    background: var(--bg);
    transition: border-color .18s, background .18s, box-shadow .18s;
    cursor: default;
}
.priority-item:hover {
    background: var(--y-soft);
    border-color: var(--y-border);
    box-shadow: var(--sh-xs);
}
.priority-num {
    width: 40px; height: 40px;
    border-radius: var(--r-sm);
    background: var(--ink-2);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background .18s;
}
.priority-item:hover .priority-num { background: var(--y); color: var(--y-ink); }
.priority-body h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 5px;
}
.priority-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 9px;
}
.priority-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.priority-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-3);
}

/* Roadmap prose */
.prose { font-size: 14px; color: var(--ink-3); line-height: 1.8; }
.prose p { margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.015em;
    margin: 20px 0 8px;
}
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin: 5px 0; color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 700; }

/* Module cards */
.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.module-card {
    padding: 16px;
    border-radius: var(--r-lg);
    background: var(--bg);
    border: 1px solid var(--line);
}
.module-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 3px;
}
.module-card-sub {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.5;
}
.module-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.module-kpi {
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--white);
    border: 1px solid var(--line);
}
.module-kpi-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted-2);
    margin-bottom: 4px;
}
.module-kpi-val {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink-2);
    line-height: 1;
}
.module-items { display: grid; gap: 7px; }
.module-item {
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--white);
    border: 1px solid var(--line);
}
.module-item strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 3px; }
.module-item p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.module-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.module-table th {
    font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
    font-weight: 700; color: var(--muted-2);
    padding: 0 0 8px; text-align: left;
    border-bottom: 1px solid var(--line);
}
.module-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-3);
    vertical-align: top;
}
.module-table tr:last-child td { border-bottom: 0; }
.mod-score {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 22px; padding: 0 7px;
    border-radius: var(--r-xs);
    font-size: 11.5px; font-weight: 800;
}

/* ══════════════════════════════════════════════════════════════════════════
   PUBLIC PAGES (login / register / landing)
   ══════════════════════════════════════════════════════════════════════════ */
.public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.public-header {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--sh-xs);
}
.public-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.public-main { flex: 1; }
.public-footer {
    border-top: 1px solid var(--line);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    :root { --sidebar-w: 200px; }
    .app-content { padding: 20px 20px 48px; }
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: var(--topbar-h) var(--topbar-h) 1fr;
        grid-template-areas:
            "topbar"
            "sidebar"
            "content";
    }
    .app-sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 0 8px;
        align-items: center;
    }
    .sidebar-brand { display: none; }
    .sidebar-nav {
        flex-direction: row;
        padding: 0;
        gap: 2px;
        white-space: nowrap;
    }
    .sidebar-section-label { display: none; }
    .sidebar-link { min-height: var(--topbar-h); border-radius: 0; }
    .sidebar-link.active::before {
        top: auto; bottom: 0; left: 6px; right: 6px;
        width: auto; height: 3px;
        border-radius: 3px 3px 0 0;
    }
    .sidebar-footer { display: none; }
    .module-grid,
    .issue-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-content { padding: 16px 14px 40px; }
    .audit-hero { padding: 18px 16px; }
    .card-header, .card-body { padding: 14px 16px; }
    .priority-item { grid-template-columns: 1fr; }
    .priority-num { display: none; }
    .score-bar-row { grid-template-columns: 80px 1fr 34px; }
}