@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;
    --paper: #faf7f2;
    --paper-2: #f5efe6;
    --surface: #ffffff;
    --rail: #f3ede3;
    --line: #e8e0d2;
    --line-2: #d8cdb8;
    --ink: #1a1614;
    --ink-2: #4a423b;
    --ink-3: #7a7166;
    --ink-4: #a39989;
    --brand: #d96a2c;
    --brand-ink: #b04816;
    --brand-soft: #fdece1;
    --ok: #15803d;
    --ok-soft: #dcfce7;
    --warn: #856404;
    --warn-soft: #fff3cd;
    --info: #245fbd;
    --info-soft: #dbeafe;
    --danger: #721c24;
    --danger-soft: #f8d7da;
    --favorite: #f5b342;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 0 rgba(60, 40, 20, 0.04), 0 1px 2px rgba(60, 40, 20, 0.05);
    --shadow: 0 1px 0 rgba(60, 40, 20, 0.04), 0 8px 24px -8px rgba(60, 40, 20, 0.16);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
*:focus-visible { outline:2px solid var(--brand); outline-offset:2px; border-radius:4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, .rail-link:focus-visible, .topbar-btn:focus-visible,
.shell-btn:focus-visible, .shell-search input:focus-visible,
.fk-btn:focus-visible, .cat-card:focus-visible, .ws-cat-btn:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }

/* Skip-to-content link — visually hidden until focused */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    z-index: 1000;
    padding: 8px 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top .12s ease;
}
.skip-link:focus {
    position: fixed;
    top: 8px;
}
.skip-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--brand-ink); }

h1, h2, h3, h4 {
    font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.app-shell {
    min-height: 100vh;
    background: var(--paper);
}

.rail {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 268px;
    max-width: 85vw;
    overflow-y: auto;
    padding: 14px 12px;
    background: var(--rail);
    border-right: 1px solid var(--line);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow);
}

.rail.rail-open {
    transform: translateX(0);
}

.rail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 20, 14, 0.45);
    z-index: 39;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.rail-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 14px;
    margin-bottom: 10px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1), 0 1px 2px rgba(180, 80, 30, 0.3);
}

.brand-copy { min-width: 0; }
.brand-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.brand-subtitle { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.rail-section {
    padding: 12px 8px 6px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-4);
    font-weight: 700;
}

.rail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.rail-link:hover {
    background: rgba(60, 40, 20, 0.04);
    color: var(--ink);
}

.rail-link.active {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.rail-icon {
    width: 16px;
    text-align: center;
    color: var(--ink-3);
    flex-shrink: 0;
}

.rail-link.active .rail-icon { color: var(--brand); }

.rail-status {
    margin: 8px 4px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--paper));
    box-shadow: var(--shadow-sm);
}

.rail-status h4 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.rail-status p {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.45;
}

.status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-chip {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 600;
}

.shell-main {
    min-width: 0;
    width: 100%;
    max-width: none !important;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 12px 32px;
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.topbar-brand .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.topbar-search {
    min-width: 0;
    flex: 0 1 440px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-3);
    box-shadow: var(--shadow-sm);
    transition: border-color .12s ease, box-shadow .12s ease;
}

.topbar-search:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(227, 112, 42, 0.12);
}

.topbar-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
}

.topbar-search input::placeholder {
    color: var(--ink-3);
}

.topbar-search-kbd {
    flex-shrink: 0;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper-2);
    color: var(--ink-4);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.topbar-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .12s ease;
}

.topbar-upload-btn:hover {
    background: var(--brand-ink);
    border-color: var(--brand-ink);
}


.page-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 32px 48px 64px;
}

.content-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
}

.content-main > header:first-child {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.content-main h1 {
    margin: 0;
    color: var(--ink);
    letter-spacing: 0;
}

.content-main p {
    color: var(--ink-2);
}

.shell-page-head {
    display: grid;
    gap: 12px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,247,242,0.88));
    box-shadow: var(--shadow-sm);
}

.shell-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.shell-page-head h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
    color: var(--ink);
}

.shell-page-head p {
    margin: 0;
    max-width: 760px;
    color: var(--ink-2);
    font-size: .98rem;
    line-height: 1.6;
}

.shell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.shell-btn:hover {
    background: var(--paper-2);
}

.shell-btn.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.shell-btn.primary:hover {
    background: var(--brand-ink);
    border-color: var(--brand-ink);
}

.shell-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(420px, 100%);
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.shell-search span {
    color: var(--ink-4);
    font-size: .85rem;
    flex-shrink: 0;
}

.shell-search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: .9rem;
    outline: 0;
}

.shell-search input::placeholder {
    color: var(--ink-4);
}

/* Focus improvements for interactive cards and buttons */
.fk-btn:focus-visible, .cat-card:focus-visible, .cat-tool-card:focus-visible,
.fk-feature-card:focus-visible, .fk-tool-card:focus-visible, .file-card:focus-visible, .fav-card:focus-visible,
.acct-link:focus-visible, .acct-recent-item:focus-visible, .bt-task-card:focus-visible,
.ws-tool-card:focus-visible, .tk-file-chip .remove:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Shared tool card component — used on the home page and the full tool catalog.
   The whole card is the click target, not just the corner arrow. */
.fk-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fk-tool-card {
    position: relative;
    display: block;
    min-height: 154px;
    background: #fff;
    border: 1px solid #e5d8c7;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}

.fk-tool-card:hover {
    border-color: #d9c7b2;
    box-shadow: var(--shadow);
}

.fk-tool-card.is-soon {
    opacity: .72;
}

.fk-tool-card-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
}

.fk-tool-card-body {
    position: relative;
    height: 100%;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
}

.fk-tool-card-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fk-format-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid #edd9c2;
    background: #fff2e2;
    color: #bf6a2a;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}

.fk-format-pill.is-muted {
    background: #f3f5f8;
    color: #718096;
    border-color: #d8dee7;
}

.fk-format-pill.is-soon {
    background: #fff0dd;
    color: #c5722f;
    border-color: #efc79b;
}

.fk-tool-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--ink);
}

.fk-tool-card p {
    margin: 6px 0 0;
    color: var(--ink-3);
    font-size: .86rem;
    line-height: 1.45;
    max-width: 95%;
}

.fk-tool-card-arrow {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid #d6cffb;
    background: #f0edff;
    color: #6b63ff;
    font-size: 1rem;
    font-weight: 700;
    transition: background .15s, border-color .15s;
}

.fk-tool-card:hover .fk-tool-card-arrow {
    background: #e4dfff;
    border-color: #c3b8f9;
}

@media (max-width: 1240px) {
    .fk-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .fk-card-grid {
        grid-template-columns: 1fr;
    }
}

/* All clickable elements with onclick must be keyboard-accessible */
[onclick]:not(a):not(button):not([role="button"]):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Ensure file action buttons have proper focus */
.file-act-btn:focus-visible, .fav-act-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.panel,
.section,
.table-wrap,
.item,
.hero-cta,
.continue-card,
.pickup-card,
.activity-line,
.latest-result-banner,
.draft-banner,
.session-ctx,
.card {
    box-shadow: var(--shadow-sm);
}

.badge-gray,
.badge-preview,
.badge-zip,
.delivery-label {
    background: var(--paper-2) !important;
    color: var(--ink-2) !important;
}

/* Improve contrast on status badges — darker text for readability */
.badge-warn, .badge-soon { color: #5a3e01 !important; }
.badge-fail { color: #5f141b !important; }
.badge-ok, .badge-ready { color: #0d5e2b !important; }

/* Improve inline status message contrast */
.result-badge-ok { color: #0d5e2b !important; }
.result-badge-fail { color: #5f141b !important; }
.result-badge-warn { background-color: var(--warn-soft) !important; color: #5a3e01 !important; }

.badge-ok,
.badge-ready {
    background: var(--ok-soft) !important;
    color: var(--ok) !important;
}

.badge-info,
.badge-single {
    background: var(--info-soft) !important;
    color: var(--info) !important;
}

.badge-fail {
    background: var(--danger-soft) !important;
    color: var(--danger) !important;
}

.badge-warn,
.badge-soon {
    background: var(--warn-soft) !important;
    color: var(--warn) !important;
}


.rail-secondary {
    display: block;
}

.shell-home .hero-cta,
.shell-workspace .workspace-hero,
.shell-workspace .workspace-sidecard {
    background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.92));
    border: 1px solid var(--line);
    border-radius: 16px;
}

.shell-home .hero-cta {
    border-width: 1px;
    box-shadow: var(--shadow);
    gap: 28px;
}

.shell-home .hero-cta .eyebrow,
.shell-workspace .workspace-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.shell-home .hero-cta .cta-title,
.shell-workspace .workspace-hero .hero-title {
    margin: 10px 0 0;
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    line-height: 1;
    color: var(--ink);
}

.shell-home .hero-cta .cta-copy,
.shell-workspace .workspace-hero .hero-copy {
    margin-top: 10px;
    max-width: 680px;
    color: var(--ink-2);
    font-size: .98rem;
    line-height: 1.6;
}

.shell-home .hero-proof,
.shell-workspace .hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.shell-home .hero-proof-item,
.shell-workspace .hero-proof-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(250, 247, 242, 0.75);
}

.shell-home .hero-proof-item strong,
.shell-workspace .hero-proof-item strong {
    display: block;
    color: var(--ink);
    font-size: .88rem;
    margin-bottom: 4px;
}

.shell-home .hero-proof-item span,
.shell-workspace .hero-proof-item span {
    color: var(--ink-3);
    font-size: .78rem;
    line-height: 1.45;
}

.shell-home .home-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
    gap: 16px;
    margin: 18px 0 26px;
    align-items: start;
}

.shell-home .home-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.shell-home .home-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--ink);
}

.shell-home .home-card p {
    margin: 0;
    color: var(--ink-2);
    font-size: .88rem;
    line-height: 1.55;
}

.shell-home .home-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.shell-home .home-mini {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(250, 247, 242, 0.7);
}

.shell-home .home-mini strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: .84rem;
}

.shell-home .home-mini span {
    display: block;
    color: var(--ink-3);
    font-size: .76rem;
    line-height: 1.45;
}

.shell-home .home-side-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.shell-home .home-side-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(250, 247, 242, 0.55);
}

.shell-home .home-side-item em {
    font-style: normal;
    font-size: .95rem;
    line-height: 1;
}

.shell-home .home-side-item div {
    min-width: 0;
}

.shell-home .home-side-item strong {
    display: block;
    font-size: .82rem;
    color: var(--ink);
    margin-bottom: 2px;
}

.shell-home .home-side-item span {
    display: block;
    color: var(--ink-3);
    font-size: .74rem;
    line-height: 1.4;
}

.shell-home #sg-grid {
    gap: 14px;
}

.shell-home .home-section-card {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.shell-home .sg-card {
    border-radius: 14px;
    padding: 20px 20px 18px;
    box-shadow: var(--shadow-sm);
}

.shell-home #tool-grid {
    gap: 12px;
}

.shell-home #tool-grid .item,
.shell-home section .grid .item {
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.shell-workspace .workspace-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr);
    gap: 18px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.shell-workspace .workspace-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.shell-workspace .workspace-hero .hero-actions a,
.shell-workspace .workspace-hero .hero-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
}

.shell-workspace .workspace-hero .hero-actions .primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.shell-workspace .workspace-hero .hero-side {
    display: grid;
    gap: 10px;
    align-content: start;
}

.shell-workspace .workspace-hero .hero-side .hero-proof-item {
    background: rgba(250, 247, 242, 0.72);
}

.shell-workspace .layout {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.shell-workspace .layout > div:first-child {
    display: grid;
    gap: 14px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.shell-workspace .layout > div:last-child {
    display: grid;
    gap: 14px;
}

.shell-workspace .panel,
.shell-workspace .compat-panel,
.shell-workspace .preflight-panel,
.shell-workspace .share-section,
.shell-workspace .tool-guidance,
.shell-workspace .reset-area {
    border-radius: 14px;
}

.shell-workspace .panel {
    box-shadow: var(--shadow-sm);
}

.shell-workspace .workspace-sidecard {
    padding: 16px 16px 14px;
    box-shadow: var(--shadow-sm);
}

.shell-workspace .workspace-sidecard h3 {
    margin: 0 0 6px;
    font-size: .95rem;
    color: var(--ink);
}

.shell-workspace .workspace-sidecard p {
    margin: 0;
    color: var(--ink-3);
    font-size: .8rem;
    line-height: 1.45;
}

.shell-workspace .workspace-sidecard .quick-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.shell-workspace .workspace-sidecard .quick-link {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(250, 247, 242, 0.68);
    text-decoration: none;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 600;
}

.shell-workspace .workspace-sidecard .quick-link small {
    display: block;
    margin-top: 3px;
    color: var(--ink-3);
    font-size: .72rem;
    font-weight: 500;
}

.shell-workspace .workspace-sidecard .quick-link:hover {
    border-color: var(--brand);
    background: var(--surface);
}

.shell-workspace #wf-tools .tool-item {
    border-radius: 10px;
}

.shell-workspace #wf-tool-panel {
    box-shadow: var(--shadow);
}

.shell-workspace #wf-start-guide,
.shell-workspace .draft-save-form,
.shell-workspace #latest-result-banner {
    border-radius: 12px;
}

.shell-workspace #wf-ws-panel,
.shell-workspace #wf-jobs {
    margin-top: 0 !important;
}

@media (max-width: 1120px) {
    .shell-home .home-intro-grid,
    .shell-workspace .workspace-hero {
        grid-template-columns: 1fr;
    }

    .shell-workspace .layout {
        grid-template-columns: 1fr;
    }

    .shell-workspace .layout > div:first-child {
        position: static;
    }
}

@media (max-width: 980px) {
    .topbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .page-shell {
        padding: 20px 16px 40px;
    }

    .shell-home .hero-proof,
    .shell-home .home-mini-grid,
    .shell-workspace .hero-proof {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-shell {
        padding: 14px 12px 32px !important;
    }

    .shell-page-head {
        padding: 16px 16px;
    }

    .shell-page-head h1 {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }

    .topbar {
        padding: 10px 12px;
    }

    .topbar-search {
        height: 36px;
        padding: 0 10px;
    }

    .topbar-search strong {
        font-size: 12px;
    }

    .topbar-search span {
        font-size: 11px;
    }

    .rail {
        padding: 10px 8px;
    }

    .brand {
        padding: 4px 4px 10px;
    }

    .rail-link {
        padding: 6px 8px;
        font-size: 12px;
    }

    .shell-btn {
        min-height: 36px;
        padding: 0 12px;
        font-size: .82rem;
    }

    .shell-search {
        width: 100%;
    }

    .shell-kicker {
        font-size: 10px;
        padding: 4px 8px;
    }
}
