:root {
    --ink: #15201b;
    --muted: #66736d;
    --line: #dfe7e2;
    --bg: #f7faf8;
    --panel: #ffffff;
    --green: #0644b7;
    --green-dark: #032b78;
    --gain: #168a3a;
    --amber: #b87919;
    --red: #b93232;
    --blue: #0644b7;
    --shadow: 0 16px 40px rgba(19, 38, 29, .08);
    --soft: #eef5f1;
    --panel-strong: #ffffff;
    --shell-width: min(1180px, calc(100% - 2rem));
    --page-bg:
        radial-gradient(circle at 12% 8%, rgba(6,68,183,.08) 0, rgba(6,68,183,0) 28%),
        radial-gradient(circle at 84% 14%, rgba(184,121,25,.07) 0, rgba(184,121,25,0) 24%),
        linear-gradient(135deg, #eef4f8 0%, #f6f8f7 48%, #e8f0ec 100%);
    color-scheme: light;
}

html[data-theme="dark"] {
    --ink: #edf7f0;
    --muted: #a8b9af;
    --line: #263b32;
    --bg: #09140f;
    --panel: #101f18;
    --panel-strong: #14271e;
    --green: #4f8cff;
    --green-dark: #9ec0ff;
    --gain: #45d06f;
    --amber: #e0a33f;
    --red: #ff7777;
    --blue: #9ec0ff;
    --shadow: 0 16px 40px rgba(0, 0, 0, .28);
    --soft: #162b21;
    --page-bg:
        radial-gradient(circle at 14% 10%, rgba(79,140,255,.13) 0, rgba(79,140,255,0) 30%),
        radial-gradient(circle at 84% 18%, rgba(224,163,63,.08) 0, rgba(224,163,63,0) 25%),
        linear-gradient(135deg, #08131d 0%, #101c28 52%, #0b151f 100%);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html {
    overflow-x: hidden;
}
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    transition: background-color .2s ease, color .2s ease;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: var(--page-bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button {
    font: inherit;
}
button, .button {
    border: 1px solid var(--green);
    background: var(--panel);
    color: var(--gain);
    border-radius: 6px;
    padding: .72rem 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}
button:hover, .button:hover { background: var(--soft); }
.primary, button.primary {
    background: var(--green);
    color: #fff;
}
.primary:hover, button.primary:hover { background: var(--green-dark); }

.top-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 40px;
    padding: 0 1rem;
    font-size: .86rem;
    background: linear-gradient(90deg, #032b78 0%, #0644b7 60%, #062f7d 100%);
    color: #f3faf5;
}
.top-strip > span {
    display: flex;
    align-items: center;
    min-width: 0;
    line-height: 1.2;
}
.top-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}
.theme-toggle {
    min-height: 24px;
    width: 48px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(255,255,255,.14);
    color: #fff;
    display: inline-grid;
    place-items: center;
}
.theme-toggle-track {
    position: relative;
    display: block;
    width: 38px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
}
.theme-toggle-track::before,
.theme-toggle-track::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    line-height: 1;
}
.theme-toggle-track::before {
    content: "☀";
    left: 5px;
}
.theme-toggle-track::after {
    content: "☾";
    right: 5px;
}
.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 1;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.25);
    transition: transform .18s ease;
}
html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(20px);
}
.site-header {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--panel-strong) 88%, transparent));
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}
.live-ticker {
    overflow: hidden;
    max-width: 100vw;
    contain: paint;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--panel-strong) 90%, transparent), color-mix(in srgb, var(--soft) 78%, transparent));
}
.ticker-track {
    display: flex;
    width: max-content;
    gap: .75rem;
    padding: .38rem 1rem;
    animation: ticker-scroll 42s linear infinite;
}
.ticker-track:hover {
    animation-play-state: paused;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    padding: .24rem .64rem;
    font-size: .82rem;
    box-shadow: 0 6px 18px rgba(19, 38, 29, .06);
}
.ticker-item em {
    font-style: normal;
    font-weight: 700;
}
.ticker-item.up em {
    color: var(--gain);
    animation: price-pulse-up 1.6s ease-in-out infinite;
}
.ticker-item.down em {
    color: var(--red);
    animation: price-pulse-down 1.6s ease-in-out infinite;
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes price-pulse-up {
    50% { text-shadow: 0 0 12px rgba(57, 185, 120, .5); }
}
@keyframes price-pulse-down {
    50% { text-shadow: 0 0 12px rgba(255, 119, 119, .45); }
}
.header-main {
    display: grid;
    gap: 1rem;
    padding: .72rem 0;
    align-items: center;
    width: var(--shell-width);
    margin: 0 auto;
}
.menu-toggle {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: .55rem;
    border-radius: 8px;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
    line-height: 1;
}
.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 999px;
    flex: 0 0 2px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .72rem;
    width: max-content;
    min-width: 0;
}
.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 18%, transparent), 0 10px 26px rgba(6, 68, 183, .18);
    flex: 0 0 auto;
    transform: translateZ(0);
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    image-rendering: auto;
}
.brand-wordmark {
    display: block;
    width: min(196px, 52vw);
    height: auto;
    flex: 0 1 auto;
    object-fit: contain;
}
[data-theme="dark"] .brand-wordmark,
[data-theme="dark"] .mobile-wordmark {
    filter: brightness(0) invert(1) opacity(.92);
}
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(6, 68, 183, .08);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.search-form:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(6, 68, 183, .14), 0 10px 28px rgba(6, 68, 183, .1);
}
.search-form input {
    border: 0;
    outline: 0;
    padding: .72rem .9rem;
    min-width: 0;
    background: transparent;
    color: var(--ink);
}
.search-form button {
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    min-width: 72px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    outline: 0;
}
.search-form button:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.62);
}
.site-nav {
    display: none;
    gap: .25rem;
    overflow-x: auto;
    padding: .36rem;
    width: calc(var(--shell-width) + .72rem);
    margin: 0 auto .55rem;
    transform: translateX(-.36rem);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-strong);
    box-shadow: 0 12px 34px rgba(6, 68, 183, .07);
}
.site-nav a {
    white-space: nowrap;
    padding: .48rem .82rem;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 700;
    font-size: .9rem;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.site-nav a:hover {
    background: var(--soft);
    transform: translateY(-1px);
}
.site-nav a.active {
    background: var(--green);
    color: #fff;
    box-shadow: 0 10px 22px rgba(6, 68, 183, .22);
}
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 36;
    width: min(86vw, 340px);
    padding: 1rem;
    background: var(--panel);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform .24s ease;
    display: grid;
    align-content: start;
    gap: 1rem;
    box-shadow: var(--shadow);
}
.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}
.mobile-menu-brand img:not(.mobile-wordmark) {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(6, 68, 183, .2);
}
.mobile-menu-brand .mobile-wordmark {
    display: block;
    width: 148px;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}
.mobile-menu-head button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 1.45rem;
}
.mobile-menu nav {
    display: grid;
    gap: .45rem;
}
.mobile-menu nav a {
    padding: .75rem .85rem;
    border-radius: 8px;
    background: var(--soft);
    font-weight: 700;
}
.mobile-menu nav a.active {
    background: var(--green);
    color: #fff;
}
body.menu-open {
    overflow: hidden;
}
body.menu-open .mobile-menu {
    transform: translateX(0);
}
body.menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.site-shell {
    display: grid;
    gap: 1.2rem;
    width: var(--shell-width);
    margin: 1.2rem auto 2rem;
}
.content-flow {
    min-width: 0;
    display: grid;
    gap: 1.2rem;
}
.site-sidebar {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.sidebar-block, .content-section, .chart-card, .price-section, .hero-panel, .page-title, .error-page, .contact-form {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--panel) 94%, transparent), color-mix(in srgb, var(--panel-strong) 84%, transparent)),
        linear-gradient(115deg, rgba(255,255,255,.18), rgba(255,255,255,0) 46%, rgba(6,68,183,.05));
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1rem;
}
.sidebar-block h2, .content-section h2, .price-section h2, .chart-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.18rem;
}
.sidebar-category-link {
    display: block;
    padding: .6rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--blue);
}
.sidebar-category-link small {
    float: right;
    color: var(--muted);
    font-weight: 700;
}
.sidebar-block p, .section-heading p, .page-title p, .hero-panel p {
    color: var(--muted);
    margin: .25rem 0 0;
}
.sidebar-article-list {
    display: grid;
    gap: .6rem;
    margin: .65rem 0 0;
    padding-left: 0;
    list-style: none;
}
.sidebar-article-list li {
    color: var(--muted);
}
.sidebar-article-list .sidebar-article-link {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    border-bottom: 0;
    color: var(--ink);
    padding: .45rem 0;
    text-decoration: none;
}
.sidebar-article-list .sidebar-article-link:hover {
    color: var(--blue);
}
.sidebar-article-list img {
    width: 74px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #edf2ef;
}
.sidebar-article-list span {
    min-width: 0;
}
.sidebar-article-list strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.35;
}
.sidebar-article-list small {
    float: none;
    display: block;
    margin-top: .2rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}
.sidebar-empty {
    list-style: none;
}
.region-insight-grid {
    display: grid;
    gap: .75rem;
    margin-top: .85rem;
}
.region-insight-card {
    display: grid;
    gap: .45rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 82%, var(--soft));
}
.region-insight-card div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}
.region-insight-card strong {
    color: var(--ink);
    font-size: 1rem;
}
.region-insight-card span {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}
.region-insight-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.hero-panel {
    display: grid;
    gap: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #eff8f2 55%, #fff6e7 100%);
}
html[data-theme="dark"] .hero-panel {
    background: linear-gradient(135deg, #11231a 0%, #0d1b15 55%, #241b0f 100%);
}
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.live-container {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    max-height: 30px;
    min-height: 28px;
    padding: .22rem .7rem;
    border: 1px solid rgba(6, 68, 183, .18);
    border-radius: 999px;
    background: #eaf3ff;
    color: #006dff;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
}
.live-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #38b850;
    box-shadow: 0 0 0 0 rgba(56, 184, 80, .55);
    animation: live-pulse 1.45s ease-out infinite;
}
@keyframes live-pulse {
    70% { box-shadow: 0 0 0 8px rgba(56, 184, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 184, 80, 0); }
}
html[data-theme="dark"] .live-container {
    border-color: rgba(79, 140, 255, .28);
    background: rgba(79, 140, 255, .14);
    color: #9ec0ff;
}
.home-current-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.hero-panel h1, .page-title h1, .article-detail h1, .error-page h1 {
    margin: .15rem 0;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: 0;
}
.home-current-time {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    padding: .34rem .68rem;
    border: 1px solid rgba(22, 138, 58, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    color: #168a3a;
    font-size: .96rem;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0;
}
.home-current-time::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.62) 18%, rgba(255,255,255,0) 34%),
        linear-gradient(135deg, rgba(22,138,58,.12), rgba(255,255,255,.45), rgba(184,121,25,.12));
    background-size: 220% 100%, 100% 100%;
    animation: metal-sheen 3.8s linear infinite;
}
html[data-theme="dark"] .home-current-time {
    border-color: rgba(69, 208, 111, .34);
    background: rgba(255, 255, 255, .06);
    color: #45d06f;
}
html[data-theme="dark"] .home-current-time::before {
    background:
        linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.22) 18%, rgba(255,255,255,0) 34%),
        linear-gradient(135deg, rgba(69,208,111,.1), rgba(255,255,255,.05), rgba(224,163,63,.08));
}
@keyframes metal-sheen {
    from { background-position: 180% 0, 0 0; }
    to { background-position: -80% 0, 0 0; }
}
.eyebrow {
    text-transform: uppercase;
    color: var(--amber) !important;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: 0;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}
.stat-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .75rem;
    background: var(--panel-strong);
}
.stat-grid span {
    display: block;
    color: var(--muted);
    font-size: .8rem;
}
.stat-grid strong {
    display: block;
    font-size: 1.1rem;
}
.section-heading {
    display: grid;
    gap: .8rem;
    margin-bottom: 1rem;
}
.section-heading select, .inline-filter select, .inline-filter input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .7rem;
    background: var(--panel);
    color: var(--ink);
}
.chart-controls {
    display: grid;
    gap: .65rem;
    min-width: min(100%, 360px);
}
.range-buttons, .sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.range-buttons button,
.sort-buttons button {
    min-height: 36px;
    padding: .45rem .7rem;
    border-radius: 999px;
    border-color: var(--line);
}
.range-buttons button.active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}
.chart-box {
    position: relative;
    height: 320px;
}
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.price-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--panel);
}
.price-table th, .price-table td {
    padding: .78rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    vertical-align: top;
}
.price-table th:last-child,
.price-table td:last-child {
    border-right: 0;
}
.price-table thead {
    background: linear-gradient(135deg, rgb(255, 255, 255) 0%, rgb(239, 248, 242) 55%, rgb(255, 246, 231) 100%);
}
.price-table th {
    background: transparent;
    font-size: .86rem;
    color: var(--ink);
}
html[data-theme="dark"] .price-table thead {
    background: linear-gradient(135deg, #122219 0%, #10251c 55%, #261d10 100%);
}
.price-table tbody tr:nth-child(odd),
.price-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}
.price-table tbody tr:nth-child(even),
.price-table tbody tr:nth-child(even) td {
    background: #0644b70a;
}
.price-table tbody tr:hover,
.price-table tbody tr:hover td {
    background: #0644b714;
}
html[data-theme="dark"] .price-table tbody tr:nth-child(odd),
html[data-theme="dark"] .price-table tbody tr:nth-child(odd) td {
    background: #102019;
}
html[data-theme="dark"] .price-table tbody tr:nth-child(even),
html[data-theme="dark"] .price-table tbody tr:nth-child(even) td {
    background: #15271f;
}
html[data-theme="dark"] .price-table tbody tr:hover,
html[data-theme="dark"] .price-table tbody tr:hover td {
    background: #1c3328;
}
.price-table tr:last-child td { border-bottom: 0; }
.up { color: var(--gain); font-weight: 700; }
.down { color: var(--red); font-weight: 700; }
.price-table small { color: var(--muted); display: block; }
.price-change {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    border-radius: 999px;
    padding: .18rem .45rem;
    font-weight: 700;
    font-size: .82rem;
    background: var(--soft);
    color: var(--muted);
}
.price-change-up {
    background: #e5f4ea;
    color: var(--gain);
}
.price-change-down {
    background: #f9e1e1;
    color: var(--red);
}
.price-change-text {
    font-weight: 800;
    white-space: nowrap;
}
.price-change-text.up {
    color: var(--gain);
}
.price-change-text.neutral {
    color: #808080;
}
.snapshot-price-table {
    min-width: 620px;
}

.article-grid {
    display: grid;
    gap: 1rem;
}
.article-card {
    display: grid;
    gap: .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: .85rem;
}
.article-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #edf2ef;
}
.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-card time, .article-detail time {
    color: var(--muted);
    font-size: .85rem;
}
.article-category {
    display: inline-flex;
    width: fit-content;
    margin-left: .45rem;
    color: var(--green);
    font-size: .82rem;
    font-weight: 800;
}
.article-card h2 {
    font-size: 1.08rem;
    margin: .15rem 0;
}
.article-card p { color: var(--muted); margin: 0; }
.article-detail, .rich-content {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.article-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1rem 0;
}
.rich-content {
    font-size: 1.02rem;
    line-height: 1.78;
}
.rich-content h2,
.rich-content h3 {
    color: var(--ink);
    line-height: 1.28;
    letter-spacing: 0;
}
.rich-content h2 {
    margin: 1.8rem 0 .75rem;
    padding: .75rem .9rem;
    border-left: 4px solid var(--green);
    border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, rgba(6, 68, 183, .07) 0%, rgba(239, 248, 242, .9) 55%, rgba(255, 246, 231, .8) 100%);
    font-size: 1.45rem;
}
.rich-content h3 {
    margin: 1.45rem 0 .55rem;
    padding-left: .72rem;
    border-left: 3px solid rgba(6, 68, 183, .28);
    color: var(--green-dark);
    font-size: 1.14rem;
}
html[data-theme="dark"] .rich-content h2 {
    background: linear-gradient(135deg, rgba(56, 116, 255, .12) 0%, rgba(18, 48, 36, .9) 55%, rgba(58, 42, 20, .7) 100%);
}
html[data-theme="dark"] .rich-content h3 {
    color: #9ce2b0;
    border-left-color: rgba(156, 226, 176, .42);
}
.rich-content p {
    color: var(--ink);
    margin: 0 0 1rem;
}
.rich-content a {
    color: var(--green-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(27, 111, 61, .35);
    text-underline-offset: 3px;
    transition: color .18s ease, text-decoration-color .18s ease;
}
.rich-content a:hover {
    color: var(--green);
    text-decoration-color: currentColor;
}
html[data-theme="dark"] .rich-content a {
    color: #9ce2b0;
    text-decoration-color: rgba(156, 226, 176, .4);
}
.rich-content blockquote {
    margin: 1.45rem 0;
    padding: 1rem 1.05rem;
    border-left: 4px solid var(--green);
    border-radius: 8px;
    background: rgba(6, 68, 183, .04);
    color: var(--ink);
}
.rich-content blockquote p {
    margin: 0;
    font-weight: 700;
}
html[data-theme="dark"] .rich-content blockquote {
    background: rgba(156, 226, 176, .08);
}
.rich-content ul,
.rich-content ol {
    margin: 1rem 0 1.15rem;
    padding-left: 1.35rem;
}
.rich-content li {
    margin: .42rem 0;
    color: var(--ink);
}
.rich-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px rgba(6, 68, 183, .1);
}
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}
.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: 1rem;
}
.admin-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
}
.admin-pagination a,
.admin-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: .45rem .7rem;
    border: 1px solid #dce5df;
    border-radius: 8px;
    background: #fff;
    color: #17201c;
    font-size: .9rem;
    font-weight: 700;
}
.admin-pagination a:hover {
    border-color: #1f7a4d;
    color: #145236;
    background: #eef5f1;
}
.admin-pagination .active {
    border-color: #1f7a4d;
    background: #1f7a4d;
    color: #fff;
}
.admin-pagination .disabled,
.admin-pagination .dots {
    color: #66736d;
    background: #f4f6f5;
}
.admin-pagination .disabled {
    opacity: .65;
}
.static-page {
    display: grid;
    gap: .95rem;
}
.static-page h2,
.static-page p {
    margin-bottom: 0;
}
.page-hero-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(6, 68, 183, .08);
}
.contact-info-grid {
    display: grid;
    gap: .75rem;
    margin: .4rem 0;
}
.contact-info-grid div {
    display: grid;
    gap: .2rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}
.contact-info-grid strong {
    color: var(--muted);
    font-size: .84rem;
    text-transform: uppercase;
}
.contact-info-grid a {
    color: var(--blue);
    font-weight: 800;
}
.inline-filter, .contact-form {
    display: grid;
    gap: .8rem;
}
.form-grid {
    display: grid;
    gap: .8rem;
}
label {
    display: grid;
    gap: .35rem;
    font-weight: 700;
}
label input, label textarea, label select {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .75rem;
    font-weight: 400;
    width: 100%;
    background: var(--panel);
    color: var(--ink);
}
.form-message { margin: 0; color: var(--green-dark); }
.load-more {
    width: 100%;
    margin-top: .8rem;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tag-list span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .45rem .65rem;
    background: var(--panel);
}
.text-link { color: var(--blue); font-weight: 700; }
.seo-content-block,
.faq-block {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--panel) 94%, transparent), color-mix(in srgb, var(--panel-strong) 84%, transparent)),
        linear-gradient(115deg, rgba(255,255,255,.18), rgba(255,255,255,0) 46%, rgba(6,68,183,.05));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(6, 68, 183, .06);
}
.seo-scroll {
    max-height: 700px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .45rem;
    scrollbar-width: thin;
}
.seo-article {
    display: grid;
    gap: .95rem;
}
.seo-article h2,
.seo-article h3 {
    margin: .15rem 0 0;
    line-height: 1.25;
}
.seo-article p {
    margin: 0;
    color: var(--ink);
}
.seo-article a {
    color: var(--blue);
    font-weight: 800;
}
.seo-article figure {
    margin: .25rem 0;
}
.seo-article img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(6, 68, 183, .08);
}
.faq-list {
    display: grid;
    gap: .7rem;
}
.faq-list details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: .85rem 1rem;
}
.faq-list summary {
    cursor: pointer;
    color: var(--ink);
    font-weight: 800;
}
.faq-list p {
    margin: .7rem 0 0;
    color: var(--muted);
}
.main-footer {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #0b1f17 0%, #123425 55%, #08130f 100%);
    color: #f2faf5;
    border-top: 1px solid rgba(255,255,255,.12);
}
.main-footer .container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}
.footer-content {
    display: grid;
    gap: 1.4rem;
    padding: 2rem 0 1.3rem;
}
.footer-info {
    display: grid;
    gap: .9rem;
}
.logo-area-footer {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: fit-content;
    max-width: 82vw;
    padding: .4rem .55rem;
    border-radius: 8px;
    background: #fff;
}
.footer-mark-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
}
.footer-logo-img {
    width: 180px;
    height: auto;
    flex: 0 1 auto;
}
.footer-info p {
    max-width: 620px;
    margin: 0;
    color: #c8dbd0;
}
.footer-contact-list,
.links-group ul {
    display: grid;
    gap: .45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-contact-list li {
    color: #dcebe2;
}
.footer-contact-list a,
.links-group a {
    color: #f4fbf6;
}
.footer-contact-list a:hover,
.links-group a:hover {
    color: #8ce0a4;
}
.footer-links {
    display: grid;
    gap: 1.2rem;
}
.links-group h5 {
    margin: 0 0 .65rem;
    color: #fff;
    font-size: .98rem;
    text-transform: uppercase;
}
.links-group a {
    color: #c8dbd0;
    font-size: .94rem;
}
.footer-bottom {
    display: grid;
    gap: .85rem;
    align-items: center;
    padding: 1rem 0 1.35rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.footer-bottom p {
    margin: 0;
    color: #b8cfbf;
}
.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    min-height: 34px;
    padding: .4rem .7rem;
    border: 1px solid rgba(140, 224, 164, .34);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #dff4e5;
    font-size: .78rem;
    font-weight: 800;
}
.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8ce0a4;
    box-shadow: 0 0 0 0 rgba(140, 224, 164, .62);
    animation: footer-pulse 1.8s ease-out infinite;
}
@keyframes footer-pulse {
    70% { box-shadow: 0 0 0 8px rgba(140, 224, 164, 0); }
    100% { box-shadow: 0 0 0 0 rgba(140, 224, 164, 0); }
}
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 28;
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--green) 60%, transparent);
    background: var(--green);
    color: #fff;
    box-shadow: 0 14px 34px rgba(6, 68, 183, .2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease, background-color .18s ease;
}
.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--green-dark);
}

@media (max-width: 640px) {
    body {
        padding-top: 148px;
    }
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 34;
    }
    .top-strip {
        padding: 0 .5rem;
        gap: .65rem;
    }
    .top-strip > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .top-actions {
        margin-left: auto;
        justify-content: flex-end;
    }
    .theme-toggle {
        width: 42px;
        min-width: 42px;
        min-height: 24px;
    }
    .theme-toggle-track {
        width: 34px;
    }
    html[data-theme="dark"] .theme-toggle-thumb {
        transform: translateX(16px);
    }
    .header-main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .75rem;
        width: min(100%, calc(100% - 1rem));
        padding: .62rem 0;
    }
    .header-main .brand {
        justify-self: start;
    }
    .header-main .menu-toggle {
        justify-self: end;
    }
    .menu-toggle {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 10px;
    }
    .header-main .search-form {
        display: none;
    }
    .site-shell {
        width: min(100%, calc(100% - 1rem));
        margin: .85rem auto 1.5rem;
    }
    .content-flow,
    .hero-panel,
    .price-section,
    .chart-card,
    .content-section,
    .seo-content-block,
    .faq-block {
        min-width: 0;
        max-width: 100%;
    }
    .price-section .section-heading h2,
    .chart-card .section-heading h2 {
        display: block;
        width: 100%;
        margin: -.15rem 0 .15rem;
        padding: .68rem .78rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: linear-gradient(135deg, rgb(255, 255, 255) 0%, rgb(239, 248, 242) 55%, rgb(255, 246, 231) 100%);
        color: var(--ink);
        font-size: 1.02rem;
        line-height: 1.28;
    }
    html[data-theme="dark"] .price-section .section-heading h2,
    html[data-theme="dark"] .chart-card .section-heading h2 {
        background: linear-gradient(135deg, #122219 0%, #10251c 55%, #261d10 100%);
    }
    .hero-panel h1, .page-title h1, .article-detail h1, .error-page h1 {
        font-size: 1.48rem;
        overflow-wrap: anywhere;
    }
    .brand {
        max-width: 100%;
    }
    .brand-logo {
        width: 42px;
        height: 42px;
    }
    .brand-wordmark {
        width: min(170px, 48vw);
    }
    .ticker-track {
        padding-left: .5rem;
        padding-right: .5rem;
    }
    .ticker-item {
        max-width: 86vw;
    }
    .ticker-item strong,
    .ticker-item span,
    .ticker-item em {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .price-table {
        min-width: 0;
    }
    .price-table thead {
        display: none;
    }
    .price-table, .price-table tbody, .price-table tr, .price-table td {
        display: block;
        width: 100%;
    }
    .price-table tr {
        border-bottom: 1px solid var(--line);
        padding: .45rem 0;
    }
    .price-table td {
        display: grid;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        gap: .55rem;
        border-bottom: 0;
        border-right: 0;
        padding: .48rem .65rem;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .price-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 700;
        min-width: 0;
    }
    .snapshot-price-table {
        min-width: 0;
    }
    .price-change-text {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .chart-controls {
        min-width: 0;
    }
    .range-buttons button {
        flex: 1 1 56px;
    }
}

@media (min-width: 760px) {
    .header-main {
        grid-template-columns: auto minmax(280px, 460px);
        justify-content: space-between;
        align-items: center;
    }
    .menu-toggle {
        display: none;
    }
    .site-nav {
        display: flex;
    }
    .section-heading {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
    .region-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-content {
        grid-template-columns: minmax(280px, .9fr) minmax(0, 1.35fr);
    }
    .footer-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .footer-bottom {
        grid-template-columns: 1fr auto;
    }
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .contact-info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .inline-filter {
        grid-template-columns: auto minmax(220px, 320px) auto;
        align-items: end;
    }
}

@media (min-width: 1040px) {
    .site-shell {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
    .hero-panel {
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
        align-items: center;
        padding: 1.4rem;
    }
    .article-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
