/* Access levels (ROADMAP F63): visitor / Free / Pro marks in the menu, the strip under the menu, the locked page card,
   the lock notes on tables and charts, the corner card, and the plans (Pricing and landing pages). Tokens from app.css. */

:root {
    --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

/* ---------------- menu marks */

.access-mark {
    display: inline-block;
    margin-inline-start: 6px;
    vertical-align: middle;
}

.access-mark-lock {
    width: 12px;
    height: 12px;
    background-color: var(--ink-faint);
    -webkit-mask: var(--lock-icon) center / contain no-repeat;
    mask: var(--lock-icon) center / contain no-repeat;
}

.access-mark-pro {
    padding: 0 6px;
    font-size: calc(12px * var(--text-scale, 1));
    font-weight: 700;
    line-height: 16px;
    letter-spacing: .04em;
    color: var(--pro-ink);
    background-color: var(--pro-soft);
    border: 1px solid var(--pro-ink);
    border-radius: var(--radius-pill);
}

.access-upgrade {
    padding: 4px 10px;
    font-size: var(--fs-ctl);
    font-weight: 600;
    color: var(--pro-ink);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--pro-ink);
    border-radius: var(--radius-pill);
}

.access-upgrade:hover, .access-upgrade.active { color: var(--pro-ink); background-color: var(--pro-soft); }

.navbar a.btn-accent.access-signup {
    display: inline-flex;
    align-items: center;
    min-height: var(--ctl-h);
    padding: 0 14px;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

/* ---------------- the strip under the menu */

.access-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 22px;
    font-size: calc(15px * var(--text-scale, 1));
    color: var(--ink);
    background-color: var(--accent-soft);
    border-bottom: 1px solid var(--border);
}

.access-banner-pro { background-color: var(--pro-soft); }

.access-banner-icon {
    width: 16px;
    height: 16px;
    flex: none;
    background-color: var(--link);
    -webkit-mask: var(--lock-icon) center / contain no-repeat;
    mask: var(--lock-icon) center / contain no-repeat;
}

.access-banner-text { flex: 1 1 320px; }

.access-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.access-banner-actions .btn-accent,
.access-note-actions .btn-accent,
.access-lock-actions .btn-accent,
.plan-button,
.landing-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ctl-h);
    padding: 0 14px;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

/* ---------------- a locked page: a blurred sample under a card */

.access-locked {
    position: relative;
    min-height: 420px;
}

.access-sample {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    filter: blur(5px);
    opacity: .55;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    user-select: none;
    pointer-events: none;
}

.access-sample-row {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, 1fr);
    gap: 14px;
}

.access-sample-row span {
    height: 14px;
    border-radius: 4px;
    background-color: var(--panel-3);
}

.access-sample-row .up   { background-color: var(--up-ink); opacity: .55; }
.access-sample-row .down { background-color: var(--down-ink); opacity: .55; }

.access-lock-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(440px, calc(100% - 32px));
    padding: 24px 24px 18px;
    text-align: center;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transform: translate(-50%, -50%);
}

.access-lock-icon {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    background-color: var(--link);
    -webkit-mask: var(--lock-icon) center / contain no-repeat;
    mask: var(--lock-icon) center / contain no-repeat;
}

.access-lock-card h2 { margin-bottom: 10px; font-size: calc(21px * var(--text-scale, 1)); }

.access-lock-points {
    margin: 0 auto 16px;
    padding: 0;
    max-width: 320px;
    text-align: start;
    list-style: none;
    color: var(--ink-dim);
}

.access-lock-points li { padding-block: 3px; padding-inline: 22px 0; position: relative; }

.access-lock-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: 9px;
    width: 10px;
    height: 6px;
    border-inline-start: 2px solid var(--up-ink);
    border-bottom: 2px solid var(--up-ink);
    transform: rotate(-45deg);
}

.access-lock-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.access-lock-actions .btn-primary { display: inline-flex; align-items: center; }


/* ---------------- lock notes inside tables and charts, and the corner card */

.access-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    font-size: calc(15px * var(--text-scale, 1));
    color: var(--ink);
    text-align: start;
    background-color: var(--accent-soft);
    border: 1px dashed var(--link);
    border-radius: var(--radius-sm);
}

.access-note-icon {
    width: 16px;
    height: 16px;
    flex: none;
    background-color: var(--link);
    -webkit-mask: var(--lock-icon) center / contain no-repeat;
    mask: var(--lock-icon) center / contain no-repeat;
}

.access-note-text { flex: 1 1 220px; }

.access-note-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.access-note-actions .btn-accent { min-height: 30px; padding: 0 12px; font-size: calc(15px * var(--text-scale, 1)); }

.access-note-row td { padding: 8px !important; background-color: transparent !important; }

.access-corner {
    position: fixed;
    inset-inline-end: 16px;
    bottom: 16px;
    z-index: 1080;
    width: min(420px, calc(100% - 32px));
    padding: 10px;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.access-corner-close {
    position: absolute;
    top: -10px;
    inset-inline-end: -10px;
    width: 26px;
    min-height: 26px;
    height: 26px;
    padding: 0;
    font-size: calc(18px * var(--text-scale, 1));
    line-height: 1;
    border-radius: 50%;
}

@media (max-width: 575.98px) {
    .access-corner { bottom: 72px; }            /* above the bottom tab bar */
    .access-banner { padding: 8px 16px; }
}

/* ---------------- plans: Pricing and the landing page */

/* a visitor's line above the two plans (owner, 2026-10-21: no Visitor card or column) */
.plan-visitor-line { margin: 0 0 16px; color: var(--ink-dim); max-width: 70ch; }

.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.plan-card-pro { border-color: var(--pro-ink); }

.plan-card h2 { margin: 0; font-size: calc(20px * var(--text-scale, 1)); }

.plan-price { margin: 4px 0 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-amount { font-size: calc(36px * var(--text-scale, 1)); font-weight: 700; line-height: 1.1; }
.plan-per { color: var(--ink-dim); }
.plan-was { color: var(--ink-faint); }
.plan-for { margin: 0; color: var(--ink-dim); }
.plan-small { margin: 4px 0 0; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink-faint); }

.plan-points {
    flex: 1;
    margin: 8px 0 12px;
    padding-inline-start: 18px;
}

.plan-points li { padding: 2px 0; }

.plan-current {
    align-self: flex-start;
    padding: 4px 12px;
    font-size: calc(15px * var(--text-scale, 1));
    font-weight: 600;
    color: var(--ink-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

.plan-table-wrap { overflow-x: auto; }

.plan-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.plan-table caption {
    caption-side: top;
    padding: 0 0 8px;
    font-weight: 600;
    color: var(--ink);
}

.plan-table th, .plan-table td {
    padding: 9px 12px;
    text-align: start;
    border-bottom: 1px solid var(--border-soft);
}

.plan-table thead th { color: var(--ink-dim); font-weight: 600; }
.plan-table tbody th { font-weight: 500; }
.plan-table td:last-child { color: var(--ink); font-weight: 600; }

/* ---------------- Terms and Privacy */

.public-text { max-width: 860px; }
.public-text h2 { margin: 18px 0 6px; font-size: calc(19px * var(--text-scale, 1)); }
.public-text h2:first-child { margin-top: 0; }

/* ---------------- the Chart page (ROADMAP F63): the visitor note in the toolbar, locked time frames / grids */

.chart-guest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    font-size: calc(14px * var(--text-scale, 1));
    color: var(--ink-dim);
    white-space: nowrap;
}

.chart-guest .btn-accent {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    font-size: calc(14px * var(--text-scale, 1));
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.chart-timeframes button.is-locked,
.cg-item.is-locked { opacity: .5; }

/* a locked choice button (access.js lockButtons: a visitor's period, window, chart time frame; owner, 2026-10-21) */
button.is-locked[data-locked] { opacity: .5; }

.ci-plan a { margin-inline-start: 4px; }

#addAlertBtn .access-mark-pro { margin-inline-start: 8px; }

/* a quiet second button beside a btn-accent one (Sign in, Look around first) */
a.access-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ctl-h);
    padding: 0 14px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

a.access-ghost:hover { color: var(--ink); background-color: var(--panel-2); border-color: var(--ink-faint); }

/* a visitor's screener: the time frames that need an account (ROADMAP F63) */
.chip:has(input:disabled) { opacity: .45; }
.chip:has(input:disabled) label { cursor: not-allowed; }

/* the welcome offer on Home (owner, 2026-10-04) */
.welcome-note { margin-bottom: 16px; border: 1px solid var(--pro-ink); border-radius: var(--radius); }
.welcome-close { min-height: 28px; height: 28px; width: 28px; padding: 0; font-size: calc(20px * var(--text-scale, 1)); line-height: 1; }
.welcome-note[hidden] { display: none; }

/* ---------------- the owner's message to everyone (Admin > Site Settings, owner 2026-10-26), above the access strip */

.site-banner {
    padding: 8px 22px;
    font-size: calc(15px * var(--text-scale, 1));
    color: var(--ink);
    background-color: var(--brand-soft);
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.site-banner-warning { background-color: var(--danger-soft); font-weight: 600; }
