
/* =========================================
   SSAQR TECH — RESPONSIVE DESIGN SYSTEM
   ========================================= */

:root {
    --ink: #0e0f11;
    --surface: #1a1b1d;
    --cream: #f5ede1;
    --gold: #d8c9b4;
    --brass: #c6a476;
    --border: #46413a;
}

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

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

body {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}

img,
svg,
video {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-underline-offset: 4px;
}

a:hover {
    color: var(--brass);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    outline-offset: 4px;
}

:focus-visible {
    outline: 2px solid var(--brass);
}

.shell {
    width: min(1200px, calc(100% - 64px));
    margin-inline: auto;
    min-width: 0;
}

/* =========================================
   NAVIGATION
   ========================================= */

header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid #353331;
    background: var(--ink);
}

.nav {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: .13em;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.brand small {
    font-size: .7em;
    color: var(--brass);
}

.links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.links a {
    text-decoration: none;
    font-size: 14px;
}

.links form {
    margin: 0;
}

.lang,
.menu {
    background: transparent;
    border: 1px solid transparent;
    color: inherit;
    cursor: pointer;
    min-height: 44px;
    padding: 8px 12px;
}

.menu {
    display: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */

h1,
h2,
h3,
p {
    margin-top: 0;
    overflow-wrap: break-word;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(36px, 6.5vw, 96px);
    margin-bottom: 28px;
}

h2 {
    font-size: clamp(28px, 4.5vw, 62px);
    margin-bottom: 32px;
}

h3 {
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.3;
    font-weight: 550;
}

.eyebrow {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .18em;
    color: var(--brass);
    margin-bottom: 24px;
}

.dot {
    display: inline-block;
    background: var(--brass);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-inline-end: 8px;
}

.lead {
    font-size: clamp(16px, 2vw, 22px);
    color: var(--gold);
    max-width: 650px;
}

/* =========================================
   HERO
   ========================================= */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
    min-height: 620px;
    padding-block: 80px;
}

.hero > * {
    min-width: 0;
}

.hero-art {
    aspect-ratio: 1.2;
    position: relative;
    display: grid;
    place-items: center;
    background: var(--ink);
    overflow: hidden;
    width: 100%;
}

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.orbit,
.hero-art .orbit {
    display: none;
}

.art-label {
    position: absolute;
    bottom: 6%;
    font: 10px monospace;
    letter-spacing: .15em;
    color: var(--brass);
}

/* =========================================
   BUTTONS
   ========================================= */

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.button,
.outline,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 22px;
    min-height: 44px;
    border: 1px solid var(--brass);
    border-radius: 3px;
    text-decoration: none;
    text-align: center;
    background: var(--cream);
    color: var(--ink);
    font-weight: 650;
    cursor: pointer;
    max-width: 100%;
    transition: transform .2s, background .2s;
}

.button:hover,
button:hover {
    background: var(--gold);
    color: var(--ink);
}

.button.small {
    padding: 10px 15px;
}

.outline {
    background: transparent;
    color: var(--cream);
}

.outline.dark {
    color: var(--ink);
}

.darkbutton {
    background: var(--ink);
    color: var(--cream);
}

/* =========================================
   TECHNOLOGY STRIP
   ========================================= */

.tech-strip {
    border-block: 1px solid #353331;
    padding-block: 24px;
    color: var(--gold);
    font-size: 13px;
    letter-spacing: .12em;
}

.tech-strip .shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 18px;
    flex-wrap: wrap;
}

/* =========================================
   SECTIONS AND SERVICE CARDS
   ========================================= */

.section {
    padding-block: clamp(44px, 7vw, 85px);
}

.cream {
    background: var(--cream);
    color: var(--ink);
}

.cream .eyebrow,
.cream .index {
    color: #735536;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.service-card,
.panel {
    padding: clamp(20px, 2.5vw, 32px);
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    min-width: 0;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    transition: transform .2s, border-color .2s;
}

.service-card:hover {
    border-color: var(--brass);
    color: inherit;
}

.cream .service-card {
    background: #efe4d5;
    border-color: #d8c9b4;
}

.service-card h3 {
    margin-bottom: 18px;
}

.service-card p {
    font-size: 15px;
    opacity: .85;
    line-height: 1.7;
    margin-bottom: 20px;
}

.index {
    display: block;
    color: var(--brass);
    font-size: 12px;
    margin-bottom: 24px;
}

.arrow {
    display: block;
    text-align: end;
    color: var(--brass);
    font-size: 24px;
    margin-top: auto;
}

.cards + p {
    margin-top: 28px;
    margin-bottom: 0;
}

/* =========================================
   APPROACH
   ========================================= */

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.steps div {
    min-width: 0;
    border-top: 1px solid var(--brass);
    padding-top: 24px;
}

.steps span {
    color: var(--brass);
}

/* =========================================
   CALL TO ACTION
   ========================================= */

.cta {
    padding-block: clamp(40px, 6vw, 70px);
}

.cta .shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cta h2 {
    margin: 0;
    min-width: 0;
}

.cta .button {
    flex-shrink: 0;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    padding-block: 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--gold);
    font-size: 14px;
}

.footer > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* =========================================
   CONTACT AND FORMS
   ========================================= */

.narrow {
    max-width: 800px;
}

.contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.contact > * {
    min-width: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.panel label {
    font-size: 14px;
}

.panel input:not([type=checkbox]),
.panel select,
.panel textarea,
.filters input,
.filters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 12px;
    color: var(--cream);
    background: #111214;
    border: 1px solid #68605a;
    border-radius: 3px;
    font-size: 16px;
}

.panel textarea {
    min-height: 130px;
    resize: vertical;
}

.panel input[type=checkbox] {
    accent-color: var(--brass);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.validation {
    color: #ffb6a8;
    overflow-wrap: anywhere;
}

.prose {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.trap,
.skip:not(:focus) {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip:focus {
    position: absolute;
    z-index: 100;
    padding: 12px;
    background: var(--cream);
    color: var(--ink);
}

/* =========================================
   ADMIN DASHBOARD
   ========================================= */

.admin {
    min-width: 0;
}

.admin h1 {
    font-size: clamp(30px, 5vw, 52px);
}

.adminnav,
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 35px;
}

.filters input,
.filters select {
    width: auto;
    max-width: 100%;
}

.tablewrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
}

th,
td {
    padding: 12px;
    text-align: start;
    border-bottom: 1px solid #49433c;
}

/* =========================================
   ARABIC / RTL
   ========================================= */

html[dir=rtl] h1,
html[dir=rtl] h2 {
    font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0;
    line-height: 1.3;
}

html[dir=rtl] .eyebrow {
    letter-spacing: 0;
}

html[dir=rtl] .brand,
html[dir=rtl] .index,
html[dir=rtl] .tech-strip {
    direction: ltr;
}

html[dir=rtl] .index {
    text-align: right;
}

/* =========================================
   TABLETS AND SMALL LAPTOPS
   ========================================= */

@media (max-width: 1100px) {

    .shell {
        width: calc(100% - 48px);
    }

    .nav {
        min-height: 76px;
    }

    .menu {
        display: inline-flex;
        border: 1px solid var(--brass);
        border-radius: 3px;
    }

    .links {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        z-index: 30;
        background: var(--surface);
        padding: 20px 24px;
        border-bottom: 1px solid var(--brass);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        max-height: 75vh;
        overflow-y: auto;
    }

    .links.open {
        display: flex;
    }

    .links a {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }

    .links .lang,
    .links .button {
        width: 100%;
    }

    .hero {
        min-height: 520px;
        padding-block: 60px;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   MOBILE AND PORTRAIT TABLETS
   ========================================= */

@media (max-width: 767px) {

    .shell {
        width: calc(100% - 36px);
    }

    .nav {
        min-height: 72px;
        gap: 12px;
    }

    .brand {
        font-size: 14px;
        gap: 8px;
    }

    .brand img {
        width: 36px;
        height: 36px;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        padding-block: 44px;
        gap: 28px;
    }

    h1 {
        font-size: clamp(34px, 8vw, 54px);
        margin-bottom: 20px;
    }

    h2 {
        font-size: clamp(28px, 6vw, 42px);
        margin-bottom: 24px;
    }

    .hero-art {
        max-width: 440px;
        margin-inline: auto;
    }

    .eyebrow {
        margin-bottom: 16px;
    }

    .actions {
        margin-top: 24px;
    }

    .tech-strip {
        padding-block: 18px;
        font-size: 11px;
    }

    .tech-strip .shell {
        justify-content: center;
        gap: 10px 14px;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .contact {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .cta .shell,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .adminnav,
    .filters {
        gap: 10px;
        margin-bottom: 24px;
    }
}

/* =========================================
   SMALL MOBILE PHONES
   ========================================= */

@media (max-width: 520px) {

    .shell {
        width: calc(100% - 32px);
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .hero {
        padding-block: 36px;
        gap: 22px;
    }

    .hero-art {
        max-width: 340px;
    }

    .service-card {
        min-height: auto;
        padding: 22px;
    }

    .service-card h3 {
        font-size: 21px;
    }

    .service-card .index {
        margin-bottom: 16px;
    }

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

    .actions .button,
    .actions .outline,
    .cta .button {
        width: 100%;
    }

    .panel {
        padding: 18px;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    .filters button {
        width: 100%;
    }

    .footer {
        padding-block: 30px;
    }

    th,
    td {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {

    .shell {
        width: calc(100% - 24px);
    }

    .brand {
        font-size: 12px;
        letter-spacing: .08em;
    }

    .brand img {
        width: 30px;
        height: 30px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
    }

    .steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-card {
        padding: 18px;
    }
}

/* =========================================
   ACCESSIBILITY AND INTERACTIONS
   ========================================= */

@media (hover: hover) and (pointer: fine) {

    .service-card:hover {
        transform: translateY(-4px);
    }

    .button:hover {
        transform: translateY(-2px);
    }
}

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

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
/* =========================================
   ARABIC RTL RESPONSIVE CORRECTIONS
   ========================================= */

html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    font-family: Tahoma, Arial, "Segoe UI", sans-serif;
    text-align: right;
    line-height: 1.8;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
    font-family: Tahoma, Arial, "Segoe UI", sans-serif;
    letter-spacing: 0;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

html[dir="rtl"] .hero > *,
html[dir="rtl"] .cards > *,
html[dir="rtl"] .contact > *,
html[dir="rtl"] .steps > *,
html[dir="rtl"] .footer > * {
    min-width: 0;
    max-width: 100%;
}

html[dir="rtl"] .brand {
    direction: ltr;
    flex-shrink: 1;
}

html[dir="rtl"] .service-card {
    text-align: right;
}

html[dir="rtl"] .service-card p {
    line-height: 1.9;
    overflow-wrap: anywhere;
}

html[dir="rtl"] .button,
html[dir="rtl"] .outline,
html[dir="rtl"] .lang {
    white-space: normal;
    overflow-wrap: anywhere;
    letter-spacing: 0;
}

html[dir="rtl"] .arrow {
    direction: ltr;
    text-align: left;
    transform: none;
}

html[dir="rtl"] .panel,
html[dir="rtl"] .panel input,
html[dir="rtl"] .panel textarea {
    text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"] {
    direction: ltr;
    text-align: left;
}

/* Arabic tablet layout */

@media (max-width: 1100px) {

    html[dir="rtl"] .hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        padding-block: 48px;
    }

    html[dir="rtl"] .hero-art {
        max-width: 440px;
        margin-inline: auto;
    }

    html[dir="rtl"] .links {
        direction: rtl;
        text-align: right;
    }

    html[dir="rtl"] .nav {
        gap: 12px;
    }
}

/* Arabic mobile layout */

@media (max-width: 767px) {

    html[dir="rtl"] .shell {
        width: calc(100% - 32px);
        max-width: 100%;
    }

    html[dir="rtl"] h1 {
        font-size: clamp(28px, 7.5vw, 42px);
        line-height: 1.45;
    }

    html[dir="rtl"] h2 {
        font-size: clamp(24px, 6vw, 34px);
    }

    html[dir="rtl"] h3 {
        font-size: 20px;
    }

    html[dir="rtl"] .lead {
        font-size: 16px;
        line-height: 1.9;
    }

    html[dir="rtl"] .hero {
        gap: 24px;
        padding-block: 32px;
    }

    html[dir="rtl"] .hero-art {
        width: 100%;
        max-width: 340px;
    }

    html[dir="rtl"] .cards,
    html[dir="rtl"] .contact {
        grid-template-columns: minmax(0, 1fr);
    }

    html[dir="rtl"] .service-card {
        width: 100%;
        min-height: auto;
        padding: 20px;
    }

    html[dir="rtl"] .actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    html[dir="rtl"] .actions > a,
    html[dir="rtl"] .cta .button {
        width: 100%;
    }

    html[dir="rtl"] .cta .shell,
    html[dir="rtl"] .footer {
        flex-direction: column;
        align-items: stretch;
    }

    html[dir="rtl"] .tech-strip .shell {
        justify-content: center;
        font-size: 10px;
        letter-spacing: .05em;
    }

    html[dir="rtl"] .section {
        padding-block: 40px;
    }

    html[dir="rtl"] .brand {
        font-size: 13px;
        gap: 8px;
    }

    html[dir="rtl"] .brand img {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    html[dir="rtl"] .menu {
        flex-shrink: 0;
        padding: 8px 12px;
    }
}

/* Very small Arabic mobile screens */

@media (max-width: 380px) {

    html[dir="rtl"] .shell {
        width: calc(100% - 24px);
    }

    html[dir="rtl"] h1 {
        font-size: 28px;
    }

    html[dir="rtl"] h2 {
        font-size: 24px;
    }

    html[dir="rtl"] .steps {
        grid-template-columns: minmax(0, 1fr);
    }

    html[dir="rtl"] .brand {
        font-size: 11px;
    }

    html[dir="rtl"] .panel,
    html[dir="rtl"] .service-card {
        padding: 16px;
    }
}

/* =========================================
   SSAQR TECH — ANALYTICS CONSENT
   ========================================= */

.analytics-consent-banner {
    position: fixed;
    inset-inline-start: 24px;
    bottom: 24px;
    z-index: 1000;
    width: min(440px, calc(100% - 48px));
    box-sizing: border-box;
    background: #f5f1e8;
    color: #242628;
    border: 1px solid #b6a17c;
    border-radius: 12px;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.12);
}

.analytics-consent-content {
    padding: 24px;
}

.analytics-consent-eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: #71634b;
    margin-bottom: 14px;
}

.analytics-consent-banner h2 {
    margin: 0 0 12px;
    color: #242628;
    font-size: 23px;
    line-height: 1.35;
}

.analytics-consent-banner p {
    margin: 0 0 20px;
    color: #55534e;
    font-size: 14px;
    line-height: 1.75;
}

.analytics-consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
}

    .analytics-consent-actions button {
        flex: 1 1 140px;
        min-height: 44px;
        padding: 11px 14px;
        border: 1px solid #242628;
        border-radius: 6px;
        background: #242628;
        color: #f5f1e8;
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 150ms ease;
    }

        .analytics-consent-actions button:hover {
            background: #44464a;
        }

        .analytics-consent-actions button:focus-visible {
            outline: 3px solid #8a744f;
            outline-offset: 3px;
        }

.analytics-consent-policy {
    font-size: 12px;
    color: #71634b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.analytics-preferences {
    margin-block: 40px;
    padding: 24px;
    border: 1px solid #b6a17c;
    border-radius: 10px;
    scroll-margin-top: 100px;
}

.analytics-preferences-status {
    margin-block: 16px;
}

.analytics-preferences .analytics-consent-actions {
    max-width: 440px;
}

@media (max-width: 600px) {
    .analytics-consent-banner {
        inset-inline-start: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .analytics-consent-content {
        padding: 20px;
    }

    .analytics-consent-banner h2 {
        font-size: 20px;
    }

    .analytics-consent-banner p {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .analytics-consent-actions button {
        transition: none;
    }
}

/* SSAQR TECH — ADMIN ANALYTICS */

.analytics-dashboard {
    --analytics-gold: #b69a5b;
    --analytics-border: #d6cbb7;
    --analytics-muted: #756f65;
    --analytics-panel: #faf7f0;
    --analytics-ink: #242628;
}

.analytics-heading {
    margin-block: 32px;
}

    .analytics-heading h1 {
        margin-block: 8px 16px;
    }

    .analytics-heading small,
    .analytics-muted {
        color: var(--analytics-muted);
    }

.analytics-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analytics-period {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--analytics-border);
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
}

    .analytics-period.active {
        background: var(--analytics-ink);
        color: #f5f1e8;
        border-color: var(--analytics-ink);
    }

.analytics-date-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin: 0;
}

    .analytics-date-form label {
        display: flex;
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }

    .analytics-date-form input {
        min-width: 145px;
    }

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.analytics-kpi {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: var(--analytics-panel);
    border: 1px solid var(--analytics-border);
    border-radius: 8px;
    color: var(--analytics-ink);
}

    .analytics-kpi span {
        font-size: 13px;
        color: var(--analytics-muted);
    }

    .analytics-kpi strong {
        font-size: 30px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.04em;
    }

.analytics-panel {
    min-width: 0;
    padding: 24px;
    margin-bottom: 20px;
    background: var(--analytics-panel);
    border: 1px solid var(--analytics-border);
    border-radius: 8px;
    color: var(--analytics-ink);
}

    .analytics-panel h2 {
        margin: 0 0 20px;
        font-size: 20px;
    }

.analytics-chart-scroll {
    overflow-x: auto;
}

.analytics-traffic-chart {
    display: block;
    width: 100%;
    min-width: 500px;
    height: auto;
}

.analytics-chart-grid {
    stroke: #d6cbb7;
    stroke-width: 0.75px;
}

.analytics-chart-label {
    font-size: 11px;
    fill: #756f65;
}

.analytics-chart-bar {
    fill: var(--analytics-gold);
}

    .analytics-chart-bar:hover {
        fill: #806a3c;
    }

.analytics-daily-details {
    margin-top: 18px;
}

    .analytics-daily-details summary {
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
    }

.analytics-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.analytics-breakdown-row {
    margin-block: 16px;
}

.analytics-breakdown-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

    .analytics-breakdown-label strong {
        font-variant-numeric: tabular-nums;
    }

.analytics-breakdown-row progress {
    display: block;
    width: 100%;
    height: 8px;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    accent-color: var(--analytics-gold);
    background: #e8e0d2;
}

    .analytics-breakdown-row progress::-webkit-progress-bar {
        background: #e8e0d2;
    }

    .analytics-breakdown-row progress::-webkit-progress-value {
        background: var(--analytics-gold);
    }

    .analytics-breakdown-row progress::-moz-progress-bar {
        background: var(--analytics-gold);
    }

.analytics-page-table td small {
    display: block;
    margin-top: 5px;
    color: var(--analytics-muted);
}

.analytics-page-table td {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.analytics-empty {
    padding-block: 24px;
    color: var(--analytics-muted);
    text-align: center;
}

.analytics-report-note {
    border-top: 1px solid var(--analytics-border);
    padding-block: 20px;
    color: var(--analytics-muted);
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .analytics-kpi {
        padding: 16px;
    }

        .analytics-kpi strong {
            font-size: 25px;
        }

    .analytics-panel {
        padding: 16px;
    }

    .analytics-date-form {
        align-items: stretch;
    }
}


/* SSAQR TECH — PERIOD COMPARISONS */

.analytics-trend {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

    .analytics-trend.positive {
        color: #16803d;
    }

    .analytics-trend.negative {
        color: #b93d3d;
    }

    .analytics-trend.neutral {
        color: var(--analytics-muted);
    }

.analytics-previous-value {
    font-size: 12px;
    color: var(--analytics-muted);
}

.analytics-comparison-note {
    margin-top: -8px;
    margin-bottom: 24px;
    font-size: 12px;
    color: var(--analytics-muted);
}

/* SSAQR TECH — CONVERSION FUNNEL */

.analytics-funnel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-block: 12px;
}

.analytics-funnel-stage {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analytics-funnel-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

    .analytics-funnel-label span {
        color: var(--analytics-muted);
        font-variant-numeric: tabular-nums;
    }

.analytics-funnel-stage progress {
    display: block;
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 5px;
    overflow: hidden;
    background: #e8e0d2;
    accent-color: var(--analytics-gold);
}

    .analytics-funnel-stage progress::-webkit-progress-bar {
        background: #e8e0d2;
    }

    .analytics-funnel-stage progress::-webkit-progress-value {
        background: var(--analytics-gold);
    }

    .analytics-funnel-stage progress::-moz-progress-bar {
        background: var(--analytics-gold);
    }

.analytics-funnel-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--analytics-muted);
}

@media (max-width: 600px) {
    .analytics-funnel-label {
        font-size: 12px;
    }

    .analytics-funnel-stage progress {
        height: 22px;
    }
}

/* SSAQR TECH — ANALYTICS EXPORTS */

.analytics-export-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid var(--analytics-border);
    background: var(--analytics-panel);
    border-radius: 8px;
}

    .analytics-export-panel strong {
        font-size: 14px;
    }

    .analytics-export-panel p {
        margin: 6px 0 0;
        font-size: 12px;
        color: var(--analytics-muted);
    }

.analytics-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .analytics-export-actions a {
        display: inline-block;
        padding: 9px 12px;
        border: 1px solid var(--analytics-border);
        border-radius: 5px;
        color: var(--analytics-ink);
        font-size: 12px;
        text-decoration: none;
    }

        .analytics-export-actions a:hover {
            background: var(--analytics-ink);
            border-color: var(--analytics-ink);
            color: #f5f1e8;
        }

        .analytics-export-actions a:focus-visible {
            outline: 2px solid var(--analytics-gold);
            outline-offset: 3px;
        }

@media (max-width: 600px) {
    .analytics-export-actions {
        width: 100%;
    }

        .analytics-export-actions a {
            flex: 1 1 140px;
            text-align: center;
        }
}
/* Article typography only: preserve the site's existing visual identity. */
.article-markdown { white-space: normal; line-height: 1.85; font-size: clamp(1rem, 1.5vw, 1.15rem); min-width: 0; text-align: start; }
.article-markdown p { margin: 0 0 1.15em; }
.article-markdown h2, .article-markdown h3, .article-markdown h4, .article-markdown h5, .article-markdown h6 { line-height: 1.35; margin: 1.65em 0 .6em; overflow-wrap: anywhere; }
.article-markdown h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.article-markdown h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.article-markdown h4, .article-markdown h5, .article-markdown h6 { font-size: 1.12em; }
.article-markdown ul, .article-markdown ol { padding-inline-start: 1.6em; margin: 0 0 1.25em; }
.article-markdown li { margin-block: .35em; }
.article-markdown a { color: var(--brass); text-decoration: underline; }
.article-markdown strong { font-weight: 700; }
.article-markdown blockquote { margin: 1.2em 0; padding-inline-start: 1em; border-inline-start: 3px solid var(--brass); }
.article-markdown pre { direction: ltr; text-align: left; white-space: pre; overflow-x: auto; max-width: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.article-markdown code { font-family: ui-monospace, monospace; font-size: .9em; }
.article-markdown :not(pre) > code { background: var(--surface); padding: .1em .3em; }
.article-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.2em; }
.article-markdown th, .article-markdown td { padding: .6em .8em; border: 1px solid var(--border); text-align: start; }
.article-markdown th { background: var(--surface); }
.article-markdown hr, .article-preview hr { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }
.article-preview { overflow-wrap: anywhere; }
