:root {
    --ink: #17202a;
    --soft-ink: #2d3b48;
    --muted: #667789;
    --line: #dce5ec;
    --paper: #ffffff;
    --surface: #f4f7fa;
    --surface-strong: #eaf0f5;
    --teal: #0f7b75;
    --teal-dark: #075550;
    --teal-soft: #dff4ec;
    --amber: #d9961f;
    --amber-soft: #fff3d8;
    --red: #b83b3b;
    --red-soft: #fff0f0;
    --green: #1f8d5c;
    --shadow: 0 18px 55px rgba(23, 32, 42, 0.11);
    --shadow-soft: 0 10px 30px rgba(23, 32, 42, 0.08);
}

:root[data-theme="dark"] {
    --ink: #eef6f8;
    --soft-ink: #d3e3ea;
    --muted: #a7bac5;
    --line: #2d4350;
    --paper: #111d27;
    --surface: #0c151d;
    --surface-strong: #172733;
    --teal: #20b6a9;
    --teal-dark: #75ddd3;
    --teal-soft: #113b3a;
    --amber: #e0ac43;
    --amber-soft: #3a2c12;
    --red: #ff7777;
    --red-soft: #351a1a;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(rgba(15, 123, 117, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 150, 31, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #ffffff 0, var(--surface) 360px),
        var(--surface);
    background-size: 34px 34px, 34px 34px, auto, auto;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
    word-break: normal;
}

:root[data-theme="dark"] body {
    background:
        linear-gradient(rgba(32, 182, 169, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 172, 67, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, #101d26 0, var(--surface) 360px),
        var(--surface);
    background-size: 34px 34px, 34px 34px, auto, auto;
}

a {
    color: var(--teal);
    text-decoration: none;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}

a:hover {
    text-decoration: underline;
}

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

h1 {
    max-width: 720px;
    margin-bottom: 18px;
    font-size: 72px;
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 12px;
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: 0;
}

h3 {
    margin: 26px 0 12px;
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: 0;
}

span,
strong,
small,
label,
li,
dt,
dd,
button,
input,
select,
textarea {
    min-width: 0;
    word-break: normal;
}

main {
    padding-bottom: 64px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    min-height: 78px;
    padding: 0 max(18px, calc((100% - 1160px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(220, 229, 236, 0.86);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 900;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--teal);
    font-size: 14px;
    letter-spacing: 0;
}

.brand-logo {
    display: block;
    width: 210px;
    max-width: min(46vw, 220px);
    height: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 18px;
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
}

.nav-links a {
    color: var(--soft-ink);
    white-space: nowrap;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--soft-ink);
    background: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--soft-ink);
    background: var(--paper);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(23, 32, 42, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-toggle::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 150, 31, 0.16);
}

:root[data-theme="dark"] .theme-toggle::before {
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(32, 182, 169, 0.2);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 123, 117, 0.16);
}

.hero,
.verify-hero,
.certificate,
.notice,
.info-band,
.admin-shell,
.admin-login {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero {
    min-height: calc(100vh - 128px);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.8fr);
    align-items: center;
    gap: 50px;
    padding: 48px 0 58px;
}

.lead,
.discount {
    max-width: 690px;
    color: var(--muted);
    font-size: 20px;
}

.discount {
    color: var(--soft-ink);
}

.hero-actions,
.input-row,
.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.button-small {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
}

.button-primary {
    color: #ffffff;
    background: var(--teal);
    box-shadow: 0 10px 22px rgba(15, 123, 117, 0.2);
}

.button-primary:hover {
    background: var(--teal-dark);
}

.button-secondary {
    color: var(--teal-dark);
    background: #ffffff;
    border-color: var(--line);
}

.button-dark {
    color: #ffffff;
    background: var(--ink);
}

.button-danger {
    color: #ffffff;
    background: var(--red);
}

.button-danger:hover {
    box-shadow: 0 14px 30px rgba(184, 59, 59, 0.22);
}

.hero-media {
    position: relative;
    margin: 0;
    min-height: 440px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.hero-media figcaption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(23, 32, 42, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.hero-media figcaption strong,
.hero-media figcaption span {
    display: block;
}

.hero-media figcaption span {
    margin-top: 4px;
    color: #d8e4ec;
    font-size: 14px;
}

.info-band {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.info-item h2 {
    margin-bottom: 6px;
    font-size: 23px;
}

.info-item p {
    margin-bottom: 0;
    color: var(--muted);
}

.founder-showcase {
    width: min(1160px, calc(100% - 36px));
    margin: 28px auto 0;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 28px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.home-products {
    width: min(1160px, calc(100% - 36px));
    margin: 38px auto 0;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading-row h2 {
    max-width: 720px;
    margin-bottom: 0;
}

.founder-showcase h2 {
    margin-bottom: 10px;
}

.founder-showcase p:last-child {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.verify-hero {
    padding: 64px 0 34px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(330px, 520px);
    gap: 42px;
    align-items: end;
}

.verify-heading p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.verify-form,
.login-card,
.admin-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.verify-form {
    padding: 24px;
}

.verify-form label,
.login-card label,
.field-grid label,
.wide-label {
    display: block;
    color: var(--soft-ink);
    font-size: 14px;
    font-weight: 900;
}

.verify-form label,
.login-card label {
    margin-bottom: 10px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
}

input,
select {
    min-height: 46px;
    padding: 10px 12px;
}

textarea {
    min-height: 126px;
    padding: 12px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(15, 123, 117, 0.16);
    border-color: var(--teal);
}

.verify-form input {
    flex: 1 1 260px;
    min-width: 0;
    text-transform: uppercase;
}

.notice {
    margin-top: 24px;
    padding: 24px;
    border-radius: 8px;
}

.notice.invalid {
    border: 1px solid rgba(184, 59, 59, 0.28);
    background: var(--red-soft);
}

.notice h2 {
    margin-bottom: 8px;
    color: var(--red);
    font-size: 26px;
}

.notice p {
    margin-bottom: 0;
}

.certificate {
    margin-top: 34px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.direct-license-page main {
    padding-bottom: 36px;
}

.direct-license-page .certificate {
    margin-top: 28px;
    padding: 24px;
}

.direct-license-page .certificate-top {
    padding-bottom: 18px;
}

.direct-license-page .certificate-top h2 {
    margin-bottom: 6px;
    font-size: 30px;
}

.direct-license-page .certificate-top p {
    font-size: 14px;
}

.certificate-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.certificate-top h2 {
    max-width: 780px;
    margin-bottom: 8px;
}

.certificate-top p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.permanent-link {
    margin-top: 12px;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 800;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-size: 14px;
    font-weight: 900;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 28px;
}

.direct-license-page .certificate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding-top: 18px;
}

.certificate-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.direct-license-page .certificate-section {
    padding: 16px;
}

.direct-license-page .certificate-section h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.certificate-section h3 {
    color: var(--teal-dark);
}

.grantee {
    background: linear-gradient(145deg, #ffffff, #f0faf8);
}

.grantee-name,
.issuer-name {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 900;
}

.certificate-section p:last-child {
    margin-bottom: 0;
}

.issuer-profile {
    display: flex;
    gap: 14px;
    align-items: center;
}

.certificate .issuer-profile .issuer-photo {
    display: block;
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 70px;
    aspect-ratio: 1;
    border: 3px solid var(--amber);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(15, 123, 117, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.certificate .issuer-profile:hover .issuer-photo,
.certificate .issuer-profile .issuer-photo:hover {
    border-color: var(--teal);
    box-shadow: 0 16px 32px rgba(15, 123, 117, 0.28);
    transform: translateY(-2px) scale(1.06) rotate(-2deg);
}

.direct-license-page .issuer-profile {
    gap: 10px;
}

.direct-license-page .certificate .issuer-profile .issuer-photo {
    flex-basis: 54px;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    height: 54px;
}

dl {
    margin: 0;
}

dl div {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1fr);
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid #edf2f5;
}

.direct-license-page dl div {
    grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    font-size: 14px;
}

.direct-license-page .check-list li,
.direct-license-page .restriction-list li {
    margin-top: 8px;
    font-size: 14px;
}

.direct-license-page .legal-links {
    margin-top: 16px;
    padding-top: 16px;
}

.direct-license-page .legal-links h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.direct-license-page .legal-links li {
    margin-top: 4px;
    font-size: 14px;
}

dl div:first-child {
    padding-top: 0;
    border-top: 0;
}

dt {
    color: var(--muted);
    font-weight: 900;
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 900;
}

.check-list,
.restriction-list,
.legal-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li,
.restriction-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.check-list li:first-child,
.restriction-list li:first-child {
    margin-top: 0;
}

.check-list li::before,
.restriction-list li::before {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.check-list li::before {
    content: "+";
    background: var(--teal);
}

.restriction-list li::before {
    content: "!";
    background: var(--red);
}

.legal-links {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.legal-links li {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.legal-links li:first-child {
    margin-top: 0;
}

.site-footer {
    margin-top: 70px;
    padding: 46px 0;
    color: #dbe7ed;
    background:
        linear-gradient(115deg, rgba(15, 123, 117, 0.28) 0 2px, transparent 2px 90px),
        linear-gradient(135deg, #111d27, #17202a 55%, #102b35);
}

.footer-inner {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: start;
}

.footer-brand {
    display: grid;
    gap: 14px;
}

.footer-brand p {
    max-width: 720px;
    margin-bottom: 0;
    color: #c6d5de;
}

.footer-logo {
    width: min(310px, 100%);
    height: auto;
    padding: 10px 0;
}

.footer-phone {
    width: max-content;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 900;
}

.footer-phone:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
}

.footer-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-links a,
.site-footer a {
    color: #ffffff;
}

.founder-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    overflow: visible;
}

.founder-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(15, 123, 117, 0.42), rgba(217, 150, 31, 0.24));
    opacity: 0;
    transition: opacity 0.18s ease;
}

.founder-card:hover::after {
    opacity: 1;
}

.founder-photo {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    border: 4px solid rgba(255, 255, 255, 0.74);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.founder-card div {
    position: relative;
    z-index: 1;
}

.founder-card span,
.founder-card small {
    display: block;
    color: #a9bec8;
}

.founder-card > div > span {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.founder-card strong {
    display: block;
    margin-top: 3px;
    color: #ffffff;
    font-size: 23px;
}

.founder-card p {
    margin: 4px 0 2px;
    color: #dbe7ed;
    font-size: 14px;
}

.founder-card-light {
    color: var(--ink);
    background: linear-gradient(135deg, #ffffff, #f0faf8);
    box-shadow: var(--shadow-soft);
}

.founder-card-light span,
.founder-card-light small {
    color: var(--muted);
}

.founder-card-light strong {
    color: var(--ink);
}

.founder-card-light p {
    color: var(--soft-ink);
}

.founder-tooltip {
    position: absolute;
    left: var(--tip-x, 50%);
    bottom: calc(100% + 14px);
    width: min(320px, calc(100vw - 48px));
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(7, 85, 80, 0.94);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    font-size: 14px;
    font-weight: 800;
    transform: translate(-50%, 8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.founder-card:hover .founder-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.click-burst {
    position: fixed;
    z-index: 9999;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(15, 123, 117, 0.8);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: click-burst 0.62s ease-out forwards;
}

@keyframes click-burst {
    from {
        opacity: 0.88;
        transform: translate(-50%, -50%) scale(0.4);
        box-shadow: 0 0 0 0 rgba(217, 150, 31, 0.24);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(4.5);
        box-shadow: 0 0 0 10px rgba(217, 150, 31, 0);
    }
}

.legal-page {
    width: min(980px, calc(100% - 36px));
    margin: 0 auto;
    padding: 64px 0 20px;
}

.legal-page h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: 58px;
}

.legal-intro {
    max-width: 860px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 20px;
}

.legal-section {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.legal-section h2 {
    margin-bottom: 10px;
    color: var(--teal-dark);
    font-size: 24px;
}

.legal-section p {
    margin-bottom: 0;
    color: var(--soft-ink);
}

.store-hero,
.product-grid,
.product-detail,
.payment-page {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.store-hero {
    padding: 58px 0 24px;
}

.store-hero h1 {
    margin-bottom: 14px;
}

.store-hero p {
    max-width: 780px;
    color: var(--muted);
    font-size: 19px;
}

.store-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.store-filters a,
.product-tags span,
.product-badges span,
.discount-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft-ink);
    background: var(--paper);
    font-size: 13px;
    font-weight: 900;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 340px));
    gap: 22px;
    justify-content: start;
}

.product-card {
    width: 100%;
    max-width: 340px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.product-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--surface-strong);
    overflow: hidden;
}

.product-thumb img,
.payment-summary img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 18px;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.product-badges span,
.discount-pill {
    color: var(--teal-dark);
    background: var(--teal-soft);
}

.product-card h2 {
    margin-bottom: 9px;
    font-size: 22px;
}

.product-card p {
    color: var(--muted);
}

.price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 14px 0 16px;
}

.old-price {
    color: var(--muted);
    text-decoration: line-through;
}

.price-row strong {
    font-size: 24px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1fr);
    gap: 32px;
    padding-top: 56px;
}

.product-gallery,
.product-summary,
.product-description,
.payment-summary,
.payment-card,
.product-manager-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}

.product-gallery {
    padding: 16px;
}

.product-main-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.gallery-strip img {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.product-summary {
    padding: 28px;
}

.product-summary h1 {
    font-size: 48px;
}

.price-panel {
    margin: 22px 0;
    padding: 18px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.price-panel strong {
    font-size: 42px;
    line-height: 1;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.product-description {
    grid-column: 1 / -1;
    padding: 28px;
}

.product-description h2 {
    font-size: 30px;
}

.related-products {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.related-products .product-grid {
    width: 100%;
    margin: 0;
}

.payment-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 24px;
    padding-top: 58px;
}

.payment-heading {
    grid-column: 1 / -1;
}

.payment-heading p {
    max-width: 850px;
    color: var(--muted);
    font-size: 18px;
}

.payment-summary {
    padding: 16px;
    align-self: start;
}

.payment-summary img {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

.payment-summary h2 {
    margin: 14px 0 6px;
    font-size: 24px;
}

.payment-summary span,
.payment-summary strong {
    display: block;
}

.payment-summary strong {
    margin: 6px 0;
    font-size: 34px;
}

.payment-methods {
    display: grid;
    gap: 18px;
}

.payment-card {
    padding: 22px;
}

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

.payment-card-top span {
    color: var(--muted);
    font-weight: 900;
}

.payment-card h2 {
    margin: 4px 0;
    font-size: 30px;
}

.asset-badge {
    display: inline-grid;
    place-items: center;
    min-width: 68px;
    min-height: 68px;
    border-radius: 50%;
    color: #ffffff !important;
    background: var(--teal);
    font-size: 15px;
}

.payment-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 900;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.copy-row code {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.payment-facts {
    margin-top: 12px;
}

.payment-warning {
    margin: 16px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.product-placement {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.product-placement label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 900;
}

.product-placement input {
    width: auto;
    min-height: auto;
}

.product-import-card {
    margin-bottom: 22px;
}

.import-source-panel {
    margin: 14px 0 18px;
    padding: 14px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--surface), rgba(15, 123, 117, 0.08));
}

.import-source-panel strong {
    color: var(--teal-dark);
    font-size: 13px;
    text-transform: uppercase;
}

.import-source-panel span {
    overflow-wrap: anywhere;
    color: var(--soft-ink);
    font-size: 13px;
    font-weight: 800;
}

.import-grid {
    align-items: end;
}

.manual-import-divider {
    margin: 24px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.manual-import-divider::before,
.manual-import-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.toggle-label {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 900;
}

.toggle-label input {
    width: auto;
    min-height: auto;
}

.admin-product-preview {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.admin-product-preview img {
    width: 110px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
}

.inline-delete-form {
    display: inline;
}

.inline-delete-form button {
    border: 0;
    color: var(--red);
    background: transparent;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.admin-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.seo-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .hero-media,
:root[data-theme="dark"] .verify-form,
:root[data-theme="dark"] .certificate,
:root[data-theme="dark"] .certificate-section,
:root[data-theme="dark"] .notice,
:root[data-theme="dark"] .info-band,
:root[data-theme="dark"] .founder-showcase,
:root[data-theme="dark"] .legal-section,
:root[data-theme="dark"] .store-filters a,
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .product-gallery,
:root[data-theme="dark"] .product-summary,
:root[data-theme="dark"] .product-description,
:root[data-theme="dark"] .payment-summary,
:root[data-theme="dark"] .payment-card,
:root[data-theme="dark"] .price-panel,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .admin-card,
:root[data-theme="dark"] .admin-sidebar,
:root[data-theme="dark"] .admin-metrics div,
:root[data-theme="dark"] .hover-message-list span,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: var(--paper);
    color: var(--ink);
}

:root[data-theme="dark"] .site-header {
    border-color: rgba(45, 67, 80, 0.88);
    background: rgba(17, 29, 39, 0.94);
}

:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .logout-form button {
    color: var(--teal-dark);
    background: var(--surface-strong);
    border-color: var(--line);
}

:root[data-theme="dark"] .button-dark {
    color: #061014;
    background: var(--teal-dark);
}

:root[data-theme="dark"] .grantee,
:root[data-theme="dark"] .founder-card-light {
    background: linear-gradient(135deg, var(--paper), #132b2e);
}

:root[data-theme="dark"] .product-thumb,
:root[data-theme="dark"] .price-panel,
:root[data-theme="dark"] .hero-media {
    border-color: var(--line);
}

:root[data-theme="dark"] dl div {
    border-color: var(--line);
}

:root[data-theme="dark"] .hero-media figcaption {
    background: rgba(0, 0, 0, 0.78);
}

:root[data-theme="dark"] a {
    color: #75ddd3;
}

@media (max-width: 980px) {
    .product-grid,
    .product-detail,
    .payment-page {
        grid-template-columns: repeat(auto-fill, minmax(260px, 340px));
    }

    .product-detail,
    .payment-page {
        grid-template-columns: 1fr;
    }

    .payment-summary {
        order: -1;
    }
}

@media (max-width: 720px) {
    .store-hero,
    .product-grid,
    .product-detail,
    .payment-page {
        width: min(100% - 24px, 1160px);
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: none;
    }

    .product-summary h1 {
        font-size: 38px;
    }

    .copy-row,
    .product-placement {
        grid-template-columns: 1fr;
    }

    .copy-row .button {
        width: 100%;
    }
}

.admin-login {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 42px;
    align-items: center;
    padding: 58px 0;
}

.admin-login-copy p:last-child,
.admin-title p,
.card-heading p {
    color: var(--muted);
}

.login-card {
    padding: 28px;
}

.login-card input {
    margin-bottom: 16px;
}

.login-card .button {
    width: 100%;
}

.admin-shell {
    padding: 48px 0 30px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 96px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--soft-ink);
    font-size: 14px;
    font-weight: 900;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    color: var(--teal-dark);
    text-decoration: none;
    border-color: rgba(15, 123, 117, 0.18);
    background: var(--teal-soft);
}

.admin-content {
    min-width: 0;
}

.admin-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.admin-title h1 {
    margin-bottom: 12px;
    font-size: 50px;
}

.admin-title p {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 18px;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 12px;
}

.admin-metrics div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.admin-metrics strong,
.admin-metrics span {
    display: block;
}

.admin-metrics strong {
    font-size: 28px;
    line-height: 1;
}

.admin-metrics span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.flash {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 800;
}

.flash-success {
    border: 1px solid rgba(31, 141, 92, 0.26);
    color: #145f3e;
    background: #e9f8f0;
}

.flash-error {
    border: 1px solid rgba(184, 59, 59, 0.28);
    color: #8f2929;
    background: var(--red-soft);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.15fr);
    gap: 22px;
    align-items: start;
}

.admin-card {
    padding: 22px;
}

.preview-card {
    position: sticky;
    top: 98px;
}

.fields-card {
    grid-row: span 3;
}

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

.card-heading h2 {
    margin-bottom: 4px;
    font-size: 24px;
}

.card-heading p {
    margin-bottom: 0;
    font-size: 14px;
}

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

.field-grid.textareas {
    grid-template-columns: 1fr 1fr;
}

.field-grid input,
.field-grid select,
.field-grid textarea,
.wide-label textarea {
    margin-top: 7px;
}

.wide-label {
    margin-top: 14px;
}

.admin-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.source-card textarea,
.output-card textarea {
    min-height: 430px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
}

.certificate-preview {
    width: 100%;
    background: #ffffff;
}

.preview-border {
    min-height: 760px;
    padding: 30px;
    border: 4px solid var(--teal);
    outline: 1px solid var(--amber);
    outline-offset: -14px;
    background: #ffffff;
}

.preview-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.preview-logo {
    width: min(260px, 62%);
    height: auto;
}

.preview-founder-photo {
    width: 74px;
    height: 74px;
    border: 4px solid var(--amber);
    border-radius: 50%;
    object-fit: cover;
}

.preview-kicker {
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.certificate-preview h2 {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 28px;
    text-align: center;
}

.certificate-preview h2 + p {
    max-width: 660px;
    margin: 0 auto 26px;
    color: var(--muted);
    text-align: center;
}

.preview-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.preview-split span,
.preview-split small,
.preview-footer span {
    display: block;
}

.preview-split span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.preview-split strong {
    display: block;
    margin: 6px 0;
    font-size: 24px;
}

.preview-split small {
    color: var(--muted);
}

.preview-status {
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.preview-pairs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 12px;
}

.preview-pairs div {
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f5;
}

.preview-pairs span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.preview-pairs strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.preview-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.preview-two-column h3 {
    margin-top: 0;
    color: var(--teal-dark);
}

.preview-two-column ul {
    margin: 0;
    padding-left: 18px;
}

.preview-two-column li {
    margin-top: 6px;
}

.preview-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.preview-footer div:last-child {
    text-align: right;
}

.preview-footer strong {
    display: block;
}

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

.saved-card {
    margin-top: 22px;
}

.settings-card {
    margin-top: 22px;
}

.message-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.hover-message-list {
    max-height: 250px;
    margin-top: 14px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow-y: auto;
}

.hover-message-list span {
    display: inline-flex;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft-ink);
    background: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.saved-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.saved-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

.saved-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.saved-table td {
    font-weight: 700;
}

@media (max-width: 980px) {
    h1 {
        font-size: 54px;
    }

    .hero,
    .verify-hero,
    .admin-login,
    .admin-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-sidebar nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero {
        min-height: auto;
    }

    .info-band {
        grid-template-columns: 1fr;
    }

    .direct-license-page .certificate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-card {
        position: static;
    }

    .fields-card {
        grid-row: auto;
    }
}

@media (max-width: 720px) {
    .site-header {
        position: static;
        padding-top: 14px;
        padding-bottom: 14px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .brand {
        white-space: normal;
    }

    .brand-logo {
        max-width: 190px;
    }

    .nav-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        font-size: 14px;
    }

    .nav-links a,
    .theme-toggle {
        min-height: 42px;
        padding: 9px 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--paper);
        text-align: center;
    }

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

    .admin-sidebar a {
        justify-content: center;
        text-align: center;
    }

    .hero,
    .verify-hero,
    .certificate,
    .notice,
    .info-band,
    .home-products,
    .founder-showcase,
    .admin-shell,
    .admin-login {
        width: min(100% - 24px, 1160px);
    }

    h1 {
        font-size: 43px;
        line-height: 1.04;
    }

    h2 {
        font-size: 28px;
    }

    .hero {
        gap: 22px;
        padding: 30px 0 34px;
    }

    .lead,
    .discount,
    .store-hero p,
    .verify-heading p:last-child,
    .founder-showcase p:last-child {
        font-size: 16px;
    }

    .hero-media,
    .hero-media img {
        min-height: 250px;
    }

    .hero-actions,
    .input-row,
    .admin-actions,
    .section-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .input-row input {
        width: 100%;
    }

    .input-row button,
    .hero-actions .button,
    .info-band .button,
    .admin-actions .button {
        width: 100%;
    }

    .info-band,
    .founder-showcase {
        padding: 20px;
    }

    .certificate {
        padding: 18px;
    }

    .certificate-top,
    .preview-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .certificate-top h2,
    .direct-license-page .certificate-top h2 {
        font-size: 26px;
        line-height: 1.12;
    }

    .certificate-grid,
    .section-heading-row,
    .founder-showcase,
    .field-grid,
    .field-grid.textareas,
    .preview-pairs,
    .preview-two-column,
    .preview-split {
        grid-template-columns: 1fr;
    }

    .direct-license-page .certificate-grid {
        grid-template-columns: 1fr;
    }

    .certificate-section,
    .direct-license-page .certificate-section {
        padding: 15px;
    }

    dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .direct-license-page dl div {
        grid-template-columns: 1fr;
    }

    dt,
    dd {
        font-size: 14px;
    }

    .admin-card,
    .login-card {
        padding: 18px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
    }

    .founder-card {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .founder-photo {
        width: 80px;
        height: 80px;
    }

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

    .button-small {
        width: 100%;
    }

    .preview-footer div:last-child {
        text-align: left;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    main {
        padding-bottom: 42px;
    }

    .brand-logo {
        max-width: 170px;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .admin-sidebar nav {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 34px;
        line-height: 1.08;
    }

    h2,
    .legal-page h1,
    .product-summary h1 {
        font-size: 26px;
        line-height: 1.12;
    }

    .hero,
    .verify-hero,
    .certificate,
    .notice,
    .info-band,
    .home-products,
    .founder-showcase,
    .admin-shell,
    .admin-login,
    .store-hero,
    .product-grid,
    .product-detail,
    .payment-page {
        width: min(100% - 18px, 1160px);
    }

    .hero-media,
    .hero-media img {
        min-height: 220px;
    }

    .certificate {
        padding: 14px;
    }

    .founder-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .founder-photo {
        margin: 0 auto;
    }

    .founder-tooltip {
        left: 50%;
        width: min(280px, calc(100vw - 28px));
    }
}

@media print {
    body.admin-page {
        background: #ffffff;
    }

    body.admin-page * {
        visibility: hidden;
    }

    body.admin-page #certificatePreview,
    body.admin-page #certificatePreview * {
        visibility: visible;
    }

    body.admin-page #certificatePreview {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none;
    }

    body.admin-page .preview-border {
        min-height: auto;
        border-color: #0f7b75;
        outline-color: #d9961f;
    }

    @page {
        margin: 0.45in;
    }
}
