/* CiNotes design system — light, modern, calm */

/* ============================================================ */
/* Tokens                                                        */
/* ============================================================ */
:root {
    --bg:            #ffffff;
    --bg-subtle:     #f7f8fa;
    --bg-muted:      #f1f3f6;
    --bg-input:      #ffffff;

    --text:          #0f172a;
    --text-body:     #334155;
    --text-muted:    #64748b;
    --text-dim:      #94a3b8;

    --border:        #e2e8f0;
    --border-strong: #cbd5e1;

    --accent:        #4f46e5;
    --accent-hover:  #4338ca;
    --accent-soft:   #eef2ff;
    --accent-ring:   rgba(79, 70, 229, 0.18);

    --success:       #059669;
    --success-soft:  #ecfdf5;
    --warning:       #b45309;
    --warning-soft:  #fffbeb;
    --warning-border:#fde68a;
    --danger:        #b91c1c;
    --danger-soft:   #fef2f2;

    --radius-sm:     6px;
    --radius:        10px;
    --radius-lg:     14px;

    --shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.06);
    --shadow:        0 4px 14px rgba(15, 23, 42, 0.08);
    --shadow-lg:     0 12px 32px rgba(15, 23, 42, 0.12);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* ============================================================ */
/* Reset                                                         */
/* ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ============================================================ */
/* Base                                                          */
/* ============================================================ */
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 40px; letter-spacing: -0.02em; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p { margin: 0; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

strong { color: var(--text); font-weight: 600; }

code, .code {
    font-family: var(--font-mono);
    background: var(--bg-muted);
    color: var(--text);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ============================================================ */
/* Layout                                                        */
/* ============================================================ */
.page {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 5rem;
}
.page-narrow { max-width: 760px; }
.page-wide   { max-width: 1200px; }

.section + .section { margin-top: 3rem; }

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* ============================================================ */
/* Top nav                                                       */
/* ============================================================ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}
.nav-brand {
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.nav-brand:hover { color: var(--text); text-decoration: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.nav-link {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

/* ============================================================ */
/* Hero                                                          */
/* ============================================================ */
.hero {
    padding: 2.5rem 0 2rem;
    max-width: 760px;
}
.hero-title {
    font-size: 44px;
    margin-bottom: 1rem;
    color: var(--text);
}
.hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
    max-width: 620px;
}
.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* ============================================================ */
/* Stat bar (trust row)                                          */
/* ============================================================ */
.stat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
}
.stat-bar .stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.stat-bar .stat::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-dim);
}
.stat-bar .stat:first-child::before { display: none; }

/* ============================================================ */
/* Buttons                                                       */
/* ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid transparent;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
    white-space: nowrap;
}
.btn:hover:not(:disabled) { text-decoration: none; }
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.btn:disabled, .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.btn-danger {
    background: var(--bg);
    color: var(--danger);
    border-color: var(--border);
}
.btn-danger:hover:not(:disabled) {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}

.btn-sm { padding: 0.45rem 0.85rem; font-size: 14px; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 16px; }
.btn-block { width: 100%; }

/* ============================================================ */
/* Cards                                                         */
/* ============================================================ */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.card-flush { padding: 0; overflow: hidden; }
.card-emphasis {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-sm);
}
.card-soft {
    background: var(--bg-subtle);
    box-shadow: none;
}
.card-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

/* ============================================================ */
/* Forms                                                         */
/* ============================================================ */
.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.field + .field { margin-top: 1rem; }

.field-label {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}
.field-label .label-meta {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.4rem;
    font-size: 13px;
}
.field-hint { color: var(--text-muted); font-size: 13px; }

.input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 8rem;
}

input[type="file"] { display: none; }

.input-row {
    display: flex;
    gap: 0.5rem;
}
.input-row .input,
.input-row input { flex: 1; min-width: 0; }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}
.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 0.15rem;
    accent-color: var(--accent);
    cursor: pointer;
    flex: none;
}
.checkbox-row label {
    font-size: 13.5px;
    color: var(--text-body);
    line-height: 1.5;
    cursor: pointer;
}

/* ============================================================ */
/* Alerts                                                        */
/* ============================================================ */
.alert {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-body);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-size: 14.5px;
    line-height: 1.5;
}
.alert-info {
    background: var(--accent-soft);
    border-color: #c7d2fe;
    color: #312e81;
}
.alert-warn {
    background: var(--warning-soft);
    border-color: var(--warning-border);
    color: #78350f;
}
.alert-warn strong { color: #78350f; }
.alert-success {
    background: var(--success-soft);
    border-color: #a7f3d0;
    color: #065f46;
}
.alert-danger {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: #991b1b;
}
.alert h4 {
    color: inherit;
    font-size: 15px;
    margin-bottom: 0.35rem;
}

/* ============================================================ */
/* Workspace (split layout for the uploader on /)                */
/* ============================================================ */
.workspace {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 50vh;
    box-shadow: var(--shadow-sm);
}
.workspace-sidebar {
    width: 240px;
    background: var(--bg-subtle);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex: none;
}
.nav-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}
.nav-item {
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    border-left: 2px solid transparent;
    display: flex;
    align-items: center;
    transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
    background: var(--bg-muted);
    color: var(--text);
}
.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-left-color: var(--accent);
}
.nav-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.add-btn {
    padding: 0.85rem 1.1rem;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: transparent;
    transition: color 0.15s, background 0.15s;
}
.add-btn:hover {
    color: var(--accent);
    background: var(--bg-muted);
}

.workspace-main {
    flex: 1;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}
.panel {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}
.panel.active { display: flex; }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

/* Drop zone */
.drop-zone {
    border: 1.5px dashed var(--border-strong);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    padding: 2.25rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-height: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.drop-zone p { color: var(--text-body); font-size: 15px; font-weight: 500; }
.drop-zone .hint { color: var(--text-muted); font-size: 13.5px; }

/* PDF card (created dynamically by JS — class-based) */
.pdf-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: var(--shadow-sm);
}
.pdf-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.pdf-card-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    display: block;
    word-break: break-all;
}
.pdf-card-size {
    color: var(--text-muted);
    font-size: 13px;
}
.pdf-card-options {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    color: var(--text-body);
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.pdf-card-options select {
    width: auto;
    padding: 0.4rem 0.7rem;
    font-size: 14px;
    flex: none;
}
.pdf-card-options select.error {
    border-color: var(--danger);
    color: var(--danger);
}

/* Toggle group (MCQ/FRQ) */
.toggle-group { display: inline-flex; gap: 0.4rem; }
.toggle-btn {
    padding: 0.5rem 0.9rem;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.toggle-btn:hover { border-color: var(--border-strong); color: var(--text); }
.toggle-btn.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

/* Progress bar */
.progress-bar-container {
    background: var(--bg-muted);
    height: 4px;
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
    display: none;
}
.progress-bar-container.active { display: block; }
.progress-bar {
    background: var(--accent);
    height: 100%;
    width: 0;
    transition: width 0.2s;
}

/* Empty state */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
    font-size: 15px;
    text-align: center;
}

/* ============================================================ */
/* Footer / checkout block (index.html)                          */
/* ============================================================ */
.footer-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.footer-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}
.input-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-width: 280px;
    max-width: 460px;
}
.checkout-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}
.status-msg {
    color: var(--warning);
    font-size: 14px;
    display: none;
}
.status-msg.active { display: block; }

/* ============================================================ */
/* Modal                                                         */
/* ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover { color: var(--text); background: var(--bg-muted); }
.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

/* ============================================================ */
/* Step list (counter-based, used in modal)                      */
/* ============================================================ */
.step-list {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.step-item {
    position: relative;
    padding-left: 2.5rem;
}
.step-item::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid #c7d2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.step-item h3 {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.step-item p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Step card variant (guide.html numbered sections) */
.step-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}
.step-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
    margin-bottom: 0.6rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ============================================================ */
/* Calculator screenshot frame                                   */
/* ============================================================ */
.calc-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.calc-figure img {
    width: 100%;
    max-width: 320px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    box-shadow: var(--shadow-sm);
    padding: 6px;
}
.calc-figure figcaption {
    margin-top: 0.7rem;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}
.screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 1.75rem 0;
}
.screen-grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ============================================================ */
/* Compare grid (notes-on-ti-84)                                 */
/* ============================================================ */
.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.compare-col {
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
}
.compare-col.bad  { background: #fdf6f6; border-color: #f5d6d6; }
.compare-col.good { background: var(--accent-soft); border-color: #c7d2fe; }
.compare-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
    color: var(--text-muted);
}
.compare-col.bad h4  { color: #b45050; }
.compare-col.good h4 { color: var(--accent); }
.compare-col ul { list-style: none; padding: 0; }
.compare-col ul li {
    font-size: 14.5px;
    padding: 0.3rem 0;
    color: var(--text-body);
    display: flex;
    gap: 0.5rem;
}
.compare-col.bad  ul li::before { content: "−"; color: #c47a7a; flex: none; }
.compare-col.good ul li::before { content: "+"; color: var(--accent); font-weight: 700; flex: none; }

/* ============================================================ */
/* Flow diagram                                                  */
/* ============================================================ */
.flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.75rem 0;
    flex-wrap: wrap;
}
.flow-step {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 1.1rem;
    text-align: center;
    font-size: 14px;
    color: var(--text);
    min-width: 130px;
    box-shadow: var(--shadow-sm);
}
.flow-step .label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.flow-arrow {
    color: var(--text-dim);
    font-size: 18px;
    padding: 0 0.25rem;
}

/* ============================================================ */
/* Feature grid                                                  */
/* ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.feature-card h4 {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

/* ============================================================ */
/* Pricing cards                                                 */
/* ============================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.pricing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-sm);
}
.pricing-card .price {
    font-size: 36px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0.25rem 0 1rem;
    line-height: 1.1;
}
.pricing-card .price span {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
}
.price-features { list-style: none; flex: 1; padding: 0; }
.price-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.65rem;
    color: var(--text-body);
    font-size: 14.5px;
}
.price-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}
.price-features li.note {
    color: var(--text-muted);
    font-size: 14px;
}
.price-features li.note::before {
    content: "ℹ";
    color: var(--text-muted);
    font-weight: 400;
}

/* Discount banner */
.discount-banner {
    background: var(--accent-soft);
    border: 1px solid #c7d2fe;
    color: var(--text);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin: 1rem 0;
}
.discount-banner strong {
    color: var(--accent);
    font-size: 18px;
}
.discount-banner p {
    margin-top: 0.5rem;
    font-size: 15px;
    color: var(--text-body);
}
.discount-banner.subtle {
    background: var(--bg-subtle);
    border-color: var(--border);
    text-align: left;
}
.discount-banner.subtle strong { color: var(--text); }

/* ============================================================ */
/* Tip / action callouts (guide page)                            */
/* ============================================================ */
.tip {
    background: var(--bg-subtle);
    border-left: 3px solid var(--border-strong);
    padding: 0.75rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-body);
    font-size: 14px;
    margin: 1rem 0;
    line-height: 1.55;
}
.tip::before {
    content: "Tip: ";
    color: var(--text);
    font-weight: 600;
}
.tip.warn {
    background: var(--warning-soft);
    border-left-color: var(--warning);
    color: #78350f;
}
.tip.warn::before { content: ""; }
.tip.warn strong { color: #78350f; }

.action {
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    padding: 0.85rem 1.1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
    font-size: 15px;
    margin: 1rem 0;
    line-height: 1.55;
}
.action strong { color: var(--text); }

/* ============================================================ */
/* Reference table                                               */
/* ============================================================ */
.ref-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.ref-table th {
    text-align: left;
    padding: 0.65rem 0.9rem;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}
.ref-table td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-body);
    vertical-align: top;
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table td:first-child { white-space: nowrap; color: var(--text); font-weight: 500; }

/* Generic data table (dashboard) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 13.5px;
}
.data-table th, .data-table td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-subtle); }

/* ============================================================ */
/* Keyboard key                                                  */
/* ============================================================ */
kbd {
    display: inline-block;
    background: var(--bg);
    color: var(--text);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid var(--border-strong);
    box-shadow: 0 1px 0 var(--border-strong);
    vertical-align: baseline;
    white-space: nowrap;
    line-height: 1.4;
}

/* ============================================================ */
/* CTA box                                                       */
/* ============================================================ */
.cta-box {
    background: var(--accent-soft);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    text-align: center;
    margin: 2.5rem 0;
}
.cta-box h2 {
    margin: 0 0 0.5rem;
    font-size: 22px;
}
.cta-box p {
    color: var(--text-body);
    font-size: 15px;
    margin-bottom: 1.25rem;
}

/* ============================================================ */
/* FAQ                                                           */
/* ============================================================ */
.faq-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.faq-item p {
    color: var(--text-body);
    font-size: 14.5px;
    line-height: 1.6;
}

/* ============================================================ */
/* Site footer                                                   */
/* ============================================================ */
.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .sep { margin: 0 0.5rem; color: var(--border-strong); }

/* ============================================================ */
/* Setup-success specifics                                       */
/* ============================================================ */
.center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--bg-subtle);
}
.success-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    max-width: 620px;
    width: 100%;
    text-align: center;
}
.success-code {
    font-family: var(--font-mono);
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 0.18em;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0 1rem;
    word-break: break-all;
}
.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 1.5rem 0;
    text-align: left;
}
.meta-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    font-size: 14px;
    color: var(--text);
}
.meta-item span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 0.15rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.success-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

/* ============================================================ */
/* Setup page (add another calculator)                           */
/* ============================================================ */
.setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.85fr);
    gap: 1.25rem;
    align-items: start;
}
.setup-side > * + * { margin-top: 1.25rem; }
.tier-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.tier {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    color: var(--text);
    font-size: 14.5px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.tier .tier-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}
.help-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
}
.help-link {
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-decoration: none;
}
.help-link:hover {
    background: var(--bg-subtle);
    text-decoration: none;
    color: var(--text);
}
.quote-box {
    display: none;
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}
.quote-box strong {
    color: var(--accent);
    display: block;
    font-size: 15px;
    margin-bottom: 0.25rem;
}
.quote-price {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0.5rem;
}

/* ============================================================ */
/* Mini-nav (guide.html jump links)                              */
/* ============================================================ */
.mini-nav {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 10;
}
.mini-nav a {
    background: var(--bg);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: color 0.15s, border-color 0.15s;
}
.mini-nav a:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

/* ============================================================ */
/* Dashboard-specific small bits                                 */
/* ============================================================ */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}
.stat-card-title {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.stat-card-value {
    font-size: 22px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.status-pending    { color: var(--warning); }
.status-processing { color: #2563eb; }
.status-completed  { color: var(--success); }
.status-failed     { color: var(--danger); }

.btn-del {
    color: var(--text-muted);
    font-size: 16px;
    padding: 0.15rem 0.4rem;
}
.btn-del:hover { color: var(--danger); }

/* ============================================================ */
/* Responsive                                                    */
/* ============================================================ */
@media (max-width: 820px) {
    h1 { font-size: 32px; }
    .hero-title { font-size: 34px; }
    h2 { font-size: 24px; }

    .pricing-grid { grid-template-columns: 1fr; }
    .compare      { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .meta-grid    { grid-template-columns: 1fr; }
    .setup-grid   { grid-template-columns: 1fr; }

    .workspace { flex-direction: column; }
    .workspace-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .footer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .checkout-area { align-items: stretch; }
    .checkout-area .btn { width: 100%; }
    .input-stack { max-width: 100%; }

    .flow { flex-direction: column; gap: 0.5rem; }
    .flow-arrow { transform: rotate(90deg); padding: 0.15rem 0; }
}

@media (max-width: 560px) {
    body { font-size: 15.5px; }
    .page { padding: 1rem 1rem 4rem; }
    .hero { padding: 1.5rem 0 1.25rem; }
    .hero-title { font-size: 28px; }
    .hero-sub   { font-size: 16px; }

    .nav { padding: 0.85rem 0; }
    .nav-links { gap: 1rem; }

    .success-code { font-size: 30px; letter-spacing: 0.12em; }
    .pricing-card { padding: 1.25rem; }
    .pricing-card .price { font-size: 30px; }

    .mini-nav { display: none; }
}
