/* ================================================================
   RavenX — Brand Stylesheet v7 (Full Technical Audit)
   ================================================================
   Palette   : dull oxblood red, near-black, warm grey, soft white
   Type      : Cormorant Garamond (display) + Inter (body)
   Signature : soft "wing-cut" diagonal clip + restrained glass
               panels on the Index & Dashboard pages only

   CHANGELOG (v6 -> v7) — two applied fixes, rest is audit-only
   (see the audit report delivered alongside this file):
   - Section 9 [CRITICAL FIX]: `minmax(300px, 1fr)` had no upper
     bound below 300px. On a 320px-wide phone, main's padding leaves
     ~288px of content width — less than the 300px floor — so the
     grid track couldn't shrink to fit and overflowed horizontally.
     Restored the `min(300px, 100%)` clamp the pre-v6 file had (as
     `min(260px, 100%)`) so the track shrinks instead of overflowing
     once the viewport can't fit 300px.
   - Section 23 [CRITICAL FIX]: `.nav-toggle-input` was
     `display: none` at every breakpoint, including the 640px range
     where the visible toggle button actually exists. display:none
     removes an element from the tab order entirely in every
     browser, so keyboard-only users had no way to reach or open the
     mobile menu — there was no focusable control behind the icon at
     all. Replaced with the same clip-based visually-hidden pattern
     already used for `.sr-only` (Section 21) at the 640px
     breakpoint specifically, plus a visible focus ring mirrored
     onto the label via `:focus-visible ~`.

   CHANGELOG (v5 -> v6) — full review, no redesign:
   - Section 23 [CRITICAL FIX]: `.nav-toggle-input:checked ~ nav`
     stopped working the moment the toggle moved inside <header> in
     v5 — general sibling combinators require a shared parent, and
     <nav> is a sibling of <header>, not of the input nested inside
     it. The hamburger icon would animate but the menu itself would
     never open. Replaced with `body:has(.nav-toggle-input:checked)
     nav`, matching the :has() pattern already used to hide it.
   - Section 23: removed a dead re-declaration of `order: 2;
     flex-shrink: 0;` on the logo inside the mobile query — both
     were already set unconditionally in Section 3, so the mobile
     copy did nothing but risk drifting out of sync.
   - Section 18: `.form-card` was getting its own backdrop-filter
     blur despite this file's own stated rule that nested surfaces
     reuse a flat fill instead of stacking blur — and a form-card on
     these pages is normally nested inside an already-blurred
     <section>. Dropped the blur so it matches .profile-card /
     .ad-box / .card; removed the now-unnecessary @supports fallback
     entry for it too.
   - No visual/UI changes, no selectors renamed, no markup required
     beyond what v5 already asked for.

   CHANGELOG (v4 -> v5):
   - Section 18: removed the `body.dashboard-page .nav-toggle-btn`
     position:fixed override. It was fighting the flex layout fix
     below by yanking the button back out of the header's flex flow.
   - Section 23: `.nav-toggle-btn` no longer uses position:fixed to
     fake its place next to the logo. It is now a real flex child of
     <header>, positioned with `order` + `flex-shrink: 0`, so it
     stays correctly aligned regardless of header content height.
     REQUIRES a small HTML change — the checkbox + label must move
     to be direct children of <header> (see markup note in the
     section 23 comment block, and dashboard.html).
   - Section 3: no property changes, but `header` is now a 3-item
     flex container on mobile (toggle, header-text, logo) instead of
     2 — noted here since it changes how wrapping behaves at
     <=640px (header-text now goes full-width via order/flex-basis
     defined inside the section 23 media query, so it wraps under
     the toggle+logo row instead of squeezing beside them).

   PRODUCTION NOTES (read once, applies to the whole file):
   - Fonts are NOT @import-ed here anymore (see section 1) — load
     them via <link> in <head> so the browser can fetch them in
     parallel with this stylesheet instead of blocking on it.
   - This file is shipped unminified for readability/maintenance.
     Run it through a build step before deploy (PostCSS + cssnano,
     Lightning CSS, or your bundler's built-in CSS minifier) to strip
     comments/whitespace and autoprefix any additional browser
     targets you support.
   - GPU cost of glassmorphism: backdrop-filter is the single most
     expensive property in this file. It's kept on the three "outer"
     glass surfaces (header, nav, main section) only. Nested cards
     that already sit inside a blurred section reuse a plain
     translucent fill instead of stacking a second blur layer — see
     section 18 for why.
   ================================================================
   TABLE OF CONTENTS
   1.  Fonts & CSS variables
   2.  Reset & base
   3.  Header
   4.  Navigation
   5.  Main / Sections
   6.  Typography helpers
   7.  Buttons
   8.  Form inputs & controls
   9.  Card grids (projects / ads / shop)
   10. UI-concept & shop preview frames
   11. Profile card
   12. Data table
   13. Request / contact form card
   14. Footer & aside
   15. WhatsApp widget
   16. Status utilities
   17. Auth page
   18. Glass hero pages (Index + Dashboard background)
   19. Responsive
   20. Reduced motion / accessibility
   21. Utility classes
   22. Light mode (optional, opt-in)
   23. Hamburger nav (mobile)
   24. Button variants
   25. Form validation states
   26. Table — mobile card fallback
   27. Logout page
   28. Container queries — card grids
   29. Index-page nav (Login / Register buttons, no hamburger)
   30. Receipt / payment card component
   ================================================================ */


/* ================================================================
   1. FONTS & CSS VARIABLES
   ================================================================
   Google Fonts is intentionally NOT @import-ed here — @import blocks
   the CSS parser until it resolves, adding a serial round-trip on
   top of this file's own load. Add these to the <head> of every
   template instead, so fonts fetch in parallel with the stylesheet
   and the page doesn't wait on Google's server before it can start
   rendering:

     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link
       href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600&display=swap"
       rel="stylesheet">

   `display=swap` in that URL is the font-display strategy — text
   renders immediately in the fallback stack below and swaps to the
   webfont once it arrives, avoiding invisible-text flashes (FOIT).
   ================================================================ */

:root {
    --raven-black: #0a0a0a;
    --raven-charcoal: #141414;
    --raven-charcoal-2: #1c1c1c;
    --raven-red: #9c2b36;
    --raven-red-dim: #6e222b;
    --raven-red-glow: rgba(156, 43, 54, 0.22);
    --raven-white: #f2efec;
    --raven-light-grey: #cfcac5;
    --raven-grey: #8a857f;
    --raven-line: rgba(255, 255, 255, 0.07);
    --raven-line-strong: rgba(255, 255, 255, 0.12);

    --glass-fill: rgba(20, 18, 18, 0.42);
    --glass-fill-soft: rgba(20, 18, 18, 0.32);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-blur: 10px;

    --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --space-xs: 8px;
    --space-sm: 14px;
    --space-md: 22px;
    --space-lg: 36px;
    --space-xl: 56px;

    --radius-sm: 3px;
    --radius-md: 6px;
    --wing-cut: polygon(0 0, 100% 0, 100% 93%, 97% 100%, 0 100%);
    --wing-cut-card: polygon(0 0, 100% 0, 100% 95%, 93% 100%, 0 100%);

    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --t-fast: 0.18s;
    --t-med: 0.28s;
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background: var(--raven-black);
    color: var(--raven-white);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ================================================================
   3. HEADER
   ================================================================
   header is a flex container (row, wraps, vertically centered).
   On desktop it holds 2 items: .header-text (order 1) and the logo
   (order 2, pinned right via margin-left:auto).
   On mobile (<=640px) it holds a 3rd item, .nav-toggle-btn — see
   the media query inside Section 23 for how the three are ordered
   and kept in one aligned row.
   ================================================================ */

header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg) 6vw calc(var(--space-lg) + 10px);
    background: linear-gradient(160deg, var(--raven-charcoal) 0%, var(--raven-black) 85%);
    border-bottom: 2px solid var(--raven-red-dim);
    clip-path: var(--wing-cut);
    -webkit-clip-path: var(--wing-cut);
    flex-wrap: wrap;
}

.header-text {
    order: 1;
    flex: 1 1 320px;
    min-width: 0;
}

.header-logo,
header img {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    max-width: 108px;
    height: auto;
    border-radius: var(--radius-md);
    filter: drop-shadow(0 0 10px rgba(156, 43, 54, 0.28));
}

header h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: normal;
    font-size: clamp(1.9rem, 4.2vw, 2.7rem);
    letter-spacing: 0.01em;
    color: var(--raven-white);
    max-width: 760px;
}

header h1::after,
header h3::after {
    content: '';
    display: block;
    width: 64px;
    height: 2px;
    margin-top: 14px;
    background: var(--raven-red);
}

header h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.35rem, 3.2vw, 1.9rem);
    letter-spacing: 0.01em;
    color: var(--raven-white);
    width: 100%;
}

header .header-text p {
    margin: 10px 0 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--raven-grey);
    max-width: 52ch;
}

header .header-text p b {
    color: var(--raven-white);
    font-weight: 600;
}

header h5 {
    margin: 8px 0 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.92rem;
    color: var(--raven-grey);
    width: 100%;
}

header hr {
    width: 100%;
    border: none;
    border-top: 1px solid var(--raven-line);
    margin: 20px 0 0;
}

header .header-text .btn,
header .header-text .btn-primary {
    margin-top: var(--space-sm);
}


/* ================================================================
   4. NAVIGATION
   ================================================================ */

nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-sm) 6vw;
    background: var(--raven-charcoal);
    border-bottom: 1px solid var(--raven-line);
}

nav p {
    margin: 0;
    color: var(--raven-light-grey);
    font-size: 0.88rem;
}

nav a {
    position: relative;
    display: inline-block;
    padding: 9px 20px;
    color: var(--raven-white);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.03em;
    font-size: 0.82rem;
    text-transform: uppercase;
    border: 1px solid var(--raven-line-strong);
    background: var(--raven-black);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

nav a:hover {
    border-color: var(--raven-red);
    color: var(--raven-red);
}

nav form.topnav-form {
    margin-left: auto;
}


/* ================================================================
   5. MAIN / SECTIONS
   ================================================================ */

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl) 6vw;
}

main h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    line-height: 1.35;
    margin-bottom: var(--space-lg);
    color: var(--raven-white);
    border-left: 3px solid var(--raven-red);
    padding-left: var(--space-sm);
}

section {
    position: relative;
    padding: var(--space-md) 0 var(--space-md) var(--space-md);
    margin-bottom: var(--space-lg);
    border-left: 1px solid var(--raven-line);
}

section::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 1px;
    height: 34px;
    background: var(--raven-red);
}

section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: 0.01em;
    margin: 0 0 var(--space-sm);
    color: var(--raven-white);
}

section h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--raven-light-grey);
    margin: 0 0 var(--space-xs);
}

section h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--raven-red);
    margin: 20px 0 10px;
}

section p {
    color: var(--raven-light-grey);
    font-size: 0.98rem;
    max-width: 72ch;
    margin: 0 0 var(--space-sm);
}

section strong {
    color: var(--raven-white);
}

section a {
    color: var(--raven-red);
    text-decoration: none;
    font-weight: 600;
}

section a:hover {
    text-decoration: underline;
}

section hr {
    border: none;
    border-top: 1px solid var(--raven-line);
    margin: var(--space-md) 0;
}

section ul {
    list-style: none;
    margin: var(--space-sm) 0 var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 62ch;
}

section li {
    position: relative;
    padding-left: 22px;
    color: var(--raven-light-grey);
    font-size: 0.95rem;
}

section li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--raven-red);
}


/* ================================================================
   6. TYPOGRAPHY HELPERS
   ================================================================ */

.subtitle {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--raven-light-grey);
}


/* ================================================================
   7. BUTTONS
   ================================================================ */

button,
.btn,
.btn-primary,
input[type="submit"] {
    display: inline-block;
    padding: 11px 26px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--raven-white);
    background: var(--raven-charcoal-2);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease),
        color var(--t-fast) var(--ease),
        background-color var(--t-fast) var(--ease);
}

button:hover,
.btn:hover,
.btn-primary:hover,
input[type="submit"]:hover {
    color: var(--raven-red);
    border-color: var(--raven-red);
    background: var(--raven-charcoal);
}

button:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
input[type="submit"]:focus-visible {
    outline: none;
    border-color: var(--raven-red);
    box-shadow: 0 0 0 3px var(--raven-red-glow);
}


/* ================================================================
   8. FORM INPUTS & CONTROLS
   ================================================================ */

form p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--raven-white);
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    max-width: 500px;
    padding: 11px 15px;
    background: var(--raven-charcoal-2);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-sm);
    color: var(--raven-white);
    font-family: var(--font-body);
    font-size: 0.93rem;
    color-scheme: dark;
    transition: border-color var(--t-fast) var(--ease);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--raven-red);
    outline: none;
    box-shadow: 0 0 0 3px var(--raven-red-glow);
}

label {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--raven-light-grey);
    cursor: pointer;
}

select[multiple] {
    height: auto;
}

select[multiple] option {
    padding: 10px 8px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--raven-line);
}


/* ================================================================
   9. CARD GRIDS (projects / ads / shop)
   ================================================================ */

.container,
.ad-container,
.shop-container {
    display: grid;
    /* auto-fit + larger min column width: fewer, bigger columns that
       collapse/redistribute cleanly instead of leaving narrow gaps */
    /* CRITICAL: minmax(300px, 1fr) alone has no upper bound below
       300px — on a 320px-wide phone, main's padding leaves ~288px
       of content width, less than the 300px floor, so the track
       can't shrink to fit and the grid overflows horizontally. The
       min(300px, 100%) wrapper restores a hard ceiling at 100% of
       the available width, so the track shrinks instead of
       overflowing once the viewport can't fit 300px. Still auto-fit
       (stretches a partial last row) and still 300px on anything
       wide enough to support it. */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.card,
.ad-box,
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
    transition: border-color var(--t-med) var(--ease),
        transform var(--t-med) var(--ease);
}

.card:hover,
.ad-box:hover,
.product-card:hover {
    border-color: var(--raven-red-dim);
    transform: translateY(-3px);
}

.card img,
.ad-box img,
.product-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.card h3,
.product-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--raven-white);
    margin-bottom: 10px;
}

.card p,
.ad-box p,
.product-card p {
    color: var(--raven-light-grey);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.ad-box p {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--raven-red);
    margin: 0;
}

.product-card h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--raven-red);
    margin-bottom: 12px;
}

.product-tag {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--raven-grey);
    margin: -6px 0 10px;
}

.card a.visit-btn,
.product-card button {
    margin-top: auto;
}


/* ================================================================
   10. UI-CONCEPT & SHOP PREVIEW FRAMES
   ================================================================ */

.ad-box .img-zoom-wrap,
.product-card .img-zoom-wrap {
    width: 100%;
    /* was max-width: 320px — raised so posters render larger inside
       the wider grid columns from Section 9 */
    max-width: 480px;
    margin: 0 auto var(--space-sm);
    /* fixed 2:3 poster ratio, unchanged, still the source of truth
       for container shape regardless of container width */
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--raven-charcoal-2);
    border: 1px solid var(--raven-line);
    border-radius: var(--radius-sm);
}

.ad-box .img-zoom-wrap img,
.product-card .img-zoom-wrap img {
    width: 100%;
    height: 100%;
    /* was object-fit: contain — switched to cover so the image
       fills the full 2:3 box with no letterboxing; crops overflow
       instead of padding it, matches "posters" sizing intent */
    object-fit: cover;
    margin-bottom: 0;
}

@media (max-width: 480px) {

    .ad-box .img-zoom-wrap,
    .product-card .img-zoom-wrap {
        /* was max-width: 160px — that hard cap made posters tiny on
           phones; container now scales with its grid column (up to
           the 480px cap above) instead of being clamped small */
        max-width: 100%;
    }
}


/* ================================================================
   11. PROFILE CARD
   ================================================================ */

.profile-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
}

.profile-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--raven-red-dim);
    border-radius: 50%;
}

.profile-info h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--raven-white);
    margin-bottom: 6px;
}

.profile-info .subtitle {
    color: var(--raven-red);
    font-size: 0.85rem;
    margin-bottom: 14px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 560px) {
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}


/* ================================================================
   12. DATA TABLE
   ================================================================ */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--raven-charcoal);
    min-width: 480px;
}

table th,
table td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid var(--raven-line);
    font-size: 0.9rem;
    color: var(--raven-light-grey);
}

table th {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--raven-white);
    background: var(--raven-charcoal-2);
    border-bottom: 2px solid var(--raven-red-dim);
}

table td:first-child {
    font-weight: 600;
    color: var(--raven-red);
    white-space: nowrap;
}

table tr:last-child td {
    border-bottom: none;
}


/* ================================================================
   13. REQUEST / CONTACT-STYLE FORM CARD
   ================================================================ */

.form-card {
    max-width: 560px;
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
}

.form-card form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-card label {
    display: block;
    margin-bottom: 6px;
}

.form-card input,
.form-card select,
.form-card textarea {
    max-width: 100%;
}

.form-card textarea {
    min-height: 110px;
    resize: vertical;
    font-family: var(--font-body);
}

.form-card select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--raven-red) 50%),
        linear-gradient(135deg, var(--raven-red) 50%, transparent 50%);
    background-position: calc(100% - 20px) center, calc(100% - 15px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.form-card button[type="submit"] {
    align-self: flex-start;
    margin-top: 4px;
}


/* ================================================================
   14. FOOTER & ASIDE
   ================================================================ */

footer {
    padding: var(--space-lg) 6vw;
    background: var(--raven-black);
    text-align: center;
    border-top: 1px solid var(--raven-line);
    margin-top: var(--space-xl);
}

footer h5 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--raven-grey);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

aside {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
}

aside h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: var(--raven-white);
}


/* ================================================================
   15. WHATSAPP WIDGET
   ================================================================ */

.whatsapp-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.whatsapp-options {
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    max-width: calc(100vw - 32px);
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.whatsapp-options a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--raven-white);
    text-decoration: none;
    border: 1px solid var(--raven-line);
    background: var(--raven-black);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast) var(--ease);
}

.whatsapp-options a:hover {
    border-color: var(--raven-red);
    color: var(--raven-red);
}

.whatsapp-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2f6b4a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform var(--t-fast) var(--ease);
    will-change: transform;
}

.whatsapp-btn:hover {
    transform: scale(1.06);
}

.whatsapp-btn svg {
    width: 26px;
    height: 26px;
}


/* ================================================================
   16. STATUS UTILITIES
   ================================================================ */

.error-msg,
.error-message {
    border-left: 3px solid var(--raven-red);
    padding-left: 10px;
    color: var(--raven-light-grey);
}

.success-msg,
.success-message {
    border-left: 3px solid #3f6b4f;
    padding-left: 10px;
    color: var(--raven-light-grey);
}


/* ================================================================
   17. AUTH PAGE
   ================================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--raven-black);
}

.auth-page .form-card {
    width: 100%;
    max-width: 420px;
}

.auth-page h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    text-align: center;
    color: var(--raven-white);
    margin-bottom: var(--space-md);
}

.auth-page .form-card button[type="submit"] {
    align-self: stretch;
    text-align: center;
}


/* ================================================================
   18. GLASS HERO PAGES — Index & Dashboard
   ================================================================
   NOTE (v5): the `body.dashboard-page .nav-toggle-btn { position:
   fixed; ... }` override that used to live here has been REMOVED.
   It was re-yanking the toggle button out of header's flex flow
   after Section 23 put it back in — see the Section 23 changelog
   note at the top of this file for the full explanation.
   ================================================================ */

body.index-page,
body.dashboard-page {
    position: relative;
    min-height: 100vh;
    background-color: var(--raven-black);
}

body.index-page::before,
body.dashboard-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(10, 10, 10, 0.74) 0%, rgba(10, 10, 10, 0.9) 100%),
        var(--hero-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

body.index-page>*,
body.dashboard-page>* {
    position: relative;
    z-index: 1;
}

body.index-page header,
body.dashboard-page header {
    background: linear-gradient(160deg, var(--glass-fill) 0%, rgba(10, 10, 10, 0.55) 85%);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

body.index-page nav,
body.dashboard-page nav {
    background: var(--glass-fill-soft);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

body.index-page main section,
body.dashboard-page main section {
    background: var(--glass-fill-soft);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-left: 2px solid var(--raven-red-dim);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
    padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-lg);
}

/* No backdrop-filter here on purpose: a .form-card on these pages
   is almost always nested inside a <section>, which is already
   blurred above. Blurring it a second time stacks GPU cost for no
   visible gain and contradicts the "no stacked blur" rule stated
   at the top of Section 18 — .form-card was the one place that
   rule wasn't actually being followed. It now gets the same flat
   translucent-fill treatment as .profile-card / .ad-box / .card
   just below. (.auth-page's .form-card is unaffected — that page
   never gets the index/dashboard-page class in the first place.) */
body.index-page .form-card,
body.dashboard-page .form-card {
    background: var(--glass-fill-soft);
    border: 1px solid var(--glass-border);
}

body.index-page .profile-card,
body.dashboard-page .profile-card,
body.index-page .ad-box,
body.dashboard-page .ad-box,
body.index-page .card,
body.dashboard-page .card {
    background: var(--glass-fill-soft);
    border: 1px solid var(--glass-border);
}

body.index-page input[type="text"],
body.index-page input[type="email"],
body.index-page input[type="password"],
body.index-page input[type="url"],
body.index-page input[type="number"],
body.index-page textarea,
body.index-page select,
body.dashboard-page input[type="text"],
body.dashboard-page input[type="email"],
body.dashboard-page input[type="password"],
body.dashboard-page input[type="url"],
body.dashboard-page input[type="number"],
body.dashboard-page textarea,
body.dashboard-page select {
    background: rgba(10, 10, 10, 0.4);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {

    body.index-page header,
    body.dashboard-page header,
    body.index-page nav,
    body.dashboard-page nav,
    body.index-page main section,
    body.dashboard-page main section {
        background: rgba(12, 12, 12, 0.85);
    }

    /* .form-card intentionally omitted — it no longer uses
       backdrop-filter (see Section 18 note), so its normal
       var(--glass-fill-soft) fill already works with zero
       backdrop-filter support, no fallback needed. */
}


/* ================================================================
   19. RESPONSIVE
   ================================================================ */

@media (max-width: 600px),
(pointer: coarse) {
    :root {
        --glass-blur: 6px;
    }
}

@media (max-width: 1024px) {
    main {
        padding: var(--space-lg) 5vw;
    }
}

@media (max-width: 640px) {
    header {
        padding: var(--space-md) 5vw var(--space-lg);
    }

    main {
        padding: var(--space-lg) 5vw;
    }

    .header-logo,
    header img {
        max-width: 80px;
    }

    header .header-text .btn,
    header .header-text .btn-primary {
        display: block;
        width: 100%;
        text-align: center;
    }

    nav p {
        text-align: center;
    }

    nav a {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    nav form.topnav-form {
        margin-left: 0;
        width: 100%;
    }

    nav form.topnav-form button {
        width: 100%;
    }

    .card a.visit-btn,
    .product-card button,
    .form-card button[type="submit"] {
        width: 100%;
        text-align: center;
        align-self: stretch;
    }

    .whatsapp-container {
        right: 16px;
        bottom: 16px;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 420px) {

    button,
    .btn,
    .btn-primary,
    input[type="submit"] {
        width: 100%;
        text-align: center;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .profile-photo {
        width: 64px;
        height: 64px;
    }

    body.index-page main section,
    body.dashboard-page main section {
        padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-md);
    }
}


/* ================================================================
   20. REDUCED MOTION / ACCESSIBILITY
   ================================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --raven-line: rgba(255, 255, 255, 0.18);
        --raven-line-strong: rgba(255, 255, 255, 0.3);
        --glass-border: rgba(255, 255, 255, 0.24);
    }
}

:focus-visible {
    outline: 2px solid var(--raven-red);
    outline-offset: 2px;
}


/* ================================================================
   21. UTILITY CLASSES
   ================================================================ */

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.grid {
    display: grid;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

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

.full-width {
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ================================================================
   22. LIGHT MODE (optional, opt-in only)
   ================================================================ */

[data-theme="light"] {
    --raven-black: #f4f2f0;
    --raven-charcoal: #ffffff;
    --raven-charcoal-2: #ececec;
    --raven-white: #171412;
    --raven-light-grey: #3a3632;
    --raven-grey: #6b655e;
    --raven-line: rgba(0, 0, 0, 0.08);
    --raven-line-strong: rgba(0, 0, 0, 0.14);
}

/* ================================================================
   23. HAMBURGER NAV (mobile)
   ================================================================
   Checkbox-hack toggle — no JS dependency, works even if script.js
   fails to load.

   v5 CHANGE: the checkbox + label are now DIRECT CHILDREN OF
   <header>, placed first, immediately before .header-text:

     <header>
       <input type="checkbox" id="nav-toggle" class="nav-toggle-input">
       <label for="nav-toggle" class="nav-toggle-btn" aria-label="Menu">
         <span></span><span></span><span></span>
       </label>
       <div class="header-text"> ...unchanged... </div>
       <img ... class="header-logo">
     </header>
     <nav> ...existing nav content unchanged... </nav>

   Being real flex children of <header> (which already has
   align-items: center from Section 3) means the toggle and the logo
   line up correctly on their own — no more hardcoded
   position:fixed coordinates guessing where the header happens to
   be. `order` below controls left/right placement instead.

   `.nav-toggle-input` and `.nav-toggle-btn` are both display:none
   above 640px, so on desktop they take up no visual space and don't
   affect the existing header layout.
   ================================================================ */

.nav-toggle-input {
    /* Hidden and out of the tab order above 640px — there's no
       visible toggle button at that width (.nav-toggle-btn is
       display:none there too), so nothing to operate. It becomes
       focusable again inside the 640px media query below, where
       the toggle button is actually visible and needed. */
    display: none;
}

.nav-toggle-btn {
    display: none;
    width: 52px;
    height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle-btn span {
    width: 24px;
    height: 3px;
    background: var(--raven-white);
    transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.nav-toggle-input:checked~.nav-toggle-btn span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle-input:checked~.nav-toggle-btn span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-input:checked~.nav-toggle-btn span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 640px) {

    /* Was display:none at this breakpoint too, same as above —
       that's the actual keyboard-accessibility bug. A display:none
       checkbox is removed from the accessibility tree AND the tab
       order in every browser, so a keyboard-only user had no way to
       reach or open this menu at all: no visible affordance ever
       receives focus. This reuses the same clip-based technique as
       .sr-only (Section 21) instead — visually invisible, but still
       focusable and operable with Space/Enter like any checkbox.
       The label (.nav-toggle-btn) is what's actually painted; this
       just makes sure something real sits behind it for a keyboard
       user to land on. */
    .nav-toggle-input {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Without this, tabbing to the (invisible) checkbox gives no
       on-screen indication of focus at all — the global
       :focus-visible rule (Section 20) can't help since it's the
       checkbox, not the label, that receives focus. Mirrors it onto
       the visible label instead. */
    .nav-toggle-input:focus-visible~.nav-toggle-btn {
        outline: 2px solid var(--raven-red);
        outline-offset: 2px;
    }

    /* Hamburger becomes visible and joins the header's flex row */
    .nav-toggle-btn {
        display: flex;
        order: 1;
        flex-shrink: 0;
    }

    /* Logo needs no override here — order:2, flex-shrink:0 and
       margin-left:auto are already set unconditionally in Section 3
       and apply at every breakpoint. Restating them in this query
       was dead weight (same values, same selector target). */

    /* Title/greeting/etc. drops to its own full-width line below
       the toggle+logo row instead of squeezing beside them —
       header's flex-wrap (Section 3) makes this basis-100% item
       wrap on its own automatically. */
    header .header-text {
        order: 3;
        flex: 1 1 100%;
    }

    /* Scoped with :has() so only pages that actually ship the
       checkbox/label toggle get their <nav> collapsed. Templates
       with a plain <nav> and no toggle markup (contact, admin
       panel, generate-quote, shop) keep their nav always visible
       and simply wrap — collapsing it here with no way to reopen
       it was a real bug, not a style choice. */
    body:has(.nav-toggle-input) nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    /* NOTE: was `.nav-toggle-input:checked ~ nav { display: flex; }`.
       That relied on the general sibling combinator, which only
       matches elements sharing the same parent. Since the alignment
       fix moved .nav-toggle-input to live INSIDE <header> while
       <nav> is a sibling of <header> itself (not of the input),
       that selector silently stopped matching — the menu would open
       visually (icon animates) but the nav panel would never show.
       :has() doesn't have that constraint, so it's used here too,
       mirroring the hide-rule immediately above. */
    body:has(.nav-toggle-input:checked) nav {
        display: flex;
    }
}


/* ================================================================
   24. BUTTON VARIANTS
   ================================================================
   .btn / .btn-primary / input[type="submit"] keep their existing
   look (section 7) as the default/primary style. These two are new.
   ================================================================ */

.btn-secondary {
    background: transparent;
    border: 1px solid var(--raven-red-dim);
    color: var(--raven-light-grey);
}

.btn-secondary:hover {
    border-color: var(--raven-red);
    color: var(--raven-red);
    background: var(--raven-charcoal-2);
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--raven-light-grey);
    padding-left: 10px;
    padding-right: 10px;
}

.btn-ghost:hover {
    color: var(--raven-red);
    background: var(--raven-line);
}

button:disabled,
.btn:disabled,
input[type="submit"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}


/* ================================================================
   25. FORM VALIDATION STATES
   ================================================================
   Uses [aria-invalid] rather than :invalid alone — :invalid fires
   the instant a required field is empty on page load, before the
   user has touched it, which reads as "you already got it wrong."
   Set aria-invalid="true" via JS/template logic only after a failed
   submit or on blur, and this styling picks it up correctly either
   way (also matches :invalid as a plain-HTML fallback with no JS).
   ================================================================ */

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: var(--raven-red);
    box-shadow: 0 0 0 1px var(--raven-red-glow);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: rgba(63, 107, 79, 0.6);
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--raven-red);
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--raven-grey);
}


/* ================================================================
   26. TABLE — MOBILE CARD FALLBACK
   ================================================================
   Below 560px the table drops horizontal scroll and reflows each
   row into its own stacked card. Requires a data-label attribute on
   every <td> matching its column header, since CSS can't read <th>
   text at that point:

     <td data-label="Order ID">{{ order.id }}</td>

   Existing markup with no data-label attributes still gets the
   horizontal-scroll behavior from section 12 unchanged — this is
   additive, not a breaking requirement.
   ================================================================ */

@media (max-width: 560px) {
    .table-wrap.stack-on-mobile {
        overflow-x: visible;
        border: none;
        clip-path: none;
        -webkit-clip-path: none;
    }

    .table-wrap.stack-on-mobile table,
    .table-wrap.stack-on-mobile thead,
    .table-wrap.stack-on-mobile tbody,
    .table-wrap.stack-on-mobile tr,
    .table-wrap.stack-on-mobile td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-wrap.stack-on-mobile thead {
        display: none;
    }

    .table-wrap.stack-on-mobile tr {
        margin-bottom: var(--space-sm);
        background: var(--raven-charcoal);
        border: 1px solid var(--raven-line-strong);
        border-radius: var(--radius-md);
        overflow: hidden;
    }

    .table-wrap.stack-on-mobile td {
        display: flex;
        justify-content: space-between;
        gap: var(--space-sm);
        text-align: right;
        border-bottom: 1px solid var(--raven-line);
    }

    .table-wrap.stack-on-mobile td:last-child {
        border-bottom: none;
    }

    .table-wrap.stack-on-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        color: var(--raven-red);
        text-align: left;
    }
}


/* ================================================================
   27. LOGOUT PAGE
   ================================================================
   logout.html was the one template with zero connection to this
   design system — inline `style="text-align:center; font-family:
   Arial;"` on <body>, no brand type, no dark background. This gives
   it a real component instead: reuses the .auth-page centering
   pattern (section 17) so it visually matches login/register rather
   than flashing an unstyled white page on the way out.

   Markup:
     <body class="logout-page">
       <div class="logout-card">
         <img src="..." class="logout-logo" alt="RavenX Logo">
         <h2>You have successfully logged out</h2>
         <p>Visit again 👋</p>
         <a href="{{ url_for('auth.login') }}" class="btn btn-secondary">
           Back to Login
         </a>
       </div>
     </body>

   The auto-redirect meta refresh in <head> is left as-is server-side
   (it's markup, not styling) — this only fixes what the page looks
   like during the 2 seconds before it fires.
   ================================================================ */

.logout-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--raven-black);
    text-align: center;
}

.logout-card {
    width: 100%;
    max-width: 420px;
    background: var(--raven-charcoal);
    border: 1px solid var(--raven-line-strong);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    clip-path: var(--wing-cut-card);
    -webkit-clip-path: var(--wing-cut-card);
}

.logout-logo {
    width: 96px;
    height: auto;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-md);
    filter: drop-shadow(0 0 10px rgba(156, 43, 54, 0.28));
}

.logout-card h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--raven-white);
    margin-bottom: 10px;
}

.logout-card p {
    color: var(--raven-light-grey);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.logout-card .btn,
.logout-card .btn-secondary {
    width: 100%;
    text-align: center;
}


/* ================================================================
   28. CONTAINER QUERIES — card grids
   ================================================================
   Progressive enhancement, not a replacement for section 9's
   auto-fill grid (which already handles most cases well on its
   own). This lets a .card-grid-container react to the width of its
   own wrapper rather than the viewport — useful once/if a card grid
   ever sits in a narrower context than full page width (a sidebar,
   a modal). No-op today since nothing currently nests grids that
   way; safe to leave in for when it's needed, unsupported browsers
   just ignore the block and keep the default grid from section 9.
   ================================================================ */

.card-grid-container {
    container-type: inline-size;
}

@container (max-width: 480px) {

    .card-grid-container .card,
    .card-grid-container .ad-box,
    .card-grid-container .product-card {
        padding: var(--space-sm);
    }
}


/* ================================================================
   29. INDEX-PAGE NAV — Login / Register groups, no hamburger
   ================================================================
   index.html does not ship the checkbox+label hamburger markup at
   all (Section 23). Instead each CTA sits inside its own group with
   a short line of context above it ("Already part of the RavenX
   family?" / "New here?") — both groups always visible, at every
   breakpoint. This overrides the default <nav> layout (section 4);
   the glass treatment it inherits from section 18 stays intact.
   ================================================================ */

body.index-page nav.index-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    padding: var(--space-md) 6vw;
}

.index-nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.index-nav-group p {
    margin: 0;
    color: var(--raven-light-grey);
    font-size: 0.85rem;
    max-width: 26ch;
}

body.index-page nav.index-nav .btn-primary,
body.index-page nav.index-nav .btn-secondary {
    min-width: 160px;
    text-align: center;
}

/* Belt-and-braces: even if a hamburger toggle is ever reintroduced
   into index.html by mistake, keep it hidden on this page so the
   direct buttons are never accidentally collapsed behind it. */
body.index-page .nav-toggle-btn,
body.index-page .nav-toggle-input {
    display: none !important;
}

@media (max-width: 640px) {
    body.index-page nav.index-nav {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md) 5vw;
    }

    .index-nav-group {
        width: 100%;
    }

    body.index-page nav.index-nav .btn-primary,
    body.index-page nav.index-nav .btn-secondary {
        width: 100%;
    }
}


/* ================================================================
   30. RECEIPT / PAYMENT CARD COMPONENT
   ================================================================
   Used by payment.html, quote_checkout.html, download.html, and
   success.html — each renders a single <div class="card"> as a
   direct child of <body> (no <main> wrapper). That's a different
   context from the project tiles in section 9, which are `.card`
   elements nested inside `.container` on the dashboard. Same class
   name, two jobs — scoped apart here with `body > .card` so the two
   never collide.

   `body:has(> .card)` centers the whole page around it, the same
   way `.auth-page` centers the login/register form-card — no extra
   body class needed on these four templates for that to work.
   ================================================================ */

body:has(> .card) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

body>.card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* The project-tile .card in section 9 lifts on hover since it sits
   in a clickable grid; a static receipt panel shouldn't move under
   the cursor, so cancel that here. */
body>.card:hover {
    transform: none;
    border-color: var(--raven-line-strong);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--raven-line);
}

.eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--raven-red);
}

.brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--raven-white);
}

.card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.product-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--raven-line);
}

.product-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--raven-grey);
    margin-bottom: 4px;
}

.product-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--raven-white);
    max-width: 32ch;
}

.price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--raven-red);
    text-align: right;
}

.price-sub {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--raven-grey);
    text-align: right;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: var(--space-xs) 0 0;
}

.meta-item {
    position: relative;
    padding-left: 18px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--raven-light-grey);
    word-break: break-word;
}

.meta-item::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--raven-red);
}

.secure-note {
    margin-top: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--raven-grey);
    text-align: center;
    word-break: break-word;
}

.pay-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-top: var(--space-xs);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--raven-white);
    background: var(--raven-charcoal-2);
    border: 1px solid var(--raven-red-dim);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.pay-btn:hover {
    color: var(--raven-red);
    border-color: var(--raven-red);
}

.pay-btn:focus-visible {
    outline: none;
    border-color: var(--raven-red);
    box-shadow: 0 0 0 3px var(--raven-red-glow);
}

/* The Razorpay button rendered by checkout.js into payment.html's
   <form> is unstyled by the library itself — give it the same look
   as the rest of the button family so it doesn't stand out as a
   raw, unstyled <button>. */
#razorpay-payment-button {
    display: inline-block;
    padding: 11px 26px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--raven-white);
    background: var(--raven-charcoal-2);
    border: 1px solid var(--raven-line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

#razorpay-payment-button:hover {
    color: var(--raven-red);
    border-color: var(--raven-red);
}

@media (max-width: 640px) {
    body:has(> .card) {
        padding: var(--space-sm);
    }

    body>.card {
        padding: var(--space-md);
    }
}

/* On the narrowest phones, right-aligned price stacked under a
   long product name reads awkwardly — let it drop to full width
   and left-align instead of clinging to the right edge. */
@media (max-width: 380px) {
    .product-row {
        flex-direction: column;
    }

    .price,
    .price-sub {
        text-align: left;
    }
}