@font-face {
    font-family: "Sora TP";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/main/static/fonts/sora/sora-500.woff2") format("woff2");
}

@font-face {
    font-family: "Sora TP";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/main/static/fonts/sora/sora-600.woff2") format("woff2");
}

@font-face {
    font-family: "Sora TP";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/main/static/fonts/sora/sora-700.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3 TP";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/main/static/fonts/source-sans-3/source-sans-3-400.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3 TP";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/main/static/fonts/source-sans-3/source-sans-3-500.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3 TP";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/main/static/fonts/source-sans-3/source-sans-3-600.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3 TP";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/main/static/fonts/source-sans-3/source-sans-3-700.woff2") format("woff2");
}

:root {
    /* Backgrounds */
    --color-bg: #222222;
    --color-bg-alt: #333333;

    /* Typography */
    --color-text: #D4D4D4;
    --color-text-alt: #8a9099;

    /* Brand & accents */
    --color-primary: #A06DC2;         /* AA-safe purple */
    --color-primary-hover: #8F5AB4;   /* darker for hover */
    --color-secondary: #89A158;       /* AA-safe olive for links */
    --color-accent: #D75B33;          /* lively mauve-orange */
    --color-accent-light: #E0AA2F;    /* warm amber-gold */
    --color-tertiary: #0F5E73;        /* deep teal */
    --radius: 4px;
    --spacing: 1rem;
    --font-heading: "Sora TP", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Source Sans 3 TP", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-ui: "Source Sans 3 TP", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --type-size-hero: clamp(2rem, 3vw, 2.5rem);
    --type-size-h1: 2rem;
    --type-size-h2: 1.5rem;
    --type-size-h3: 1.125rem;
    --type-size-body: 1.02rem;
    --type-size-small: 0.9rem;
    --type-size-caption: 0.8125rem;
    --type-size-nav: clamp(1.06rem, 0.22vw + 0.98rem, 1.18rem);
    --type-line-tight: 1.2;
    --type-line-normal: 1.5;
    --type-line-relaxed: 1.7;
    --type-track-tight: -0.01em;
    --type-track-normal: 0;
    --type-track-wide: 0.06em;
    --section-pad-y: clamp(1.25rem, 2.4vw, 2.5rem);
    --section-gap: clamp(1rem, 2vw, 1.75rem);
    --card-border: #3e3e3e;
    --card-border-strong: #535353;
    --card-surface: #252525;
    --card-surface-alt: #2c2c2c;
    --btn-height: 2.65rem;
    --btn-pad-x: 1rem;
    --btn-font-size: var(--type-size-small);
    --btn-radius: 8px;
    /* Footer/Sidebar background uses palette colors */
    --color-bg-footer: #222222;  /* anthracite */
    --color-bg-sidebar: #333333; /* light anthracite */
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--font-body);
    font-size: var(--type-size-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center; /* keep header centered; main will stretch */
    text-align: center; /* default; override with .content/.content-inner */
    line-height: var(--type-line-normal);
    padding: var(--spacing);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Ensure main stretches full width so grid sidebars can align left */
main { width: 100%; margin: 0; flex: 1; }

h1 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing);
    font-size: var(--type-size-h1);
    line-height: var(--type-line-tight);
    letter-spacing: var(--type-track-tight);
}

h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: var(--type-line-tight);
    letter-spacing: var(--type-track-tight);
}

h2 { font-size: var(--type-size-h2); }
h3 { font-size: var(--type-size-h3); }

small {
    font-size: var(--type-size-caption);
    line-height: var(--type-line-normal);
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

label {
    font-family: var(--font-ui);
    font-size: var(--type-size-small);
    line-height: var(--type-line-tight);
    text-align: left;
    color: var(--color-text);
    font-weight: bold;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    font-family: var(--font-body);
    font-size: var(--type-size-small);
    line-height: var(--type-line-normal);
    padding: 0.5rem;
    border: 1px solid var(--color-text-alt);
    border-radius: var(--radius);
    background-color: var(--color-bg-alt);
    color: var(--color-text);
}

.cart-qty-input {
    width: 110px;
    text-align: center;
}

button {
    font-family: var(--font-ui);
    font-weight: 600;
    line-height: var(--type-line-tight);
    letter-spacing: var(--type-track-normal);
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius);
    background-color: var(--color-primary);
    color: var(--color-text);
    cursor: pointer;
    font-size: var(--type-size-small);
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--color-primary-hover);
}

a {
    font-family: var(--font-ui);
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

p {
    margin: var(--spacing) 0;
    font-size: var(--type-size-body);
    line-height: var(--type-line-relaxed);
}

ul, ol {
    line-height: var(--type-line-relaxed);
}

img {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--spacing);
}

/* Default logo rendered via CSS mask */
.logo {
    width: 64px;
    height: 64px;
    background-color: var(--color-secondary);  /* default tint, overridden in context */
    -webkit-mask: url('/main/static/images/triggerpointed_logo_traced.svg') no-repeat center / contain;
            mask: url('/main/static/images/triggerpointed_logo_traced.svg') no-repeat center / contain;
}

/* Brand container in global header */
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Default: auto width; becomes fixed on sidebar pages */
}

.brand-text {
    font-family: var(--font-heading);
    display: inline-block; /* always show brand text */
    color: var(--color-text-alt); /* match footer link tone */
    font-weight: 600;
    letter-spacing: var(--type-track-tight);
    font-size: 1.25rem;
    line-height: var(--type-line-tight);
}

/* Default header brand logo size */
header .brand .logo {
    width: 48px;
    height: 48px;
}

/* Home page header: center logo with brand text */
.home-header { display: flex; flex-direction: column; align-items: center; margin: 0.5rem 0 1rem; }



.home-header .logo { margin: 0.5rem 0; width: 48px; height: 48px; }

/* Stack brand title and subtitle under the logo */
.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;   /* keep them centred */
    text-align: center;    /* ensure multiline text is centred */
}


.home-header .brand-title { margin: 0.5rem 0 0; font-size: var(--type-size-h2); color: var(--color-primary); font-family: var(--font-heading); line-height: var(--type-line-tight); letter-spacing: var(--type-track-tight); }

.home-header .brand-subtitle { margin: 0; font-size: var(--type-size-small); color: var(--color-text-alt); line-height: var(--type-line-normal); }

/* Hero ribbon image (cropped strip) */
.hero-ribbon { width: 100%; max-width: 1200px; margin: 0 auto 1.25rem; overflow: hidden; border-radius: 8px; }
.hero-ribbon img { width: 100%; height: 140px; object-fit: cover; display: block; filter: saturate(1.05); }

/* Small icon images on cards */
.card .icon { width: 64px; height: 64px; display: block; margin-bottom: 0.5rem; }
.icon { width: 64px; height: 64px; display: block; margin-bottom: 0.5rem; }
.date-tag { font-size: var(--type-size-caption); color: var(--color-text-alt); font-weight: 500; margin-left: 0.5rem; line-height: var(--type-line-normal); }
.trust-line { color: var(--color-text-alt); font-size: var(--type-size-caption); margin-top: 0.6rem; display: inline-flex; align-items: center; gap: 0.35rem; line-height: var(--type-line-normal); }
.trust-line svg { width: 14px; height: 14px; fill: currentColor; opacity: 0.85; }
.trust-line img.lock-icon { width: 14px; height: 14px; opacity: 0.85; display: inline-block; }

.whatsnew { line-height: var(--type-line-relaxed); }

/* Vertical notices */
.error, #error {
    color: var(--color-accent);
}

/* Feedback messages */
.success, #success {
    color: var(--color-secondary);
}

/* Site-wide header/navigation */
header {
    display: grid;
    grid-template-columns: calc(220px + 1rem) 1fr; /* align with sidebar layout even on pages without sidebar */
    align-items: center;
    gap: 0; /* spacing handled inside columns */
    padding: var(--spacing) 0;
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--color-bg);
    z-index: 100;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing);
    margin: 0;
    padding: 0;
}

/* Make nav a flex row holding both menus */
header nav {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Keep menu items on one line by default */
header nav ul { /* reinforce nowrap for both lists */
    flex-wrap: nowrap;
}

/* Push auth menu to the right and align horizontally */
#auth-nav {
    margin-left: auto;
    display: flex;
    gap: var(--spacing);
}

header nav a {
    font-family: var(--font-ui);
    font-size: var(--type-size-nav);
    font-weight: 650;
    line-height: var(--type-line-tight);
    color: var(--color-secondary);
    text-decoration: none;
}

header nav a:hover {
    color: var(--color-accent-light);
}

header nav ul.lang-switch {
    margin-left: 0.75rem;
    gap: 0.45rem;
    align-items: center;
}

header nav ul.lang-switch a {
    font-size: var(--type-size-small);
    font-weight: 700;
    letter-spacing: 0.02em;
}

header nav ul.lang-switch a[aria-current="page"] {
    color: var(--color-accent-light);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* When a page has a left sidebar, align header with content */
.has-sidebar header {
    display: grid;
    grid-template-columns: calc(220px + 1rem) 1fr; /* sidebar + grid gap | content */
    gap: 0; /* spacing handled inside columns */
}

.has-sidebar header .brand { /* sits in first column; no fixed width needed */ }

.has-sidebar header .brand .brand-text { font-size: 1.25rem; }

.has-sidebar header .header-right {
    /* mirror .content-inner sizing */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* same as .content-inner */
}

.has-sidebar header .header-right nav {
    display: flex;
    align-items: center;
}

/* Also align header-right to content width on non-sidebar pages */
header .header-right {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Focus visibility for accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
}

/* Dropdown menus */
/* (Dropdown styles retained if needed later) */

/* Utility */
.hidden { display: none; }

/* Page layout with left sidebar for subcategories */
.page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    width: 100%;
    align-items: start;
}
.sidebar {
    text-align: left;
    position: sticky;
    top: 60px;
    background-color: var(--color-bg-sidebar);
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.75rem;
}
.sidebar h3 { margin: 0.25rem 0 0.5rem; font-size: var(--type-size-h3); font-family: var(--font-heading); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0; }
.sidebar a { display: block; padding: 0.5rem 0.5rem; color: var(--color-text); }
.sidebar a:hover { color: var(--color-accent-light); }
.sidebar a.active { color: var(--color-accent-light); font-weight: 600; border-left: 2px solid var(--color-primary); padding-left: calc(0.5rem - 2px); }
.content { text-align: left; }
.content-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Admin/content tables and forms theme */
table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: var(--type-size-small); line-height: var(--type-line-normal); }
thead th { text-align: left; color: var(--color-text); border-bottom: 1px solid #2b2b2b; padding: 0.5rem; font-family: var(--font-ui); font-size: var(--type-size-caption); letter-spacing: var(--type-track-wide); text-transform: uppercase; }
tbody td { border-bottom: 1px solid #2a2a2a; padding: 0.5rem; }
tbody tr:hover { background: #1b1b1b; }

/* Inputs inside table should be readable and sized */
td input[type="text"], td input[type="number"], td input[type="email"] {
  width: 100%;
}

/* Narrow forms in content for better focus */
.content form { max-width: 800px; margin-left: auto; margin-right: auto; }

/* Responsive: stack sidebar on small screens */
@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* Card layout for product summaries */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--section-gap);
}
.card {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--card-surface);
    text-align: left;
}
.card h3 { margin-top: 0.25rem; }
.card .thumb {
    width: 100%;
    aspect-ratio: 1.6 / 1;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--btn-height);
    padding: 0 0.95rem;
    border-radius: var(--btn-radius);
    cursor: pointer;
    vertical-align: middle;
    border: 1px solid transparent;
    font-family: var(--font-ui);
    font-size: var(--btn-font-size);
    font-weight: 600;
    line-height: var(--type-line-tight);
    letter-spacing: var(--type-track-normal);
    text-decoration: none;
}
.cards .btn { margin: 0.25rem 0.25rem 0 0; }
.btn-primary { background: var(--color-primary); color: #fff; border: none; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-link { background: transparent; color: var(--color-secondary); border: 1px solid var(--card-border-strong); }
.btn-link:hover { color: var(--color-accent-light); }
.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px dashed var(--card-border-strong);
}
.btn-ghost:hover { border-color: var(--color-accent-light); color: var(--color-accent-light); }
.btn-lg { min-height: 2.95rem; padding: 0 1.2rem; font-size: var(--type-size-body); }

/* Mobile subnav chips */
.mobile-subnav { display: none; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { display: inline-block; padding: 0.25rem 0.6rem; border: 1px solid var(--color-bg-alt); border-radius: 999px; }
@media (max-width: 900px) {
  .mobile-subnav { display: flex; }
}

/* Footer links horizontal */
footer {
    margin-top: var(--spacing);
    text-align: center;
    background-color: var(--color-bg-footer);
    width: 100%;
    padding: var(--spacing);
    border-top: 1px solid #2b2b2b;
    /* Keep footer readable while staying visually secondary */
    font-size: var(--type-size-small);
    line-height: var(--type-line-normal);
}

/* Footer grid layout */
.footer-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
}
.footer-col h4 {
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
    font-size: var(--type-size-small);
    font-family: var(--font-heading);
    line-height: var(--type-line-tight);
    letter-spacing: var(--type-track-tight);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0.25rem 0; }
.footer-col a { color: var(--color-text-alt); text-decoration: none; }
.footer-col a:hover { color: #d8dde4; }

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

/* Skip link */
.skip-link {
    font-family: var(--font-ui);
    font-size: var(--type-size-small);
    line-height: var(--type-line-tight);
    position: absolute;
    left: 1rem;
    top: -40px;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

.landing-main {
    display: grid;
    gap: var(--section-gap);
}

.hero-main {
    padding: var(--section-pad-y) 0;
    text-align: left;
}

.hero-main .eyebrow {
    margin: 0;
    color: var(--color-accent-light);
    font-size: var(--type-size-caption);
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: var(--type-track-wide);
}

.hero-main .hero-lead {
    max-width: 58ch;
    margin-top: 0.65rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.quick-path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--section-gap);
}

.card.card-emphasis {
    border-color: var(--card-border-strong);
    background: linear-gradient(165deg, var(--card-surface-alt), var(--card-surface));
}

.trust-panel {
    border-color: #4b5840;
}

.section-header {
    text-align: left;
    padding-top: 0.2rem;
}

.section-header h2 {
    margin-bottom: 0.25rem;
}

.section-header p {
    margin: 0;
    color: var(--color-text-alt);
}

.card-grid-home .card {
    min-height: 100%;
}

.proof-strip {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--section-gap);
    align-items: center;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: linear-gradient(165deg, #262626, #202020);
    padding: 1rem;
}

.proof-strip img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 0;
}

.proof-copy {
    text-align: left;
}

.kpi-list {
    margin: 0.4rem 0 0;
    padding-left: 1rem;
}

.support-surface {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-surface);
    padding: 1rem;
    text-align: left;
}

.support-surface h3 {
    margin-top: 0;
}

.admin-overview-cards {
    margin-top: 2rem;
}

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