:root {
    color-scheme:light;
    --bg:#f4f7f5;
    --paper:#fff;
    --ink:#172d2a;
    --muted:#60746f;
    --line:#dce7e1;
    --accent:#116b56;
    --accent-dark:#0c5141;
    --soft:#eaf5ee;
    --warn:#7c4c0c;
    --radius:21px;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    scroll-behavior:smooth;
}

* {
    box-sizing:border-box;
}

body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-size:15px;
    line-height:1.55;
}

button,input {
    font:inherit;
}

button {
    cursor:pointer;
}

button:disabled,input:disabled {
    opacity:.5;
    cursor:not-allowed;
}

button:focus-visible,input:focus-visible,a:focus-visible {
    outline:3px solid #78c8ad;
    outline-offset:3px;
}

a {
    color:inherit;
}

h1,h2,h3,p {
    margin:0;
}

h2 {
    font-size:19px;
    letter-spacing:-.035em;
    line-height:1.3;
}

h3 {
    font-size:16px;
    line-height:1.4;
}

p {
    color:var(--muted);
}

[hidden] {
    display:none!important;
}

.shell {
    width:min(1170px,calc(100% - 48px));
    margin-inline:auto;
}

.topbar {
    border-bottom:1px solid var(--line);
    background:#f9fbf9;
}

.nav {
    height:74px;
    display:flex;
    align-items:center;
    gap:32px;
}

.brand {
    display:flex;
    align-items:center;
    gap:8px;
    text-decoration:none;
    font-size:23px;
    font-weight:800;
    letter-spacing:-1.1px;
}

.brand>span:last-child {
    color:var(--accent);
    margin-left:-8px;
}

.brand-icon {
    width:37px;
    height:37px;
    background:var(--accent);
    color:#fff;
    border-radius:11px;
    display:grid;
    place-items:center;
}

.brand-icon svg {
    width:26px;
    height:26px;
}

.nav nav {
    display:flex;
    gap:24px;
    margin-left:auto;
}

.nav nav a {
    text-decoration:none;
    font-size:14px;
    color:var(--muted);
    font-weight:600;
}

.status {
    border:1px solid var(--line);
    border-radius:100px;
    padding:6px 12px;
    color:var(--accent-dark);
    font-size:12px;
    white-space:nowrap;
}

.hero {
    padding:60px 0 38px;
    max-width:800px;
}

.eyebrow {
    font-size:11px;
    letter-spacing:.16em;
    font-weight:800;
    color:var(--accent);
    display:flex;
    gap:8px;
    align-items:center;
}

.eyebrow span {
    width:8px;
    height:8px;
    background:#31a87e;
    border-radius:100%;
}

.hero h1 {
    font-size:clamp(43px,6.1vw,76px);
    letter-spacing:-.075em;
    line-height:1.02;
    margin:15px 0 18px;
    font-weight:780;
}

.hero h1 em {
    font-style:normal;
    color:var(--accent);
}

.lede {
    max-width:630px;
    font-size:17px;
    line-height:1.65;
}

.hero-meta {
    display:flex;
    gap:22px;
    flex-wrap:wrap;
    margin-top:19px;
    color:var(--muted);
    font-size:13px;
    font-weight:600;
}

.hero-meta span:before {
    content:'✓';
    margin-right:6px;
    color:var(--accent);
}

.notice {
    background:#fff4db;
    color:var(--warn);
    padding:11px 16px;
    border:1px solid #edd6a3;
    border-radius:12px;
    margin-bottom:16px;
    font-size:13px;
}

.workspace {
    display:grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap:20px;
    align-items:start;
    scroll-margin-top:16px;
}

.panel {
    background:var(--paper);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:26px;
    box-shadow:0 6px 25px #163c2610;
    min-width:0;
}

.panel-title {
    display:flex;
    gap:12px;
    align-items:flex-start;
    margin-bottom:20px;
}

.panel-title p {
    font-size:13px;
    margin-top:3px;
}

.step {
    color:var(--accent);
    background:var(--soft);
    border:1px solid #d5e9dd;
    font-size:12px;
    font-weight:800;
    border-radius:9px;
    padding:7px 9px;
    min-width:37px;
    text-align:center;
}

.field-label {
    font-size:13px;
    font-weight:700;
    display:block;
    margin-bottom:7px;
}

.search-wrap {
    position:relative;
}

.search-wrap svg {
    position:absolute;
    width:20px;
    left:13px;
    top:14px;
    color:var(--muted);
    pointer-events:none;
}

.search-wrap input {
    width:100%;
    height:48px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fafcfb;
    padding:0 14px 0 41px;
    color:var(--ink);
}

.suggestions {
    display:grid;
    gap:3px;
    max-height:215px;
    overflow:auto;
    margin:8px 0 17px;
}

.suggestion {
    background:none;
    border:0;
    border-bottom:1px solid #eff3f0;
    padding:8px 6px;
    display:flex;
    gap:10px;
    align-items:center;
    text-align:left;
    width:100%;
    color:var(--ink);
}

.suggestion:hover {
    background:var(--soft);
}

.coin-mark {
    width:35px;
    height:35px;
    border-radius:50%;
    background:#eef3f0;
    color:var(--accent);
    font-size:12px;
    font-weight:800;
    display:grid;
    place-items:center;
    flex:none;
}

.suggestion strong {
    display:block;
    font-size:13px;
}

.suggestion small {
    display:block;
    color:var(--muted);
    font-size:11px;
}

.suggestion .plus {
    margin-left:auto;
    color:var(--accent);
    font-size:21px;
}

.selected-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:6px;
}

.selected-head .field-label {
    margin:0;
}

.muted {
    color:var(--muted);
    font-size:12px;
    font-weight:400;
}

.text-btn {
    border:0;
    background:none;
    color:var(--accent);
    font-size:12px;
    font-weight:700;
    padding:5px;
}

.chips {
    display:flex;
    gap:7px;
    flex-wrap:wrap;
    min-height:44px;
    padding:10px 0 0;
}

.chip {
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid #d3e6dc;
    background:var(--soft);
    color:var(--accent-dark);
    border-radius:8px;
    padding:5px 9px;
    font-weight:700;
    font-size:13px;
}

.chip span {
    font-size:16px;
    font-weight:400;
}

hr {
    border:0;
    border-top:1px solid var(--line);
    margin:22px 0;
}

.exchange-options {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:20px;
}

.exchange-option {
    display:flex;
    align-items:center;
    gap:9px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:9px 10px;
    font-size:13px;
    cursor:pointer;
    min-width:0;
    overflow-wrap:anywhere;
}

.exchange-option:has(input:checked) {
    background:var(--soft);
    border-color:#9fcab3;
}

.exchange-option input {
    accent-color:var(--accent);
    width:16px;
    height:16px;
    flex:none;
    margin:0;
}

.primary {
    border:0;
    background:var(--accent);
    color:#fff;
    border-radius:12px;
    width:100%;
    padding:13px 15px;
    font-weight:750;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.primary:hover:not(:disabled) {
    background:var(--accent-dark);
}

.primary span {
    font-size:20px;
}

.error {
    color:#aa2626;
    font-size:13px;
    margin-top:10px;
}

.result-panel {
    min-height:440px;
}

.empty-state {
    text-align:center;
    min-height:340px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    padding:30px 12px;
}

.empty-icon {
    width:92px;
    height:92px;
    border-radius:25px;
    background:var(--soft);
    color:#2d8d71;
    display:grid;
    place-items:center;
    margin-bottom:18px;
}

.empty-icon svg {
    width:73px;
    height:73px;
}

.empty-state p {
    max-width:275px;
    margin-top:8px;
    font-size:13px;
}

.stats {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:9px;
    margin-bottom:16px;
}

.stat {
    padding:15px;
    background:#f4f8f5;
    border:1px solid var(--line);
    border-radius:13px;
}

.stat small {
    display:block;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}

.stat strong {
    display:block;
    font-size:32px;
    letter-spacing:-.06em;
    line-height:1.2;
    color:var(--accent-dark);
}

.result-heading {
    margin:18px 0 9px;
    font-size:13px;
    font-weight:800;
}

.result-card {
    border:1px solid var(--line);
    padding:13px;
    border-radius:12px;
    margin-top:8px;
}

.result-top {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.result-top strong {
    font-size:15px;
}

.tag {
    border-radius:100px;
    background:var(--soft);
    color:var(--accent-dark);
    padding:4px 8px;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
}

.tag.neutral {
    background:#f0f3f1;
    color:var(--muted);
}

.mini-coins {
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin:9px 0;
}

.mini-coins span {
    font-size:11px;
    color:var(--accent-dark);
    background:var(--soft);
    padding:3px 6px;
    border-radius:5px;
}

.visit {
    display:block;
    text-decoration:none;
    background:var(--accent);
    color:white;
    padding:8px;
    border-radius:8px;
    font-size:12px;
    text-align:center;
    font-weight:700;
}

.visit:hover {
    background:var(--accent-dark);
}

.uncovered {
    margin-top:12px;
    border:1px solid #edd6a3;
    background:#fff8e9;
    color:var(--warn);
    font-size:12px;
    padding:11px;
    border-radius:10px;
}

.rank {
    display:grid;
    grid-template-columns:minmax(0,1fr) 80px 42px;
    gap:9px;
    align-items:center;
    padding:8px 0;
    border-bottom:1px solid var(--line);
    font-size:12px;
}

.rank-bar {
    height:6px;
    background:#e6eeea;
    border-radius:100px;
    overflow:hidden;
}

.rank-bar span {
    display:block;
    height:100%;
    background:#56a98e;
    border-radius:100px;
}

.rank-count {
    text-align:right;
    font-variant-numeric:tabular-nums;
}

.how {
    padding:58px 0 30px;
}

.how h2 {
    font-size:28px;
    margin-top:8px;
}

.how-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-top:20px;
}

.how-grid article {
    border-top:1px solid var(--line);
    padding:15px 4px;
}

.how-grid article>span {
    font-size:12px;
    font-weight:800;
    color:var(--accent);
}

.how-grid h3 {
    margin:7px 0;
}

.how-grid p,.disclosure p {
    font-size:13px;
}

.disclosure {
    border-top:1px solid var(--line);
    padding:20px 0 34px;
}

.disclosure h2 {
    font-size:15px;
    margin-bottom:7px;
}

.footer {
    border-top:1px solid var(--line);
    padding:20px 0 28px;
    display:flex;
    justify-content:space-between;
    gap:12px;
    font-size:12px;
    color:var(--muted);
}

@media(max-width:820px) {
    .workspace {
        grid-template-columns:1fr;
    }
    .hero {
        padding:40px 0 26px;
    }
    .result-panel {
        min-height:370px;
    }
    .empty-state {
        min-height:255px;
    }
    .how {
        padding-top:35px;
    }
    .nav nav {
        display:none;
    }
    .status {
        margin-left:auto;
    }
}

@media(max-width:480px) {
    .shell {
        width:calc(100% - 28px);
    }
    .nav {
        height:64px;
        gap:5px;
    }
    .brand {
        font-size:20px;
    }
    .brand-icon {
        width:32px;
        height:32px;
    }
    .status {
        font-size:10px;
        padding:5px 7px;
    }
    .panel {
        padding:17px;
        border-radius:17px;
    }
    .hero h1 {
        font-size:43px;
    }
    .lede {
        font-size:15px;
    }
    .hero-meta {
        gap:7px 14px;
        font-size:12px;
    }
    .exchange-options {
        grid-template-columns:1fr;
    }
    .how-grid {
        grid-template-columns:1fr;
        gap:0;
    }
    .footer {
        flex-direction:column;
    }
    .stat strong {
        font-size:28px;
    }
    .rank {
        grid-template-columns:minmax(0,1fr) 60px 35px;
    }
}

@media(prefers-reduced-motion:reduce) {
    :root {
        scroll-behavior:auto;
    }
}

/* Portfolio builder and educational content */
.portfolio-section {margin:0 0 26px;scroll-margin-top:16px;}
.section-heading {display:flex;align-items:center;justify-content:space-between;gap:14px;}
.section-heading h2,.faq h2 {font-size:clamp(23px,3vw,30px);margin-top:5px;}
.section-intro {max-width:780px;font-size:14px;margin:8px 0 18px;}
.secondary-btn {border:1px solid #b5cfc2;color:var(--accent);background:var(--paper);padding:9px 14px;border-radius:10px;font-weight:700;font-size:13px;flex-shrink:0;}
.secondary-btn:hover:not(:disabled) {background:var(--soft);}
.preset-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;}
.preset-card {min-width:0;display:flex;}
.preset-select {width:100%;text-align:left;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:9px;min-width:0;transition:border-color .15s,background .15s;}
.preset-select:hover:not(:disabled),.preset-select[aria-pressed="true"] {border-color:var(--accent);background:#f8fcf9;}
.preset-select[aria-pressed="true"] {box-shadow:0 0 0 1px var(--accent);}
.preset-risk {font-size:11px;font-weight:700;color:var(--muted);}
.preset-name {font-size:23px;letter-spacing:-.04em;line-height:1.15;}
.preset-desc {font-size:12px;color:var(--muted);min-height:56px;}
.preset-bar {display:flex;height:9px;border-radius:12px;overflow:hidden;background:var(--soft);}
.preset-bar span {display:block;height:100%;}
.preset-legend {display:flex;flex-wrap:wrap;gap:5px 10px;margin-bottom:8px;}
.preset-asset {display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);overflow-wrap:anywhere;}
.preset-asset i {width:7px;height:7px;border-radius:50%;flex:none;}
.preset-action {margin-top:auto;color:var(--accent);font-weight:750;font-size:13px;}
.allocation-list {margin:9px 0 5px;display:grid;gap:4px;}
.allocation-row {display:grid;grid-template-columns:35px minmax(0,1fr) 83px 27px;align-items:center;gap:9px;border-bottom:1px solid var(--line);padding:8px 0;}
.allocation-coin {min-width:0;overflow-wrap:anywhere;}
.allocation-coin strong,.allocation-coin small {display:block;}
.allocation-coin small {font-size:11px;}
.coin-amount {font-size:11px;color:var(--accent);font-variant-numeric:tabular-nums;}
.weight-field {display:flex;gap:4px;align-items:center;}
.weight-field input,.budget-input {border:1px solid var(--line);border-radius:8px;background:#fafcfb;padding:7px;color:var(--ink);min-width:0;}
.weight-field input {width:62px;text-align:right;font-size:13px;}
.remove-coin {border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1;padding:4px;}
.remove-coin:hover {color:#aa2626;}
.allocation-summary {display:flex;align-items:center;justify-content:space-between;padding-top:6px;}
#allocation-total {color:var(--warn);font-variant-numeric:tabular-nums;}
#allocation-total.allocation-valid {color:var(--accent);}
.budget-label {margin-top:15px;}
.budget-input {width:100%;}
#preset-notice {margin-top:9px;color:var(--warn);}
.faq {padding:8px 0 30px;}
.faq-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 22px;margin-top:16px;}
.faq-grid article {border-top:1px solid var(--line);padding:13px 0;}
.faq-grid h3 {margin-bottom:6px;}
.faq-grid p {font-size:13px;}
@media(max-width:820px) {.preset-grid {grid-template-columns:1fr;}.preset-desc {min-height:0;}}
@media(max-width:480px) {.section-heading {align-items:flex-start;flex-direction:column;}.faq-grid {grid-template-columns:1fr;}.allocation-row {grid-template-columns:30px minmax(0,1fr) 70px 23px;gap:5px;}.allocation-row .coin-mark {width:30px;height:30px;}.weight-field input {width:53px;}.preset-select {padding:15px;}}

/* Keep the longer wordmark and status legible on narrow screens. */
.brand { white-space: nowrap; flex-shrink: 0; }
.brand-icon { flex-shrink: 0; }
@media (max-width: 380px) {
    .brand { font-size: 17px; gap: 5px; letter-spacing: -.7px; }
    .brand > span:last-child { margin-left: -5px; }
    .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
