/* ============================================================
   TokenTimes — classic news portal theme
   ============================================================ */
:root {
    --bg:       #ffffff;
    --panel:    #f4f5f7;
    --ink:      #10243e;   /* navy */
    --ink-2:    #38495d;
    --muted:    #6b7787;
    --accent:   #cc0000;   /* news red */
    --accent-d: #a40000;
    --line:     #e0e3e8;
    --line-2:   #c8ccd3;
    --rule:     #10243e;
    --serif:    "PT Serif", Georgia, "Times New Roman", serif;
    --sans:     "PT Sans", system-ui, sans-serif;
    --cond:     "PT Sans Narrow", "PT Sans", sans-serif;
    --wrap:     1200px;
    --measure:  720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
time { font-variant-numeric: tabular-nums; }

/* ---------- Small-caps category label ---------- */
.kicker {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 6px;
}
a.kicker:hover { color: var(--accent-d); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Utility bar ---------- */
.utility {
    background: var(--ink);
    color: #cdd6e0;
}
.utility-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 7px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.utility-inner .u-date { font-weight: 700; color: #fff; }
.utility-inner .u-tag { color: #aeb9c6; }

/* ---------- Masthead ---------- */
.masthead {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.masthead-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 22px 24px 18px;
    text-align: center;
}
.wordmark {
    display: inline-block;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(40px, 7vw, 72px);
    letter-spacing: -.02em;
    line-height: 1;
    color: var(--ink);
}
.wordmark::first-letter { color: var(--accent); }

/* ---------- Filled accent nav bar ---------- */
.navbar {
    background: var(--accent);
    border-bottom: 3px solid var(--accent-d);
}
.navbar-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.nav-link {
    font-family: var(--sans);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    padding: 13px 16px;
    border-left: 1px solid rgba(255,255,255,.15);
    transition: background .12s;
}
.nav-link:first-child { border-left: 0; padding-left: 0; }
.navbar-inner .nav-link:first-child { padding-left: 0; }
.nav-link:hover { background: var(--accent-d); }
.nav-link.on { background: var(--ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 0; }

/* ---------- Front page: lead + sidebar ---------- */
.frontpage {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 3px solid var(--rule);
    margin-bottom: 6px;
}
.lead-img { display: block; margin-bottom: 16px; }
.lead-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.lead-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.1;
    letter-spacing: -.01em;
    margin: 4px 0 14px;
}
.lead-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.lead-ex {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 0 0 14px;
}

/* sidebar headlines */
.sidebar { border-left: 1px solid var(--line); padding-left: 36px; }
.sidebar-head {
    border-top: 3px solid var(--accent);
    padding-top: 8px;
    margin-bottom: 4px;
}
.sidebar-head span {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
}
.headline {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.headline:last-child { border-bottom: 0; }
.headline .kicker { margin-bottom: 3px; }
.headline-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.22;
    margin: 0 0 6px;
}
.headline-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.sidebar-empty { color: var(--muted); font-style: italic; padding: 16px 0; }

/* ---------- Meta ---------- */
.card-meta {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Section rule label ---------- */
.rule-label {
    position: relative;
    border-top: 2px solid var(--rule);
    margin: 44px 0 28px;
}
.rule-label span {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 6px 16px;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: -1px;
}

/* ---------- Grid of compact cards ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 32px;
}
.card { display: flex; flex-direction: column; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.card-img { display: block; margin-bottom: 12px; }
.card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 21px;
    line-height: 1.18;
    margin: 2px 0 9px;
}
.card-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.card-ex { font-family: var(--serif); font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 12px; }
.card .card-meta { margin-top: auto; }

/* ---------- Section head (category) ---------- */
.section-head {
    border-bottom: 3px solid var(--rule);
    padding-bottom: 14px;
    margin-bottom: 32px;
}
.section-head h1 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(30px, 5vw, 48px);
    margin: 2px 0 0;
    letter-spacing: -.01em;
}

/* ---------- Article ---------- */
.article { max-width: var(--measure); margin: 0 auto; }
.article-head { margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.article-head .kicker { font-size: 12px; }
.article-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(30px, 4.6vw, 50px);
    line-height: 1.08;
    letter-spacing: -.015em;
    margin: 6px 0 16px;
}
.article-lead {
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    line-height: 1.45;
    color: var(--ink-2);
    margin: 0 0 18px;
}
.article-meta {
    font-family: var(--sans);
    font-size: 12.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}
.article-meta .dot { color: var(--line-2); margin: 0 2px; }
.article-cover { margin: 0 0 32px; }
.article-cover img { width: 100%; max-height: 500px; object-fit: cover; }

.article-body { font-family: var(--serif); font-size: 19px; line-height: 1.7; color: #1a2a3d; }
.article-body p { margin: 0 0 1.3em; }
.article-body > p:first-of-type { font-size: 20px; }
.article-body h2 {
    font-family: var(--serif); font-weight: 700; font-size: 27px;
    margin: 1.7em 0 .5em; letter-spacing: -.01em;
    padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.article-body h3 { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 1.4em 0 .4em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-d); }
.article-body blockquote {
    margin: 1.5em 0; padding: 4px 0 4px 22px;
    border-left: 4px solid var(--accent);
    font-style: italic; font-size: 21px; color: var(--ink);
}
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.article-body li { margin: .35em 0; }
.article-body img { margin: 1.5em 0; }
.article-body code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    background: var(--panel); padding: 2px 6px; border-radius: 3px; font-size: .88em;
}

.more { margin-top: 26px; }

/* ---------- Pager ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 50px 0 0; }
.pager a {
    font-family: var(--sans); font-weight: 700; font-size: 14px;
    min-width: 38px; height: 38px; padding: 0 10px;
    display: grid; place-items: center;
    border: 1px solid var(--line-2); color: var(--ink-2); background: #fff;
}
.pager a.on, .pager a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.empty { text-align: center; color: var(--muted); font-style: italic; padding: 70px 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0; border-bottom: 3px solid var(--rule); margin-bottom: 6px; }
.notfound h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(36px,7vw,64px); margin: 8px 0 14px; }
.notfound p { color: var(--ink-2); font-family: var(--serif); font-size: 19px; }
.btn-link { font-family: var(--sans); font-weight: 700; color: var(--accent); letter-spacing: .03em; text-transform: uppercase; font-size: 13px; }
.btn-link:hover { color: var(--accent-d); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-foot { margin-top: 80px; border-top: 4px solid var(--accent); background: var(--ink); color: #c6d0db; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 44px 24px; text-align: center; }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 36px; color: #fff; }
.foot-brand::first-letter { color: var(--accent); }
.foot-tag { font-family: var(--serif); font-style: italic; color: #9fabb9; margin: 6px 0 24px; }
.foot-nav {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 22px;
    font-family: var(--sans); font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 24px;
    padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.foot-nav a { color: #c6d0db; }
.foot-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-copy { font-family: var(--sans); font-size: 12.5px; color: #8997a6; max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* ---------- Live crypto ticker (under nav) ---------- */
.mkt-ticker {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.mkt-ticker-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: stretch;
}
.mkt-ticker-label {
    flex: 0 0 auto;
    align-self: center;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ink);
    padding: 6px 12px;
    margin-right: 16px;
}
.mkt-ticker-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mkt-ticker-row::-webkit-scrollbar { display: none; }
.mkt-item {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 8px 16px;
    border-left: 1px solid var(--line);
    font-family: var(--sans);
    white-space: nowrap;
}
.mkt-item:first-child { border-left: 0; padding-left: 0; }
.mkt-sym {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--ink);
}
.mkt-px {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}
.mkt-chg {
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mkt-chg.up   { color: #16a34a; }
.mkt-chg.down { color: var(--accent); }
.mkt-ticker .mkt-spark {
    width: 56px;
    height: 18px;
    display: block;
}

/* ---------- Markets board (home page) ---------- */
.mkt-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-bottom: 6px;
}
.mkt-card {
    padding: 16px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
}
.mkt-card-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}
.mkt-card-top .mkt-sym { font-size: 14px; }
.mkt-name {
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mkt-card-fig {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.mkt-card-fig .mkt-px { font-size: 17px; }
.mkt-card-fig .mkt-chg { font-size: 13px; }
.mkt-board .mkt-spark {
    width: 100%;
    height: 32px;
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .mkt-board { grid-template-columns: repeat(2, 1fr); }
    .frontpage { grid-template-columns: 1fr; gap: 28px; }
    .sidebar { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .utility-inner .u-tag { display: none; }
    .navbar-inner { gap: 0; }
    .nav-link { padding: 11px 12px; font-size: 12.5px; }
    .nav-link:first-child { padding-left: 0; }
    .mkt-board { grid-template-columns: 1fr; }
    .mkt-ticker-label { margin-right: 10px; padding: 6px 9px; }
}
