:root {
    --cr-bg: #f5f6f8;
    --cr-fg: #1f2530;
    --cr-muted: #6b7280;
    --cr-border: #d9dee6;
    --cr-accent: #1f5fb2;
    --cr-accent-dark: #18497e;
    --cr-card: #ffffff;
    --cr-pos: #1a7f4b;
    --cr-neg: #b22424;
    --cr-radius: 8px;
    /* Height of the sticky account bar. Exposed on :root (not only on .cr-header)
       so the apps can offset their own sticky elements clear of it. */
    --cr-bar-h: 3rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--cr-fg);
    background: var(--cr-bg);
    line-height: 1.5;
}

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

/* Header — fixed bar height so Platform, Belgium, and Luxembourg match exactly */
.cr-header {
    --cr-bar-h: 3rem;
    --cr-bar-font: 0.9375rem;
    --cr-bar-item-h: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--cr-bar-h);
    padding: 0 1.25rem;
    background: var(--cr-card);
    border-bottom: 1px solid var(--cr-border);
    flex-wrap: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--cr-bar-font);
    line-height: 1.2;
    font-feature-settings: normal;
    -webkit-font-smoothing: auto;
}
.cr-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: var(--cr-bar-h);
    font-weight: 700;
    font-size: var(--cr-bar-font);
    line-height: 1.2;
    color: var(--cr-fg);
    text-decoration: none;
    flex-shrink: 0;
}
.cr-brand:hover { color: var(--cr-fg); text-decoration: none; }
.cr-brand-logo {
    height: 22px;
    width: auto;
    display: block;
    background: #fff;
    padding: 1px 5px;
    border-radius: 4px;
    box-sizing: content-box;
    flex-shrink: 0;
}
.cr-brand-name { color: inherit; line-height: 1.2; }
.cr-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: var(--cr-bar-h);
    flex-shrink: 0;
}
.cr-header .cr-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--cr-bar-item-h);
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--cr-fg);
    font-size: var(--cr-bar-font);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
.cr-header .cr-nav a:hover {
    color: var(--cr-accent);
    text-decoration: none;
}
.cr-header .cr-nav a.is-active {
    font-weight: 600;
    text-decoration: none;
}
.cr-header .cr-nav a.is-active.is-belgium {
    background: #fdecec;
    border-color: #f5d0d0;
    color: #9a2a2a;
}
.cr-header .cr-nav a.is-active.is-belgium:hover { color: #7a1f1f; }
.cr-header .cr-nav a.is-active.is-luxembourg {
    background: #e8f0fb;
    border-color: #c9ddf3;
    color: #1f5fb2;
}
.cr-header .cr-nav a.is-active.is-luxembourg:hover { color: var(--cr-accent-dark); }
.cr-header .cr-nav a.is-active.is-lebanon {
    background: #f5e8ec;
    border-color: #e0c4cc;
    color: #5b2333;
}
.cr-header .cr-nav a.is-active.is-lebanon:hover { color: #452028; }
.cr-header .cr-nav a.is-active.is-dubai {
    background: #eaf3ee;
    border-color: #c6e0d1;
    color: #1f6b45;
}
.cr-header .cr-nav a.is-active.is-dubai:hover { color: #175134; }
.cr-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--cr-bar-h);
    flex-wrap: nowrap;
}
.cr-header .cr-account > a:not(.cr-cta) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--cr-bar-item-h);
    color: var(--cr-fg);
    font-size: var(--cr-bar-font);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
.cr-header .cr-account > a:not(.cr-cta):not(.cr-balance):hover {
    color: var(--cr-accent);
    text-decoration: none;
}
.cr-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--cr-bar-item-h);
    background: var(--cr-bg);
    border: 1px solid var(--cr-border);
    border-radius: 999px;
    padding: 0 0.7rem;
    font-size: var(--cr-bar-font);
    font-weight: 600;
    line-height: 1.2;
    box-sizing: border-box;
}
a.cr-balance { color: var(--cr-fg); text-decoration: none; }
a.cr-balance:hover { border-color: var(--cr-accent); color: var(--cr-accent); text-decoration: none; }
.cr-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--cr-bar-item-h);
    background: var(--cr-accent);
    color: #fff;
    padding: 0 0.8rem;
    border-radius: var(--cr-radius);
    font-size: var(--cr-bar-font);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
}
.cr-cta:hover { background: var(--cr-accent-dark); color: #fff; text-decoration: none; }
.cr-header .cr-inline { display: inline-flex; align-items: center; height: var(--cr-bar-item-h); margin: 0; }
.cr-header .cr-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--cr-bar-item-h);
    background: none;
    border: none;
    color: var(--cr-accent);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--cr-bar-font);
    font-weight: 500;
    line-height: 1.2;
    padding: 0;
    box-sizing: border-box;
}
.cr-header .cr-link-btn:hover { text-decoration: underline; }
.cr-header a:hover { text-decoration: none; }
.cr-inline { display: inline; margin: 0; }
.cr-link-btn {
    background: none; border: none; color: var(--cr-accent);
    cursor: pointer; font: inherit; padding: 0;
}
.cr-link-btn:hover { text-decoration: underline; }

/* Mobile: the desktop bar packs brand + service links + account controls into
   one non-wrapping row, which overflows a phone and pushes the account controls
   off-screen. Let it wrap — the account cluster drops to its own full-width row
   and the service nav wraps its pills. Fixed child heights are cleared so wrapped
   rows aren't clipped. */
@media (max-width: 640px) {
    .cr-header {
        flex-wrap: wrap;
        min-height: 0;
        padding: 0.5rem 1rem;
        gap: 0.4rem 0.6rem;
    }
    .cr-brand,
    .cr-nav,
    .cr-account {
        height: auto;
    }
    .cr-nav {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .cr-account {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }
}

/* Layout */
.cr-main { max-width: 980px; margin: 1.5rem auto; padding: 0 1.25rem; }
.cr-narrow { max-width: 440px; margin: 0 auto; }
.cr-wide { width: 100%; }
.cr-footer {
    text-align: center;
    color: var(--cr-muted);
    padding: 2rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}
.cr-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.cr-footer-links a { color: var(--cr-muted); text-decoration: none; }
.cr-footer-links a:hover { color: var(--cr-accent); text-decoration: underline; }
.cr-footer-copy { margin: 0; }
.cr-footer-note { margin: 0; max-width: 72ch; line-height: 1.45; }
.cr-muted { color: var(--cr-muted); }

/* Flash */
.cr-flash {
    padding: 0.7rem 1rem;
    border-radius: var(--cr-radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.cr-flash-info { background: #eef4fb; border-color: #c9ddf3; }
.cr-flash-success { background: #e9f7ef; border-color: #bce6cd; }
.cr-flash-error { background: #fbecec; border-color: #f0c5c5; }

/* Logged-in customer dashboard (home) */
.cr-dash h1 { margin-top: 0; }
.cr-dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; }
.cr-dash-greeting { flex: 1 1 240px; }
.cr-dash-greeting h1 { margin-bottom: 0.25rem; }
.cr-dash-greeting .cr-lede { margin: 0; }
.cr-dash-balance { display: flex; align-items: center; gap: 1.25rem; background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: var(--cr-radius); padding: 0.85rem 1.1rem; }
.cr-dash-balance.is-empty { border-color: var(--cr-accent); }
.cr-dash-balance-figure { display: flex; flex-direction: column; line-height: 1.15; }
.cr-dash-nudge { margin: 0.75rem 0 0; }
.cr-dash-nudge-out { color: var(--cr-neg); font-weight: 600; }
.cr-dash-credits { margin: 0.75rem 0 0; font-size: 0.9rem; max-width: 72ch; }
.cr-dash-subhead { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }
.cr-dash .cr-cards { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) {
    .cr-dash .cr-cards { grid-template-columns: minmax(0, 1fr); }
}
.cr-dash-caveat { margin: 0.75rem 0 0; font-size: 0.9rem; }
.cr-dash .cr-actions .cr-btn-ghost { background: var(--cr-card); }
.cr-dash .cr-actions .cr-btn-ghost:hover { background: var(--cr-accent-dark); color: #fff; }
.cr-recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.cr-recent-head .cr-dash-subhead { margin: 0; }
.cr-recent { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: var(--cr-radius); overflow: hidden; }
.cr-recent-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; text-decoration: none; color: var(--cr-fg); border-bottom: 1px solid var(--cr-border); }
.cr-recent-row:last-child { border-bottom: none; }
.cr-recent-row:hover { background: var(--cr-bg); text-decoration: none; }
.cr-recent-q { font-weight: 600; }
.cr-recent-status { margin-left: auto; white-space: nowrap; }
.cr-recent-chev { color: var(--cr-muted); font-size: 1.2rem; line-height: 1; }

/* Minimal public landing page (logged-out home) */
.cr-landing { text-align: center; max-width: 640px; margin: 4rem auto; }
.cr-landing-title { font-size: 2rem; margin: 0 0 0.75rem; }
.cr-landing-lede { color: var(--cr-muted); font-size: 1.1rem; margin: 0 0 2rem; }
.cr-landing-actions { display: flex; justify-content: center; margin: 0; }
.cr-landing-alt { margin-top: 1.5rem; color: var(--cr-muted); font-size: 0.9rem; }

/* Hero / cards */
.cr-hero h1 { margin-top: 0; }
.cr-lede { color: var(--cr-muted); max-width: 80ch; }
.cr-cards { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.cr-card {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 1.25rem;
    color: var(--cr-fg);
}
.cr-card:hover { border-color: var(--cr-accent); text-decoration: none; }
.cr-card h2 { margin: 0 0 0.4rem; }
.cr-card p { margin: 0 0 1rem; }

/* Visual button inside the (already clickable) card — a span, not a nested link */
.cr-card-cta {
    align-self: flex-start;
    margin-top: auto;
    background: var(--cr-accent);
    color: #fff;
    border-radius: var(--cr-radius);
    padding: 0.45rem 0.95rem;
    font-size: 0.9rem;
}
.cr-card:hover .cr-card-cta { background: var(--cr-accent-dark); }
.cr-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: start;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--cr-border);
    border-bottom: 1px solid var(--cr-border);
}
.cr-section h2 { margin: 0 0 0.35rem; }
.cr-price-list { display: grid; gap: 0.55rem; }
.cr-price {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.8rem;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    align-items: center;
}
.cr-price-deal { border-color: var(--cr-accent, #2563eb); }
.cr-price-amount { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.cr-price-save {
    font-size: 0.75rem; font-weight: 700; color: #fff;
    background: #15803d; border-radius: 999px; padding: 0.15rem 0.5rem; white-space: nowrap;
}
.cr-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.cr-info {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 1rem;
}
.cr-info h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.cr-info p { margin: 0; color: var(--cr-muted); font-size: 0.92rem; }

/* Buttons / forms */
.cr-btn {
    display: inline-block;
    background: var(--cr-accent);
    color: #fff;
    border: none;
    border-radius: var(--cr-radius);
    padding: 0.55rem 1.1rem;
    font: inherit;
    cursor: pointer;
}
.cr-btn:hover { background: var(--cr-accent-dark); color: #fff; text-decoration: none; }
.cr-btn-ghost { background: transparent; color: var(--cr-accent); border: 1px solid var(--cr-border); }
.cr-btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.cr-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }

.cr-form { display: flex; flex-direction: column; gap: 1rem; margin: 1.25rem 0; }
.cr-form label:not(.cr-checkbox) {
    display: block;
    font-weight: 600;
}
.cr-form label:not(.cr-checkbox) > input,
.cr-form label:not(.cr-checkbox) > select,
.cr-form label:not(.cr-checkbox) > textarea {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    box-sizing: border-box;
}
.cr-form label:not(.cr-checkbox) > small {
    display: block;
    margin-top: 0.25rem;
}
.cr-pw-group label + label {
    margin-top: 0;
}
/* Password field with an in-field Show/Hide toggle. */
.cr-pw-field {
    position: relative;
    display: block;
}
.cr-pw-field > input {
    width: 100%;
    padding-right: 4rem;
}
.cr-pw-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 0.2rem 0.4rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cr-accent, #2563eb);
    cursor: pointer;
}
.cr-pw-toggle:hover { text-decoration: underline; }
.cr-pw-rules {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--cr-muted);
}
.cr-pw-rules li {
    position: relative;
    padding-left: 1.15rem;
    line-height: 1.45;
}
.cr-pw-rules li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
}
.cr-pw-rules.is-active li.is-met {
    color: #15803d;
}
.cr-pw-rules.is-active li.is-met::before {
    content: '✓';
}
.cr-pw-rules.is-active li.is-unmet {
    color: #b91c1c;
}
.cr-pw-rules.is-active li.is-unmet::before {
    content: '✕';
}
.cr-pw-match {
    font-size: 0.82rem;
    font-weight: 600;
}
.cr-pw-match.is-ok { color: #15803d; }
.cr-pw-match.is-bad { color: #b91c1c; }
.cr-form input,
.cr-form textarea,
.cr-form select {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    font: inherit;
}
.cr-form textarea { resize: vertical; }
.cr-form small { font-weight: 400; color: var(--cr-muted); }
.cr-form-heading { margin: 0.75rem 0 0; font-size: 1.05rem; }
.cr-form.cr-form-compact {
    gap: 0.6rem;
    margin: 0.75rem 0;
}
.cr-form.cr-form-compact label:not(.cr-checkbox) > input,
.cr-form.cr-form-compact label:not(.cr-checkbox) > select,
.cr-form.cr-form-compact label:not(.cr-checkbox) > textarea {
    margin-top: 0.15rem;
    padding: 0.4rem 0.55rem;
}
.cr-form.cr-form-compact label:not(.cr-checkbox) > small {
    margin-top: 0.1rem;
    font-size: 0.82rem;
}
.cr-form.cr-form-compact .cr-form-heading {
    margin: 0.35rem 0 0;
}
.cr-form.cr-form-compact .cr-form-heading + .cr-muted {
    margin: 0.1rem 0 0;
    font-size: 0.88rem;
}
.cr-form.cr-form-compact .cr-legal {
    padding: 0.65rem 0.85rem;
}
.cr-tabs {
    display: flex; gap: 0.25rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--cr-border); margin: 0 0 1.25rem;
}
.cr-tab {
    padding: 0.55rem 1rem; text-decoration: none; color: var(--cr-muted);
    border: 1px solid transparent; border-bottom: none;
    border-radius: var(--cr-radius) var(--cr-radius) 0 0; margin-bottom: -1px;
}
.cr-tab:hover { color: var(--cr-text, inherit); }
.cr-tab.is-active {
    color: var(--cr-text, inherit); font-weight: 700;
    background: var(--cr-card); border-color: var(--cr-border); border-bottom-color: var(--cr-card);
}
.cr-showmore { text-align: center; margin: 1rem 0; }

/* Page-number pager (admin domains list). */
.cr-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 1rem 0;
}
.cr-pager .is-current {
    background: var(--cr-accent);
    border-color: var(--cr-accent);
    color: #fff;
    cursor: default;
}
.cr-pager .is-disabled {
    opacity: 0.45;
    pointer-events: none;
}
.cr-pager-gap {
    padding: 0 0.25rem;
    color: var(--cr-muted);
}

/* Admin pricing / credit-package editor */
.cr-pkg-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.cr-pkg {
    display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
    background: var(--cr-card); border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius); padding: 0.75rem 1rem;
}
.cr-pkg-inactive { opacity: 0.6; }
.cr-pkg-form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 0; }
.cr-pkg-form > label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.85rem; }
.cr-pkg-form input[type="number"] {
    width: 7rem; padding: 0.4rem 0.5rem;
    border: 1px solid var(--cr-border); border-radius: var(--cr-radius); box-sizing: border-box;
}
.cr-pkg-form .cr-pkg-active { flex-direction: row; align-items: center; gap: 0.4rem; }
.cr-pkg-percredit { color: var(--cr-muted); font-size: 0.85rem; align-self: center; }
.cr-month-nav { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 0 0 0.75rem; }
.cr-tx-actions { margin: 0 0 0.75rem; }
.cr-req { color: #b91c1c; font-weight: 700; }
.cr-optional { font-weight: 400; color: var(--cr-muted); font-size: 0.85em; }
/* Emphasised inline label note (e.g. "business email addresses only"). */
.cr-optional.cr-strong { font-weight: 700; }
.cr-form-note { margin: 0; color: var(--cr-muted); font-size: 0.85rem; font-weight: 400; }
.cr-admin-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin: 0.75rem 0 1rem;
    padding: 0.85rem;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
}
.cr-admin-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--cr-muted);
    font-size: 0.82rem;
    font-weight: 700;
}
.cr-admin-filters input,
.cr-admin-filters select {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    color: var(--cr-fg);
    font: inherit;
    font-weight: 400;
}
.cr-filter-check {
    flex-direction: row !important;
    align-items: center;
    gap: 0.4rem !important;
}
.cr-filter-check input {
    width: auto !important;
}
.cr-filter-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}
.cr-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.cr-admin-edit-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}
.cr-support-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}
.cr-support-stats div {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 0.85rem;
}
.cr-support-stats strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
}
.cr-support-stats span {
    color: var(--cr-muted);
    font-size: 0.8rem;
}
.cr-support-kv th {
    width: 12rem;
}

/* Admin overview (dashboard tiles) */
.cr-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.cr-window {
    display: flex;
    gap: 0.35rem;
}
.cr-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}
.cr-kpi {
    display: block;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 0.85rem;
    color: inherit;
    text-decoration: none;
}
a.cr-kpi:hover {
    border-color: var(--cr-fg);
}
.cr-kpi strong {
    display: block;
    font-size: 1.5rem;
    line-height: 1.15;
}
.cr-kpi span {
    color: var(--cr-muted);
    font-size: 0.82rem;
}
/* A tile only changes colour when it wants something done about it. */
.cr-kpi.is-attention {
    border-color: #f0d8a8;
    background: #fdf9f1;
}
.cr-kpi.is-attention strong { color: #9a6400; }
.cr-kpi.is-bad {
    border-color: #fca5a5;
    background: #fef4f4;
}
.cr-kpi.is-bad strong { color: var(--cr-neg); }
.cr-row-idle td { color: var(--cr-muted); }

/* Health tab */
.cr-health-table td { vertical-align: top; }
.cr-health {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.cr-health-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.cr-health-ok { color: var(--cr-pos); }
.cr-health-warn { color: #9a6400; }
.cr-health-down { color: var(--cr-neg); }
.cr-health-not_configured { color: var(--cr-muted); }

.cr-danger {
    border: 1px solid #fca5a5; background: #fef2f2;
    border-radius: var(--cr-radius); padding: 0.85rem 1rem;
}
.cr-danger p { margin: 0 0 0.6rem; }
.cr-btn-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.cr-btn-danger:hover { background: #991b1b; border-color: #991b1b; }
.cr-legal {
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 0.85rem 1rem;
    max-height: 220px;
    overflow-y: auto;
    background: var(--cr-panel, #fafafa);
    font-weight: 400;
}
.cr-legal-intro { margin: 0 0 0.5rem; font-weight: 600; }
.cr-legal-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.cr-checkbox {
    display: flex;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
}
.cr-checkbox input { width: auto; margin-top: 0.2rem; }
.cr-inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.75rem 0; }
.cr-inline-form input { padding: 0.4rem 0.6rem; border: 1px solid var(--cr-border); border-radius: var(--cr-radius); }
.cr-bulk-form { align-items: flex-end; }
.cr-bulk-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--cr-muted, #5a6473); }
.cr-bulk-form label:first-of-type { flex: 1 1 22rem; }
.cr-bulk-form textarea { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--cr-border); border-radius: var(--cr-radius); resize: vertical; font: inherit; }
.cr-account-section { margin: 1.5rem 0 2rem; }
.cr-billing-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem 1.25rem;
    align-items: end;
}
/* An explicit display (the billing form's grid, the password form's flex, etc.)
   otherwise overrides the [hidden] attribute, leaving toggled-off panels visible. */
[hidden] { display: none !important; }
.cr-form-actions { display: flex; gap: 0.6rem; align-items: center; }
.cr-billing-form .cr-form-actions { grid-column: 1 / -1; }

/* Read-only detail list (e.g. billing details before editing) */
.cr-detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0 0 1rem; }
.cr-detail-list > div { display: contents; }
.cr-detail-list dt { color: var(--cr-muted); font-weight: 600; }
.cr-detail-list dd { margin: 0; }
.cr-billing-empty { margin-top: 0; }
.cr-loadmore { margin-top: 1rem; }
.cr-account-email { margin: 0 0 1rem; font-size: 0.95rem; }

/* Account page: sticky table-of-contents sidebar + content column */
.cr-account-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2rem; align-items: start; }
.cr-account-main { min-width: 0; }
.cr-account-main > .cr-account-section:first-child { margin-top: 0; }
.cr-account-section { scroll-margin-top: 5rem; }
.cr-account-toc { position: sticky; top: 5rem; }
.cr-account-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.cr-account-toc a {
    display: block; padding: 0.4rem 0.65rem; border-radius: var(--cr-radius);
    color: var(--cr-muted); text-decoration: none; font-size: 0.9rem;
    border-left: 2px solid transparent;
}
.cr-account-toc a:hover { background: var(--cr-card); color: var(--cr-fg); text-decoration: none; }
.cr-account-toc a.is-active {
    color: var(--cr-fg); background: var(--cr-card);
    border-left-color: var(--cr-accent); font-weight: 600;
}
@media (max-width: 720px) {
    .cr-account-layout { grid-template-columns: 1fr; gap: 0; }
    .cr-account-toc { position: static; margin-bottom: 1rem; }
    .cr-account-toc ul { flex-direction: row; flex-wrap: wrap; gap: 0.35rem; }
}

.cr-verify-link { word-break: break-all; background: var(--cr-card); border: 1px solid var(--cr-border); padding: 0.75rem; border-radius: var(--cr-radius); }

/* Balance box */
.cr-balance-box {
    display: flex; align-items: baseline; gap: 0.5rem;
    background: var(--cr-card); border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius); padding: 1rem 1.25rem; margin: 1rem 0 1.5rem;
}
.cr-balance-num { font-size: 2rem; font-weight: 700; }
.cr-balance-label { color: var(--cr-muted); }

/* Packages */
.cr-packages { display: flex; gap: 1rem; flex-wrap: wrap; }
.cr-package {
    position: relative;
    background: var(--cr-card); border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius); padding: 1.25rem; text-align: center;
    flex: 1 1 160px; display: flex; flex-direction: column; gap: 0.5rem; align-items: center;
    cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cr-package:hover { border-color: var(--cr-accent, #2563eb); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cr-package-deal { border-color: var(--cr-accent, #2563eb); }
.cr-package-badge {
    position: absolute; top: -0.6rem; right: -0.4rem;
    background: var(--cr-accent, #2563eb); color: #fff;
    font-size: 0.72rem; font-weight: 700; line-height: 1;
    padding: 0.3rem 0.5rem; border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cr-package-credits { font-size: 1.25rem; font-weight: 700; }
.cr-package-price { color: var(--cr-muted); }
.cr-package-was { text-decoration: line-through; opacity: 0.7; margin-right: 0.35rem; }
.cr-package-now { font-weight: 700; color: var(--cr-text, inherit); }
.cr-package-save { font-size: 0.8rem; font-weight: 700; color: #15803d; }
.cr-package-percredit { font-size: 0.82rem; color: var(--cr-muted); }
/* "What a credit buys" perks shown above the package grid. */
.cr-credit-perks {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    font-size: 0.85rem;
    color: var(--cr-muted);
}
.cr-credit-perks li {
    position: relative;
    padding-left: 1.3rem;
}
.cr-credit-perks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #15803d;
    font-weight: 700;
}

/* Tables */
.cr-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1.5rem; background: var(--cr-card); }
.cr-table th, .cr-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--cr-border); font-size: 0.92rem; }
.cr-table th { background: var(--cr-bg); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--cr-muted); }
.cr-sort { display: inline-flex; align-items: center; gap: 0.25rem; color: inherit; text-decoration: none; white-space: nowrap; }
.cr-sort:hover { color: var(--cr-fg); text-decoration: underline; }
.cr-sort.is-active { color: var(--cr-fg); }
/* Reserve the arrow's width on every header so the row does not shift on sort. */
.cr-sort-arrow { display: inline-block; min-width: 0.7em; font-size: 0.9em; }
.cr-pos { color: var(--cr-pos); font-weight: 600; }
.cr-neg { color: var(--cr-neg); font-weight: 600; }
.cr-row-actions { display: flex; gap: 0.75rem; align-items: center; }
.cr-reject-form { flex-wrap: wrap; gap: 0.35rem; }
.cr-reject-note { width: 100%; max-width: 15rem; padding: 0.3rem 0.5rem; font-size: 0.82rem; border: 1px solid var(--cr-border); border-radius: var(--cr-radius); }
.cr-linkcell { word-break: break-all; }
.cr-refresh { font-weight: 600; }

/* Tags / status */
.cr-tag { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.cr-tag-belgium { background: #fdecec; color: #9a2a2a; }
.cr-tag-luxembourg { background: #e8f0fb; color: #1f5fb2; }
.cr-tag-lebanon { background: #f7ecf0; color: #5b2333; }
.cr-tag-dubai { background: #eaf3ee; color: #1f6b45; }
.cr-status { font-size: 0.8rem; font-weight: 600; }
.cr-status-approved { color: var(--cr-pos); }
.cr-status-pending_approval, .cr-status-pending_verification { color: #b06a00; }
.cr-status-suspended, .cr-status-rejected { color: var(--cr-neg); }

/* History view */
.cr-history-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.cr-history-actions { display: flex; gap: 0.75rem; align-items: center; }
.cr-snapshot { margin-top: 1rem; background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: var(--cr-radius); padding: 1rem; }
.cr-snapshot-frame { width: 100%; height: 75vh; border: 1px solid var(--cr-border); border-radius: var(--cr-radius); background: #fff; margin-top: 0.75rem; }

/* Search-history term status */
.cr-history-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0; }
.cr-history-toolbar .cr-legend { margin: 0; }
.cr-history-count { margin: 0 0 0.5rem; font-size: 0.9rem; }
.cr-pagination { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 0; }
.cr-legend { font-size: 0.85rem; color: var(--cr-muted); display: flex; gap: 1.25rem; align-items: center; }
.cr-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.cr-dot-free { background: #1a7f4b; }
.cr-dot-expired { background: #b06a00; }
.cr-pill { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.cr-pill-free { background: #e9f7ef; color: #1a7f4b; border: 1px solid #bce6cd; }
.cr-pill-expired { background: #fdf2e2; color: #9a6400; border: 1px solid #f0d8a8; }
.cr-term-expired td { background: #fcf8f1; }
.cr-term-expired td:nth-child(4) { color: var(--cr-muted); }
.cr-query-sub {
    display: block;
    margin-top: 0.15rem;
    color: var(--cr-muted);
    font-size: 0.82rem;
    font-weight: 400;
}
.cr-history-variants td {
    background: #fbfcfe;
    padding-top: 0.2rem;
}
.cr-history-variants ul {
    margin: 0;
    padding: 0.2rem 0 0.35rem;
    list-style: none;
    display: grid;
    gap: 0.3rem;
}
.cr-history-variants li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: baseline;
    font-size: 0.86rem;
}

/* Receipts and demo */
.cr-receipt {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 1.25rem;
}
.cr-receipt-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--cr-border);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}
.cr-receipt-head h1,
.cr-receipt-head p { margin: 0; }
.cr-receipt-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.cr-receipt-meta dt {
    color: var(--cr-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.cr-receipt-meta dd { margin: 0.2rem 0 0; }
.cr-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.cr-demo-card {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    padding: 1rem;
}

@media (max-width: 720px) {
    .cr-section,
    .cr-info-grid,
    .cr-billing-form,
    .cr-admin-filters,
    .cr-admin-edit-form,
    .cr-support-stats,
    .cr-receipt-meta,
    .cr-demo-grid {
        grid-template-columns: 1fr;
    }
    .cr-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cr-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cr-table th,
    .cr-table td {
        white-space: nowrap;
    }
    .cr-history-table td:nth-child(4),
    .cr-history-variants td {
        white-space: normal;
    }
}

@media print {
    .cr-header,
    .cr-footer,
    .cr-receipt-head .cr-btn,
    .cr-main > .cr-flash,
    script {
        display: none !important;
    }
    body { background: #fff; }
    .cr-main { max-width: none; margin: 0; padding: 0; }
    .cr-receipt { border: 0; padding: 0; }
}

/* ===================================================================
   Landing page (/testlanding) — "the index"
   Self-hosted IBM Plex; ink-and-ledger palette; scoped .cr-tl-* only.
   =================================================================== */
@font-face {
    font-family: "Plex Sans"; font-style: normal; font-weight: 400;
    font-display: swap; src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
    font-family: "Plex Sans"; font-style: normal; font-weight: 500;
    font-display: swap; src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2");
}
@font-face {
    font-family: "Plex Sans"; font-style: normal; font-weight: 600;
    font-display: swap; src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
}
@font-face {
    font-family: "Plex Sans"; font-style: normal; font-weight: 700;
    font-display: swap; src: url("/assets/fonts/ibm-plex-sans-700.woff2") format("woff2");
}
@font-face {
    font-family: "Plex Mono"; font-style: normal; font-weight: 400;
    font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
    font-family: "Plex Mono"; font-style: normal; font-weight: 500;
    font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

.cr-tl {
    --tl-paper:   #f1f2ee;
    --tl-surface: #ffffff;
    --tl-ink:     #14181f;
    --tl-ink-2:   #565e6b;
    --tl-navy:    #1c3a57;
    --tl-navy-d:  #14283c;
    --tl-rule:    #d7d9d2;
    --tl-rule-2:  #e6e7e1;
    /* Background substrate: faint ledger ruling + a soft top light. Tune the
       two alphas to taste, or set them to 0 to fall back to flat paper. */
    --tl-ruling:  rgba(20, 40, 60, 0.035);
    --tl-glow:    rgba(255, 255, 255, 0.55);

    --tl-sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --tl-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    font-family: var(--tl-sans);
    color: var(--tl-ink);
    margin: 0 0 4rem;
    -webkit-font-smoothing: antialiased;
}
/* Give the landing its own ground without touching the shared layout.
   The paper is ruled like a ledger sheet — horizontal hairlines every 34px,
   lifted by a soft light behind the hero — so the surface reads as a record,
   not an empty canvas. Kept at a whisper so it's texture, never pattern. */
.cr-tl::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--tl-paper);
    background-image:
        radial-gradient(120% 60% at 30% -10%, var(--tl-glow), transparent 60%),
        repeating-linear-gradient(
            to bottom,
            var(--tl-ruling) 0,
            var(--tl-ruling) 1px,
            transparent 1px,
            transparent 34px
        );
}
.cr-tl h1, .cr-tl h2, .cr-tl h3 { font-family: var(--tl-sans); color: var(--tl-ink); }

/* Shared mono label + section heads --------------------------------- */
.cr-tl-label,
.cr-tl-kicker {
    font-family: var(--tl-mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tl-navy);
    margin: 0;
}
.cr-tl-block { margin: 4.5rem 0; }
.cr-tl-block-head {
    border-top: 2px solid var(--tl-ink);
    padding-top: 0.75rem;
    margin-bottom: 2rem;
}
.cr-tl-block-head .cr-tl-label { color: var(--tl-ink-2); }
.cr-tl-block-head h2 {
    font-size: clamp(1.5rem, 3.4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0.35rem 0 0;
}

/* Hero -------------------------------------------------------------- */
.cr-tl-hero {
    padding: 2.75rem 0 3.25rem;
    border-bottom: 1px solid var(--tl-rule);
    margin-bottom: 1.5rem;
}
.cr-tl-kicker { margin-bottom: 1.25rem; }
.cr-tl-headline {
    font-size: clamp(2.1rem, 5.6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
    margin: 0 0 1.1rem;
    max-width: 18ch;
}
.cr-tl-headline span { color: var(--tl-navy); }
.cr-tl-deck {
    font-size: 1.12rem;
    line-height: 1.55;
    color: var(--tl-ink-2);
    max-width: 60ch;
    margin: 0 0 2rem;
}

/* Hero search line — a facsimile of the product's own search field */
.cr-tl-search {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    max-width: 620px;
    background: var(--tl-surface);
    border: 1.5px solid var(--tl-ink);
    border-radius: 4px;
    padding: 0.35rem 0.35rem 0.35rem 0.9rem;
    color: var(--tl-ink);
    box-shadow: 4px 4px 0 rgba(20, 40, 60, 0.08);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.cr-tl-search:hover,
.cr-tl-search:focus-visible {
    text-decoration: none;
    border-color: var(--tl-navy);
    box-shadow: 6px 6px 0 rgba(28, 58, 87, 0.16);
}
.cr-tl-search-glass { flex: none; align-self: center; color: var(--tl-ink-2); }
.cr-tl-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    font-size: 1.05rem;
}
.cr-tl-search-ph { color: #98a0ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-tl-caret {
    display: inline-block;
    width: 2px;
    height: 1.25em;
    background: var(--tl-navy);
    margin-right: 0.35rem;
    flex: none;
    animation: cr-tl-blink 1.1s step-end infinite;
}
@keyframes cr-tl-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cr-tl-search-go {
    flex: none;
    display: flex;
    align-items: center;
    background: var(--tl-navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 1.25rem;
    border-radius: 3px;
}
.cr-tl-search:hover .cr-tl-search-go { background: var(--tl-navy-d); }

.cr-tl-egline {
    font-family: var(--tl-mono);
    font-size: 0.82rem;
    color: var(--tl-ink-2);
    margin: 0.9rem 0 2rem;
}
.cr-tl-eg-label {
    color: var(--tl-navy);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-right: 0.5rem;
}

/* Buttons / links --------------------------------------------------- */
.cr-tl-hero-cta { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.cr-tl-btn {
    display: inline-block;
    font-family: var(--tl-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    border: 1.5px solid var(--tl-ink);
}
.cr-tl-btn-primary { background: var(--tl-ink); color: #fff; }
.cr-tl-btn-primary:hover { background: var(--tl-navy); border-color: var(--tl-navy); color: #fff; text-decoration: none; }
.cr-tl-textlink { color: var(--tl-navy); font-weight: 500; text-underline-offset: 3px; }
.cr-tl-textlink:hover { text-decoration: underline; }

/* Coverage register ------------------------------------------------- */
.cr-tl-register { list-style: none; margin: 0; padding: 0; }
.cr-tl-entry {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 1.5rem;
    padding: 1.85rem 0;
    border-top: 1px solid var(--tl-rule);
    position: relative;
}
.cr-tl-entry:last-child { border-bottom: 1px solid var(--tl-rule); }
/* Jurisdiction spine — colour encodes the source, it is not decoration */
.cr-tl-entry::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.85rem;
    bottom: 1.85rem;
    width: 3px;
    background: var(--tl-entry-color, var(--tl-navy));
}
.cr-tl-entry-belgium    { --tl-entry-color: #9a2a2a; }
.cr-tl-entry-luxembourg { --tl-entry-color: #1f5fb2; }
.cr-tl-entry-lebanon    { --tl-entry-color: #7a3b52; }
.cr-tl-entry-dubai      { --tl-entry-color: #1f6b45; }

.cr-tl-entry-id { padding-left: 1rem; }
.cr-tl-entry-code {
    font-family: var(--tl-mono);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    color: var(--tl-entry-color, var(--tl-navy));
}
.cr-tl-entry-name { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; margin: -0.15rem 0 0.4rem; }
.cr-tl-entry-body { color: var(--tl-ink-2); line-height: 1.5; margin: 0 0 1rem; max-width: 46ch; }

.cr-tl-fields { margin: 0; display: grid; gap: 0.4rem; }
.cr-tl-field { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; align-items: baseline; }
.cr-tl-field dt {
    font-family: var(--tl-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tl-ink-2);
    padding-top: 0.15rem;
}
.cr-tl-field dd { margin: 0; font-size: 0.92rem; color: var(--tl-ink); }

.cr-tl-entry-shot {
    position: relative;
    display: block;
    align-self: start;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--tl-rule);
    border-radius: 4px;
    background: var(--tl-paper);
    cursor: zoom-in;
}
.cr-tl-entry-shot img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}
.cr-tl-entry-shot:hover img { transform: scale(1.03); }
.cr-tl-shot-tag {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    font-family: var(--tl-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(20, 24, 31, 0.82);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.16s ease;
}
.cr-tl-entry-shot:hover .cr-tl-shot-tag,
.cr-tl-entry-shot:focus-visible .cr-tl-shot-tag { opacity: 1; }

/* Workflow ledger --------------------------------------------------- */
.cr-tl-flow {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cr-tl-flow li { padding: 0 1.75rem; border-left: 1px solid var(--tl-rule); }
.cr-tl-flow li:first-child { padding-left: 0; border-left: 0; }
.cr-tl-flow-n {
    font-family: var(--tl-mono);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--tl-navy);
    letter-spacing: 0.05em;
}
.cr-tl-flow h3 { font-size: 1.15rem; font-weight: 600; margin: 0.5rem 0 0.5rem; }
.cr-tl-flow p { color: var(--tl-ink-2); line-height: 1.5; margin: 0; font-size: 0.95rem; }

/* Close ------------------------------------------------------------- */
.cr-tl-close {
    text-align: left;
    padding: 3rem 0 1.5rem;
    border-top: 2px solid var(--tl-ink);
    margin-top: 4.5rem;
}
.cr-tl-close h2 {
    font-size: clamp(1.8rem, 4.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0.4rem 0 0.75rem;
}
.cr-tl-close-sub { color: var(--tl-ink-2); font-size: 1.08rem; line-height: 1.55; max-width: 56ch; margin: 0 0 1.75rem; }

.cr-tl-note {
    display: flex;
    gap: 0.75rem;
    font-family: var(--tl-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--tl-ink-2);
    border-top: 1px solid var(--tl-rule);
    padding-top: 1rem;
    margin: 2.5rem 0 0;
}
.cr-tl-note-mark { color: var(--tl-navy); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; flex: none; }

/* Lightbox — pure-CSS :target overlay, no JavaScript ---------------- */
.cr-tl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5vmin;
    background: rgba(12, 16, 24, 0.85);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.cr-tl-lightbox:target { opacity: 1; visibility: visible; pointer-events: auto; }
.cr-tl-lightbox-bg { position: absolute; inset: 0; cursor: zoom-out; }
.cr-tl-lightbox-inner { position: relative; z-index: 1; max-width: 96vw; max-height: 92vh; line-height: 0; }
.cr-tl-lightbox-inner img {
    display: block;
    max-width: 96vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.cr-tl-lightbox-close {
    position: absolute;
    top: -0.6rem;
    right: -0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--tl-ink);
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.cr-tl-lightbox-close:hover { background: var(--tl-navy); color: #fff; text-decoration: none; }

/* Responsive -------------------------------------------------------- */
@media (max-width: 760px) {
    .cr-tl-entry { grid-template-columns: 2.5rem 1fr; gap: 0.5rem 1rem; }
    .cr-tl-entry-shot { grid-column: 1 / -1; height: 180px; margin-top: 0.5rem; }
    .cr-tl-flow { grid-template-columns: 1fr; gap: 1.75rem; }
    .cr-tl-flow li { padding: 0; border-left: 0; border-top: 1px solid var(--tl-rule); padding-top: 1rem; }
    .cr-tl-flow li:first-child { border-top: 0; padding-top: 0; }
    .cr-tl-search { flex-wrap: wrap; }
    .cr-tl-search-go { padding: 0.6rem 1.25rem; }
}
@media (max-width: 460px) {
    .cr-tl-field { grid-template-columns: 1fr; gap: 0.1rem; }
    .cr-tl-search-field { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cr-tl-caret { animation: none; }
    .cr-tl-entry-shot img, .cr-tl-lightbox, .cr-tl-search { transition: none; }
}
