/* Subscription tab (js/plan-view.js), in Settings and on the account page.
   slate.css tokens and .sl-* components only; no tokens of its own. */

.pv { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pv-card {
    background: var(--sl-bg-card);
    border: 1px solid var(--sl-hairline);
    border-radius: var(--sl-r-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.pv-h { margin: 0; font-size: 15px; font-weight: 600; color: var(--sl-text-hi); }
.pv-line { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sl-text); }
.pv-muted { margin: 0; font-size: 13px; line-height: 1.5; color: var(--sl-text-3); }
/* A lone button in a card (Try again, Sign in) keeps its own width. */
.pv-inline-btn { align-self: flex-start; }

/* (i) after a heading: its help in a popover, never a line under it. Settings
   draws .setting-info itself (css/style.css, higher specificity); this is the
   account page's copy of that recipe. */
.pv-h:has(> .setting-info) { position: relative; }
.pv .setting-info {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; margin-left: 4px; vertical-align: -4px;
    border-radius: 50%; color: var(--sl-text-3); cursor: help; outline: none;
}
.pv .setting-info:is(:hover, :focus-within) { color: var(--sl-text-1); }
.pv .setting-info:focus-visible { box-shadow: 0 0 0 2px var(--sl-focus); }
.pv .setting-info-pop {
    display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 30;
    width: max-content; max-width: min(340px, calc(100vw - 48px)); padding: 10px 12px;
    background: var(--sl-raised); border: 1px solid var(--sl-border-strong); border-radius: var(--sl-r-10);
    box-shadow: var(--sl-shadow-pop); cursor: auto;
    font-family: var(--sl-font-ui); font-size: 12px; font-weight: 400; line-height: 1.55;
    letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; color: var(--sl-text-2);
}
.pv .setting-info-pop::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.pv .setting-info:is(:hover, :focus-within) > .setting-info-pop { display: block; }

/* Your plan */
.pv-current-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pv-plan-name {
    margin-top: 2px;
    font-family: var(--sl-font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--sl-text-hi);
}
.pv-badge { flex: none; margin-top: 4px; }
/* You pay nothing ($0): the first thing under the plan name. Status colour
   stays on the $0 text; the block itself has no fill. */
.pv-free {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}
/* The normal price struck out over $0. */
.pv-free-amount {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 64px;
}
.pv-free-was {
    font-family: var(--sl-font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--sl-text-3);
    white-space: nowrap;
    text-decoration-thickness: 1.5px;
}
.pv-free-now {
    font-family: var(--sl-font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: var(--sl-green-text);
}
.pv-free-when { font-size: 11px; font-weight: 600; color: var(--sl-green-text); white-space: nowrap; }
.pv-free-words { min-width: 0; }
.pv-free-title { font-size: 15px; font-weight: 700; color: var(--sl-text-hi); }
.pv-free-text { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--sl-text-2); }
.pv-facts { display: flex; flex-wrap: wrap; gap: 6px; }
/* Facts are grey tags (6 radius), never pills. */
.pv-fact {
    padding: 3px 8px;
    border-radius: var(--sl-r-6);
    background: var(--sl-quiet);
    border: 1px solid var(--sl-hairline);
    font-size: 12px;
    color: var(--sl-text-2);
}
.pv-meter-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--sl-text-2); }
.pv-meter-val { font-family: var(--sl-font-mono); font-size: 12.5px; }

/* Verify your email (bot protection): an action to take, so it stands out. */
.pv-verify { border-color: var(--sl-amber-40); background: linear-gradient(var(--sl-amber-14), var(--sl-amber-14)), var(--sl-bg-card); }
.pv-verify-row { display: flex; }
.pv-verify-code { flex: 0 1 180px; letter-spacing: 0.2em; }
.pv-verify-again { align-self: flex-start; height: auto; font-size: 12.5px; }

/* Have a code? */
.pv-redeem { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-code { flex: 1 1 220px; min-width: 0; font-family: var(--sl-font-mono); text-transform: uppercase; }
.pv-code::placeholder { text-transform: none; }

.pv-msg {
    padding: 8px 12px;
    border-radius: var(--sl-r-md);
    background: var(--sl-bg-chip);
    font-size: 13px;
    line-height: 1.45;
    color: var(--sl-text);
}
.pv-msg[hidden] { display: none; }
.pv-msg.is-ok { background: var(--sl-green-14); color: var(--sl-green-text); }
.pv-msg.is-error { background: var(--sl-red-12); color: var(--sl-red-text); }
.pv-msg.is-info { background: var(--sl-sky-10); color: var(--sl-sky-text); }

/* Plans */
.pv-section { display: flex; flex-direction: column; gap: 10px; min-width: 0; container-type: inline-size; }
/* Four plans side by side, else two by two, else one column — never 3 + 1. */
.pv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 820px) { .pv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 440px) { .pv-grid { grid-template-columns: minmax(0, 1fr); } }
.pv-plan {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--sl-hairline);
    border-radius: var(--sl-r-lg);
    background: var(--sl-bg-card);
}
.pv-plan.is-current { border-color: var(--sl-accent); box-shadow: inset 0 0 0 1px var(--sl-accent); }
.pv-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-plan-title { font-size: 16px; font-weight: 700; color: var(--sl-text-hi); }
/* "Your plan" / "Viewing": a grey tag (6 radius); the card's accent border marks it. */
.pv-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 7px;
    border-radius: var(--sl-r-6);
    background: var(--sl-quiet);
    border: 1px solid var(--sl-hairline);
    font-size: 11px;
    font-weight: 600;
    color: var(--sl-text-2);
    white-space: nowrap;
}
/* Preview is a state: a dot, never a fill. */
.pv-tag.is-preview::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--sl-warning); }
.pv-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pv-amount { font-family: var(--sl-font-display); font-size: 24px; font-weight: 700; color: var(--sl-text-hi); }
.pv-per, .pv-extra, .pv-aud { font-size: 12.5px; color: var(--sl-text-3); }
/* Your own plan from a code: the normal price struck out, then $0. */
.pv-amount-was {
    font-family: var(--sl-font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--sl-text-3);
    text-decoration-thickness: 2px;
}
.pv-amount.is-free { color: var(--sl-green-text); }
.pv-free-why { font-size: 12.5px; font-weight: 600; color: var(--sl-green-text); }
.pv-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
/* Prices are for later: a plain line, no fill. */
.pv-later {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--sl-text-2);
}
.pv-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.pv-lines li { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.4; color: var(--sl-text); }
.pv-check { flex: none; margin-top: 2px; color: var(--sl-green); }
.pv-plan-foot { margin-top: 8px; }
.pv-plan-foot:empty { display: none; }
.pv-btn { width: 100%; justify-content: center; }

/* Admins: view the app as */
.pv-seg { flex-wrap: wrap; align-self: flex-start; max-width: 100%; }

/* Profile use-case chips (multi-select toggle group): Settings → Profile,
   js/settings-profile.js. Several can be on, so a picked chip takes the
   toggle-group accent tint instead of the segmented grey. Here because
   plan-view.css loads on every page that has Settings. */
:is(#settings-overlay, #home-settings-container) .setting-chip-row.is-multi { margin-bottom: 12px; }
:is(#settings-overlay, #home-settings-container) .setting-chip-row.is-multi .setting-chip.active {
    background: var(--sl-accent-tint);
    box-shadow: inset 0 0 0 1px var(--sl-accent-line);
    color: var(--sl-accent-text);
}
