:root {
  --ink: #071410;
  --ink-soft: #0d211a;
  --surface: #f5f7f4;
  --card: #ffffff;
  --line: #dfe6e1;
  --muted: #66736d;
  --emerald: #0b8f67;
  --emerald-bright: #36d399;
  --emerald-pale: #e7f8f1;
  --gold: #d7ad55;
  --red: #d94b57;
  --shadow: 0 22px 60px rgba(7, 20, 16, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.site-identity {
  color: #dce9e4;
  background: #050e0b;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-identity .page-shell { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-identity-copy { display: flex; align-items: center; gap: 18px; min-width: 0; }
.site-identity-copy strong { display: inline-flex; align-items: center; gap: 7px; color: #f4faf7; font-size: .78rem; font-weight: 600; letter-spacing: .015em; white-space: nowrap; }
.site-identity-copy strong span { color: var(--emerald-bright); font-weight: 800; letter-spacing: .08em; }
.site-identity-copy strong i { color: var(--gold); font-style: normal; }
.site-identity-copy p { margin: 0; padding-right: 18px; border-right: 1px solid rgba(255, 255, 255, .12); color: #91a49c; font-size: .76rem; white-space: nowrap; }
.site-domain { flex: 0 0 auto; padding: 4px 10px; border: 1px solid rgba(54, 211, 153, .24); border-radius: 999px; color: #bcebd9; background: rgba(54, 211, 153, .07); font-size: .7rem; font-weight: 700; letter-spacing: .05em; transition: color .2s, border-color .2s, background .2s; }
.site-domain:hover { color: #fff; border-color: rgba(54, 211, 153, .5); background: rgba(54, 211, 153, .13); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 20, 16, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.site-nav { min-height: 78px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; flex: 0 0 auto; }
.brand > span:last-child { display: grid; line-height: 1.25; }
.brand b { font-size: 1.06rem; font-weight: 800; }
.brand small { color: #91a49c; font-size: .7rem; margin-top: 4px; }
.brand-mark { width: 42px; height: 42px; border: 1px solid rgba(54, 211, 153, .42); border-radius: 13px; display: flex; align-items: end; justify-content: center; gap: 3px; padding: 10px; background: rgba(54, 211, 153, .08); }
.brand-mark i { width: 4px; border-radius: 4px; background: var(--emerald-bright); }
.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 19px; }
.brand-mark i:nth-child(3) { height: 14px; background: var(--gold); }
.main-navigation { display: flex; align-items: center; gap: 32px; margin-inline: auto; }
.main-navigation a { color: #aebbb6; font-size: .92rem; position: relative; padding: 27px 0 24px; transition: color .2s; }
.main-navigation a:hover, .main-navigation a.active { color: #fff; }
.main-navigation a.active::after { content: ""; position: absolute; right: 0; left: 0; bottom: 0; height: 2px; border-radius: 3px; background: var(--emerald-bright); }
.main-navigation .dashboard-nav-link { display: flex; align-items: center; gap: 6px; }
.dashboard-nav-link span { padding: 1px 5px; border-radius: 5px; color: #052218; background: var(--emerald-bright); font-size: .52rem; font-weight: 800; }
.nav-refresh { border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #edf8f3; padding: 9px 15px; border-radius: 11px; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: .2s ease; }
.nav-refresh:hover { background: rgba(54,211,153,.13); border-color: rgba(54,211,153,.45); }
.nav-refresh.loading svg { animation: spin .8s linear infinite; }
.nav-refresh svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-toggle { display: none; border: 0; background: none; padding: 8px; }
.menu-toggle > span:not(.visually-hidden) { display: block; width: 24px; height: 2px; background: white; margin: 5px 0; border-radius: 2px; }
.market-ticker { background: #0c2b21; color: #a9bdb5; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .78rem; }
.market-ticker .page-shell { min-height: 31px; display: flex; align-items: center; gap: 9px; }
.market-ticker b { color: #d5e5de; font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 0 5px rgba(54,211,153,.11); flex: 0 0 auto; }

.hero-section { position: relative; min-height: 400px; overflow: hidden; background: var(--ink); color: #fff; }
.hero-backdrop { position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(7,20,16,.05), rgba(7,20,16,.32) 47%, rgba(7,20,16,.96) 76%), url('/images/market-hero.png'); background-size: cover; background-position: center; transform: scale(1.01); }
.hero-backdrop::after { content: ""; position: absolute; inset: auto 0 0; height: 150px; background: linear-gradient(transparent, rgba(7,20,16,.97)); }
.hero-content { position: relative; z-index: 1; min-height: 400px; display: flex; align-items: center; }
.hero-copy { width: min(625px, 56%); padding: 30px 0 28px; }
.eyebrow, .section-kicker { color: var(--emerald-bright); font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; background: rgba(54,211,153,.08); border: 1px solid rgba(54,211,153,.2); border-radius: 999px; padding: 7px 12px; }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 0 4px rgba(54,211,153,.12); }
.hero-copy h1 { font-size: clamp(2.35rem, 4.4vw, 3.75rem); line-height: 1.18; margin: 17px 0 13px; letter-spacing: -.04em; font-weight: 800; }
.hero-copy h1 em { color: var(--gold); font-style: normal; }
.hero-copy > p { max-width: 550px; color: #b9c7c2; font-size: 1rem; line-height: 1.85; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin: 20px 0 24px; }
.hero-actions a { min-height: 44px; padding: 9px 20px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; font-weight: 700; transition: transform .2s, background .2s; }
.hero-actions a:hover { transform: translateY(-2px); }
.primary-action { background: var(--emerald-bright); color: #052218; box-shadow: 0 12px 32px rgba(54,211,153,.2); }
.primary-action:hover { background: #5be1af; }
.secondary-action { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: white; }
.secondary-action:hover { background: rgba(255,255,255,.11); }
.hero-meta { display: flex; align-items: stretch; color: #d5dfdb; }
.hero-meta > div { min-height: 47px; display: grid; grid-template-columns: auto auto; align-content: center; column-gap: 8px; padding: 0 22px; border-left: 1px solid rgba(255,255,255,.12); }
.hero-meta > div:first-child { padding-right: 0; }
.hero-meta > div:last-child { border-left: 0; }
.hero-meta b { font-size: .92rem; }
.hero-meta small { display: block; grid-column: 1 / -1; color: #81958d; font-size: .7rem; }
.pulse-ring { align-self: center; width: 7px; height: 7px; background: var(--emerald-bright); border-radius: 50%; box-shadow: 0 0 0 4px rgba(54,211,153,.1); }

.market-section, .prices-section { padding-block: 88px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.section-heading h2, .trend-copy h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin: 3px 0 4px; letter-spacing: -.035em; line-height: 1.35; font-weight: 800; }
.section-heading p, .trend-copy > p { color: var(--muted); margin: 0; }
.last-update { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; background: white; border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; }
.last-update b { color: var(--ink); direction: ltr; }
.market-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.market-card { background: var(--card); border: 1px solid #e5ebe7; border-radius: 17px; padding: 20px; box-shadow: 0 7px 24px rgba(7,20,16,.035); transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.market-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cddbd3; }
.card-topline { display: flex; align-items: center; gap: 10px; }
.asset-icon { width: 43px; height: 43px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; font-size: .82rem; font-weight: 800; direction: ltr; flex: 0 0 auto; }
.asset-icon.currency { color: #0a8b64; background: #e7f8f1; }
.asset-icon.crypto { color: #5f53c7; background: #efedff; }
.asset-icon.gold { color: #a67713; background: #fff6dc; }
.asset-icon.car { color: #2a6eb6; background: #e7f1fc; }
.asset-title { min-width: 0; line-height: 1.35; flex: 1; }
.asset-title h3 { font-size: .93rem; margin: 0; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-title span { color: #8b9791; font-size: .69rem; }
.change-badge { font-size: .72rem; direction: ltr; white-space: nowrap; padding: 4px 7px; border-radius: 7px; font-weight: 700; }
.change-badge.up { color: #097552; background: #e6f8f0; }
.change-badge.down { color: #c33e4b; background: #fff0f1; }
.change-badge.flat { color: #737f79; background: #f0f3f1; }
.price-line { display: flex; align-items: baseline; gap: 7px; margin: 23px 0 20px; direction: rtl; }
.price-line strong { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; direction: rtl; }
.price-line span { color: var(--muted); font-size: .72rem; }
.card-footer { padding-top: 13px; border-top: 1px solid #eef1ef; display: flex; justify-content: space-between; gap: 8px; color: #89938e; font-size: .68rem; }
.card-footer span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-footer time { direction: ltr; }
.state-panel { display: flex; align-items: center; gap: 18px; background: white; border: 1px dashed #cdd7d1; border-radius: 18px; padding: 28px; }
.state-panel > span { width: 48px; height: 48px; border-radius: 15px; background: var(--emerald-pale); color: var(--emerald); display: grid; place-items: center; font-size: 1.5rem; }
.state-panel h3, .state-panel p { margin: 0; }
.state-panel h3 { font-size: 1rem; }
.state-panel p { color: var(--muted); font-size: .85rem; }
.state-panel button { margin-right: auto; border: 0; background: var(--ink); color: white; border-radius: 10px; padding: 9px 15px; cursor: pointer; }
.error-state > span { background: #fff0f1; color: var(--red); }

.trend-section { background: var(--ink); color: white; padding-block: 92px; position: relative; overflow: hidden; }
.trend-section::before { content: ""; position: absolute; width: 500px; height: 500px; right: -200px; top: -280px; border-radius: 50%; background: rgba(54,211,153,.09); filter: blur(50px); }
.trend-layout { position: relative; display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 70px; align-items: center; }
.trend-copy h2 { font-size: 2.25rem; margin-block: 8px 16px; }
.trend-copy > p { color: #91a29b; font-size: .9rem; line-height: 1.9; }
.trend-copy label { display: block; margin: 30px 0 8px; color: #d7e1dd; font-size: .75rem; font-weight: 600; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; color: white; background: #11271f; border: 1px solid #294238; border-radius: 11px; padding: 11px 14px 11px 35px; appearance: none; font-size: .82rem; outline: none; }
.select-wrap select:focus { border-color: var(--emerald-bright); box-shadow: 0 0 0 3px rgba(54,211,153,.12); }
.select-wrap > span { position: absolute; left: 13px; top: 7px; color: #8aa197; pointer-events: none; }
.trend-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
.trend-metrics > div { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); border-radius: 11px; padding: 12px; display: grid; }
.trend-metrics small, .trend-metrics span { color: #81958d; font-size: .65rem; }
.trend-metrics b { font-size: .94rem; direction: ltr; text-align: right; margin: 2px 0; }
.chart-card { min-width: 0; background: #0d211a; border: 1px solid #244036; border-radius: 20px; padding: 23px; box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.chart-card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.chart-card-head span { color: #81958d; font-size: .67rem; }
.chart-card-head h3 { font-size: 1rem; margin: 2px 0 0; }
.chart-status { display: flex; align-items: center; gap: 8px; background: rgba(54,211,153,.07); border: 1px solid rgba(54,211,153,.12); padding: 6px 10px; border-radius: 9px; }
.chart-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-bright); }
.chart-canvas-wrap { height: 330px; position: relative; }
#market-chart { width: 100%; height: 100%; }
.chart-tooltip { position: absolute; z-index: 2; min-width: 130px; transform: translate(-50%, calc(-100% - 14px)); background: #f3faf7; color: var(--ink); padding: 8px 10px; border-radius: 9px; box-shadow: 0 10px 35px rgba(0,0,0,.3); pointer-events: none; text-align: center; font-size: .71rem; line-height: 1.55; direction: rtl; }
.chart-tooltip b { display: block; font-size: .85rem; direction: ltr; }
.chart-range { display: flex; justify-content: space-between; color: #6e857b; font-size: .63rem; border-top: 1px solid rgba(255,255,255,.055); padding-top: 12px; }

.prices-heading { align-items: center; }
.market-search { width: min(330px,100%); height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); background: white; border-radius: 12px; transition: border .2s, box-shadow .2s; }
.market-search:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(11,143,103,.08); }
.market-search svg { width: 19px; fill: none; stroke: #8b9791; stroke-width: 1.7; stroke-linecap: round; }
.market-search input { border: 0; outline: 0; width: 100%; background: transparent; font-size: .82rem; }
.market-search input::placeholder { color: #9ca6a1; }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: white; color: #58675f; padding: 8px 14px; font-size: .78rem; cursor: pointer; transition: .2s; }
.category-tabs button span { color: #99a39e; margin-right: 5px; }
.category-tabs button:hover { border-color: #aac3b7; }
.category-tabs button.active { background: var(--ink); color: white; border-color: var(--ink); }
.category-tabs button.active span { color: #8ea099; }
.market-table-wrap { background: white; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; box-shadow: 0 7px 25px rgba(7,20,16,.035); }
.market-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.market-table th { color: #85918b; font-weight: 500; font-size: .69rem; padding: 10px 16px; text-align: right; background: #f8faf8; border-bottom: 1px solid var(--line); }
.market-table td { padding: 9px 16px; border-bottom: 1px solid #edf1ee; color: #53615a; }
.market-table tbody tr:last-child td { border-bottom: 0; }
.market-table tbody tr { transition: background .2s; }
.market-table tbody tr:hover { background: #f9fbfa; }
.table-asset { display: flex; align-items: center; gap: 11px; min-width: 170px; }
.table-asset .asset-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .66rem; }
.table-asset > div { display: grid; line-height: 1.35; }
.table-asset b, .table-price b { color: var(--ink); font-size: .82rem; }
.table-asset small, .table-price small { color: #98a29d; font-size: .65rem; }
.table-price { display: flex; align-items: baseline; gap: 6px; min-width: 120px; }
.quote-pill { background: #f0f4f1; color: #66736d; padding: 4px 8px; border-radius: 7px; white-space: nowrap; font-size: .7rem; }
.market-table time { direction: ltr; display: inline-block; color: #7b8781; }
.no-results { padding: 35px; color: var(--muted); text-align: center; }
.table-pagination { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: .74rem; }
.table-pagination button { border: 1px solid #cdd9d2; background: white; color: var(--ink); border-radius: 10px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.table-pagination button:hover { border-color: var(--emerald); box-shadow: 0 7px 20px rgba(7,20,16,.07); transform: translateY(-1px); }
.table-pagination button b { color: var(--emerald); font-size: .9rem; }
.market-summary { margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.market-summary > div { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.summary-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; }
.summary-icon.up { background: var(--emerald-pale); color: var(--emerald); }
.summary-icon.down { background: #fff0f1; color: var(--red); }
.summary-icon.neutral { background: #fff6dc; color: #a67713; }
.market-summary p { margin: 0; display: grid; line-height: 1.35; }
.market-summary small { color: var(--muted); font-size: .65rem; }
.market-summary b { font-size: .8rem; }

.site-footer { background: #06100d; color: #9baba4; padding: 55px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 35px; padding-bottom: 35px; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand b { color: white; }
.footer-brand p { margin: 2px 0 0; font-size: .72rem; }
.footer-grid > p { margin: 0; font-size: .74rem; line-height: 1.8; }
.footer-grid > a { color: #d5e0dc; font-size: .75rem; }
.footer-links { display: grid; gap: 7px; }
.footer-links a { color: #d5e0dc; font-size: .72rem; transition: color .2s; }
.footer-links a:hover { color: var(--emerald-bright); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; font-size: .68rem; color: #63746d; }

.info-page { min-height: 70vh; background: #f4f7f5; }
.info-hero { padding: 72px 0 66px; color: #fff; background: radial-gradient(circle at 18% 15%, rgba(54,211,153,.16), transparent 28%), #071410; }
.info-hero.compact { padding-block: 56px; }
.info-hero span { color: var(--emerald-bright); font-size: .78rem; font-weight: 800; }
.info-hero h1 { max-width: 780px; margin: 10px 0 12px; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.04em; }
.info-hero p { max-width: 720px; margin: 0; color: #afc0b9; line-height: 2; }
.info-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); align-items: start; gap: 55px; padding-block: 65px 85px; }
.info-summary { position: sticky; top: 110px; padding: 20px; border: 1px solid #dce6e0; border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(7,20,16,.04); }
.info-summary b { color: #087552; font-size: .8rem; }
.info-summary p { margin: 7px 0 0; color: #6e7d76; font-size: .78rem; line-height: 1.9; }
.info-content { display: grid; gap: 34px; }
.info-content section { padding-bottom: 30px; border-bottom: 1px solid #dfe7e2; }
.info-content h2 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 800; }
.info-content p { margin: 0; color: #5f6f67; line-height: 2.1; }
.info-content .info-notice { padding: 22px; border: 1px solid #d5e5dc; border-radius: 15px; background: #edf8f2; }
.refresh-toast { position: fixed; z-index: 100; left: 24px; bottom: 24px; background: var(--ink); color: white; padding: 11px 16px; border-radius: 11px; box-shadow: 0 12px 35px rgba(0,0,0,.25); font-size: .78rem; }
.refresh-toast.error { background: #862d36; }

[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardFlash { 50% { background: #e8faf3; } }
.price-updated { animation: cardFlash .8s ease; }

@media (max-width: 1050px) {
  .market-cards { grid-template-columns: repeat(2,1fr); }
  .trend-layout { grid-template-columns: 270px minmax(0,1fr); gap: 35px; }
  .main-navigation { gap: 20px; }
}

@media (max-width: 820px) {
  .page-shell { width: min(100% - 32px, 680px); }
  .site-identity .page-shell { min-height: 50px; gap: 14px; }
  .site-identity-copy { display: grid; gap: 1px; }
  .site-identity-copy strong { font-size: .7rem; }
  .site-identity-copy p { padding-right: 0; border-right: 0; font-size: .68rem; }
  .site-nav { min-height: 68px; }
  .menu-toggle { display: block; margin-right: auto; cursor: pointer; }
  .nav-refresh span { display: none; }
  .nav-refresh { padding: 9px; }
  .main-navigation { display: none; position: fixed; inset: 99px 0 auto; background: #0a1d17; padding: 15px 22px 25px; flex-direction: column; align-items: stretch; gap: 0; box-shadow: 0 20px 40px rgba(0,0,0,.32); }
  .main-navigation.open { display: flex; }
  .main-navigation a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .main-navigation a.active::after { display: none; }
  .hero-section, .hero-content { min-height: 430px; }
  .hero-backdrop { background-image: linear-gradient(90deg, rgba(7,20,16,.1), rgba(7,20,16,.45) 45%, rgba(7,20,16,.98) 82%), url('/images/market-hero.png'); background-position: 35% center; }
  .hero-copy { width: 75%; }
  .trend-layout { grid-template-columns: 1fr; }
  .trend-copy { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > a { grid-column: 1 / -1; }
  .info-layout { grid-template-columns: 1fr; gap: 28px; }
  .info-summary { position: static; }
  .market-table-wrap { overflow-x: auto; }
  .market-table { min-width: 620px; }
  .market-table th:nth-child(4), .market-table td:nth-child(4),
  .market-table th:nth-child(5), .market-table td:nth-child(5) { display: none; }
}

@media (max-width: 580px) {
  .page-shell { width: calc(100% - 26px); }
  .site-identity .page-shell { min-height: 54px; gap: 8px; }
  .site-identity-copy strong { gap: 4px; font-size: .62rem; letter-spacing: 0; }
  .site-identity-copy strong span { letter-spacing: .05em; }
  .site-identity-copy p { font-size: .62rem; line-height: 1.45; white-space: normal; }
  .site-domain { padding: 3px 7px; font-size: .62rem; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .market-ticker .page-shell > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-section, .hero-content { min-height: 420px; }
  .hero-backdrop { background-image: linear-gradient(180deg, rgba(7,20,16,.55), rgba(7,20,16,.93) 58%, #071410 90%), url('/images/market-hero.png'); background-position: 32% center; }
  .hero-content { align-items: center; }
  .hero-copy { width: 100%; padding: 22px 0 20px; }
  .hero-copy h1 { margin-block: 14px 9px; font-size: clamp(1.85rem, 9.5vw, 2.35rem); line-height: 1.25; }
  .hero-copy > p { font-size: .86rem; line-height: 1.9; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0 17px; }
  .hero-actions a { min-height: 44px; padding-inline: 10px; gap: 8px; font-size: .8rem; }
  .hero-meta { justify-content: space-between; }
  .hero-meta > div { padding: 0 10px; }
  .hero-meta > div:first-child { display: none; }
  .market-section, .prices-section { padding-block: 60px; }
  .section-heading, .prices-heading { align-items: stretch; flex-direction: column; margin-bottom: 24px; }
  .last-update, .market-search { width: 100%; }
  .market-cards { grid-template-columns: 1fr; }
  .market-card { padding: 18px; }
  .trend-section { padding-block: 65px; }
  .trend-copy h2 { font-size: 1.85rem; }
  .chart-card { padding: 15px; border-radius: 16px; }
  .chart-canvas-wrap { height: 270px; }
  .chart-status { display: none; }
  .market-summary { grid-template-columns: 1fr; }
  .table-pagination { flex-direction: column; gap: 8px; padding: 13px 0 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > a { grid-column: auto; }
  .footer-bottom { gap: 15px; flex-direction: column; }
  .info-hero, .info-hero.compact { padding-block: 44px; }
  .info-hero h1 { font-size: 2.15rem; }
  .info-layout { padding-block: 42px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
