/* KryptoBurn — ember & ash theme
   Palette: char (#15130F) / ash (#948C7E) / ember (#FF5A1F) / deep-ember (#B22E12) / glow (#FFC46B) / bone (#F1EBDF)
*/

:root {
    --char:       #15130F;
    --char-2:     #1E1B15;
    --ash:        #948C7E;
    --ash-dim:    #55503F;
    --ember:      #FF5A1F;
    --ember-deep: #B22E12;
    --glow:       #FFC46B;
    --bone:       #F1EBDF;
    --line:       #322C22;

    --font-display: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id], #suggestions { scroll-margin-top: 90px; }

body {
    margin: 0;
    background: var(--char);
    color: var(--bone);
    font-family: var(--font-body);
    line-height: 1.5;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--glow); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--glow);
    outline-offset: 2px;
}

code {
    font-family: var(--font-mono);
    background: var(--char-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ---------- Header ---------- */
.site-head {
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(21, 19, 15, 0.92);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.site-head .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); }
.brand-mark {
    display: flex;
    align-items: center;
    font-size: 1.15rem; /* matches .brand-name so the logo scales in lockstep with it */
    filter: drop-shadow(0 0 4px rgba(255, 90, 31, 0.45));
}
.brand-mark img {
    display: block;
    height: 1.15em; /* = .brand-mark's font-size = .brand-name's font-size */
    width: auto;    /* preserves the image's natural aspect ratio */
}
.brand-name { font-size: 1.15rem; letter-spacing: 0.06em; font-weight: 600; }
.accent { color: var(--ember); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
    color: var(--ash);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--bone); text-decoration: none; }

.nav-admin {
    color: var(--ash-dim) !important;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 0.78rem !important;
}
.nav-admin:hover {
    border-color: var(--ember-deep);
    color: var(--glow) !important;
}

.site-nav a.is-current {
    color: var(--glow);
    position: relative;
}
.site-nav a.is-current::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--glow);
    border-radius: 2px;
}

/* ---------- Header search ---------- */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-search {
    position: relative;
    display: flex;
    align-items: center;
}
.site-search input[type="search"] {
    background: var(--char-2);
    border: 1px solid var(--line);
    color: var(--bone);
    padding: 7px 34px 7px 14px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 190px;
    transition: border-color 0.15s ease, width 0.15s ease;
}
.site-search input[type="search"]::placeholder { color: var(--ash-dim); }
.site-search input[type="search"]:focus {
    border-color: var(--ember);
    outline: none;
    width: 230px;
}
.site-search input[type="search"]::-webkit-search-cancel-button { display: none; }

.site-search button[type="submit"] {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--ash);
    cursor: pointer;
    display: flex;
    padding: 0;
}
.site-search button[type="submit"]:hover { color: var(--glow); }

.site-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 260px;
    background: var(--char-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
}
.site-search-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px;
    color: var(--bone);
    text-decoration: none;
    font-size: 0.85rem;
}
.site-search-item:hover,
.site-search-item.is-active {
    background: rgba(255, 196, 107, 0.10);
    text-decoration: none;
}
.site-search-item-symbol {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--glow);
    white-space: nowrap;
}
.site-search-item-name {
    color: var(--ash);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-search-empty {
    padding: 12px 14px;
    color: var(--ash-dim);
    font-size: 0.82rem;
    font-style: italic;
}

/* ---------- Search results page ---------- */
.search-heading {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin: 8px 0 24px;
}
.search-results-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.search-result-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 10px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.search-result-row:hover { background: rgba(255, 196, 107, 0.06); text-decoration: none; }
.search-result-symbol {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--bone);
    min-width: 90px;
}
.search-result-name { color: var(--ash); flex: 1; }
.search-result-contract { color: var(--ash-dim); font-size: 0.85rem; }

/* ---------- News page ---------- */
.news-hero { padding: 56px 0 40px; }
.news-hero .hero-sub { max-width: 64ch; }
.news-hero .hero-grid { align-items: stretch; }

.news-ticker {
    border: 2px solid var(--ember-deep);
    border-radius: 10px;
    padding: 18px 22px;
    background: rgba(178, 46, 18, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-height: 140px;
}
.news-ticker-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ash);
}
.news-ticker-slots {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.news-ticker-slot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 2.6em;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.news-ticker-slot.is-visible { opacity: 1; }
.news-ticker-slot a {
    color: var(--bone);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
}
.news-ticker-slot a:hover { color: var(--glow); text-decoration: none; }
.news-ticker-source {
    font-size: 0.72rem;
    color: var(--ash);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Long headlines (see kb_ticker_is_long()) show their source inline,
   right after the title with a space, instead of the normal two-line
   stack. Plain block flow (not flex) so the source wraps as part of the
   same paragraph, right after the headline's last word — flexbox with
   wrap would instead drop it onto its own row once the headline wraps. */
.news-ticker-slot.is-inline {
    display: block;
}

.news-panel { padding-top: 40px; }

.news-list {
    display: flex;
    flex-direction: column;
}
.news-item {
    display: flex;
    gap: 20px;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }

.news-rank {
    flex-shrink: 0;
    width: 36px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ash-dim);
    line-height: 1.4;
}

.news-item-body { min-width: 0; flex: 1; }

.news-headline {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 8px;
}
.news-headline a { color: var(--bone); }
.news-headline a:hover { color: var(--glow); text-decoration: none; }

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--ash);
    margin-bottom: 10px;
}
.news-source { font-weight: 600; color: var(--ash); }
.news-dot { color: var(--ash-dim); }

.news-summary {
    color: var(--ash);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 10px;
    max-width: 74ch;
}

.news-read-more {
    font-size: 0.82rem;
    font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
    padding: 72px 0 56px;
    background:
        radial-gradient(ellipse 700px 380px at 85% 0%, rgba(255, 90, 31, 0.16), transparent 60%),
        var(--char);
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: end;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--ash);
    margin: 0 0 14px;
    font-weight: 600;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin: 0 0 20px;
    font-weight: 600;
}

.hero-sub {
    color: var(--ash);
    max-width: 46ch;
    font-size: 1.02rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border-left: 2px solid var(--ember);
    padding-left: 22px;
}

.hero-right {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
}

.news-ticker.ticker-compact {
    min-height: 100px;
    padding: 14px 18px;
    gap: 10px;
}
.ticker-compact .news-ticker-slots { gap: 8px; }
.ticker-compact .news-ticker-slot { min-height: 2.4em; }
.ticker-compact .news-ticker-slot a { font-size: 0.92rem; }
.ticker-compact .news-ticker-label a { color: var(--ash); text-decoration: underline; }
.ticker-compact .news-ticker-label a:hover { color: var(--glow); }

.hero-stat-label {
    color: var(--ash);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 600;
    color: var(--glow);
    text-shadow: 0 0 28px rgba(255, 196, 107, 0.35);
    line-height: 1.05;
}

/* ---------- Flash message ---------- */
.flash {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid var(--ember-deep);
    background: rgba(178, 46, 18, 0.12);
    border-radius: 6px;
    font-size: 0.92rem;
    color: var(--glow);
}

.flash-error {
    border-color: #b23; 
    background: rgba(178, 34, 51, 0.12);
    color: #ff8a8a;
}

/* ---------- Panels ---------- */
.panel {
    padding: 56px 0;
    border-bottom: 1px solid var(--line);
}
.panel:last-of-type { border-bottom: none; }

.panel h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 24px;
    letter-spacing: 0.01em;
}

.panel-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 32px;
}
.panel-head-left {
    flex: 1 1 auto;
    min-width: 260px;
}

.panel-stat {
    border-left: 2px solid var(--ember);
    padding-left: 16px;
    gap: 4px;
}
.panel-stat .hero-stat-value { font-size: clamp(2rem, 4vw, 2.6rem); }
.panel-stat .hero-stat-label { font-size: 0.8rem; }

.panel-sub {
    color: var(--ash);
    margin: -12px 0 24px;
    font-size: 0.95rem;
}

.empty { color: var(--ash); font-style: italic; }

/* ---------- Sort tabs ---------- */
.sort-tabs {
    display: flex;
    gap: 8px;
    margin: -12px 0 24px;
    flex-wrap: wrap;
}
.sort-tab {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.sort-tab:hover { color: var(--bone); border-color: var(--ash-dim); }
.sort-tab.is-active {
    background: rgba(255, 196, 107, 0.14);
    border-color: var(--glow);
    color: var(--glow);
}

/* ---------- Token cards ---------- */
.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

/* Only the top 6 tokens (in whatever order the current sort tab put them
   in the DOM) are shown — token-sort.js reorders by moving nodes, so this
   selector always reflects "current top 6" regardless of which tab is active. */
.token-grid-capped .token-card:nth-child(n+7) { display: none; }

.token-card {
    position: relative;
    background: var(--char-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s ease;
}
.token-card:hover { border-color: var(--ember-deep); }

.token-spark {
    margin: -20px -20px 16px;
    padding: 14px 20px 0;
    background: linear-gradient(180deg, rgba(255, 196, 107, 0.08), transparent);
    border-bottom: 1px solid var(--line);
}
.spark-svg {
    display: block;
    width: 100%;
    height: 56px;
}
.spark-area {
    fill: rgba(255, 196, 107, 0.32);
    stroke: none;
}
.spark-line {
    fill: none;
    stroke: var(--glow);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(255, 196, 107, 0.7));
}
.spark-label {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ash-dim);
    margin: 4px 0 8px;
}

.spark-range {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
}
.spark-range-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.spark-range-btn:hover { color: var(--bone); border-color: var(--ash-dim); }
.spark-range-btn.is-active {
    background: rgba(255, 90, 31, 0.14);
    border-color: var(--ember-deep);
    color: var(--glow);
}

.token-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    margin-left: -6px;
    margin-right: -6px;
    padding: 4px 6px;
    transition: background 0.15s ease;
}
.token-card-top:hover { background: rgba(255, 90, 31, 0.08); text-decoration: none; }
.token-card-top:hover .token-symbol { color: var(--glow); }

.token-symbol {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--bone);
    margin-right: 8px;
}

.token-name { color: var(--ash); font-size: 0.85rem; }

.token-count {
    font-size: 0.78rem;
    color: var(--ash);
    white-space: nowrap;
}

.token-total {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--ember);
    margin-bottom: 14px;
}
.token-total .unit { font-size: 1rem; color: var(--ash); font-family: var(--font-body); }

.ember-meter {
    height: 6px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.ember-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ember-deep), var(--ember), var(--glow));
    border-radius: 4px;
}
.ember-meter-unset .ember-fill { background: var(--line); }

.supply-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--ash);
    margin-bottom: 14px;
}
.supply-caption-pct {
    color: var(--glow);
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
}
.supply-caption-muted { color: var(--ash-dim); font-style: italic; }

.token-card-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ash-dim);
}

.token-delete-form { margin-top: 14px; }

.token-delete-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.token-delete-btn:hover {
    border-color: var(--ember-deep);
    color: var(--glow);
    background: rgba(178, 46, 18, 0.1);
}

.mono { font-family: var(--font-mono); }
.strong { font-weight: 600; color: var(--bone); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }

.burn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.burn-table th {
    text-align: left;
    color: var(--ash);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.burn-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.burn-table tbody tr:hover { background: rgba(255, 90, 31, 0.05); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
}
.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ash);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
a.page-link:hover { color: var(--bone); border-color: var(--ash-dim); text-decoration: none; }
.page-link.is-current {
    background: rgba(255, 196, 107, 0.14);
    border-color: var(--glow);
    color: var(--glow);
    font-weight: 600;
}
.page-link.is-disabled { color: var(--ash-dim); opacity: 0.5; cursor: default; }
.page-link.page-prev, .page-link.page-next {
    font-family: var(--font-body);
    padding: 0 14px;
}

/* ---------- Track form ---------- */
.track-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 760px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: span 2; }
.field.full { grid-column: span 4; }

.field label {
    font-size: 0.78rem;
    color: var(--ash);
    letter-spacing: 0.02em;
}

.field input,
.field textarea {
    background: var(--char-2);
    border: 1px solid var(--line);
    color: var(--bone);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
}
.field input:focus,
.field textarea:focus { border-color: var(--ember); }
.field textarea { resize: vertical; font-family: var(--font-body); line-height: 1.5; }
.field input[readonly] { color: var(--ash); cursor: default; }

/* Honeypot: visually hidden from real visitors, still present for bots
   that auto-fill every field. Off-screen rather than display:none so it
   still gets filled in by naive bots rather than being skipped. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.track-form button {
    grid-column: span 4;
    justify-self: start;
    background: var(--ember);
    color: var(--char);
    border: none;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 12px 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.track-form button:hover { background: var(--glow); }

/* ---------- Footer ---------- */
.site-foot {
    padding: 28px 0 48px;
    color: var(--ash-dim);
    font-size: 0.8rem;
}

/* ---------- Admin page ---------- */
.admin-panel { padding-top: 40px; }

.admin-login-form { max-width: 360px; grid-template-columns: 1fr; }
.admin-login-form .field.wide { grid-column: 1; }
.admin-login-form button { grid-column: 1; justify-self: stretch; text-align: center; }

.admin-table td:last-child { width: 1%; white-space: nowrap; }
.admin-table .token-delete-form { margin-top: 0; }
.admin-table .token-delete-btn { width: auto; padding: 6px 14px; }

.supply-form { display: flex; gap: 6px; align-items: center; }
.supply-input {
    width: 140px;
    background: var(--char-2);
    border: 1px solid var(--line);
    color: var(--bone);
    padding: 6px 8px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.supply-input:focus { border-color: var(--ember); }
.supply-save-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.supply-save-btn:hover { border-color: var(--ember-deep); color: var(--glow); }

.admin-block {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line, rgba(255,255,255,0.08));
}
.admin-block h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.admin-block > form:not(.track-form) button,
.admin-block form[method="post"]:not(.track-form) button {
    width: auto;
    padding: 10px 20px;
}
.fetch-log {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--line, rgba(255,255,255,0.08));
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow-y: auto;
}

/* ---------- Page view analytics ---------- */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 8px;
}
.analytics-grid h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ash);
    margin: 0 0 10px;
    text-transform: uppercase;
}
.analytics-table { font-size: 0.85rem; }
.analytics-table td:last-child,
.analytics-table th:last-child {
    text-align: right;
    color: var(--glow);
    font-family: var(--font-mono);
}
.analytics-table th:last-child { color: var(--ash); font-family: var(--font-body); }
.clear-analytics-form { margin-top: 20px; }
.clear-analytics-form .token-delete-btn { width: auto; padding: 8px 16px; }

/* ---------- Ad placement (admin) ---------- */
.ad-code-form { display: block; }
.ad-code-form .field { margin-bottom: 14px; }
.ad-code-form textarea {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    min-height: 130px;
    white-space: pre;
    overflow-x: auto;
}
.ad-code-form button { width: auto; padding: 10px 20px; }
.ad-code-note { margin: 14px 0 0; font-size: 0.85rem; }
.ad-status-on { color: #6fd88a; font-weight: 600; }
.ad-status-off { color: var(--ash-dim); font-weight: 600; }

/* ---------- Suggestions (admin) ---------- */
.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}
.suggestion-card {
    background: var(--char-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
}
.suggestion-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 10px;
}
.suggestion-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--bone);
    margin-right: 8px;
}
.suggestion-email { font-size: 0.82rem; color: var(--ash); }
.suggestion-date { font-size: 0.76rem; color: var(--ash-dim); white-space: nowrap; }
.suggestion-message {
    color: var(--bone);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 14px;
    white-space: pre-wrap;
}
.suggestion-card .token-delete-form { margin-top: 0; }
.suggestion-card .token-delete-btn { width: auto; padding: 6px 14px; }

/* ---------- Suggest page ---------- */
.suggest-panel { padding-top: 32px; }
.suggest-form textarea { min-height: 140px; }

/* ---------- Token detail page ---------- */
.token-detail { padding-top: 32px; }

.breadcrumb { margin: 0 0 20px; font-size: 0.85rem; }
.breadcrumb a { color: var(--ash); }
.breadcrumb a:hover { color: var(--glow); }

.token-heading { margin-bottom: 28px; }
.token-heading h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    margin: 0 0 6px;
}
.token-heading-name { color: var(--ash); font-size: 0.55em; font-weight: 500; margin-left: 6px; }
.token-heading-contract {
    color: var(--ash-dim);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.copy-btn:hover { border-color: var(--ember-deep); color: var(--glow); }

/* ---------- Price hero ---------- */
.price-hero {
    background: var(--char-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 40px;
    background-image: radial-gradient(ellipse 600px 260px at 90% 0%, rgba(255, 90, 31, 0.10), transparent 60%);
}

.price-hero-top {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.price-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 600;
    color: var(--bone);
}
.price-value.price-unavailable { color: var(--ash-dim); font-size: 1.3rem; font-family: var(--font-body); }

.price-change {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
}
.price-change.is-up { color: #6fd88a; background: rgba(111, 216, 138, 0.12); }
.price-change.is-down { color: #ff7a7a; background: rgba(255, 122, 122, 0.12); }
.price-change-period { font-weight: 500; color: var(--ash); font-family: var(--font-body); font-size: 0.78rem; }

.price-note { margin: 0 0 16px; }

.price-chart-wrap { margin: 0 -4px 4px; }
.spark-svg-lg { width: 100%; height: 220px; display: block; }
.token-spark-lg {
    margin: 0 0 8px;
    padding: 0;
    background: none;
    border-bottom: none;
}
.token-spark-lg .spark-svg { width: 100%; height: 160px; }

.price-range { margin: 10px 0 22px; }

.price-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.price-stat { display: flex; flex-direction: column; gap: 4px; }
.price-stat .label { font-size: 0.72rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.04em; }
.price-stat .value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--bone); }

.price-attribution { margin: 16px 0 0; font-size: 0.75rem; color: var(--ash-dim); }

/* ---------- Burn overview stat grid ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.stat-box {
    background: var(--char-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-box-wide { grid-column: span 3; }
.stat-label { font-size: 0.72rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ember); }
.stat-value .unit { font-size: 0.85rem; color: var(--ash); font-family: var(--font-body); }
.stat-value-sm { font-size: 1rem; color: var(--bone); font-family: var(--font-body); font-weight: 500; }
.stat-tx-link { margin-left: 10px; font-size: 0.85rem; }

/* ---------- Contract detail list ---------- */
.detail-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 32px;
    margin: 0 0 18px;
}
.detail-list > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.detail-list dt { color: var(--ash); font-size: 0.85rem; margin: 0; }
.detail-list dd { margin: 0; font-size: 0.88rem; text-align: right; word-break: break-all; }
.contract-links { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-stat { border-left: none; border-top: 2px solid var(--ember); padding-left: 0; padding-top: 16px; }
    .track-form { grid-template-columns: 1fr 1fr; }
    .field.wide { grid-column: span 2; }
    .field.full { grid-column: span 2; }
    .track-form button { grid-column: span 2; }
    .price-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-box-wide { grid-column: span 2; }
    .detail-list { grid-template-columns: 1fr; }
    .header-right { gap: 12px; }
    .site-search input[type="search"] { width: 140px; }
    .site-search input[type="search"]:focus { width: 170px; }
    .analytics-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 560px) {
    .site-nav { display: none; }
    .track-form { grid-template-columns: 1fr; }
    .field.wide { grid-column: span 1; }
    .field.full { grid-column: span 1; }
    .track-form button { grid-column: span 1; }
    .price-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: 1fr; }
    .stat-box-wide { grid-column: span 1; }
    .site-search input[type="search"] { width: 130px; }
    .site-search input[type="search"]:focus { width: 160px; }
    .news-item { gap: 12px; }
    .news-rank { width: 24px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
