@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --bg: #090b0a;
    --panel: rgba(18, 22, 19, .86);
    --panel-light: rgba(25, 30, 26, .82);
    --line: rgba(198, 224, 174, .12);
    --line-strong: rgba(198, 224, 174, .24);
    --text: #eef3e9;
    --muted: #929d91;
    --acid: #c5ee64;
    --acid-soft: #a7d94b;
    --amber: #e7b75b;
    --red: #f0786c;
    --radius: 18px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        var(--bg);
    background-size: 52px 52px;
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.ambient {
    position: fixed;
    width: 680px;
    height: 680px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: .1;
    pointer-events: none;
    z-index: -1;
}
.ambient-one { background: #9dcf3c; top: -400px; right: -180px; }
.ambient-two { background: #5f8560; top: 500px; left: -520px; }

.site-header {
    height: 78px;
    padding: 0 clamp(22px, 5vw, 76px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 11, 10, .72);
    backdrop-filter: blur(18px);
    position: relative;
    z-index: 10;
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    font-family: Manrope, sans-serif;
    letter-spacing: .12em;
    font-weight: 600;
    font-size: 15px;
}
.brand strong { color: var(--acid); }
.brand-mark { display: flex; gap: 3px; transform: skew(-10deg); }
.brand-mark i { width: 5px; height: 25px; background: var(--acid); display: block; }
.brand-mark i:nth-child(2) { height: 18px; margin-top: 7px; opacity: .7; }
.brand-mark i:nth-child(3) { height: 11px; margin-top: 14px; opacity: .4; }
.market-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px currentColor; }
.market-state.live .pulse { background: var(--acid); }
.market-state.error .pulse { background: var(--red); }

main { width: min(1420px, calc(100% - 44px)); margin: 0 auto; }
.hero { padding: clamp(78px, 11vw, 150px) 0 72px; max-width: 900px; }
.eyebrow { display: flex; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 28px; }
.eyebrow span { border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 3px; }
.eyebrow span:first-child { color: var(--acid); border-color: rgba(197,238,100,.3); background: rgba(197,238,100,.06); }
h1, h2 { font-family: Manrope, sans-serif; margin: 0; }
h1 { font-size: clamp(48px, 7.3vw, 108px); line-height: .91; letter-spacing: -.065em; font-weight: 700; }
h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px rgba(238,243,233,.52); }
.hero > p { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.75; max-width: 650px; margin: 32px 0 0; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; background: #171b18; padding: 2px 6px; border-radius: 4px; font-size: .82em; color: #ced6ca; }
.hero-actions { display: flex; gap: 12px; margin-top: 38px; }
.button { border: 0; border-radius: 8px; padding: 13px 18px; font-weight: 700; font-size: 13px; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--acid); color: #10130c; box-shadow: 0 8px 30px rgba(197,238,100,.1); }
.button-primary:hover { background: #d0f879; box-shadow: 0 10px 34px rgba(197,238,100,.18); }
.button-primary:disabled { opacity: .45; cursor: wait; transform: none; }
.button-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.button-ghost:hover { background: rgba(255,255,255,.04); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.companion-card {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 0;
    margin: 0 0 24px;
    border: 1px solid rgba(197,238,100,.2);
    border-radius: var(--radius);
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 20%, rgba(197,238,100,.085), transparent 45%),
        rgba(15,19,16,.9);
    scroll-margin-top: 25px;
}
.companion-copy { padding: clamp(34px,5vw,65px); border-right: 1px solid var(--line); }
.companion-copy h2 { font-size: clamp(32px,4.1vw,58px); line-height: .98; letter-spacing: -.055em; margin: 12px 0 24px; }
.companion-copy h2 em { color: var(--acid); font-style: normal; }
.companion-copy p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.companion-actions { display: flex; align-items: center; gap: 20px; margin-top: 30px; }
.checksum-link { color: #8f9b8e; font-size: 10px; text-underline-offset: 3px; }
.checksum-link:hover { color: var(--text); }
.download-meta { display: block; margin-top: 15px; color: #5d685d; font-size: 9px; }
.companion-steps { margin: 0; padding: clamp(30px,4vw,55px); list-style: none; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.companion-steps li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.companion-steps li:last-child { border-bottom: 0; }
.companion-steps li > b { color: var(--acid); font: 700 10px Manrope; padding-top: 3px; }
.companion-steps span { display: flex; flex-direction: column; gap: 7px; }
.companion-steps strong { font: 600 13px Manrope; }
.companion-steps small { color: #727d71; font-size: 9px; line-height: 1.55; }

.summary-grid { display: grid; grid-template-columns: 1.5fr .75fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(14,17,15,.68); margin-bottom: 24px; }
.summary-card { min-height: 166px; padding: 29px 32px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.summary-card:last-child { border: 0; }
.summary-label { text-transform: uppercase; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.summary-value { display: flex; align-items: baseline; gap: 10px; }
.summary-value strong { font-family: Manrope; font-size: clamp(40px, 4vw, 62px); letter-spacing: -.06em; color: var(--acid); line-height: 1; }
.summary-value span { font-size: 11px; color: var(--acid); font-weight: 800; }
.summary-conversions { display: flex; gap: 22px; color: var(--muted); font-size: 11px; }
.summary-conversions b { color: var(--text); font-weight: 600; }
.metric { font: 700 47px/1 Manrope; letter-spacing: -.05em; }
.metric-small { font-size: clamp(20px, 2.2vw, 30px); }
.metric-note { color: var(--muted); font-size: 11px; }
.metric-note b { color: var(--text); }

.workspace { display: grid; grid-template-columns: minmax(390px, .8fr) minmax(520px, 1.2fr); gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.panel-heading { min-height: 78px; padding: 20px 23px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.panel-heading h2 { font-size: 16px; letter-spacing: -.02em; }
.step-number { color: var(--acid); font: 600 10px Manrope; letter-spacing: .08em; }
.local-badge { color: #7c8a7c; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.paste-zone { display: block; position: relative; margin: 22px; }
.paste-zone textarea { width: 100%; min-height: 245px; resize: vertical; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(5,7,6,.58); color: #d8ded4; padding: 20px; padding-bottom: 52px; outline: none; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.6; transition: .2s; }
.paste-zone textarea:focus { border-color: rgba(197,238,100,.58); box-shadow: 0 0 0 3px rgba(197,238,100,.05); }
.paste-zone textarea::placeholder { font-family: Inter; color: #5d665d; }
.paste-hint { position: absolute; bottom: 17px; left: 18px; display: flex; align-items: center; gap: 6px; color: #535d53; font-size: 10px; pointer-events: none; }
.paste-hint kbd { padding: 3px 6px; color: #7f8b7e; }
.import-footer { display: flex; gap: 22px; align-items: center; justify-content: space-between; padding: 0 22px 22px; }
.import-footer p { color: #687268; font-size: 9px; line-height: 1.6; max-width: 280px; margin: 0; }
.import-footer .button { white-space: nowrap; }
.notice { margin: 0 22px 22px; border-radius: 8px; padding: 11px 13px; font-size: 11px; background: rgba(197,238,100,.08); color: var(--acid); border: 1px solid rgba(197,238,100,.16); }
.notice.error { color: #ff9b90; border-color: rgba(240,120,108,.2); background: rgba(240,120,108,.08); }
.panel-tools { display: flex; gap: 12px; }
.text-button { background: none; border: 0; color: #899588; font-size: 10px; cursor: pointer; padding: 5px; }
.text-button:hover { color: var(--text); }
.text-button.danger:hover { color: var(--red); }
.stash-list { max-height: 490px; overflow: auto; scrollbar-color: #394238 transparent; }
.stash-item { min-height: 83px; padding: 13px 18px; display: grid; grid-template-columns: 55px minmax(130px,1fr) 60px 115px 26px; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.stash-item:last-child { border-bottom: 0; }
.item-icon { width: 50px; height: 50px; display: grid; place-items: center; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 8px; position: relative; overflow: hidden; }
.item-icon img { max-width: 90%; max-height: 90%; object-fit: contain; position: relative; z-index: 1; }
.item-icon img[src=""] { display: none; }
.icon-fallback { position: absolute; color: #4c584b; font-size: 24px; }
.item-copy, .item-price { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item-copy strong { font: 600 12px Manrope; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-copy span, .item-price span { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-quantity { color: #a8b2a5; font-size: 11px; text-align: center; }
.item-price { text-align: right; }
.item-price strong { color: var(--acid); font: 700 13px Manrope; }
.stash-item.unpriced .item-price strong { color: var(--amber); }
.remove-item { border: 0; background: transparent; color: #566056; font-size: 20px; cursor: pointer; padding: 5px; }
.remove-item:hover { color: var(--red); }
.empty-state { min-height: 285px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #667066; }
.empty-state[hidden] { display: none; }
.empty-gem { font-size: 50px; color: #354035; margin-bottom: 16px; }
.empty-state strong { color: #8b968a; font: 600 13px Manrope; }
.empty-state span { margin-top: 7px; font-size: 10px; }

.market-section { padding: 100px 0 90px; }
.market-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.section-kicker { color: var(--acid); font-size: 9px; letter-spacing: .17em; font-weight: 800; }
.market-heading h2 { font-size: clamp(28px,4vw,48px); letter-spacing: -.045em; margin-top: 7px; }
.search-wrap { width: min(420px, 100%); height: 46px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 0 14px; color: #697369; }
.search-wrap input { width: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 11px; }
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 15px;
    margin-bottom: 11px;
}
.category-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(18,22,19,.72);
    color: #8c978b;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: .16s ease;
}
.category-tab:hover { color: var(--text); border-color: var(--line-strong); }
.category-tab b {
    min-width: 20px;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,.045);
    color: #687367;
    font-size: 8px;
    text-align: center;
}
.category-tab.active {
    color: #10130c;
    border-color: var(--acid);
    background: var(--acid);
}
.category-tab.active b { color: #252b1b; background: rgba(9,11,10,.12); }
.market-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(15,18,16,.82); }
.market-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.market-table th { text-align: left; color: #6d786d; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
.market-table td { padding: 13px 20px; border-bottom: 1px solid rgba(198,224,174,.075); color: #aeb8aa; font-size: 11px; }
.market-table tbody tr:last-child td { border: 0; }
.market-table tbody tr:hover { background: rgba(197,238,100,.025); }
.market-table th:first-child { width: 36%; }
.market-table th:nth-child(2) { width: 22%; }
.market-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.market-name img { width: 35px; height: 35px; object-fit: contain; }
.market-name span { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-cell { color: var(--acid) !important; font-weight: 700; }
.change-up { color: var(--acid) !important; }
.change-down { color: var(--red) !important; }
.category-pill { padding: 4px 7px; background: rgba(255,255,255,.035); border-radius: 4px; color: #8d988b; font-size: 9px; }
.table-message { text-align: center; padding: 70px 20px; color: #687268; font-size: 11px; }
.market-table:not([hidden]) + .table-message { display: none; }

footer { border-top: 1px solid var(--line); min-height: 92px; padding: 24px clamp(22px,5vw,76px); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #596359; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
footer a { color: #899788; }

@media (max-width: 900px) {
    .companion-card { grid-template-columns: 1fr; }
    .companion-copy { border-right: 0; border-bottom: 1px solid var(--line); }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .summary-main { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
    .summary-grid .summary-card:nth-child(2) { border-right: 1px solid var(--line); }
    .workspace { grid-template-columns: 1fr; }
    .market-heading { align-items: stretch; flex-direction: column; }
    .search-wrap { width: 100%; }
    footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
    main { width: min(100% - 24px, 1420px); }
    .site-header { height: 64px; padding: 0 16px; }
    .market-state span:last-child { display: none; }
    .hero { padding: 70px 4px 48px; }
    h1 { font-size: clamp(43px, 14vw, 70px); }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .companion-copy, .companion-steps { padding: 28px 22px; }
    .companion-actions { flex-direction: column; align-items: stretch; }
    .checksum-link { text-align: center; }
    .summary-grid { grid-template-columns: 1fr; }
    .summary-main { grid-column: auto; }
    .summary-card { min-height: 145px; border-right: 0 !important; border-bottom: 1px solid var(--line); }
    .summary-card:last-child { border-bottom: 0; }
    .panel-heading { align-items: flex-start; }
    .local-badge { display: none; }
    .import-footer { flex-direction: column; align-items: stretch; }
    .import-footer p { max-width: none; }
    .stash-item { grid-template-columns: 45px minmax(100px,1fr) 80px 20px; gap: 9px; padding: 12px; }
    .item-icon { width: 42px; height: 42px; }
    .item-quantity { display: none; }
    .item-price strong { font-size: 11px; }
    .market-table th:nth-child(2), .market-table td:nth-child(2), .market-table th:nth-child(4), .market-table td:nth-child(4) { display: none; }
    .market-table th:first-child { width: 50%; }
    .market-table th { padding: 13px 12px; }
    .market-table td { padding: 11px 12px; }
    .market-section { padding-top: 72px; }
}
