/* Verso — CPH design system tokens and the "CPH Subscriptions" page, from the Claude Design
   file. Tokens mirror the design system's colors_and_type.css; only what this app uses. */

:root {
    --cph-blue-primary: #005CB3;
    --cph-blue-accent: #0077CC;
    --cph-blue-deep: #003E7A;
    --cph-blue-tint: #EDF5FA;

    --paper: #FFFFFF;
    --paper-warm: #FFFEF9;
    --bg: #F5F2ED;
    --bg-alt: #F8F3EB;

    --ink: #2C2416;
    --muted: #6B5D4F;
    --muted-soft: #8A7E70;

    --rule: #D4C9B8;
    --rule-soft: #EAE4DC;
    --rule-dark: #6B5D4F;

    --danger: #B14A3B;

    --shadow-sm: 0 1px 2px rgba(107, 93, 79, 0.12);
    --shadow-md: 0 4px 12px rgba(107, 93, 79, 0.20), 0 2px 4px rgba(107, 93, 79, 0.10);
    --shadow-menu: 0 8px 20px rgba(107, 93, 79, 0.22), 0 2px 6px rgba(107, 93, 79, 0.12);

    --radius-xs: 3px;
    --radius: 5px;

    --font-serif: "Lora", Georgia, "Times New Roman", serif;
    --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --ease: cubic-bezier(0.2, 0, 0.2, 1);
    --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--cph-blue-primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cph-blue-accent); }

:focus-visible { outline: 2px solid var(--cph-blue-accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--ink); margin: 0; }
h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.lede:first-child { margin-top: 0; }
.lede { margin-top: 16px; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.fine-print { margin-top: 18px; font-size: 13px; color: var(--muted-soft); }

/* ---- Page frame ---- */

.page { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(245, 242, 237, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}

.site-header-inner,
.site-main,
.site-footer-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.site-header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; }
.brand img { display: block; height: 56px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 24px; }

.nav-link,
.account-menu summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}
.nav-link i { font-size: 18px; }
.nav-link:hover, .nav-link.is-active { color: var(--cph-blue-primary); }

.nav-divider { width: 1px; height: 22px; background: var(--rule); }

.account-menu { position: relative; }
.account-menu summary { gap: 8px; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary > i:first-child { font-size: 20px; }
.account-menu .caret { font-size: 13px; color: var(--muted); transition: transform 120ms var(--ease); }
.account-menu[open] .caret { transform: rotate(180deg); }

.account-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    min-width: 160px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow-menu);
}
.account-menu-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
}
.account-menu-panel a:hover { background: var(--bg-alt); color: var(--ink); }
.account-menu-panel i { font-size: 17px; color: var(--muted); }

.site-main { flex: 1; padding-top: 40px; padding-bottom: 96px; }

.site-footer { border-top: 1px solid var(--rule); background: var(--bg-alt); }
.site-footer-inner {
    padding-top: 28px;
    padding-bottom: 28px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* ---- Rules, tabs, layout ---- */

.page-intro { max-width: 620px; }

.double-rule { height: 4px; border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); margin-top: 32px; }
.double-rule.spaced { margin-bottom: 32px; }
.double-rule.soft { border-color: var(--rule); margin: 28px 0; }

.tabs { display: flex; gap: 4px; margin: 24px 0 32px; border-bottom: 1px solid var(--rule); }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 120ms var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--cph-blue-primary); }
.tab-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--cph-blue-tint);
    color: var(--cph-blue-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
}
.back-link:hover { color: var(--ink); }
.back-link i { font-size: 15px; }

/* ---- Cards ---- */

.card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.card-accent { border-left: 3px solid var(--cph-blue-primary); }
.card-roomy { padding: 40px; }
.card-hover { transition: box-shadow 180ms, transform 180ms; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.narrow { max-width: 620px; }

.note { background: var(--bg-alt); border: 1px solid var(--rule); border-radius: var(--radius); padding: 32px; }
.note > p { margin: 10px 0 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }

.icon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.icon-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.icon-list i { font-size: 18px; color: var(--muted); }

/* ---- Subscription tiles ---- */

.tile-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 20px;
}
.tile { display: flex; gap: 20px; }
.tile-cover {
    flex: 0 0 84px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--rule-soft);
    border-radius: var(--radius-xs);
}
.tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-cover i { font-size: 30px; color: var(--muted-soft); }
.tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tile-body h2 { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }

.empty-state { padding: 52px 40px; text-align: center; }
.empty-state > i { font-size: 40px; color: var(--muted-soft); }
.empty-state h2 { margin-top: 16px; font-size: 26px; }
.empty-state > p:not(.fine-print) { margin: 10px auto 0; max-width: 440px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.empty-state .button-row { margin-top: 24px; }
.empty-state .fine-print { margin-top: 24px; }

/* ---- Buttons ---- */

.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.button-row.centered { justify-content: center; }

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.005em;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.button i { font-size: 17px; }
.button.lg { padding: 16px 28px; font-size: 17px; }
.button.sm { padding: 8px 16px; font-size: 13px; }

.button.primary { background: var(--cph-blue-primary); color: #fff; }
.button.primary:hover { background: var(--cph-blue-deep); color: #fff; }
.button.secondary { background: var(--paper-warm); color: var(--ink); border-color: var(--rule); }
.button.secondary:hover { background: var(--bg-alt); color: var(--ink); border-color: var(--rule-dark); }

/* ---- Sign-in form ---- */

.form { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; max-width: 24rem; }
.field label { font-size: 14px; font-weight: 600; }
.field input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.field input:hover { border-color: var(--rule-dark); }
.field input:focus { outline: 2px solid var(--cph-blue-accent); outline-offset: 0; border-color: var(--cph-blue-accent); }
.forgot-link { align-self: flex-start; font-size: 13px; }
.form .button-row { margin-top: 8px; }

.errormessage,
.async-error {
    margin-top: 20px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--danger);
    background: #FBEEEC;
    border: 1px solid #E8C4BE;
    border-radius: var(--radius);
}

/* Error box that only appears when throttle.js puts text in it. Same look as .errormessage,
   which is declared above, so this rule has to follow it to win the display. */
.async-error { display: none; }
.async-error.is-visible { display: block; }

/* Shown when the SubsitesAuth gateway refuses a sign-in because the visitor is over a limit.
   Deliberately not styled like .errormessage: a throttle is not something the visitor did
   wrong, and the red treatment reads as "your password is bad". */
.throttle-banner {
    display: none;
    margin-top: 20px;
    padding: 12px 14px;
    font-size: 14px;
    color: #7A5B12;
    background: #FFF6E9;
    border: 1px solid #E6B222;
    border-radius: var(--radius);
}
.throttle-banner.is-visible { display: block; }

/* throttle.js disables the submit button while a request is out and while a throttle is
   counting down; without this it keeps its full blue and looks clickable. */
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary:disabled:hover { background: var(--cph-blue-primary); }

/* ---- Small screens ---- */

@media (max-width: 800px) {
    .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    :root { --gutter: 16px; }
    h1 { font-size: 34px; }
    h2 { font-size: 24px; }
    .site-header-inner { height: 64px; gap: 12px; }
    .brand img { height: 42px; }
    .site-nav { gap: 8px; }
    .nav-divider { display: none; }
    /* Icon-only Help: the label stays for screen readers. */
    .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .nav-link i { font-size: 22px; }
    .account-name { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-main { padding-top: 28px; padding-bottom: 64px; }
    .card-roomy { padding: 28px 20px; }
    .empty-state { padding: 40px 20px; }
    .note { padding: 24px 20px; }
    .button.lg { padding: 14px 20px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
