/* ============================================================
   CryptoPulse — editorial / magazine theme
   ============================================================ */
:root {
    --paper:    #f6f1e7;
    --paper-2:  #efe8da;
    --ink:      #1c1a17;
    --ink-soft: #4b463f;
    --accent:   #8a2331;   /* oxblood */
    --line:     #d8cfbd;
    --rule:     #1c1a17;
    --serif:    "Spectral", Georgia, serif;
    --display:  "Playfair Display", Georgia, serif;
    --label:    "Manrope", system-ui, sans-serif;
    --measure:  720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.65;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(28,26,23,.025) 1px, transparent 0);
    background-size: 22px 22px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.kicker {
    font-family: var(--label);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
}

/* ---------- Masthead ---------- */
.masthead {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px 0;
    text-align: center;
}
.masthead-top {
    display: flex;
    justify-content: space-between;
    font-family: var(--label);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--ink-soft);
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}
.wordmark {
    display: block;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(40px, 8vw, 84px);
    letter-spacing: -.02em;
    line-height: 1;
    margin: 26px 0 22px;
}
.topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    font-family: var(--label);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-top: 3px double var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
}
.topnav a { color: var(--ink-soft); transition: color .15s; }
.topnav a:hover, .topnav a.on { color: var(--accent); }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 48px 24px 0; }

/* ---------- Lead / featured ---------- */
.lead {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 48px;
    align-items: center;
    padding-bottom: 52px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.lead-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: saturate(.92) contrast(1.02); }
.lead-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(32px, 4.4vw, 56px);
    line-height: 1.05;
    letter-spacing: -.015em;
    margin: 14px 0 18px;
}
.lead-title a:hover { color: var(--accent); }
.lead-ex { font-size: 21px; color: var(--ink-soft); font-style: italic; margin: 0 0 20px; }

.card-meta {
    font-family: var(--label);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ---------- Markets ticker (live crypto) ---------- */
.mkt {
    margin: 36px 0 8px;
    padding: 0 0 30px;
    border-bottom: 1px solid var(--line);
}
.mkt-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
}
.mkt-kicker {
    font-family: var(--label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}
.mkt-note {
    font-family: var(--label);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.mkt-rail {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}
.mkt-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 22px;
    border-left: 1px solid var(--line);
}
.mkt-item:first-child { padding-left: 0; border-left: 0; }
.mkt-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mkt-sym {
    font-family: var(--display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .01em;
    color: var(--ink);
}
.mkt-name {
    font-family: var(--label);
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-spark { width: 100%; height: 30px; display: block; opacity: .92; }
.mkt-num { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mkt-price {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 19px;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -.01em;
    color: var(--ink);
}
.mkt-pct {
    font-family: var(--label);
    font-weight: 700;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.mkt-pct.up   { color: #2f7d46; }
.mkt-pct.down { color: var(--accent); }

@media (max-width: 860px) {
    .mkt-rail { grid-template-columns: repeat(3, 1fr); gap: 26px 0; }
    .mkt-item:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
    .mkt-rail { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
    .mkt-item { padding: 4px 16px; }
    .mkt-item:nth-child(3n+1) { padding-left: 16px; border-left: 1px solid var(--line); }
    .mkt-item:nth-child(2n+1) { padding-left: 0; border-left: 0; }
}

/* ---------- Section rule label ---------- */
.rule-label {
    text-align: center;
    border-bottom: 1px solid var(--rule);
    line-height: .1em;
    margin: 50px 0 36px;
}
.rule-label span {
    background: var(--paper);
    padding: 0 18px;
    font-family: var(--label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink);
}

/* ---------- Grid of cards ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 38px 40px;
}
.card { display: flex; flex-direction: column; }
.card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 16px; filter: saturate(.92); }
.card-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.15;
    margin: 10px 0 10px;
}
.card-title a:hover { color: var(--accent); }
.card-ex { font-size: 16.5px; color: var(--ink-soft); margin: 0 0 14px; }
.card .card-meta { margin-top: auto; }

/* ---------- Section head (category) ---------- */
.section-head { text-align: center; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 3px double var(--rule); }
.section-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6vw, 64px); margin: 8px 0 0; letter-spacing: -.02em; }

/* ---------- Article ---------- */
.article { max-width: var(--measure); margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 36px; }
.article-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(34px, 5.2vw, 60px);
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 14px 0 20px;
}
.article-lead { font-size: 23px; font-style: italic; color: var(--ink-soft); margin: 0 0 22px; }
.article-meta { font-family: var(--label); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.article-cover { margin: 0 0 40px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }

.article-body { font-size: 20px; line-height: 1.72; }
.article-body > p:first-of-type::first-letter {
    font-family: var(--display);
    font-weight: 800;
    float: left;
    font-size: 4.4em;
    line-height: .76;
    padding: 8px 12px 0 0;
    color: var(--accent);
}
.article-body p { margin: 0 0 1.4em; }
.article-body h2 { font-family: var(--display); font-weight: 700; font-size: 30px; margin: 1.8em 0 .5em; letter-spacing: -.01em; }
.article-body h3 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 1.5em 0 .4em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
    margin: 1.6em 0; padding: 6px 0 6px 28px;
    border-left: 3px solid var(--accent);
    font-style: italic; font-size: 23px; color: var(--ink);
}
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.article-body li { margin: .4em 0; }
.article-body img { margin: 1.6em 0; }
.article-body code { background: var(--paper-2); padding: 2px 7px; border-radius: 3px; font-size: .9em; }

.more { margin-top: 30px; }

/* ---------- Pager ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin: 56px 0 0; }
.pager a {
    font-family: var(--label); font-weight: 600; font-size: 15px;
    width: 42px; height: 42px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft);
}
.pager a.on, .pager a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.empty { text-align: center; color: var(--ink-soft); font-style: italic; padding: 80px 0; }
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font-family: var(--display); font-size: clamp(40px,8vw,72px); margin: 10px 0 16px; }
.btn-link { font-family: var(--label); font-weight: 700; color: var(--accent); letter-spacing: .04em; }

/* ---------- Footer ---------- */
.site-foot { margin-top: 90px; border-top: 3px double var(--rule); background: var(--paper-2); }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 54px 24px; text-align: center; }
.foot-brand { font-family: var(--display); font-weight: 900; font-size: 40px; }
.foot-tag { font-style: italic; color: var(--ink-soft); margin: 6px 0 22px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; font-family: var(--label); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 26px; }
.foot-nav a { color: var(--ink-soft); }
.foot-nav a:hover { color: var(--accent); }
.foot-copy { font-family: var(--label); font-size: 12.5px; color: var(--ink-soft); max-width: 520px; margin: 0 auto; line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .lead { grid-template-columns: 1fr; gap: 24px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 560px) {
    body { font-size: 18px; }
    .grid { grid-template-columns: 1fr; }
    .masthead-top .m-tag { display: none; }
    .topnav { gap: 16px; font-size: 12px; }
}
