:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f7f8fa;
    --line: #e8ebef;
    --line-strong: #d9dee5;
    --text: #111827;
    --muted: #6b7280;
    --accent: #111827;
    --green: #16a34a;
    --shadow: 0 10px 30px rgba(17, 24, 39, .05);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: "Noto Sans Thai", system-ui, sans-serif;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.ambient { display: none; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}
.nav {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}
.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-weight: 800;
    color: #fff;
    background: #111827;
}
.brand strong {
    display: block;
    font-size: .98rem;
    letter-spacing: -.01em;
}
.brand small {
    display: block;
    color: var(--muted);
    font-size: .7rem;
    margin-top: 1px;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .08em;
    background: #fff;
}
.live-pill i,
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}
.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #4b5563;
    background: #fff;
    cursor: pointer;
    transition: .18s ease;
}
.icon-btn:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}
.icon-btn svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}
.hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--line);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
    gap: 56px;
    align-items: end;
}
.eyebrow,
.section-kicker {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.hero h1 {
    margin: 14px 0 18px;
    max-width: 780px;
    font-size: clamp(2.4rem, 5.2vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -.045em;
    font-weight: 700;
}
.hero h1 em {
    font-style: normal;
    color: #9ca3af;
}
.hero-copy > p {
    max-width: 670px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.85;
}
.hero-meta {
    margin-top: 22px;
    color: #9ca3af;
    font-size: .82rem;
}
.dot-sep {
    margin: 0 8px;
    color: #d1d5db;
}
.market-card {
    min-height: 235px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}
.market-card::after { display: none; }
.market-card-top {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: .7rem;
}
.market-symbol {
    margin-top: 32px;
    color: #9ca3af;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
}
.market-value {
    margin-top: 5px;
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}
.market-caption {
    color: var(--muted);
    margin-top: 7px;
    font-size: .82rem;
}
.sparkline {
    height: 42px;
    margin-top: 22px;
    display: flex;
    align-items: end;
    gap: 5px;
}
.sparkline span {
    flex: 1;
    min-width: 6px;
    border-radius: 3px;
    background: #d1d5db;
}
.news-section {
    padding: 52px 0 88px;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 24px;
}
.toolbar h2 {
    margin: 5px 0 0;
    font-size: 1.8rem;
    letter-spacing: -.02em;
}
.search-box {
    width: min(360px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.search-box:focus-within {
    border-color: #bfc5ce;
}
.search-box svg {
    width: 17px;
    fill: none;
    stroke: #9ca3af;
    stroke-width: 1.8;
}
.search-box input {
    width: 100%;
    height: 44px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}
.search-box input::placeholder {
    color: #a8afb9;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.news-card {
    position: relative;
    min-height: 215px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.news-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}
.news-card.featured {
    grid-column: span 2;
    min-height: 235px;
}
.card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}
.card-id {
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid var(--line);
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}
.card-source {
    color: #9ca3af;
    font-size: .72rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.news-card h3 {
    margin: 18px 0 22px;
    font-size: 1.02rem;
    line-height: 1.72;
    font-weight: 600;
    letter-spacing: -.01em;
}
.news-card.featured h3 {
    max-width: 880px;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
}
.card-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #4b5563;
    font-size: .82rem;
    font-weight: 600;
}
.card-link:hover {
    color: #111827;
}
.card-link svg {
    width: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}
.state-box {
    min-height: 190px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 13px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
    background: #fff;
}
.state-box strong { color: var(--text); }
.state-box p { margin: 0; }
.loader {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    border-top-color: #111827;
    animation: spin .8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
footer {
    border-top: 1px solid var(--line);
    padding: 26px 0;
    color: #9ca3af;
    background: #fff;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: .76rem;
}
.footer-inner div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-inner strong { color: var(--text); }
[hidden] { display: none !important; }
@media (max-width: 820px) {
    .hero {
        padding-top: 52px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .market-card {
        min-height: 210px;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card.featured {
        grid-column: span 1;
    }
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .search-box {
        width: 100%;
    }
}
@media (max-width: 560px) {
    .container {
        width: min(100% - 26px, 1120px);
    }
    .live-pill {
        display: none;
    }
    .hero {
        padding: 44px 0 40px;
    }
    .hero h1 {
        font-size: 2.45rem;
    }
    .news-section {
        padding: 38px 0 64px;
    }
    .footer-inner {
        flex-direction: column;
    }
}