/*!
 * fonts_tp - Adobe Fonts inspired redesign
 * Reference: https://fonts.adobe.com/fonts
 *
 * Design language
 *  - Pure white surfaces, hairline grey borders, almost no shadows
 *  - Sharp edges (radius 2-4px max)
 *  - High contrast typography, dense information
 *  - Adobe blue #1473e6 as the only saturated accent
 *  - System sans (adobe-clean fallback) for UI, generous letter spacing
 *    on eyebrows / labels (uppercase, tracking +0.08em)
 */

/* =========================================================================
   1. Design tokens
   ========================================================================= */
:root {
    /* Brand - overridden inline by index.php from template params */
    --tp-primary:        #1473e6;          /* Adobe blue */
    --tp-primary-hover:  #0d66d0;
    --tp-primary-active: #095aba;
    --tp-accent:         #1473e6;

    /* Light palette */
    --tp-bg:            #ffffff;
    --tp-bg-soft:       #fafafa;
    --tp-bg-muted:      #f5f5f5;
    --tp-bg-hover:      #f0f0f0;
    --tp-surface:       #ffffff;
    --tp-border:        #eaeaea;
    --tp-border-strong: #d3d3d3;
    --tp-divider:       #f0f0f0;

    --tp-text:        #2c2c2c;
    --tp-text-strong: #161616;
    --tp-text-soft:   #6e6e6e;
    --tp-text-muted:  #909090;
    --tp-link:        var(--tp-primary);

    /* Almost no shadows - hairline borders carry the structure */
    --tp-shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --tp-shadow-md: 0 2px 6px rgba(0,0,0,.06);
    --tp-shadow-lg: 0 4px 16px rgba(0,0,0,.08);

    /* Typography */
    --tp-font-sans: 'adobe-clean', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tp-font-display: var(--tp-font-sans);
    --tp-font-mono: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Layout */
    --tp-container:      1480px;
    --tp-container-wide: 1680px;
    --tp-radius-sm: 2px;
    --tp-radius:    3px;
    --tp-radius-lg: 4px;
    --tp-radius-pill: 999px;
    --tp-header-h:  60px;

    /* Motion */
    --tp-ease: cubic-bezier(.4,0,.2,1);
    --tp-dur:  .15s;
}

[data-theme="dark"] {
    --tp-bg:            #1d1d1d;
    --tp-bg-soft:       #232323;
    --tp-bg-muted:      #2a2a2a;
    --tp-bg-hover:      #333333;
    --tp-surface:       #232323;
    --tp-border:        #393939;
    --tp-border-strong: #4d4d4d;
    --tp-divider:       #2f2f2f;

    --tp-text:        #e3e3e3;
    --tp-text-strong: #f8f8f8;
    --tp-text-soft:   #a8a8a8;
    --tp-text-muted:  #7e7e7e;

    --tp-shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --tp-shadow-md: 0 2px 6px rgba(0,0,0,.45);
    --tp-shadow-lg: 0 4px 16px rgba(0,0,0,.5);
}

@media (prefers-color-scheme: dark) {
    body[data-theme-mode="auto"]:not([data-theme]) {
        --tp-bg:            #1d1d1d;
        --tp-bg-soft:       #232323;
        --tp-bg-muted:      #2a2a2a;
        --tp-bg-hover:      #333333;
        --tp-surface:       #232323;
        --tp-border:        #393939;
        --tp-border-strong: #4d4d4d;
        --tp-divider:       #2f2f2f;
        --tp-text:        #e3e3e3;
        --tp-text-strong: #f8f8f8;
        --tp-text-soft:   #a8a8a8;
        --tp-text-muted:  #7e7e7e;
        color-scheme: dark;
    }
}

/* =========================================================================
   2. Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--tp-bg);
    color: var(--tp-text);
    font-family: var(--tp-font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--tp-link); text-decoration: none; transition: color var(--tp-dur) var(--tp-ease); }
a:hover { color: var(--tp-primary-hover); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tp-font-display);
    font-weight: 700;
    color: var(--tp-text-strong);
    line-height: 1.15;
    margin: 0 0 .6em;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2.25rem, 1.5rem + 2.4vw, 3.5rem); letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1em; }

::selection { background: rgba(20,115,230,.25); }

button { font: inherit; cursor: pointer; }

/* Eyebrow / overline label - the iconic Adobe pattern */
.eyebrow,
.overline {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--tp-text-soft);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; top: -40px; left: 8px;
    background: var(--tp-text-strong); color: #fff;
    padding: 8px 14px; border-radius: var(--tp-radius);
    z-index: 1000; font-weight: 600;
    transition: top var(--tp-dur) var(--tp-ease);
}
.skip-link:focus { top: 8px; outline: none; }

:focus-visible {
    outline: 2px solid var(--tp-primary);
    outline-offset: 1px;
    border-radius: var(--tp-radius-sm);
}

/* =========================================================================
   3. Layout
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--tp-container);
    margin-inline: auto;
    padding-inline: clamp(20px, 3vw, 40px);
}
.layout-fluid .container  { max-width: var(--tp-container-wide); }
.layout-narrow .container { max-width: 1024px; }

/* =========================================================================
   4. Topbar (above header)
   ========================================================================= */
.topbar {
    background: var(--tp-text-strong);
    color: #f8f8f8;
    border-bottom: 1px solid #000;
    font-size: 12px;
}
.topbar a { color: inherit; }
.topbar .container {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 32px; gap: 16px; flex-wrap: wrap;
}

/* =========================================================================
   5. Header / Navigation - Adobe-style flat white bar
   ========================================================================= */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--tp-bg);
    border-bottom: 1px solid var(--tp-border);
    transition: border-color var(--tp-dur);
}
.site-header.is-scrolled { border-bottom-color: var(--tp-border-strong); }

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    min-height: var(--tp-header-h);
}

.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--tp-text-strong); font-weight: 800;
    font-size: 17px; text-decoration: none;
    letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; color: var(--tp-text-strong); }
.brand img { height: 28px; width: auto; }
.brand-text { color: var(--tp-text-strong); }
.brand-tagline {
    font-size: 11px; font-weight: 600;
    color: var(--tp-text-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-left: 1px solid var(--tp-border-strong);
    padding-left: 10px; margin-left: 4px;
}

/* Adobe-style nav: flat, no pills, underline on hover/active */
.primary-nav { justify-self: start; margin-left: 8px; }
.primary-nav ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; align-items: center; gap: 0;
}
.primary-nav a {
    display: inline-flex; align-items: center;
    color: var(--tp-text);
    padding: 8px 14px;
    font-weight: 500; font-size: 14px;
    text-decoration: none;
    position: relative;
    transition: color var(--tp-dur);
}
.primary-nav a::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px; background: transparent;
    transition: background-color var(--tp-dur);
}
.primary-nav a:hover { color: var(--tp-text-strong); text-decoration: none; }
.primary-nav a:hover::after { background: var(--tp-text-strong); }
.primary-nav .current > a,
.primary-nav .active > a,
.primary-nav a.active {
    color: var(--tp-text-strong);
    font-weight: 700;
}
.primary-nav .current > a::after,
.primary-nav .active > a::after,
.primary-nav a.active::after {
    background: var(--tp-primary);
}

.header-actions {
    display: inline-flex; align-items: center; gap: 8px;
    justify-self: end;
}

.header-search input[type="text"],
.header-search input[type="search"] {
    background: var(--tp-bg-muted);
    border: 1px solid transparent;
    border-radius: var(--tp-radius);
    padding: 7px 12px;
    color: var(--tp-text);
    font: inherit; font-size: 13px;
    min-width: 240px;
    transition: background-color var(--tp-dur), border-color var(--tp-dur), box-shadow var(--tp-dur);
}
.header-search input::placeholder { color: var(--tp-text-muted); }
.header-search input:focus {
    background: var(--tp-bg);
    border-color: var(--tp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(20,115,230,.18);
}

.theme-toggle,
.menu-toggle {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--tp-radius);
    color: var(--tp-text);
    transition: background-color var(--tp-dur), color var(--tp-dur), border-color var(--tp-dur);
}
.theme-toggle:hover,
.menu-toggle:hover { background: var(--tp-bg-muted); color: var(--tp-text-strong); }
.theme-toggle:active,
.menu-toggle:active { background: var(--tp-bg-hover); }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    body[data-theme-mode="auto"]:not([data-theme]) .theme-toggle .icon-sun { display: none; }
    body[data-theme-mode="auto"]:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}

.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle .bar {
    display: block; width: 18px; height: 2px;
    background: currentColor;
    transition: transform var(--tp-dur), opacity var(--tp-dur);
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 40;
    opacity: 0; pointer-events: none;
    transition: opacity var(--tp-dur);
}
.nav-overlay.is-active { opacity: 1; pointer-events: auto; }

/* =========================================================================
   6. Hero - Adobe-style oversized type, no rounded chrome
   ========================================================================= */
.hero {
    background: var(--tp-bg);
    border-bottom: 1px solid var(--tp-border);
    padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 7vw, 80px);
}
.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
}
.hero p {
    color: var(--tp-text-soft);
    font-size: clamp(1rem, .8rem + .6vw, 1.25rem);
    max-width: 60ch;
    margin: 0 0 28px;
}

.breadcrumb-bar {
    background: var(--tp-bg);
    border-bottom: 1px solid var(--tp-border);
    font-size: 12px;
    color: var(--tp-text-soft);
}
.breadcrumb-bar .container { padding-block: 12px; }
.breadcrumb-bar a { color: var(--tp-text-soft); text-decoration: none; }
.breadcrumb-bar a:hover { color: var(--tp-text); text-decoration: underline; }

/* =========================================================================
   7. Top promo
   ========================================================================= */
.top-promo { padding: 32px 0; border-bottom: 1px solid var(--tp-border); }
.top-promo-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* =========================================================================
   8. Main grid (sidebar/content) - Adobe uses sidebar + wide content
   ========================================================================= */
.site-main { padding: clamp(24px, 4vw, 40px) 0; }
.main-grid {
    display: grid; gap: clamp(24px, 3vw, 40px);
}
.site-main.has-none .main-grid  { grid-template-columns: 1fr; }
.site-main.has-left .main-grid  { grid-template-columns: minmax(220px, 260px) 1fr; }
.site-main.has-right .main-grid { grid-template-columns: 1fr minmax(220px, 260px); }
.site-main.has-both .main-grid  { grid-template-columns: minmax(220px, 240px) 1fr minmax(220px, 240px); }

.sidebar {
    align-self: start;
    position: sticky; top: calc(var(--tp-header-h) + 16px);
    max-height: calc(100vh - var(--tp-header-h) - 32px);
    overflow: auto;
    padding-right: 4px;
    font-size: 13px;
}
.content { min-width: 0; }

/* =========================================================================
   9. Modules / cards - Adobe is FLAT: thin border, no shadow, no radius
   ========================================================================= */
.moduletable, .module, .card, .moduletable_menu {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 28px;
    box-shadow: none;
}
.moduletable > h3, .module > h3, .card > h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--tp-text-soft);
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: 0;
}

.sidebar .moduletable,
.sidebar .module {
    border-bottom: 1px solid var(--tp-border);
    padding-bottom: 24px;
}
.sidebar .moduletable:last-child,
.sidebar .module:last-child { border-bottom: 0; }

.topbar .moduletable, .topbar .module,
.site-header .moduletable, .site-header .module {
    background: transparent; border: 0; padding: 0; margin: 0; box-shadow: none;
}

/* Sidebar menu links - Adobe filter list style */
.sidebar ul {
    list-style: none; padding: 0; margin: 0;
}
.sidebar li { margin: 0; }
.sidebar a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0;
    color: var(--tp-text);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--tp-dur);
}
.sidebar a:hover { color: var(--tp-primary); text-decoration: none; }
.sidebar .current > a,
.sidebar .active > a,
.sidebar a.active {
    color: var(--tp-text-strong);
    font-weight: 700;
}

/* =========================================================================
   10. Buttons - Adobe blue, sharp corners
   ========================================================================= */
.btn, .button, button.btn-primary, .btn-primary, input[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--tp-text-strong); color: #fff;
    border: 1px solid var(--tp-text-strong);
    border-radius: var(--tp-radius);
    padding: 9px 20px;
    font-weight: 700; font-size: 13px;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--tp-dur), border-color var(--tp-dur), color var(--tp-dur);
}
.btn:hover, .btn-primary:hover, input[type="submit"]:hover {
    background: #000; border-color: #000;
    color: #fff; text-decoration: none;
}

/* Adobe blue accent button (when explicitly requested) */
.btn-accent, .btn-blue, .btn--primary {
    background: var(--tp-primary); border-color: var(--tp-primary); color: #fff;
}
.btn-accent:hover, .btn-blue:hover, .btn--primary:hover {
    background: var(--tp-primary-hover); border-color: var(--tp-primary-hover);
}

.btn-secondary, .btn.btn-outline, .btn--ghost {
    background: transparent;
    color: var(--tp-text);
    border-color: var(--tp-border-strong);
}
.btn-secondary:hover, .btn.btn-outline:hover, .btn--ghost:hover {
    background: var(--tp-bg-muted);
    color: var(--tp-text-strong);
    border-color: var(--tp-text-soft);
}

/* =========================================================================
   11. Forms
   ========================================================================= */
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], input[type="tel"], textarea, select {
    width: 100%;
    background: var(--tp-bg);
    color: var(--tp-text);
    border: 1px solid var(--tp-border-strong);
    border-radius: var(--tp-radius);
    padding: 8px 12px;
    font: inherit; font-size: 14px;
    transition: border-color var(--tp-dur), box-shadow var(--tp-dur);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px rgba(20,115,230,.18);
}
label {
    font-weight: 600; color: var(--tp-text); display: inline-block;
    margin-bottom: 6px; font-size: 13px;
}

/* =========================================================================
   12. Tables
   ========================================================================= */
.content table {
    width: 100%; border-collapse: collapse;
    background: var(--tp-bg);
    border-top: 1px solid var(--tp-border);
    border-bottom: 1px solid var(--tp-border);
    border-radius: 0;
}
.content th, .content td {
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid var(--tp-border);
}
.content th {
    background: transparent;
    font-weight: 700; font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tp-text-soft);
}
.content tr:last-child td { border-bottom: 0; }

/* =========================================================================
   13. Article / content
   ========================================================================= */
.content article, .item-page, .blog-item {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.content article + article {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--tp-border);
}
.page-header h1, .item-page h2 { margin-top: 0; }

.article-info {
    display: flex; flex-wrap: wrap; gap: 14px;
    color: var(--tp-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    margin-bottom: 24px;
}

pre, code, kbd {
    font-family: var(--tp-font-mono);
    background: var(--tp-bg-muted);
    border-radius: var(--tp-radius-sm);
}
code { padding: 2px 6px; font-size: .92em; }
pre  { padding: 14px 16px; overflow-x: auto; border: 1px solid var(--tp-border); }

/* =========================================================================
   14. Pagination - numbered Adobe-style
   ========================================================================= */
.pagination, .pagination-wrap, ul.pagination {
    display: flex; gap: 2px; flex-wrap: wrap;
    list-style: none; padding: 0; margin: 32px 0 0;
    justify-content: center;
}
.pagination a, .pagination span, .pagination li > * {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: var(--tp-radius-sm);
    color: var(--tp-text);
    font-weight: 600; font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
}
.pagination a:hover { background: var(--tp-bg-muted); color: var(--tp-text-strong); text-decoration: none; }
.pagination .active > *,
.pagination li.active > * {
    background: var(--tp-text-strong); color: #fff;
    border-color: var(--tp-text-strong);
}

/* =========================================================================
   15. Footer - dark Adobe-style
   ========================================================================= */
.site-footer {
    background: var(--tp-text-strong);
    color: #b8b8b8;
    margin-top: 80px;
    border-top: 1px solid #000;
}
[data-theme="dark"] .site-footer { background: #0d0d0d; }
.site-footer a { color: #f0f0f0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.bottom-promo { padding: 56px 0 32px; border-bottom: 1px solid #2c2c2c; }
.bottom-grid {
    display: grid; gap: 32px;
}
.bottom-grid.cols-1 { grid-template-columns: 1fr; }
.bottom-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bottom-grid.cols-3 { grid-template-columns: repeat(4, 1fr); }
.bottom-grid.cols-3 > * { font-size: 13px; }

.site-footer .moduletable {
    background: transparent; border: 0; padding: 0; box-shadow: none;
    margin-bottom: 0;
}
.site-footer .moduletable > h3 {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin: 0 0 8px; }

.footer-modules { padding: 32px 0; border-top: 1px solid #2c2c2c; }
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #2c2c2c;
    font-size: 12px;
}
.footer-bottom-grid {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.footer-bottom .copy { margin: 0; }

/* =========================================================================
   16. Error / offline
   ========================================================================= */
.error-page, .offline-page { background: var(--tp-bg); }
.error-wrap {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 40px 16px;
}
.error-card {
    background: var(--tp-bg);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    padding: 64px clamp(24px, 4vw, 64px);
    text-align: center; max-width: 600px;
}
.error-code {
    font-size: clamp(72px, 16vw, 140px);
    font-weight: 800;
    line-height: 1; margin: 0 0 16px;
    color: var(--tp-text-strong);
    letter-spacing: -.04em;
}
.error-title {
    font-size: 1.5rem;
    margin: 0 0 28px;
    color: var(--tp-text);
    font-weight: 600;
}
.error-actions { margin: 0; }

.offline-form {
    display: grid; gap: 12px; margin-top: 24px;
    text-align: left; max-width: 320px; margin-inline: auto;
}

/* =========================================================================
   17. System messages
   ========================================================================= */
#system-message-container { margin: 16px 0; }
.alert, #system-message > div {
    background: var(--tp-bg);
    border: 1px solid var(--tp-border-strong);
    border-left: 3px solid var(--tp-primary);
    border-radius: var(--tp-radius);
    padding: 12px 16px;
    color: var(--tp-text);
    font-size: 13px;
}
.alert-success { border-left-color: #2ea043; }
.alert-warning, .alert-notice { border-left-color: #d97706; }
.alert-error, .alert-danger   { border-left-color: #dc2626; }

/* =========================================================================
   18. Responsive
   ========================================================================= */
@media (max-width: 1024px) {
    .site-main.has-both .main-grid { grid-template-columns: minmax(220px, 240px) 1fr; }
    .sidebar-right { display: none; }
    .bottom-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; }

    .header-grid { grid-template-columns: auto 1fr; }
    .primary-nav {
        position: fixed; top: 0; right: -100%;
        width: min(320px, 86vw); height: 100vh;
        background: var(--tp-bg);
        border-left: 1px solid var(--tp-border);
        padding: 76px 24px 24px;
        z-index: 60;
        overflow-y: auto;
        transition: right var(--tp-dur) var(--tp-ease);
        box-shadow: var(--tp-shadow-lg);
        justify-self: stretch;
    }
    .primary-nav.is-open { right: 0; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav li { border-bottom: 1px solid var(--tp-border); }
    .primary-nav a {
        padding: 14px 0;
        justify-content: flex-start;
    }
    .primary-nav a::after { display: none; }

    .header-search { display: none; }

    .site-main.has-left .main-grid,
    .site-main.has-right .main-grid,
    .site-main.has-both .main-grid {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; max-height: none; padding-right: 0; }
    .sidebar-left, .sidebar-right { display: block; }

    .bottom-grid.cols-2,
    .bottom-grid.cols-3 { grid-template-columns: 1fr; }

    .footer-bottom-grid { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    body { font-size: 13px; }
}

/* =========================================================================
   19. Component-only
   ========================================================================= */
body.component-only { background: var(--tp-bg); }
.component-main { padding: 24px 0; }

/* =========================================================================
   20. Reduced motion + print
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header, .site-footer, .sidebar, .top-promo, .bottom-promo,
    .breadcrumb-bar, .topbar, .menu-toggle, .theme-toggle, .nav-overlay { display: none !important; }
    body { background: #fff; color: #000; }
    .content article { border: 0; padding: 0; }
}
