/*
 *  Document   : modern.css
 *  Description: Minimal, contemporary design layer for the public site.
 *               Loaded after main.css / themes.css and overrides the legacy theme.
 *
 *  Structure:
 *      01. Design tokens
 *      02. Base & typography
 *      03. Layout & sections
 *      04. Header & navigation
 *      05. Footer
 *      06. Buttons
 *      07. Forms
 *      08. Cards & store items
 *      09. Tables & lists
 *      10. Alerts, badges, misc UI
 *      11. Page heads & hero
 *      12. Authentication
 *      13. Dashboard
 *      14. Questionnaire
 *      15. Cart & checkout
 *      16. Editorial content (pages, products, reports)
 *      17. Utilities & motion
 *      18. Responsive
 */

/*
=================================================================
01. DESIGN TOKENS
=================================================================
*/

:root {
    /* Type */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Colour */
    --ink: #101418;
    --ink-2: #3d454e;
    --muted: #6f7883;
    --line: #e7e9ec;
    --line-strong: #d7dbdf;
    --surface: #ffffff;
    --canvas: #f7f8f9;
    --canvas-2: #f1f3f4;
    --accent: #0e7c74;
    --accent-600: #0a655f;
    --accent-soft: #e8f4f2;
    --ink-panel: #0d1115;
    --danger: #b4322b;
    --danger-soft: #fbecea;
    --warn: #8a6a1f;
    --warn-soft: #fdf6e3;

    /* Shape */
    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(16, 20, 24, 0.05);
    --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.04), 0 4px 12px -6px rgba(16, 20, 24, 0.12);
    --shadow-md: 0 2px 4px rgba(16, 20, 24, 0.04), 0 18px 40px -24px rgba(16, 20, 24, 0.28);

    /* Motion */
    --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
    --speed: 0.22s;
}

/*
=================================================================
02. BASE & TYPOGRAPHY
=================================================================
*/

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Bootstrap 3 forces html {font-size: 10px}; the modern layer is built on
       a 16px root so rem values behave as expected. */
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    color: var(--ink-2);
    background-color: var(--canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv05" 1, "ss01" 1;
}

::selection {
    background: var(--accent);
    color: #fff;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 0.6em;
}

h1, .h1 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.035em; }
h2, .h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h3, .h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); }
h4, .h4 { font-size: 1.0625rem; }
h5, .h5 { font-size: 0.9375rem; }
h6, .h6 { font-size: 0.8125rem; }

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--speed) var(--ease);
}

a:hover,
a:focus {
    color: var(--accent-600);
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
}

strong, b {
    font-weight: 600;
    color: var(--ink);
}

small {
    font-size: 0.8125rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 48px 0;
}

sup {
    font-size: 0.55em;
    top: -0.65em;
    font-weight: 500;
    letter-spacing: 0;
}

.eyebrow {
    display: block;
    margin: 0 0 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow--accent {
    color: var(--accent);
}

.lede {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--muted);
    max-width: 62ch;
}

.text-muted { color: var(--muted) !important; }
.text-success { color: var(--accent) !important; }
.text-danger { color: var(--danger) !important; }
.themed-color-dark { color: var(--ink) !important; }
.themed-color-dark-modern { color: var(--ink) !important; }

/*
=================================================================
03. LAYOUT & SECTIONS
=================================================================
*/

#page-container {
    width: 100%;
    margin: 0 auto;
    background: var(--surface);
}

@media (min-width: 1200px) {
    .container {
        width: 1180px;
    }
}

.site-section {
    padding: 68px 0;
}

.site-content {
    background-color: var(--surface);
    padding-bottom: 0;
}

.site-section-top {
    padding-top: 0;
    overflow: visible;
}

.site-section-inner {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 0;
    overflow: visible;
}

.site-block {
    margin-bottom: 0;
}

.site-heading {
    margin: 0 0 18px;
}

/* Section with soft canvas background */
.section--muted {
    background: var(--canvas);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Section heading row used above grids */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.section-head h2 {
    margin-bottom: 6px;
}

.section-head p.section-sub {
    margin: 0;
    color: var(--muted);
    max-width: 60ch;
}

.section-head .eyebrow {
    margin-bottom: 10px;
}

.sidebar {
    font-size: 0.9375rem;
}

/*
=================================================================
04. HEADER & NAVIGATION
=================================================================
*/

header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    min-width: 320px;
    padding: 0;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
    z-index: 1030;
    transition: box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}

header.header-scroll {
    padding: 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 var(--line), 0 12px 28px -24px rgba(16, 20, 24, 0.45);
}

header.header-scroll:hover {
    background: rgba(255, 255, 255, 0.98);
}

header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 74px;
}

/* Bootstrap's .container clearfix pseudo-elements would become flex items
   here and push the logo and nav towards the middle of the bar. */
header > .container::before,
header > .container::after {
    content: none;
    display: none;
}

/* Logo lockup */
a.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    float: none;
    height: auto;
    line-height: 1;
    font-size: 16px;
    color: var(--ink);
    letter-spacing: -0.02em;
}

a.site-logo:hover,
a.site-logo:focus {
    color: var(--ink);
    text-decoration: none;
}

.site-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    transition: transform var(--speed) var(--ease);
}

a.site-logo:hover .site-logo__mark {
    transform: rotate(-8deg);
}

.site-logo__mark svg {
    width: 38px;
    height: 38px;
    display: block;
}

.site-logo__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-logo__line1 {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.site-logo__line1 b {
    font-weight: 700;
    letter-spacing: 0.06em;
}

.site-logo__line2 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Nav wrapper */
header nav {
    float: none;
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
    overflow: visible;
    z-index: auto;
    transition: none;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
}

.site-nav li {
    float: none;
    position: relative;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    height: auto;
    margin: 0;
    padding: 9px 14px;
    line-height: 1.2;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink-2);
    border-radius: var(--radius-pill);
    background: transparent;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.site-nav > li > a:hover,
.site-nav > li > a:focus {
    color: var(--ink);
    background: var(--canvas-2);
    text-decoration: none;
}

.site-nav li.active > a,
.site-nav a.active {
    color: var(--ink);
    background: var(--canvas-2);
}

/* Login / Sign up pills (classes come from Menu::displayTop) */
.site-nav li.btn > a {
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.site-nav li.btn-primary > a {
    color: var(--ink);
    border: 1px solid var(--line-strong);
    background: var(--surface);
}

.site-nav li.btn-primary > a:hover,
.site-nav li.btn-primary > a:focus {
    border-color: var(--ink);
    background: var(--surface);
    color: var(--ink);
}

.site-nav li.btn-success > a {
    color: #fff;
    border: 1px solid var(--ink);
    background: var(--ink);
}

.site-nav li.btn-success > a:hover,
.site-nav li.btn-success > a:focus {
    color: #fff;
    background: #000;
    border-color: #000;
}

/* Language switcher */
.site-nav > li:last-child > a {
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line);
}

.site-nav > li:last-child > a::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.7;
    margin-top: -1px;
}

/* Language dropdown ------------------------------------------------ */
/* Positioned from the trigger, right-aligned for the last item. The
   translate property (not transform) is used for the entrance animation so
   it cannot fight the centering transform. */
header .site-nav > li > ul {
    display: none;
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    right: auto;
    width: auto;
    min-width: 126px;
    margin: 0;
    padding: 6px;
    list-style: none;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 20;
}

/* Invisible bridge across the gap so the menu does not close while the
   pointer travels from the trigger down to the panel. */
header .site-nav > li > ul::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -24px;
    height: 24px;
}

header .site-nav > li.nav-lang > ul {
    left: auto;
    right: 0;
    transform: none;
}

header .site-nav > li:hover > ul,
header .site-nav > li:focus-within > ul {
    display: block;
    animation: navFade 0.16s var(--ease) both;
}

@keyframes navFade {
    from { opacity: 0; translate: 0 -4px; }
    to   { opacity: 1; translate: 0 0; }
}

.site-nav ul li {
    float: none;
    margin: 0;
    padding: 0;
}

.site-nav ul a {
    display: block;
    width: 100%;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink-2);
    border-radius: var(--radius-xs);
    background: transparent;
    white-space: nowrap;
}


.site-nav ul a:hover {
    color: var(--ink);
    background: var(--canvas-2);
}

.site-nav ul a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

/* Menu toggle (mobile) */
.site-menu-toggle,
header .site-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    box-shadow: none;
    line-height: 1;
    transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

header .site-menu-toggle:hover,
header .site-menu-toggle:focus {
    background: var(--canvas-2);
    border-color: var(--ink);
    color: var(--ink);
}

.burger {
    position: relative;
    display: block;
    width: 16px;
    height: 10px;
}

.burger span {
    position: absolute;
    left: 0;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--speed) var(--ease), top var(--speed) var(--ease);
}

.burger span:nth-child(1) { top: 1px; }
.burger span:nth-child(2) { top: 7px; }

/* Scroll-to-top */
#to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    opacity: 1;
    font-size: 15px;
    border-radius: 50%;
    color: #fff;
    background: var(--ink);
    border-radius: 50%;
    text-align: center;
    line-height: 46px;
    box-shadow: var(--shadow-md);
    z-index: 900;
    transition: transform var(--speed) var(--ease), background var(--speed) var(--ease);
}

#to-top:hover,
#to-top:focus {
    color: #fff;
    background: #000;
    transform: translateY(-2px);
}

/*
=================================================================
05. FOOTER
=================================================================
*/

.site-footer {
    position: relative;
    padding: 72px 0 30px;
    color: #98a2ac;
    background: var(--ink-panel);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #fff;
}

.footer-brand:hover,
.footer-brand:focus {
    color: #fff;
}

.footer-brand .site-logo__line1,
.footer-brand .site-logo__line2 {
    color: #fff;
}

.footer-brand .site-logo__line2 {
    color: rgba(255, 255, 255, 0.55);
}

.footer-brand .site-logo__mark {
    background: #fff;
    color: var(--ink);
}

.footer-tagline {
    max-width: 30ch;
    color: #7c8791;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-heading {
    margin: 6px 0 16px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-nav.list-inline {
    margin-left: 0;
}

.footer-nav.list-inline > li {
    display: block;
    padding: 0;
    margin: 0;
}

.footer-nav a {
    font-size: 0.9375rem;
    color: #c2cad1;
    transition: color var(--speed) var(--ease);
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: #fff;
}

.footer-nav-social {
    flex-direction: row;
    gap: 10px;
}

.footer-nav-social.list-inline > li {
    display: inline-block;
}

.footer-nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #c2cad1;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    line-height: 1;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.footer-nav-social a:hover,
.footer-nav-social a:focus {
    color: var(--ink);
    background: #fff;
    transform: translateY(-2px) rotate(0deg) scale(1);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8125rem;
    color: #6f7a85;
}

.footer-bottom a {
    color: #8f9aa4;
}

.footer-bottom a:hover {
    color: #fff;
}

/*
=================================================================
06. BUTTONS
=================================================================
*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.2;
    text-align: center;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    box-shadow: none;
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
                color var(--speed) var(--ease), transform var(--speed) var(--ease),
                box-shadow var(--speed) var(--ease);
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-lg {
    padding: 15px 28px;
    font-size: 0.9375rem;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.8125rem;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Primary = ink */
.btn-primary,
.btn-danger,
.btn-info,
.btn-warning,
.btn-success {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-danger:hover,
.btn-danger:focus,
.btn-info:hover,
.btn-info:focus,
.btn-success:hover,
.btn-success:focus {
    color: #fff;
    background: #000;
    border-color: #000;
}

/* Secondary = outlined */
.btn-default,
.btn-ghost {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line-strong);
}

.btn-default:hover,
.btn-default:focus,
.btn-ghost:hover,
.btn-ghost:focus {
    color: var(--ink);
    background: var(--canvas-2);
    border-color: var(--line-strong);
}

/* Soft accent */
.btn-soft {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: transparent;
}

.btn-soft:hover,
.btn-soft:focus {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.btn-outline {
    color: var(--ink);
    background: transparent;
    border-color: var(--ink);
}

.btn-outline:hover,
.btn-outline:focus {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.btn-link {
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    box-shadow: none;
}

.btn-link:hover,
.btn-link:focus {
    color: var(--accent-600);
    transform: none;
    box-shadow: none;
}

.btn[disabled],
.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Inline text link with arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.link-arrow::after {
    content: "\2192";
    font-size: 1em;
    transition: transform var(--speed) var(--ease);
}

.link-arrow:hover {
    color: var(--accent);
}

.link-arrow:hover::after {
    transform: translateX(3px);
}

/*
=================================================================
07. FORMS
=================================================================
*/

label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.form-control {
    height: auto;
    padding: 12px 15px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    box-shadow: none;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}

.form-control.input-lg {
    height: auto;
    padding: 14px 16px;
    font-size: 1rem;
}

.form-control::placeholder {
    color: #9aa3ac;
    opacity: 1;
}

.form-control:hover {
    border-color: #c3c9cf;
}

.form-control:focus {
    border-color: var(--ink);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(14, 124, 116, 0.1);
    outline: 0;
}

select.form-control {
    padding-right: 36px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236f7883' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea.form-control {
    min-height: 132px;
    resize: vertical;
}

.form-group {
    margin-bottom: 16px;
}

.help-block {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Icon inputs */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-sm);
}

.input-group .form-control {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: 0;
}

.input-group-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
    font-size: 15px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.input-group:focus-within .input-group-addon {
    color: var(--ink);
    border-color: var(--ink);
}

.input-group:focus-within .form-control {
    border-color: var(--ink);
}

/* Checkbox / switch */
.checkbox-inline,
.radio-inline {
    font-size: 0.9375rem;
    color: var(--ink-2);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

/* Legacy markup: .checkbox-circle style toggles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin: 0;
    vertical-align: middle;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.switch > span {
    position: absolute;
    inset: 0;
    background: var(--line-strong);
    border-radius: var(--radius-pill);
    transition: background var(--speed) var(--ease);
}

.switch > span::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-xs);
    transition: transform var(--speed) var(--ease);
}

.switch input:checked + span {
    background: var(--accent);
}

.switch input:checked + span::before {
    transform: translateX(18px);
}

/*
=================================================================
08. CARDS & STORE ITEMS
=================================================================
*/

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.card--pad {
    padding: 28px;
}

.card--hover {
    transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.card--hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

/* Product card */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

.product-card__media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--canvas-2);
}

.product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card__media img {
    transform: scale(1.03);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 14px;
    padding: 18px 20px 20px;
}

.product-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.product-card__title a {
    color: var(--ink);
}

.product-card__title a:hover {
    color: var(--accent);
}

.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.product-card__price {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.product-card__price small {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.product-card__meta .btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

/* Legacy store items, softened */
.store-items {
    margin-bottom: 0;
}

.store-item {
    display: block;
    margin-bottom: 24px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.store-item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.store-item-image img,
.store-item:hover .store-item-image img {
    transform: none;
    width: 100%;
    display: block;
}

.store-item-info {
    padding: 16px 18px;
    min-height: 0;
    background: var(--surface);
    font-size: 0.9375rem;
}

.store-item-price {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* Mini cart panel */
.cart-card {
    position: sticky;
    top: 98px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.cart-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-card__head .eyebrow {
    margin: 0;
}

.cart-card__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius-pill);
}

.cart-card__total {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--ink);
    line-height: 1.1;
}

.cart-card__total small {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
}

.cart-card__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.cart-card--empty .cart-card__total {
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
    line-height: 1.5;
}

/*
=================================================================
09. TABLES & LISTS
=================================================================
*/

.table {
    margin-bottom: 0;
    font-size: 0.9375rem;
    color: var(--ink-2);
}

.table > thead > tr > th {
    padding: 12px 16px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td {
    padding: 16px;
    border: 0;
    border-top: 1px solid var(--line);
    vertical-align: middle;
    background: transparent;
}

.table > tbody > tr:first-child > td {
    border-top: 0;
}

.table > tbody > tr:hover > td {
    background: #fbfcfc;
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: 0;
}

.table-bordered {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.table-bordered > thead > tr > th {
    border-bottom: 1px solid var(--line);
}

.table-bordered > tbody > tr > td {
    border-top: 1px solid var(--line);
}

.table-vcenter > tbody > tr > td {
    vertical-align: middle;
}

.table > tbody > tr > td.h4,
.table > tbody > tr > td .h4 {
    font-size: 1rem;
}

.table > tbody > tr.active > td,
.table > tfoot > tr.active > td {
    background: var(--canvas);
}

.table-responsive {
    border: 0;
}

/* Pricing / plan tables (legacy) */
.table-pricing {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.table-pricing > thead > tr > th {
    padding: 22px 20px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ink);
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
}

.table-pricing > tbody > tr > td {
    padding: 16px 20px;
    font-size: 0.9375rem;
    border-top: 1px solid var(--line);
}

/*
=================================================================
10. ALERTS, BADGES & MISC UI
=================================================================
*/

.alert {
    position: relative;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.9375rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--canvas);
    color: var(--ink-2);
    box-shadow: none;
}

.alert .close {
    position: absolute;
    top: 50%;
    right: 12px;
    margin: 0;
    transform: translateY(-50%);
    opacity: 0.5;
}

.alert-info {
    color: #1f5560;
    background: #eef7f8;
    border-color: #d8ecef;
}

.alert-success {
    color: var(--accent-600);
    background: var(--accent-soft);
    border-color: #d3eae5;
}

.alert-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f3d9d6;
}

.alert-warning {
    color: var(--warn);
    background: var(--warn-soft);
    border-color: #f2e7c8;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--canvas-2);
    border-radius: var(--radius-pill);
}

.badge--accent {
    color: var(--accent);
    background: var(--accent-soft);
}

.badge--warn {
    color: var(--warn);
    background: var(--warn-soft);
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--line);
}

.nav-tabs > li > a {
    margin: 0;
    padding: 12px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
}

.nav-tabs > li > a:hover {
    color: var(--ink);
    background: transparent;
    border-bottom-color: var(--line-strong);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--ink);
}

.tab-content {
    padding-top: 24px;
}

/* Modal */
.modal-content {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 40px 80px -30px rgba(16, 20, 24, 0.4);
}

.modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.modal-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}

.close {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: var(--muted);
    opacity: 1;
    text-shadow: none;
}

.close:hover,
.close:focus {
    color: var(--ink);
    opacity: 1;
}

/* Progress bars */
.progress {
    height: 6px;
    margin-bottom: 0;
    background: var(--canvas-2);
    border-radius: var(--radius-pill);
    box-shadow: none;
    overflow: hidden;
}

.progress-bar {
    background: var(--accent);
    box-shadow: none;
}

/*
=================================================================
11. PAGE HEADS & HERO
=================================================================
*/

/* Home hero */
.hero {
    position: relative;
    padding: clamp(64px, 8vw, 116px) 0 clamp(56px, 7vw, 96px);
    background:
        radial-gradient(900px 480px at 8% -10%, #e6f3f1 0%, rgba(230, 243, 241, 0) 62%),
        radial-gradient(760px 420px at 96% 4%, #eef2f4 0%, rgba(238, 242, 244, 0) 60%),
        var(--surface);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(16, 20, 24, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 20, 24, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 78%);
    pointer-events: none;
}

.hero > .container {
    position: relative;
    z-index: 2;
}

.hero__inner {
    max-width: 780px;
}

.hero__title {
    margin: 0 0 22px;
    font-size: clamp(2.15rem, 5vw, 3.85rem);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.hero__title .hero__title-soft {
    display: block;
    color: #97a1ab;
    font-weight: 500;
}

.hero__lede {
    margin: 0 0 32px;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.62;
    color: var(--muted);
    max-width: 58ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin: 48px 0 0;
    padding: 22px 0 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.hero__facts li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-2);
}

.hero__facts li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex: 0 0 6px;
}

/* Compact page header used on inner pages */
.page-head {
    position: relative;
    padding: clamp(44px, 5.5vw, 72px) 0 clamp(36px, 4vw, 52px);
    background:
        radial-gradient(700px 340px at 12% -20%, #e9f4f2 0%, rgba(233, 244, 242, 0) 65%),
        var(--surface);
    border-bottom: 1px solid var(--line);
}

.page-head__title {
    margin: 0;
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: var(--ink);
}

.page-head__sub {
    margin: 12px 0 0;
    font-size: 1rem;
    color: var(--muted);
    max-width: 62ch;
}

.page-head .eyebrow {
    margin-bottom: 12px;
}

/* Legacy dark headings, restyled as light page heads */
.site-section.site-section-light {
    color: var(--ink);
    background: transparent;
}

.site-section-light h1,
.site-section-light h2,
.site-section-light h3 {
    color: var(--ink);
}

.themed-background-dark-modern,
.themed-background-dark {
    background: transparent !important;
}

/* Wrapper used when a legacy template renders an empty dark strip */
.legacy-strip {
    padding: 36px 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
}

/*
=================================================================
12. AUTHENTICATION
=================================================================
*/

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 0 0 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.auth-card__head {
    margin-bottom: 26px;
    text-align: center;
}

.auth-card__head h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.auth-card__head p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--muted);
}

.auth-card__foot {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-card .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.auth-card .form-actions .btn {
    margin-left: auto;
}

.auth-terms {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.auth-captcha label {
    display: block;
    margin: 0 0 6px;
}

/* Account details form (client/account) */
.account-card + .account-card {
    margin-top: 20px;
}

.account-card__title {
    margin: 0 0 18px;
    font-size: 1.0625rem;
    letter-spacing: -0.015em;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

/* Contact form (mod/contact) */
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.contact-note {
    margin: 0;
}

.contact-captcha .form-control {
    max-width: 160px;
}

.checkout-captcha {
    max-width: 260px;
}

.checkout-captcha .form-control {
    max-width: 160px;
}

.contact-errors {
    margin: 0;
    padding-left: 18px;
}

/*
=================================================================
13. DASHBOARD
=================================================================
*/

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dash-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.dash-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.dash-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.dash-card__title {
    margin: 0 0 4px;
    font-size: 1.0625rem;
    letter-spacing: -0.015em;
}

.dash-card__meta {
    font-size: 0.8125rem;
    color: var(--muted);
}

.dash-card__body {
    margin-top: auto;
}

.dash-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    font-size: 0.9375rem;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
}

.dash-links li:last-child a {
    border-bottom: 0;
}

.dash-links a:hover {
    color: var(--accent);
}

.dash-links a::after {
    content: "\2192";
    color: var(--muted);
    transition: transform var(--speed) var(--ease);
}

.dash-links a:hover::after {
    transform: translateX(3px);
    color: var(--accent);
}

/*
=================================================================
14. QUESTIONNAIRE
=================================================================
*/

.quiz-shell {
    max-width: 880px;
    margin: 0 auto;
}

.quiz-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.quiz-question {
    margin: 0 0 34px;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* Inset the slider track so the outer tick labels ("Deficiency", "Excess")
   stay inside the card instead of hanging over its edge. */
.quiz-shell .slider.slider-horizontal {
    width: calc(100% - 72px) !important;
    margin: 0 36px;
}

.quiz-shell .slider-tick-label {
    font-size: 0.75rem;
    color: var(--muted);
}

.quiz-options {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.quiz-option {
    position: relative;
    display: block;
    margin: 0;
    padding: 18px 22px 18px 56px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.quiz-option::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 20px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.quiz-option:hover {
    border-color: var(--ink);
    background: #fcfdfd;
}

.quiz-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
}

.quiz-option:has(input:checked)::before {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 12px var(--accent);
}

.quiz-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Legacy answer markup (.answer) */
.answer {
    margin-bottom: 12px;
}

.answer label {
    display: block;
    margin-top: 8px;
    font-weight: 500;
}

.answer input[type="radio"] {
    margin-top: 8px;
}

/*
=================================================================
15. CART & CHECKOUT
=================================================================
*/

.panel {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.panel + .panel {
    margin-top: 20px;
}

.panel__title {
    margin: 0 0 18px;
    font-size: 1.0625rem;
    letter-spacing: -0.015em;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
}

.qty-stepper a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0.875rem;
    line-height: 1;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
}

.qty-stepper a:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--canvas-2);
}

.qty-stepper__value {
    min-width: 30px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    color: var(--ink);
}

.cart-total-row td {
    font-size: 0.9375rem;
}

.cart-total-row--grand td {
    font-size: 1.0625rem;
    background: var(--canvas);
}

.cart-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.checkout-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.checkout-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-steps li::after {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--line-strong);
}

.checkout-steps li:last-child::after {
    display: none;
}

.checkout-steps li.is-active {
    color: var(--ink);
}

/*
=================================================================
16. EDITORIAL CONTENT
=================================================================
*/

/* Long-form HTML coming from the CMS / Word */
.prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ink-2);
    max-width: 72ch;
}

.prose > *:first-child {
    margin-top: 0;
}

.prose span,
.prose font {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

.prose p,
.prose div,
.prose li {
    font-family: inherit !important;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.prose p {
    margin: 0 0 1.1em !important;
    line-height: 1.75 !important;
}

.prose h1,
.prose h2,
.prose h3 {
    margin: 1.5em 0 0.5em;
    line-height: 1.2;
}

.prose h4,
.prose h5,
.prose h6 {
    margin: 1.4em 0 0.45em;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ink);
}

.prose ul,
.prose ol {
    margin: 0 0 1.2em;
    padding-left: 1.3em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prose table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.prose th,
.prose td {
    padding: 12px 14px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    background: var(--canvas);
    font-weight: 600;
    color: var(--ink);
}

.prose hr {
    margin: 2em 0;
}

.article-head {
    max-width: 72ch;
    margin-bottom: 32px;
}

.article-head h1 {
    margin-bottom: 12px;
}

.article-head .eyebrow {
    margin-bottom: 12px;
}

/* Product detail */
.product-gallery {
    position: relative;
    overflow: hidden;
    background: var(--canvas-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.product-gallery img {
    display: block;
    width: 100%;
    height: auto;
}

.buy-panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.buy-panel__price {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ink);
}

.buy-panel__label {
    margin-top: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.buy-panel__actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.buy-panel__actions select {
    width: 88px;
    flex: 0 0 88px;
}

/* Report viewing: keep the legacy layout usable under the new header */
.mycontent {
    margin-left: 136px;
}

.sidenav {
    width: 148px;
    padding: 96px 8px 24px;
    background: var(--ink-panel);
    overflow-y: auto;
}

.sidenav a {
    padding: 7px 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #a5aeb7;
    border-radius: var(--radius-xs);
}

.sidenav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Assessment reports (P's Project and Virtues) */
.page-head--center {
    text-align: center;
}

.report-intro {
    margin-bottom: 20px;
}

.report-intro h3 {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.report-intro p {
    margin: 0;
}

.report-bar-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.report-bar-line:last-child {
    margin-bottom: 0;
}

.report-bar-name {
    flex: 0 0 82px;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--muted);
}

.report-bar-line .answer1,
.report-bar-line .answer2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.report-list {
    margin-top: 18px;
}

.report-item {
    padding: 22px 26px;
    margin-bottom: 14px;
    text-align: center;
}

.report-item:last-child {
    margin-bottom: 0;
}

.report-item h4 {
    margin: 0 0 16px;
    font-size: 1.0625rem;
}

.answer1,
.answer2 {
    width: 100%;
    height: 26px;
    margin: 0 0 8px;
    background: var(--canvas-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.answer2 {
    margin-bottom: 0;
}

.answer1 .inner,
.answer2 .inner {
    height: 100%;
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
    white-space: nowrap;
}

.answer1 .inner { background: #9aa3ab; }
.answer2 .inner { background: var(--ink); }

.report-totals {
    margin-top: 26px;
    text-align: right;
}

.report-totals p {
    margin: 0 0 2px;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ink);
}

.report-totals strong {
    font-weight: 700;
}

.report-totals__next {
    margin-top: 14px !important;
}

@media (max-width: 575px) {
    .report-item {
        padding: 18px 16px;
    }

    .report-totals p {
        font-size: 1rem;
    }
}

/*
=================================================================
17. UTILITIES & MOTION
=================================================================
*/

.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; }

.push { margin-top: 16px; }
.push-bit { margin-top: 8px; }

.visibility-none {
    visibility: hidden;
}

.stack { display: flex; flex-direction: column; }
.stack-8 { gap: 8px; }
.stack-12 { gap: 12px; }
.stack-20 { gap: 20px; }
.row-gap { row-gap: 24px; }

.divider {
    height: 1px;
    margin: 40px 0;
    background: var(--line);
}

@media (prefers-reduced-motion: no-preference) {
    .animate-in {
        animation: fadeUp 0.7s var(--ease) both;
    }

    .animate-in--delay-1 { animation-delay: 0.06s; }
    .animate-in--delay-2 { animation-delay: 0.12s; }
    .animate-in--delay-3 { animation-delay: 0.18s; }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/*
=================================================================
18. RESPONSIVE
=================================================================
*/

@media (max-width: 1199px) {
    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    /* Mobile navigation */
    header > .container {
        min-height: 66px;
    }

    header .site-menu-toggle {
        display: inline-flex;
    }

    header nav {
        gap: 0;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        display: block;
        width: auto;
        padding: 12px 16px 18px;
        background: #ffffff;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 40px -30px rgba(16, 20, 24, 0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease), visibility var(--speed);
    }

    .site-nav.site-nav-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav li {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .site-nav a,
    .site-nav > li > a {
        display: flex;
        width: 100%;
        padding: 13px 14px;
        font-size: 0.9375rem;
        border-radius: var(--radius-sm);
    }

    .site-nav li.btn-primary > a,
    .site-nav li.btn-success > a {
        justify-content: center;
        margin-top: 6px;
    }

    .site-nav > li:last-child > a {
        justify-content: space-between;
        margin-top: 6px;
        border: 1px solid var(--line);
    }

    /* Language list becomes a plain row of chips inside the drawer */
    header .site-nav > li > ul,
    header .site-nav > li.nav-lang > ul {
        position: static;
        display: flex;
        gap: 8px;
        width: auto;
        min-width: 0;
        margin: 8px 0 0;
        padding: 0;
        transform: none;
        translate: none;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    header .site-nav > li > ul::before {
        display: none;
    }

    header .site-nav > li:hover > ul,
    header .site-nav > li:focus-within > ul {
        animation: none;
    }

    header .site-nav > li > ul a {
        justify-content: center;
        border: 1px solid var(--line);
        background: var(--surface);
    }

    .nav-close {
        display: none;
    }

    /* Layout */
    .site-section {
        padding: 46px 0;
    }

    .hero {
        padding: 52px 0 56px;
    }

    .hero__facts {
        margin-top: 34px;
        gap: 10px 20px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 26px;
    }

    .cart-card {
        position: static;
        margin-top: 28px;
    }

    .site-footer {
        padding: 52px 0 26px;
    }

    .footer-heading {
        margin-top: 26px;
    }

    .footer-bottom {
        margin-top: 34px;
    }

    .mycontent {
        margin-left: 0;
    }

    .sidenav {
        position: static;
        width: auto;
        height: auto;
        padding: 12px 16px;
        overflow: visible;
    }

    .sidenav a {
        display: inline-block;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 15.5px;
    }

    .site-section {
        padding: 38px 0;
    }

    .hero__title {
        letter-spacing: -0.035em;
    }

    .hero__actions .btn {
        flex: 1 1 100%;
    }

    .auth-card {
        padding: 26px 20px;
    }

    .card--pad,
    .panel,
    .buy-panel,
    .cart-card {
        padding: 20px;
    }

    .table-responsive {
        border-radius: var(--radius-sm);
    }

    #to-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .site-logo__text {
        gap: 2px;
    }

    .site-logo__line1 {
        font-size: 14px;
    }

    .site-logo__line2 {
        font-size: 9px;
        letter-spacing: 0.18em;
    }
}

/*
=================================================================
19. COMPONENT REFINEMENTS
=================================================================
*/

/* Buy panel form row */
.buy-panel__actions form {
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    align-items: stretch;
}

.buy-panel__actions form .form-control {
    width: 92px;
    flex: 0 0 92px;
    text-align: center;
}

.buy-panel__actions form .btn {
    flex: 1 1 auto;
}

/* List rows with a trailing value */
.dash-links a > span:last-child {
    flex: 0 0 auto;
}

/* Report cover */
.report-cover {
    padding-top: 60px;
    padding-bottom: 40px;
}

.report-cover__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 44px 40px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.report-cover__title {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.report-cover__date {
    margin: 0 0 26px;
    font-size: 0.875rem;
    color: var(--muted);
}

.report-cover__inner img {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

/* Report body tables */
.mycontent .table > tbody > tr > td {
    border-top: 1px solid var(--line);
}

.mycontent .table-borderless > tbody > tr > td {
    border: 0;
}

.mycontent img {
    max-width: 100%;
    height: auto;
}

/* Radio groups */
.radio-inline + .radio-inline {
    margin-left: 18px;
}

.radio-inline input[type="radio"] {
    margin-right: 6px;
}

/* Section head actions */
.section-head .btn,
.section-head > div:last-child {
    flex: 0 0 auto;
}

/* Anchored sections (fixed header offset) */
[id] {
    scroll-margin-top: 90px;
}

/*
=================================================================
20. LAYOUT POLISH
=================================================================
*/

/* Article / long-form page measure */
.article {
    max-width: 780px;
    margin: 0 auto;
}

.article .prose {
    max-width: none;
}

/* Keep the product gallery a sensible height on wide screens */
.product-gallery img {
    max-height: 640px;
    object-fit: contain;
    background: #fff;
}

/* Related list: plain rows, no arrow affordance */
.dash-links--plain a::after {
    display: none;
}

/* Reduce hero breathing room slightly */
.hero {
    padding-bottom: clamp(48px, 5.5vw, 76px);
}

.hero__facts {
    margin-top: 38px;
}

/* Dashboard link cards get an affordance */
.dash-card.card--hover::after {
    content: "\2192";
    position: absolute;
    top: 26px;
    right: 26px;
    color: var(--muted);
    transition: transform var(--speed) var(--ease), color var(--speed) var(--ease);
}

.dash-card.card--hover {
    position: relative;
    padding-right: 64px;
}

.dash-card.card--hover:hover::after {
    transform: translateX(3px);
    color: var(--accent);
}

/*
=================================================================
21. TABLES, EMPTY STATES & PAGE FRAME
=================================================================
*/

/* Card-style table container */
.table-wrap {
    padding: 6px 22px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.table-wrap .table > thead > tr > th:first-child,
.table-wrap .table > tbody > tr > td:first-child {
    padding-left: 2px;
}

.table-wrap .table > thead > tr > th:last-child,
.table-wrap .table > tbody > tr > td:last-child {
    padding-right: 2px;
}

.table-empty {
    padding: 56px 16px !important;
    text-align: center;
    color: var(--muted);
    font-size: 0.9375rem;
}

/* Sticky footer: keep it at the bottom on short pages */
#page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#page-container > header,
#page-container > section,
#page-container > footer {
    flex: 0 0 auto;
    width: 100%;
}

#page-container > footer {
    margin-top: auto;
}

/*
=================================================================
22. REPORT VIEWER
=================================================================
*/

.sidenav {
    top: 74px;
    height: calc(100% - 74px);
    padding-top: 22px;
    padding-bottom: 28px;
    min-width: 0;
}

.report-cover .report-cover__inner img {
    max-width: 340px;
    border-radius: var(--radius-sm);
}

@media (max-width: 991px) {
    .sidenav {
        top: auto;
        height: auto;
        padding: 14px 16px 18px;
    }
}

@media (max-width: 767px) {
    .product-gallery img {
        max-height: 380px;
        object-fit: contain;
    }

    .buy-panel__actions form {
        flex-wrap: wrap;
    }

    .buy-panel__actions form .form-control {
        flex: 1 1 100%;
        width: 100%;
    }

    .site-nav a,
    .site-nav > li > a {
        font-size: 1rem;
    }
}

/*
=================================================================
23. CART LINE ITEMS
=================================================================
*/

.cart-panel {
    padding: 6px 26px 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 140px;
    gap: 20px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.cart-line--head {
    padding: 16px 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.cart-line--head span:nth-child(2) {
    text-align: center;
}

.cart-line__product a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.cart-line__product a:hover {
    color: var(--accent);
}

.cart-line__product small {
    display: block;
    margin-top: 3px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.cart-line__qty {
    display: flex;
    justify-content: center;
}

.cart-line__total {
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
    color: var(--ink);
}

.cart-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding: 20px 0 24px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    width: min(320px, 100%);
    font-size: 0.9375rem;
    color: var(--muted);
}

.cart-summary__row--total {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 575px) {
    .cart-panel {
        padding: 2px 16px 0;
    }

    .cart-line {
        grid-template-columns: 1fr auto;
        gap: 10px 12px;
        padding: 18px 0;
    }

    .cart-line--head {
        display: none;
    }

    .cart-line__product {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .cart-line__qty {
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start;
    }

    .cart-line__total {
        grid-column: 2;
        grid-row: 2;
    }

    .cart-summary__row {
        width: 100%;
    }
}

/* Stacked dashboard cards need vertical rhythm (Bootstrap 3 floats have no gap) */
@media (max-width: 991px) {
    .dash-card {
        margin-bottom: 20px;
    }

    .row-gap > .dash-card:last-child {
        margin-bottom: 0;
    }
}

/*
=================================================================
24. PRODUCT DETAIL LAYOUT
=================================================================
*/

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--canvas);
}

.product-gallery img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 620px;
    height: auto;
    margin: 0 auto;
}

.buy-panel {
    position: sticky;
    top: 98px;
}

.panel--description {
    margin-top: 22px;
}

.panel--related {
    margin-top: 20px;
}

/* Quantity select inside the buy panel */
.buy-panel__actions form .form-control {
    width: 132px;
    flex: 0 0 132px;
    padding-right: 32px;
    font-size: 0.875rem;
}

@media (max-width: 991px) {
    .buy-panel {
        position: static;
        margin-top: 22px;
    }

    .buy-panel__actions form .form-control {
        width: 120px;
        flex: 0 0 120px;
    }
}

/* Mobile product detail: price and buy action come before the long copy */
@media (max-width: 991px) {
    .product-layout {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .product-col--media,
    .product-col--buy {
        display: contents;
    }

    .product-gallery { order: 1; }
    .buy-panel { order: 2; margin-top: 0; }
    .panel--description { order: 3; margin-top: 0; }
    .panel--related { order: 4; margin-top: 0; }
}

/* Final overrides for the mobile product page (kept last on purpose) */
@media (max-width: 991px) {
    .product-layout {
        padding-left: 15px;
        padding-right: 15px;
    }

    .product-gallery img {
        max-height: 460px;
        width: auto;
    }
}

/*
=================================================================
25. HEADER MINI CART
=================================================================
*/

.site-cart {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-cart__trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 15px 0 12px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.site-cart__trigger:hover,
.site-cart__trigger:focus {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}

.site-cart__iconwrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.site-cart__icon {
    display: block;
    width: 20px;
    height: 20px;
}

.site-cart__badge {
    position: absolute;
    top: -9px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--accent);
    border: 2px solid var(--surface);
    border-radius: var(--radius-pill);
}

.site-cart__amount {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink-2);
}

/* Empty cart: a compact icon button only */
.site-cart--empty .site-cart__trigger {
    justify-content: center;
    width: 42px;
    padding: 0;
    color: var(--ink-2);
}

/* Dropdown preview (pointer or keyboard focus) */
.site-cart__panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 320px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    translate: 0 -6px;
    z-index: 40;
    transition: opacity var(--speed) var(--ease), translate var(--speed) var(--ease), visibility var(--speed);
}

/* Invisible bridge so the panel stays open while the pointer crosses the gap */
.site-cart__panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
}

.site-cart:hover .site-cart__panel,
.site-cart:focus-within .site-cart__panel {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}

.site-cart__panel-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-cart__panel-title span {
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--ink-2);
}

.site-cart__list {
    max-height: 264px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.site-cart__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 14px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

.site-cart__item:first-child {
    border-top: 0;
}

.site-cart__item-name {
    grid-column: 1;
    display: block;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-cart__item-name:hover {
    color: var(--accent);
}

.site-cart__item-meta {
    grid-column: 1;
    font-size: 0.8125rem;
    color: var(--muted);
}

.site-cart__item-total {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.site-cart__sum {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    font-size: 0.8125rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-cart__sum strong {
    font-size: 1rem;
    color: var(--ink);
}

.site-cart__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.site-cart__actions .btn {
    flex: 1 1 0;
    white-space: nowrap;
}

@media (max-width: 991px) {
    /* Keep the cart trigger in the header bar, next to the menu toggle, and
       let a tap open the full cart page instead of a hover panel. */
    header .site-cart {
        order: -1;
    }

    .site-cart__panel {
        display: none;
    }
}

@media (max-width: 767px) {
    .site-cart__amount {
        display: none;
    }

    .site-cart__trigger {
        justify-content: center;
        width: 42px;
        padding: 0;
    }
}


/*
=================================================================
22. INVITATIONS (client/invite, client/invitation)
=================================================================
*/

.invite-intro {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--ink-2);
}

.invite-limit {
    margin: 0 0 22px;
    font-size: 0.875rem;
    color: var(--muted);
}

.invite-rows {
    border-top: 1px solid var(--line);
}

.invite-row {
    padding: 16px 0 4px;
    border-bottom: 1px solid var(--line);
}

.invite-row .form-group {
    margin-bottom: 12px;
}

.invite-row .form-control:invalid {
    border-color: var(--danger);
}

.invite-row .form-control:invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.invite-row__remove-wrap {
    display: flex;
    align-items: flex-end;
}

.invite-row__remove {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 1.125rem;
    line-height: 1;
    color: var(--muted);
}

.invite-row__remove:hover:not(:disabled) {
    color: var(--danger);
    border-color: var(--danger);
}

.invite-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 4px;
}

.invite-counter {
    font-size: 0.8125rem;
    color: var(--muted);
}

.invite-body-note {
    margin-top: 8px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--muted);
}

.invite-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.invite-actions--stack {
    flex-direction: column;
    align-items: stretch;
}

.invite-actions--stack .btn {
    width: 100%;
}

.invite-actions--preview {
    justify-content: space-between;
    padding-top: 8px;
}

.invite-row--pending td {
    background: var(--canvas);
}

.invite-summary {
    margin-bottom: 24px;
    padding: 16px 18px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.invite-summary__title {
    margin: 0 0 6px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
}

.invite-summary__meta {
    margin: 2px 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.invite-accept-note {
    margin: 0 0 18px;
    font-size: 0.9375rem;
    color: var(--ink-2);
}

.invite-divider {
    margin: 0 0 10px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
}

.invite-divider + p {
    margin-bottom: 18px;
    font-size: 0.875rem;
}

.email-preview-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.email-preview {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.email-preview__head {
    padding: 14px 20px;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
}

.email-preview__head p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.email-preview__body {
    padding: 22px 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}

.email-preview__body a {
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .card--pad {
        padding: 20px;
    }

    .invite-row__remove-wrap {
        align-items: center;
    }

    .invite-actions--preview {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .invite-actions--preview .btn {
        width: 100%;
    }
}

/* Pending invitation shown on client/quest */
.invite-pending-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    border-left: 3px solid var(--accent);
}

.invite-pending-card__body {
    min-width: 0;
}

.invite-pending-card__title {
    margin: 4px 0 6px;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.invite-pending-card__meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.invite-pending-card__action {
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    .invite-pending-card__action,
    .invite-pending-card__action .btn,
    .invite-pending-card__action form {
        width: 100%;
    }
}

/*
=================================================================
26. ACCOUNT MENU (signed-in header)
=================================================================
*/

.site-user {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-user__trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 13px 0 6px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}

.site-user__trigger:hover,
.site-user__trigger:focus-visible {
    border-color: var(--ink);
    box-shadow: var(--shadow-xs);
    outline: 0;
}

.site-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #fff;
    background: var(--ink);
    border-radius: 50%;
    text-transform: uppercase;
}

.site-user__name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-user__chevron {
    width: 10px;
    height: 7px;
    flex: 0 0 10px;
    color: var(--muted);
    transition: rotate var(--speed) var(--ease), color var(--speed) var(--ease);
}

.site-user.is-open .site-user__chevron {
    rotate: 180deg;
    color: var(--ink);
}

/* Dropdown */
.site-user__panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 280px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    translate: 0 -6px;
    transition: opacity var(--speed) var(--ease), translate var(--speed) var(--ease), visibility var(--speed);
}

/* Pointer bridge over the gap between trigger and panel */
.site-user__panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .site-user:hover .site-user__panel {
        opacity: 1;
        visibility: visible;
        translate: 0 0;
    }
}

.site-user.is-open .site-user__panel {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}

.site-user__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.site-user__avatar--lg {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 0.8125rem;
}

.site-user__id {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.site-user__id strong {
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-user__id span {
    overflow: hidden;
    font-size: 0.8125rem;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-user__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-user__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: var(--radius-xs);
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.site-user__link i {
    width: 16px;
    flex: 0 0 16px;
    font-size: 0.875rem;
    text-align: center;
    color: var(--muted);
    transition: color var(--speed) var(--ease);
}

.site-user__link:hover,
.site-user__link:focus {
    color: var(--ink);
    background: var(--canvas-2);
    text-decoration: none;
}

.site-user__link.is-active {
    color: var(--accent-600);
    background: var(--accent-soft);
    font-weight: 600;
}

.site-user__link.is-active i {
    color: var(--accent);
}

.site-user__logout {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 6px;
    padding: 12px 12px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.site-user__logout i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
}

.site-user__logout:hover,
.site-user__logout:focus {
    color: var(--danger);
    background: var(--danger-soft);
    text-decoration: none;
}

@media (max-width: 991px) {
    /* Keep the avatar button in the header bar; the panel drops below the
       whole header, like the mobile navigation drawer. */
    header .site-user {
        position: static;
        order: 1;
    }

    .site-user__name,
    .site-user__chevron {
        display: none;
    }

    header .site-cart {
        order: 2;
    }

    header .site-menu-toggle {
        order: 3;
    }

    .site-user__trigger {
        justify-content: center;
        width: 42px;
        padding: 0;
    }

    .site-user__panel {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 90px);
        padding: 10px;
        overflow-y: auto;
        border-radius: var(--radius-sm);
        translate: 0 -6px;
    }

    .site-user__panel::before {
        top: -10px;
        height: 10px;
    }

    .site-user__avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}

/* Invitation tags and report summary */
.invite-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.invite-tag-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.invite-tag-form__label {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
}

.invite-tag-form .form-control {
    flex: 1 1 260px;
    max-width: 420px;
}

.invite-select-cell {
    width: 34px;
    text-align: center;
}

.invite-select-cell input {
    margin: 0;
}

@media (max-width: 767px) {
    .invite-head-actions,
    .invite-head-actions .btn,
    .invite-tag-form .form-control,
    .invite-tag-form .btn {
        width: 100%;
    }

    .invite-tag-form {
        align-items: stretch;
    }
}

/* Compact invited-users table: no horizontal scrolling */
.invite-users-table {
    width: 100%;
    table-layout: fixed;
}

.invite-users-table .invite-select-cell {
    width: 34px;
}

.invite-users-table .invite-status-cell {
    width: 220px;
}

.invite-users-table .invite-actions-cell {
    width: 190px;
    white-space: nowrap;
}

/* Resend / cancel are separate POST forms in the same cell. */
.invite-users-table .invite-actions-cell form {
    display: inline-block;
    margin: 0 0 0 4px;
    vertical-align: middle;
}

.invite-users-table .invite-actions-cell form:first-child {
    margin-left: 0;
}

.invite-user-cell strong {
    display: block;
    font-weight: 600;
    color: var(--ink);
}

.invite-user-email {
    display: block;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.invite-status-cell .badge {
    margin-right: 6px;
}

.invite-tag-chip {
    display: inline-block;
    padding: 3px 9px;
    margin: 2px 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--canvas-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    overflow-wrap: anywhere;
}

.invite-user-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--muted);
}

@media (max-width: 767px) {
    .invite-users-table,
    .invite-users-table tbody,
    .invite-users-table tr,
    .invite-users-table td {
        display: block;
        width: 100%;
    }

    .invite-users-table thead {
        display: none;
    }

    .invite-users-table tr {
        position: relative;
        padding: 14px 14px 14px 44px;
        border-bottom: 1px solid var(--line);
    }

    .invite-users-table tr:last-child {
        border-bottom: 0;
    }

    .invite-users-table td {
        padding: 3px 0;
        border: 0;
        text-align: left !important;
    }

    .invite-users-table .invite-select-cell {
        position: absolute;
        top: 16px;
        left: 14px;
        width: auto;
    }

    .invite-users-table .invite-actions-cell {
        margin-top: 8px;
    }

    .invite-users-table .invite-actions-cell .btn {
        width: 100%;
    }
}

/*
=================================================================
27. ASSESSMENT GRID
=================================================================
*/

/* Bootstrap 3 columns are floats, so `gap` does nothing. Space the rows
   explicitly, matching the 30px horizontal gutter between cards. */
.product-grid {
    margin-bottom: -30px;
}

.product-grid > [class*="col-"] {
    margin-bottom: 30px;
}

.product-grid > [class*="col-"] > .product-card {
    margin-bottom: 0;
}

/* Segmented report summary charts */
.summary-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

.summary-chart {
    overflow: hidden;
}

.summary-chart__head {
    margin-bottom: 12px;
}

.summary-chart__head h3 {
    margin: 0 0 4px;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
}

.summary-chart__head p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

.summary-chart__image {
    display: block;
}

.summary-chart img {
    display: block;
    width: 100%;
    height: auto;
}

/*
=================================================================
28. HELP CENTRE
=================================================================
*/

.help-head .page-head__sub {
    max-width: 62ch;
}

.help-quick {
    margin-top: 28px;
}

.help-quick__label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.help-quick__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-aside {
    position: -webkit-sticky;
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.help-toc__title {
    margin: 0 0 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.help-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: help-toc;
}

.help-toc__list li {
    counter-increment: help-toc;
    margin: 0;
}

.help-toc__list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--ink-2);
    text-decoration: none;
    transition: color var(--speed) var(--ease);
}

.help-toc__list a::before {
    content: counter(help-toc, decimal-leading-zero);
    flex: 0 0 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
}

.help-toc__list a:hover,
.help-toc__list a:focus {
    color: var(--accent);
    text-decoration: none;
}

.help-support {
    background: var(--canvas);
}

.help-support__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.help-support__text {
    margin: 0 0 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}

.help-article {
    scroll-margin-top: 100px;
}

.help-article + .help-article {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

.help-article__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.help-article__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-600);
    font-size: 0.8rem;
    font-weight: 700;
}

.help-article__title {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.help-article__intro {
    max-width: 70ch;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-2);
}

.help-steps {
    max-width: 70ch;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: help-step;
}

.help-steps li {
    position: relative;
    min-height: 30px;
    margin: 0 0 16px;
    padding-left: 46px;
    line-height: 1.65;
    color: var(--ink-2);
    counter-increment: help-step;
}

.help-steps li:last-child {
    margin-bottom: 0;
}

.help-steps li::before {
    content: counter(help-step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.help-steps strong {
    color: var(--ink);
    font-weight: 600;
}

.help-figure {
    margin: 26px 0 0;
}

.help-figure__link {
    display: block;
    overflow: hidden;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.help-figure__link:hover,
.help-figure__link:focus {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.help-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.help-figure figcaption {
    margin-top: 10px;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--muted);
}

.help-note {
    max-width: 70ch;
    margin-top: 26px;
    padding: 16px 20px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ink-2);
}

@media (max-width: 991px) {
    .help-aside {
        position: static;
        margin-bottom: 40px;
    }

    .help-toc__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 20px;
    }
}

@media (max-width: 480px) {
    .help-toc__list {
        grid-template-columns: 1fr;
    }

    .help-article + .help-article {
        margin-top: 36px;
        padding-top: 36px;
    }

    .help-article__title {
        font-size: 1.25rem;
    }
}
