:root {
    --ground: var(--brand-surface);
    --ink: var(--brand-ink);
    --muted: var(--brand-muted);
    --accent: var(--brand-purple);
    --accent-surface: var(--brand-tint);
    --surface: var(--brand-ground);
    --control: var(--brand-control);
    --border: var(--brand-border);
    font-family: var(--brand-font);
    color: var(--ink);
    background: var(--ground);
    font-synthesis: none;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
a {
    color: inherit;
    text-underline-offset: 4px;
}
button,
input,
textarea,
select {
    font: inherit;
}
button,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
button {
    cursor: pointer;
}
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
[hidden] {
    display: none !important;
}
h1,
h2,
h3 {
    letter-spacing: -0.045em;
    text-wrap: balance;
}
p {
    line-height: 1.75;
}
.skip-link {
    position: absolute;
    left: 24px;
    top: -80px;
    padding: 12px 20px;
    background: var(--ink);
    color: white;
    z-index: 100;
}
.skip-link:focus {
    top: 16px;
}
.site-nav {
    max-width: 1360px;
    padding: 28px 40px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.wordmark {
    display: inline-flex;
    align-items: center;
    flex: none;
    text-decoration: none;
}
.site-nav nav,
.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-nav nav a,
.login-link {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 0;
}
.site-nav nav a:hover,
.login-link:hover,
.text-action:hover {
    color: var(--accent);
}
.site-nav-actions {
    gap: 24px;
}
.button {
    min-height: 48px;
    padding: 13px 22px;
    border: 0;
    border-radius: var(--brand-radius-control);
    color: white;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    transition:
        background-color 160ms ease,
        transform 160ms ease;
}
.button:hover {
    background: var(--brand-pressed);
}
.button:active {
    transform: translateY(1px);
}
.button.secondary {
    background: var(--accent-surface);
    color: var(--accent);
}
.button.secondary:hover {
    background: var(--brand-tint-hover);
}
.button.compact {
    min-height: 40px;
    font-size: 13px;
    padding: 10px 14px;
}
.text-action {
    background: none;
    border: 0;
    padding: 10px 0;
    color: var(--ink);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}
.site-footer {
    max-width: 1280px;
    margin: auto;
    padding: 40px 40px 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
}
.site-footer .wordmark {
    --wordmark-width: 145px;
}
.site-footer p,
.site-footer nav,
.site-footer small {
    font-size: 12px;
    color: var(--muted);
}
.site-footer p {
    margin: 12px 0 0;
}
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    max-width: 500px;
}
.site-footer nav a {
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.template-section {
    max-width: 1280px;
    padding: 64px 40px 80px;
    margin: auto;
}
.gallery-heading {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    align-items: flex-end;
    margin-bottom: 36px;
}
.gallery-heading h1,
.text-page h1 {
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.1;
    margin: 0 0 20px;
}
.gallery-heading > div > p {
    font-size: 17px;
    line-height: 1.7;
    max-width: 48ch;
    color: var(--muted);
    margin: 0;
}
.gallery-quota {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px;
    margin-block: 0 24px;
    background: var(--accent-surface);
    border: 1px solid var(--border);
    border-radius: var(--brand-radius-panel);
}
.gallery-quota p {
    margin: 4px 0 0;
    color: var(--muted);
}
.gallery-quota a.button {
    min-height: 44px;
}
.gallery-note {
    max-width: 24ch;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}
.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}
.template-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.template-filters button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 11px 14px;
    min-height: 44px;
    border-radius: 6px;
    font-size: 13px;
}
.template-filters button:hover {
    background: var(--surface);
}
.template-filters button[aria-pressed="true"] {
    background: var(--accent-surface);
    color: var(--accent);
    font-weight: 600;
}
.gallery-count {
    color: var(--muted);
    font-size: 13px;
    flex: none;
}
.template-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 28px;
}
.template-card {
    min-width: 0;
}
.template-card-preview {
    background: transparent;
    display: block;
    padding: 0;
    border: 0;
    width: 100%;
    color: inherit;
    text-align: inherit;
    border-radius: 6px;
    overflow: hidden;
}
.template-card-preview .theme-preview {
    padding: 24px;
    min-height: 366px;
}
.template-card-preview .theme-preview-profile > strong {
    font-size: 24px;
}
.template-card-preview .theme-preview-profile > p {
    font-size: 13px;
}
.template-card-preview .profile-link-copy strong {
    font-size: 13px;
}
.template-card-preview .profile-link-copy small {
    font-size: 11px;
}
.template-card-preview .theme-preview-avatar {
    width: 64px;
    height: 64px;
    font-size: 28px;
}
.template-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 10px;
}
.template-card-heading h2 {
    font-size: 20px;
    line-height: 1.25;
    margin: 0;
}
.template-card-heading > span {
    font-size: 11px;
    color: var(--muted);
}
.template-card > p {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 14px;
}
.template-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.template-card-actions .text-action {
    font-size: 13px;
}
.gallery-disclaimer {
    margin: 48px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.template-dialog {
    width: min(520px, calc(100% - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    border: 0;
    padding: 24px;
    border-radius: 12px;
    background: var(--ground);
    color: var(--ink);
    overflow: auto;
}
.template-dialog::backdrop {
    background: var(--brand-scrim);
}
.template-dialog > header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.template-dialog > header h2 {
    font-size: 20px;
    margin: 0 0 6px;
}
.template-dialog > header p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}
.dialog-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 6px;
    color: var(--ink);
    background: var(--surface);
    font-size: 28px;
    line-height: 1;
}
.dialog-profile {
    max-width: 328px;
    margin: auto;
}
.dialog-profile .theme-preview {
    min-height: 400px;
}
.dialog-profile .theme-preview-profile > strong {
    font-size: 25px;
}
.dialog-profile .theme-preview-profile > p {
    font-size: 13px;
}
.dialog-profile .theme-preview-links .profile-link {
    min-height: 62px;
}
.dialog-profile .profile-link-copy strong {
    font-size: 13px;
}
.dialog-profile .profile-link-copy small {
    font-size: 11px;
}
.template-dialog > footer {
    margin-top: 24px;
    text-align: center;
}
.template-dialog > footer p {
    font-size: 13px;
    color: var(--muted);
}
.template-dialog > footer .button {
    width: 100%;
}
.text-page {
    max-width: 800px;
    margin: auto;
    padding: 64px 32px 100px;
    min-height: 60dvh;
}
.text-page h2 {
    font-size: 26px;
    margin: 36px 0 16px;
}
.text-page h3 {
    font-size: 20px;
    margin: 28px 0 14px;
}
.text-page p,
.text-page li {
    font-family: var(--brand-font);
    font-size: 16px;
    line-height: 1.8;
}
.text-page label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin: 24px 0;
}
.text-page input,
.text-page textarea,
.text-page select {
    font-size: 16px;
    padding: 12px;
    min-height: 48px;
    border: 1px solid var(--control);
    border-radius: 6px;
    background: var(--ground);
    color: var(--ink);
    width: 100%;
}
.text-page textarea {
    min-height: 140px;
    resize: vertical;
}
.text-page details {
    padding: 20px 0;
}
.text-page summary {
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.5;
}
.legal-notice {
    background: var(--accent-surface);
    padding: 18px 20px;
    font-size: 14px !important;
}
@media (max-width: 1050px) {
    .site-nav {
        padding: 24px 32px;
    }
    .site-nav nav {
        gap: 22px;
    }
    .template-section {
        padding: 48px 32px 64px;
    }
    .template-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .site-footer {
        padding: 32px;
    }
}
@media (max-width: 760px) {
    .site-nav {
        padding: 24px;
        gap: 20px;
    }
    .site-nav .wordmark {
        --wordmark-width: clamp(108px, 32vw, 142px);
    }
    .site-nav nav {
        display: none;
    }
    .site-nav-actions {
        gap: 20px;
    }
    .site-footer {
        display: block;
        padding: 36px 24px 28px;
    }
    .site-footer nav {
        margin: 24px 0;
        gap: 8px 20px;
        justify-content: flex-start;
    }
    .template-section {
        padding: 40px 24px 64px;
    }
    .gallery-heading {
        display: block;
        margin-bottom: 28px;
    }
    .gallery-heading h1 {
        font-size: 40px;
    }
    .gallery-heading > div > p {
        font-size: 16px;
    }
    .gallery-note {
        margin-top: 16px;
        max-width: 38ch;
    }
    .gallery-toolbar {
        display: block;
        margin-bottom: 24px;
    }
    .template-filters {
        gap: 4px;
    }
    .template-filters button {
        padding: 10px 12px;
        font-size: 12px;
    }
    .gallery-count {
        display: block;
        margin-top: 16px;
    }
    .template-gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    .template-card-preview .theme-preview {
        padding: 24px;
        max-width: none;
    }
    .text-page {
        padding: 40px 24px 72px;
    }
    .text-page h1 {
        font-size: 36px;
    }
}
@media (max-width: 390px) {
    .site-nav {
        padding-inline: 16px;
        gap: 12px;
    }
    .site-nav-actions {
        gap: 14px;
    }
    .site-nav .button {
        font-size: 13px;
        padding: 12px;
    }
    .site-nav .wordmark {
        --wordmark-width: clamp(104px, 34vw, 130px);
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.gallery-search {
    max-width: 420px;
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}
.gallery-search label {
    font-size: 13px;
    font-weight: 600;
}
.gallery-search input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--control);
    border-radius: 6px;
    background: var(--ground);
    color: var(--ink);
    padding: 12px 14px;
    font-size: 15px;
}
.gallery-empty {
    background: var(--surface);
    color: var(--muted);
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
}
.template-card .template-card-preview .theme-preview {
    padding: 0;
    min-height: 0;
}
.dialog-profile {
    max-width: 400px;
}
.dialog-preview-status {
    margin: 16px 0;
    color: var(--muted);
}
.dialog-preview-retry {
    min-height: 44px;
}
.dialog-profile .full-template-preview {
    min-height: 0;
    max-height: none;
    overflow: visible;
}
.dialog-profile .full-template-preview .public-profile {
    padding: 12px 20px 24px;
}
@media (max-width: 760px) {
    .gallery-search input {
        font-size: 16px;
    }
}

.template-dialog[data-preview-type="cv"],
.template-dialog[data-preview-type="company_profile"] {
    width: min(820px, calc(100% - 32px));
}
.template-dialog:is([data-preview-type="cv"], [data-preview-type="company_profile"]) .dialog-profile {
    max-width: 760px;
}
.template-dialog .full-template-preview .profile-link-copy strong {
    font-size: 16px;
}
.template-dialog .full-template-preview .profile-header h2 {
    font-size: 28px;
    margin-top: 20px;
}
.template-dialog .full-template-preview .profile-blocks h2 {
    font-size: 20px;
    margin-top: 24px;
}

.dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.gallery-heading h1::after,
.text-page > h1::after,
.pricing-intro h1::after {
    content: "";
    display: block;
    width: 2em;
    height: 4px;
    margin-top: .3em;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-purple), var(--brand-blue));
}
.pricing-intro h1::after {
    margin-inline: auto;
}
.cv-layout-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1.5rem;
    margin-block: 1.5rem;
}
.cv-layout-picker > div {
    border-top: 2px solid currentColor;
    padding-block: 1rem;
}
.cv-layout-picker h2 { font-size: 1.25rem; margin: 0; }
.cv-layout-picker p { max-width: 50ch; margin-block: .5rem; }
.cv-layout-picker button { min-height: 44px; }

.template-dialog[data-preview-landing] {
    width: min(1100px, calc(100% - 32px));
}
.template-dialog[data-preview-landing] .dialog-profile {
    max-width: none;
}

.gallery-palettes {
    border: 0;
    min-width: 0;
    margin: 12px 0;
    padding: 0;
}
.template-dialog [data-preview-palettes] { margin-inline: 24px; }
.gallery-palettes legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.gallery-palettes > div { display: flex; flex-wrap: wrap; gap: 6px; }
.template-card > .gallery-palettes > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.template-card > .gallery-palettes button {
    justify-content: center;
    padding-inline: 3px;
    min-width: 0;
}
.gallery-palettes button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 9px;
    border: 1px solid var(--control);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .8rem;
    cursor: pointer;
}
.gallery-palettes button[aria-pressed="true"] {
    border-color: var(--brand-selection-edge);
    background: var(--brand-tint);
    text-decoration: underline;
    text-underline-offset: .2em;
}
.gallery-palette-sample {
    width: 16px;
    height: 16px;
    flex: none;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--palette-ground) 50%, var(--palette-accent) 50%);
}
