/* ==========================================================================
   Site 6: status pages (Oct 2026)

   What the visitors of a short link see when it can't take them anywhere
   (expired, unsafe, not yet active, click limit, waiting for email
   verification, password), the 404 page, the branded-domain root pages,
   the cookie consent page, private mode and the email preferences page.

   Most of these templates are standalone HTML documents (or sit in the bare
   api/auth/unsubscribe layouts), so this file is self-contained: its own
   faces and tokens, same values as the home-6 page and the Landing 6 kit.
   It never loads the kit, to keep the pages light. Everything is scoped to
   .s6g (the wrapper each template adds); .s6g-body only sets the page
   background on the templates that own their <body>.
   ========================================================================== */

@font-face {
    font-family: "Nunito Sans G6";
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url("../fonts/Nunito_Sans/nunito-sans-latin-900.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans G6";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/DM_Sans/dm-sans-v11-latin-regular.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans G6";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/DM_Sans/dm-sans-v11-latin-700.woff2") format("woff2");
}

.s6g {
    --g6-ink: #0d1b2e;
    --g6-body: #465366;
    --g6-muted: #5b6678;
    --g6-line: #dce3ec;
    --g6-paper: #ffffff;
    --g6-haze: #f1f5fa;
    --g6-blue: #0967f2;
    --g6-blue-deep: #0648b5;
    --g6-blue-soft: #e6f0ff;
    --g6-stop: #e5484d;
    --g6-stop-deep: #b42328;
    --g6-stop-soft: #fdecec;
    --g6-go: #13a56b;
    --g6-go-soft: #e4f6ee;
    --g6-amber: #b26a00;
    --g6-amber-soft: #fff4e0;
    --g6-display: "Nunito Sans G6", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --g6-text: "DM Sans G6", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.s6g-body {
    margin: 0;
    background: #f1f5fa;
}

/* ==========================================================================
   Page shell: logo, card, footnote, centred on a haze page
   ========================================================================== */

.s6g {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 16px;
    background: var(--g6-haze);
    color: var(--g6-body);
    font-family: var(--g6-text);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

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

/* Resets at zero specificity, so every component class below wins over them
   (and still beats Bootstrap's element rules, which load earlier). */
:where(.s6g) p {
    margin: 0;
}

:where(.s6g) a {
    color: var(--g6-blue-deep);
}

.s6g a:focus-visible,
.s6g button:focus-visible,
.s6g input:focus-visible,
.s6g summary:focus-visible {
    outline: 3px solid rgba(9, 103, 242, 0.45);
    outline-offset: 3px;
}

.s6g-logo {
    display: inline-flex;
    align-items: center;
    color: var(--g6-ink) !important;
    font-family: var(--g6-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.s6g-logo img {
    display: block;
    width: auto;
    height: 30px;
}

.s6g-card {
    flex: none;        /* unsubscribe.php keeps Bootstrap's .card-body (a script hook), which would grow */
    width: 100%;
    max-width: 520px;
    padding: 40px 40px 36px;
    border: 1px solid var(--g6-line);
    border-radius: 26px;
    background: var(--g6-paper);
    box-shadow: 0 1px 2px rgba(13, 27, 46, 0.04), 0 30px 60px -32px rgba(13, 27, 46, 0.28);
}

.s6g-card--wide {
    max-width: 600px;
}

/* The status token on a pastel tile, tinted by state */
.s6g-art {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 22px;
    border-radius: 30px;
    background: linear-gradient(160deg, var(--g6-blue-soft), #f4f8ff);
}

.s6g-art--stop {
    background: linear-gradient(160deg, var(--g6-stop-soft), #fff6f6);
}

.s6g-art--warn {
    background: linear-gradient(160deg, #ffefd2, #fff8ea);
}

.s6g-art--go {
    background: linear-gradient(160deg, var(--g6-go-soft), #f2fbf6);
}

.s6g-art img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.s6g-kicker {
    margin: 0 0 6px !important;
    color: var(--g6-muted);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.s6g .s6g-title {
    margin: 0 0 12px;
    color: var(--g6-ink);
    font-family: var(--g6-display);
    font-size: clamp(1.85rem, 4.2vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    text-wrap: balance;
}

.s6g .s6g-title--sm {
    font-size: clamp(1.45rem, 3.4vw, 1.8rem);
    line-height: 1.18;
}

.s6g-text {
    max-width: 42ch;
    margin: 0 auto !important;
    color: var(--g6-body);
    font-size: 1.05rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.s6g-text + .s6g-text {
    margin-top: 10px !important;
}

.s6g-text strong {
    color: var(--g6-ink);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.s6g-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

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

.s6g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 26px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-family: var(--g6-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.s6g-btn--primary {
    background: var(--g6-blue);
    color: #fff !important;
}

.s6g-btn--primary:hover {
    background: var(--g6-blue-deep);
}

.s6g-btn--ghost {
    border-color: var(--g6-line);
    background: var(--g6-paper);
    color: var(--g6-ink) !important;
}

.s6g-btn--ghost:hover {
    border-color: var(--g6-ink);
}

.s6g-btn:active {
    transform: translateY(1px);
}

.s6g-btn[disabled] {
    background: #c3ccd8;
    color: #fff !important;
    cursor: not-allowed;
}

.s6g-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--g6-blue-deep) !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.s6g-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Pieces used by some pages
   ========================================================================== */

/* Small footnote under the card ("Powered by", account links) */
.s6g-foot {
    color: var(--g6-muted);
    font-size: 0.92rem;
}

.s6g-foot a {
    font-weight: 700;
    text-decoration: none;
}

.s6g-foot a:hover {
    text-decoration: underline;
}

/* A divided lower part of the card (product pitch, account links) */
.s6g-split {
    margin: 30px -40px -36px;
    padding: 26px 40px 30px;
    border-top: 1px solid var(--g6-line);
    border-radius: 0 0 26px 26px;
    background: #fafcfe;
}

.s6g-split h2 {
    margin: 0 0 6px;
    color: var(--g6-ink);
    font-family: var(--g6-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.s6g-split p {
    color: var(--g6-body);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Row of app icons ("Opens in") */
.s6g-apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 20px;
    padding: 0;
    list-style: none;
}

.s6g-apps img {
    display: block;
    width: 38px;
    height: 38px;
    padding: 7px;
    border: 1px solid var(--g6-line);
    border-radius: 11px;
    background: var(--g6-paper);
    object-fit: contain;
}

/* Status pill ("Waiting for email verification...", the 404 countdown) */
.s6g-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    margin-top: 22px;
    padding: 0 16px;
    border: 1px solid var(--g6-line);
    border-radius: 999px;
    background: var(--g6-haze);
    color: var(--g6-body);
    font-size: 0.9rem;
}

.s6g-status b,
.s6g-status strong {
    color: var(--g6-ink);
}

.s6g-dot {
    position: relative;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--g6-blue);
}

.s6g-dot--amber {
    background: #f0a020;
}

@media (prefers-reduced-motion: no-preference) {
    .s6g-dot::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: inherit;
        animation: s6g-ping 1.8s ease-out infinite;
    }
}

@keyframes s6g-ping {
    0% { opacity: 0.6; transform: scale(1); }
    80%, 100% { opacity: 0; transform: scale(2.6); }
}

/* Info note inside the card */
.s6g-note {
    margin: 22px 0 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--g6-haze);
    color: var(--g6-body);
    font-size: 0.93rem;
    line-height: 1.55;
    text-align: left;
}

.s6g-note p + p {
    margin-top: 8px;
}

/* Server flash messages (Helper::message() legacy alert) */
.s6g .custom-alert {
    position: relative;
    margin: 0 0 20px;
    padding: 14px 44px 14px 16px;
    border: 0;
    border-radius: 12px;
    box-shadow: none !important;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.s6g .custom-alert .close-alert {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

/* ==========================================================================
   Forms (password gate, email preferences)
   ========================================================================== */

.s6g-form {
    margin-top: 26px;
    text-align: left;
}

.s6g-label {
    display: block;
    margin: 0 0 8px;
    color: var(--g6-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.s6g-input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--g6-line);
    border-radius: 12px;
    background: var(--g6-paper);
    color: var(--g6-ink);
    font-family: var(--g6-text);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.s6g-input:focus {
    border-color: var(--g6-blue);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(9, 103, 242, 0.14);
}

.s6g-form .s6g-btn {
    width: 100%;
    margin-top: 14px;
}

/* Selectable option rows (email preferences) */
.s6g-options {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.s6g-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 14px;
    align-items: start;
    margin: 0;
    padding: 16px 18px;
    border: 1.5px solid var(--g6-line);
    border-radius: 14px;
    background: var(--g6-paper);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.s6g-option:hover {
    border-color: #b9c6d6;
}

.s6g-option:has(input:checked) {
    border-color: var(--g6-stop);
    background: #fff8f8;
}

.s6g-option input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--g6-stop);
    cursor: pointer;
}

.s6g-option-title {
    color: var(--g6-ink);
    font-weight: 700;
    line-height: 1.35;
}

.s6g-option-text {
    grid-column: 2;
    color: var(--g6-muted) !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Email preferences (unsubscribe.php) */
.s6g-btn--danger {
    background: var(--g6-stop);
    color: #fff !important;
}

.s6g-btn--danger:hover {
    background: var(--g6-stop-deep);
}

.s6g .s6g-text.text-muted {
    color: var(--g6-body) !important;
}

.s6g h2.s6g-label {
    margin: 0 0 12px;
    font-family: var(--g6-text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.s6g-flash .custom-alert {
    margin: 22px 0 0;
}

.s6g-note i {
    margin-right: 6px;
    color: var(--g6-blue);
}

.s6g-prefs-note {
    margin-top: 18px !important;
}

/* The "Subscribe again" form the page script adds after a successful unsubscribe */
.s6g #undoForm {
    margin-top: 6px;
}

.s6g #undoForm .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border: 1.5px solid var(--g6-ink);
    border-radius: 12px;
    background: var(--g6-paper);
    color: var(--g6-ink);
    font-family: var(--g6-text);
    font-weight: 700;
}

.s6g #undoForm .btn:hover {
    background: var(--g6-ink);
    color: #fff;
}

/* ==========================================================================
   404: the address that was tried, suggestions
   ========================================================================== */

.s6g-tried {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 6px 14px;
    border: 1px dashed #f0b4b6;
    border-radius: 14px;
    background: var(--g6-stop-soft);
    color: var(--g6-stop-deep);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
}

/* The full address wraps, so a visitor can spot a typo in it. */
.s6g-tried span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.s6g-suggest {
    margin: 30px -40px -36px;
    padding: 24px 32px 28px;
    border-top: 1px solid var(--g6-line);
    border-radius: 0 0 26px 26px;
    background: #fafcfe;
}

.s6g-suggest-title {
    margin: 0 0 14px !important;
    color: var(--g6-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.s6g-suggest ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.s6g-suggest a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--g6-line);
    border-radius: 12px;
    background: var(--g6-paper);
    color: var(--g6-ink) !important;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.s6g-suggest a:hover {
    border-color: var(--g6-blue);
    transform: translateY(-1px);
}

.s6g-suggest a i {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--g6-blue-soft);
    color: var(--g6-blue);
    font-size: 0.9rem;
}

/* ==========================================================================
   Branded-domain landing (system short domains)
   ========================================================================== */

.s6g-faces {
    display: flex;
    justify-content: center;
    margin: 22px 0 8px;
}

.s6g-faces img {
    width: 34px;
    height: 34px;
    margin-left: -8px;
    border: 2px solid var(--g6-paper);
    border-radius: 50%;
    object-fit: cover;
}

.s6g-faces img:first-child {
    margin-left: 0;
}

.s6g-proof {
    color: var(--g6-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

/* ==========================================================================
   Phones
   ========================================================================== */

@media (max-width: 560px) {
    .s6g {
        gap: 22px;
        padding: 28px 16px 32px;
    }

    .s6g-card {
        padding: 30px 22px 26px;
        border-radius: 22px;
    }

    .s6g-split,
    .s6g-suggest {
        margin: 26px -22px -26px;
        padding: 22px 22px 24px;
        border-radius: 0 0 22px 22px;
    }

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

    .s6g-art {
        width: 96px;
        height: 96px;
        margin-bottom: 18px;
        border-radius: 26px;
    }

    .s6g-art img {
        width: 68px;
        height: 68px;
    }

    .s6g-actions .s6g-btn {
        flex: 1 1 100%;
    }

    .s6g-apps {
        gap: 6px;
    }

    .s6g-apps img {
        width: 32px;
        height: 32px;
        padding: 6px;
        border-radius: 9px;
    }

    .s6g-text {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .s6g * {
        transition: none !important;
    }
}
