:root {
    --bg-dark: #07111f;
    --panel-bg: rgba(12, 24, 42, 0.88);
    --glass-border: rgba(166, 186, 214, 0.14);
    --glass-border-strong: rgba(166, 186, 214, 0.22);
    --text-main: #edf3ff;
    --text-soft: #c2cede;
    --text-muted: #7f92ad;
    --accent-blue: #6fa8ff;
    --accent-cyan: #70d4ff;
    --accent-gold: #c9a45e;
    --accent-green: #4ecb92;
    --accent-red: #ea6d75;
    --shadow-lg: 0 24px 80px rgba(2, 8, 20, 0.46);
    --font-family: 'IBM Plex Sans', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: 'IBM Plex Mono', "SFMono-Regular", Consolas, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(111, 168, 255, 0.18), transparent 32%),
        radial-gradient(circle at 85% 18%, rgba(201, 164, 94, 0.18), transparent 28%),
        linear-gradient(180deg, #08111d 0%, #091523 46%, #07111f 100%);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.65;
    overflow-x: hidden;
}

.page-glow {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.24;
    pointer-events: none;
    z-index: 0;
}

.page-glow-a {
    top: -8rem;
    right: -6rem;
    background: rgba(111, 168, 255, 0.34);
}

.page-glow-b {
    bottom: -9rem;
    left: -8rem;
    background: rgba(201, 164, 94, 0.24);
}

.dashboard-container {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
    min-width: 0;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.sidebar {
    width: 244px;
    padding: 1.35rem 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    border-right: 1px solid var(--glass-border-strong);
    background:
        linear-gradient(180deg, rgba(10, 19, 34, 0.97), rgba(8, 16, 28, 0.94)),
        radial-gradient(circle at 50% 0, rgba(111, 168, 255, 0.12), transparent 34%);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(166, 186, 214, 0.24) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(166, 186, 214, 0.22);
    border-radius: 999px;
}

.logo {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 0.68rem;
    padding: 0 0.7rem 0.9rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.08);
}

.desktop-brand-icon {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 22px rgba(24, 63, 104, 0.32);
}

.desktop-brand-copy {
    min-width: 0;
}

.eyebrow {
    color: var(--accent-gold);
    font-size: 0.73rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.logo .eyebrow {
    margin-bottom: 0.36rem;
}

.logo h2 {
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.badge {
    display: inline-flex;
    margin-top: 0.55rem;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 164, 94, 0.25);
    background: rgba(201, 164, 94, 0.12);
    color: #e7d1a2;
    font-size: 0.68rem;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    padding: 0.58rem 0.68rem;
    margin-bottom: 0.26rem;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.22s ease, transform 0.22s ease, color 0.22s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-menu li:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    transform: translateX(2px);
}

.nav-menu li.active {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(111, 168, 255, 0.2), rgba(111, 168, 255, 0.04));
    border: 1px solid rgba(111, 168, 255, 0.16);
}

.icon {
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent-cyan);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}

.futures-ticker-wrapper {
    margin-top: 0.9rem;
    padding: 0.78rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(11, 20, 36, 0.92), rgba(8, 16, 28, 0.82));
    border: 1px solid rgba(166, 186, 214, 0.12);
}

.sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.62rem;
}

.sidebar-section-header h3 {
    color: var(--text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.quote-refresh-status {
    margin: -0.24rem 0 0.34rem;
    color: var(--text-muted);
    font-size: 0.6rem;
    line-height: 1.45;
}

.mini-refresh-btn,
.action-btn {
    font-family: inherit;
}

.mini-refresh-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-soft);
    padding: 0.28rem 0.54rem;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.22s ease;
}

.mini-refresh-btn:hover {
    color: var(--text-main);
    border-color: rgba(111, 168, 255, 0.24);
    background: rgba(111, 168, 255, 0.1);
}

.quote-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: background 0.22s ease;
}

.quote-link:hover {
    background: rgba(255, 255, 255, 0.035);
}

.quote-link.is-focused {
    background: rgba(45, 111, 159, 0.14);
    outline: 2px solid rgba(45, 111, 159, 0.32);
    outline-offset: 2px;
}

.quote-category {
    margin: 0.48rem 0 0.2rem;
    color: var(--accent-cyan);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.quote-category:first-child {
    margin-top: 0;
}

.quote-item {
    padding: 0.56rem 0.12rem;
    border-bottom: 1px dashed rgba(166, 186, 214, 0.12);
}

.quote-item:last-child {
    border-bottom: none;
}

.quote-header,
.quote-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-header {
    margin-bottom: 0.22rem;
}

.quote-symbol {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
}

.quote-name {
    font-size: 0.64rem;
    color: var(--text-muted);
}

.quote-price {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
}

.quote-change {
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.loading-spinner,
.error-msg {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.84rem;
}

.sidebar-footer {
    margin-top: 0.85rem;
    padding: 0.58rem 0.66rem;
    border-top: 1px solid rgba(166, 186, 214, 0.08);
    display: grid;
    gap: 0.22rem;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
}

.footer-value,
.footer-status {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: right;
}

.footer-meta-row {
    padding-top: 0.18rem;
    border-top: 1px solid rgba(166, 186, 214, 0.06);
}

.footer-meta-row a {
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.footer-meta-row a:hover {
    color: var(--text-main);
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.45rem;
    border-radius: 50%;
}

.status-indicator.online {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(78, 203, 146, 0.8);
}

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 244px;
    padding: 1.75rem 1.75rem 2.5rem;
}

.top-header {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.82rem;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(111, 168, 255, 0.12), transparent 40%),
        linear-gradient(180deg, rgba(12, 24, 42, 0.92), rgba(8, 17, 32, 0.94));
}

.header-copy h1 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 0.22rem;
}

.subtitle {
    max-width: 50rem;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.header-actions {
    display: flex;
    align-items: flex-start;
}

.site-refresh-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.42rem;
    min-width: 11rem;
}

.site-refresh-btn {
    white-space: nowrap;
}

.site-refresh-status {
    max-width: 18rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: right;
}

.site-refresh-status[data-tone="loading"] {
    color: var(--accent-cyan);
}

.site-refresh-status[data-tone="success"] {
    color: var(--accent-green);
}

.site-refresh-status[data-tone="warning"] {
    color: var(--accent-gold);
}

.site-refresh-status[data-tone="danger"] {
    color: var(--accent-red);
}

.action-btn {
    padding: 0.62rem 0.95rem;
    border-radius: 11px;
    border: 1px solid rgba(111, 168, 255, 0.22);
    background: linear-gradient(180deg, rgba(111, 168, 255, 0.18), rgba(111, 168, 255, 0.08));
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(39, 85, 158, 0.22);
    border-color: rgba(111, 168, 255, 0.38);
}

.action-btn.secondary,
.action-link {
    border: 1px solid rgba(201, 164, 94, 0.25);
    background: rgba(201, 164, 94, 0.1);
    color: #e8d2a5;
}

.action-btn:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0 0.9rem;
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.agri-enso-panel {
    padding: 1.05rem;
    margin-bottom: 1.35rem;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(201, 164, 94, 0.1), transparent 44%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.96), rgba(8, 15, 28, 0.93));
}

.agri-enso-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 0.8rem;
}

.agri-enso-head h3 {
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
}

.agri-enso-status {
    margin-top: 0.48rem;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.agri-enso-status[data-tone="warning"] {
    color: #e3c791;
}

.agri-enso-status[data-tone="danger"] {
    color: #ff9aa2;
}

.agri-enso-actions {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    flex: 0 0 auto;
}

.agri-enso-layout {
    display: grid;
    grid-template-columns: minmax(720px, 1fr) clamp(318px, 21vw, 380px);
    gap: 0.72rem;
    align-items: stretch;
}

.agri-enso-chart-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.agri-enso-chart-frame {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.62rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background:
        linear-gradient(180deg, rgba(248, 248, 240, 0.98), rgba(253, 250, 241, 0.96));
}

.agri-enso-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.58rem;
    margin-bottom: 0.52rem;
}

.agri-enso-control-group {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.18rem;
    border-radius: 999px;
    border: 1px solid rgba(82, 109, 100, 0.16);
    background: rgba(255, 255, 255, 0.72);
}

.agri-enso-control {
    min-height: 1.72rem;
    padding: 0 0.62rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #5c7169;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.agri-enso-control.is-active {
    color: #17352b;
    background: rgba(120, 166, 112, 0.24);
    box-shadow: inset 0 0 0 1px rgba(56, 132, 98, 0.2);
}

.agri-enso-canvas-wrap {
    position: relative;
    min-height: 0;
}

.agri-enso-main-wrap {
    flex: 1 1 auto;
    min-height: clamp(320px, 38vw, 500px);
    height: auto;
}

.agri-enso-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.agri-enso-canvas-wrap canvas.is-hidden {
    display: none;
}

.agri-enso-fallback-image {
    display: none;
    width: 100%;
    height: auto;
}

.agri-enso-fallback-image.is-visible {
    display: block;
}

.agri-enso-subchart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.62rem;
    margin: 0.58rem 0 0.26rem;
    padding: 0 0.12rem;
    color: #526c63;
    font-size: 0.62rem;
    font-weight: 800;
}

.agri-enso-subchart-head strong {
    color: #2f7d5f;
    font-size: 0.6rem;
    text-align: right;
}

.agri-enso-nino-wrap {
    flex: 0 0 170px;
    height: 170px;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(82, 109, 100, 0.12);
}

.agri-enso-nino-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.agri-enso-nino-wrap canvas.is-hidden {
    display: none;
}

.agri-enso-chart-caption {
    margin-top: 0.46rem;
    color: #657870;
    font-size: 0.58rem;
    line-height: 1.45;
}

.agri-enso-chart-column .data-source-note {
    margin-bottom: 0;
}

.nitrogen-framework-card {
    margin-top: 0.68rem;
    padding: 0.78rem;
    border-radius: 16px;
    border: 1px solid rgba(166, 186, 214, 0.12);
    background:
        linear-gradient(135deg, rgba(79, 159, 152, 0.08), rgba(201, 164, 94, 0.07)),
        rgba(255, 255, 255, 0.035);
}

.nitrogen-framework-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.64rem;
}

.nitrogen-framework-head strong {
    display: block;
    color: var(--text-main);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.nitrogen-framework-head span {
    display: block;
    margin-top: 0.12rem;
    color: #e3c791;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nitrogen-framework-head p {
    max-width: 19rem;
    color: var(--text-soft);
    font-size: 0.58rem;
    line-height: 1.45;
    text-align: right;
}

.nitrogen-framework-body {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(230px, 0.72fr);
    gap: 0.72rem;
    align-items: stretch;
}

.nitrogen-plot-wrap {
    min-width: 0;
}

.nitrogen-plot {
    position: relative;
    min-height: 236px;
    height: 100%;
    border-radius: 14px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    overflow: hidden;
    background:
        linear-gradient(90deg, transparent 49.6%, rgba(166, 186, 214, 0.16) 49.6%, rgba(166, 186, 214, 0.16) 50.4%, transparent 50.4%),
        linear-gradient(0deg, transparent 49.6%, rgba(166, 186, 214, 0.16) 49.6%, rgba(166, 186, 214, 0.16) 50.4%, transparent 50.4%),
        radial-gradient(circle at 82% 20%, rgba(201, 164, 94, 0.16), transparent 32%),
        rgba(8, 18, 32, 0.58);
}

.plot-axis {
    position: absolute;
    z-index: 2;
    color: var(--text-muted);
    font-size: 0.52rem;
    letter-spacing: 0.06em;
}

.plot-axis-y {
    top: 0.68rem;
    left: 0.72rem;
}

.plot-axis-x {
    right: 0.72rem;
    bottom: 0.58rem;
}

.plot-zone {
    position: absolute;
    z-index: 1;
    color: rgba(166, 186, 214, 0.45);
    font-size: 0.55rem;
    line-height: 1.35;
}

.zone-top-left {
    top: 2.3rem;
    left: 1rem;
}

.zone-top-right {
    top: 2.3rem;
    right: 1rem;
    text-align: right;
}

.zone-bottom-left {
    bottom: 2.2rem;
    left: 1rem;
}

.zone-bottom-right {
    right: 1rem;
    bottom: 2.2rem;
    text-align: right;
}

.nitrogen-dot {
    position: absolute;
    left: var(--x);
    bottom: var(--y);
    z-index: 4;
    transform: translate(-50%, 50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 1.18rem;
    padding: 0.1rem 0.38rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.56rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.nitrogen-dot b {
    font: inherit;
}

.dot-corn {
    background: linear-gradient(135deg, #d1a64b, #e85f62);
}

.dot-sugar {
    background: linear-gradient(135deg, #e3c791, #bb7f45);
}

.dot-rubber {
    background: linear-gradient(135deg, #4f9f98, #417d70);
}

.dot-palm {
    background: linear-gradient(135deg, #5fa974, #9ca04c);
}

.nitrogen-framework-side {
    display: grid;
    gap: 0.56rem;
}

.nitrogen-axis-block {
    min-width: 0;
    padding: 0.62rem;
    border-radius: 13px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.axis-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.46rem;
}

.axis-block-head span {
    color: var(--text-muted);
    font-size: 0.52rem;
    letter-spacing: 0.08em;
}

.axis-block-head strong {
    color: var(--text-main);
    font-size: 0.68rem;
}

.nitrogen-pressure-bars {
    gap: 0.34rem;
}

.nitrogen-rigidity-list {
    display: grid;
    gap: 0.32rem;
}

.nitrogen-rigidity-list div {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.nitrogen-rigidity-list span {
    color: var(--text-soft);
    font-size: 0.62rem;
    font-weight: 700;
}

.nitrogen-rigidity-list em {
    display: inline-flex;
    justify-content: center;
    min-width: 0;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    color: #bfd0e5;
    border: 1px solid rgba(166, 186, 214, 0.14);
    background: rgba(166, 186, 214, 0.08);
    font-size: 0.54rem;
    font-style: normal;
    font-weight: 800;
}

.nitrogen-rigidity-list .rigidity-high {
    color: #ffe2aa;
    border-color: rgba(201, 164, 94, 0.34);
    background: rgba(201, 164, 94, 0.12);
}

.nitrogen-rigidity-list .rigidity-mid-high {
    color: #d9efe5;
    border-color: rgba(79, 159, 152, 0.28);
    background: rgba(79, 159, 152, 0.1);
}

.nitrogen-framework-notes {
    margin-top: 0.58rem;
    padding-top: 0.52rem;
    border-top: 1px solid rgba(166, 186, 214, 0.1);
    color: var(--text-soft);
    font-size: 0.56rem;
    line-height: 1.48;
}

.agri-enso-side {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    min-width: 0;
    align-self: stretch;
}

.agri-enso-side .nitrogen-framework-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding: 0.54rem;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(79, 159, 152, 0.10), rgba(201, 164, 94, 0.08)),
        rgba(255, 255, 255, 0.045);
}

.agri-enso-side .nitrogen-framework-head {
    display: block;
    margin-bottom: 0.42rem;
}

.agri-enso-side .nitrogen-framework-head strong {
    font-size: 0.78rem;
}

.agri-enso-side .nitrogen-framework-head span {
    font-size: 0.52rem;
}

.agri-enso-side .nitrogen-framework-head p {
    max-width: none;
    margin-top: 0.2rem;
    text-align: left;
    font-size: 0.52rem;
    line-height: 1.34;
}

.agri-enso-side .nitrogen-framework-body {
    grid-template-columns: 1fr;
    gap: 0.42rem;
}

.agri-enso-side .nitrogen-plot {
    min-height: 205px;
}

.agri-enso-side .plot-zone {
    font-size: 0.48rem;
}

.agri-enso-side .plot-axis {
    font-size: 0.48rem;
}

.agri-enso-side .nitrogen-dot {
    min-width: 2.18rem;
    min-height: 1.02rem;
    padding: 0.06rem 0.28rem;
    font-size: 0.5rem;
}

.agri-enso-side .nitrogen-framework-side {
    grid-template-columns: 1fr;
    gap: 0.38rem;
}

.agri-enso-side .nitrogen-axis-block {
    padding: 0.44rem;
}

.agri-enso-side .nitrogen-framework-notes {
    margin-top: auto;
    padding-top: 0.36rem;
    font-size: 0.5rem;
    line-height: 1.36;
}

.agri-enso-side .module-specs {
    gap: 0.35rem;
    margin-bottom: 0.18rem;
}

.agri-enso-side .spec-pill {
    padding: 0.22rem 0.5rem;
    font-size: 0.62rem;
    line-height: 1.1;
}

.agri-enso-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem;
}

.agri-enso-metric {
    min-width: 0;
    padding: 0.38rem 0.44rem;
    border: 1px solid rgba(166, 186, 214, 0.1);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
}

.agri-enso-metric span {
    display: block;
    color: var(--text-muted);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
}

.agri-enso-metric strong {
    display: block;
    margin-top: 0.1rem;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-main);
    line-height: 1.15;
}

.agri-enso-metric em {
    display: block;
    margin-top: 0.12rem;
    color: var(--text-soft);
    font-size: 0.56rem;
    font-style: normal;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.agri-enso-note {
    margin-top: 0.06rem;
    padding: 0.5rem 0.54rem;
    border-radius: 10px;
    border: 1px solid rgba(201, 164, 94, 0.18);
    background: rgba(201, 164, 94, 0.08);
}

.agri-enso-note strong {
    color: #e3c791;
    font-size: 0.72rem;
}

.agri-enso-note p {
    margin-top: 0.24rem;
    color: var(--text-soft);
    font-size: 0.62rem;
    line-height: 1.42;
}

.urea-intensity-card {
    margin-top: 0.1rem;
    padding: 0.58rem 0.6rem 0.52rem;
    border-radius: 11px;
    border: 1px solid rgba(79, 159, 152, 0.18);
    background:
        linear-gradient(135deg, rgba(79, 159, 152, 0.09), rgba(201, 164, 94, 0.07)),
        rgba(255, 255, 255, 0.04);
}

.urea-intensity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.44rem;
}

.urea-intensity-head strong {
    color: var(--text-main);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.urea-intensity-head span {
    color: var(--text-muted);
    font-size: 0.56rem;
    white-space: nowrap;
}

.urea-bars {
    display: grid;
    gap: 0.32rem;
}

.urea-bar-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: 0.4rem;
}

.urea-crop {
    color: var(--text-soft);
    font-size: 0.62rem;
    font-weight: 700;
}

.urea-track {
    height: 0.42rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(166, 186, 214, 0.16);
}

.urea-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f9f98, #d1a64b);
}

.urea-intensity-card p {
    margin-top: 0.42rem;
    color: var(--text-muted);
    font-size: 0.52rem;
    line-height: 1.38;
}

.summary-ticker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.52rem;
    align-items: stretch;
    padding: 0.48rem;
    margin-bottom: 0.88rem;
    border-radius: 14px;
}

.summary-ticker-item {
    min-width: 0;
    padding: 0.38rem 0.52rem;
    border-radius: 10px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.ai-summary-panel {
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.3rem;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(201, 164, 94, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.95), rgba(8, 15, 28, 0.92));
}

.ai-summary-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.72rem;
}

.ai-summary-tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 164, 94, 0.28);
    background: rgba(201, 164, 94, 0.11);
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ai-summary-auth {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ai-summary-auth input {
    width: 10.5rem;
    height: 2rem;
    border: 1px solid rgba(166, 186, 214, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    padding: 0 0.7rem;
}

.ai-summary-auth input:focus {
    border-color: rgba(111, 168, 255, 0.38);
    box-shadow: 0 0 0 3px rgba(111, 168, 255, 0.1);
}

.ai-summary-auth button {
    height: 2rem;
    padding: 0 0.78rem;
    border: 1px solid rgba(111, 168, 255, 0.24);
    border-radius: 10px;
    background: rgba(111, 168, 255, 0.12);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.ai-summary-analysis {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.9;
    max-width: 88rem;
}

.ai-summary-analysis.is-locked {
    color: var(--text-muted);
}

.summary-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.summary-value {
    display: block;
    margin-top: 0.16rem;
    font-family: var(--font-mono);
    font-size: clamp(0.82rem, 1vw, 1rem);
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-value.compact {
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: 600;
}

.summary-meta {
    display: block;
    margin-top: 0.14rem;
    color: var(--text-soft);
    font-size: 0.56rem;
    font-style: normal;
    line-height: 1.22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-heading {
    margin-bottom: 0.8rem;
}

.product-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.product-pill {
    min-height: 1.42rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 186, 214, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.66rem;
    cursor: pointer;
    transition: all 0.22s ease;
}

.product-pill:hover {
    color: var(--text-main);
    border-color: rgba(111, 168, 255, 0.24);
    transform: translateY(-1px);
}

.product-pill.active {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(111, 168, 255, 0.22), rgba(201, 164, 94, 0.14));
    border-color: rgba(111, 168, 255, 0.28);
    box-shadow: 0 6px 16px rgba(39, 85, 158, 0.12);
}

.focus-note {
    margin: 0.4rem 0 0;
    color: var(--text-soft);
    font-size: 0.66rem;
    line-height: 1.45;
}

.product-brief-inline {
    margin-top: 0.34rem;
    color: var(--text-soft);
    font-size: 0.66rem;
    line-height: 1.5;
}

.product-brief-inline strong {
    margin-right: 0.42rem;
    color: var(--text-main);
    font-size: 0.68rem;
}

.brief-label-inline {
    color: var(--accent-gold);
    font-weight: 600;
}

.brief-inline-text {
    color: var(--text-soft);
}

.brief-separator {
    color: var(--text-muted);
    margin: 0 0.35rem;
}

.raot-focus-strip {
    margin: 0.46rem 0 0.64rem;
    padding: 0.52rem 0.58rem;
    border-radius: 12px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.raot-focus-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.raot-focus-strip-head > span {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.module-disclosure {
    margin-top: 0.62rem;
    border-radius: 10px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.028);
}

.module-disclosure-slim {
    margin-top: 0.46rem;
}

.module-disclosure summary {
    min-height: 1.7rem;
    padding: 0.38rem 0.58rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    list-style-position: inside;
}

.module-disclosure[open] {
    padding-bottom: 0.56rem;
}

.module-disclosure .data-source-note {
    margin: 0 0.56rem 0.5rem;
}

.module-disclosure .insight-panel {
    margin: 0 0.56rem;
}

.section-heading {
    margin-bottom: 1.1rem;
}

.section-heading h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.grid-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
    min-width: 0;
}

.span-2-col {
    grid-column: span 2;
}

.mt-4 {
    margin-top: 0.15rem;
}

.module-card {
    border-radius: 22px;
    overflow: hidden;
    min-width: 0;
    background: linear-gradient(180deg, rgba(11, 20, 36, 0.95), rgba(8, 15, 28, 0.94));
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.1);
}

.card-title-block h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.module-kicker {
    margin-bottom: 0.32rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag.alert {
    background: rgba(111, 168, 255, 0.12);
    color: #b7d2ff;
    border: 1px solid rgba(111, 168, 255, 0.24);
}

.tag.warning {
    background: rgba(201, 164, 94, 0.12);
    color: #e3c791;
    border: 1px solid rgba(201, 164, 94, 0.24);
}

.tag.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    border: 1px solid rgba(166, 186, 214, 0.16);
}

.tag.danger {
    color: #ffb0b6;
    border-color: rgba(234, 109, 117, 0.22);
}

.weather-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.72rem;
    flex-wrap: wrap;
}

.weather-module .card-header {
    cursor: pointer;
}

.weather-module.is-collapsed .card-header {
    border-bottom: none;
}

.weather-module.is-collapsed .weather-module-body {
    display: none;
}

.module-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 186, 214, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.22s ease;
}

.module-toggle-btn {
    cursor: pointer;
    font-family: inherit;
}

.module-link-btn:hover {
    color: var(--text-main);
    border-color: rgba(111, 168, 255, 0.34);
    background: rgba(111, 168, 255, 0.12);
    transform: translateY(-1px);
}

.card-body {
    padding: 1.4rem;
}

.module-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.module-header-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.46rem;
    flex-wrap: wrap;
    min-width: 0;
}

.module-update-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.7rem;
    padding: 0.25rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 186, 214, 0.14);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-soft);
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: nowrap;
}

.data-source-note {
    margin: 0.45rem 0 1rem;
    padding: 0.46rem 0.62rem;
    border-radius: 11px;
    border: 1px solid rgba(166, 186, 214, 0.10);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.58;
}

.data-source-note-compact {
    margin: 0.35rem 0 0;
    padding: 0.38rem 0.5rem;
    font-size: 0.62rem;
    line-height: 1.45;
}

.spec-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(166, 186, 214, 0.12);
    color: var(--text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.chart-container {
    height: 390px;
    margin-bottom: 0.45rem;
    padding: 0.8rem 0.4rem 0.3rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(166, 186, 214, 0.08);
}

.supply-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
    gap: 0.8rem;
    align-items: stretch;
    margin-bottom: 0.8rem;
    min-width: 0;
}

.supply-chart-container {
    min-height: 292px;
    height: 292px;
    margin-bottom: 0;
}

.supply-side-panel {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.supply-metric,
.supply-price-list {
    border-radius: 14px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.65rem 0.75rem;
}

.supply-metric span,
.supply-price-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.supply-metric strong {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 700;
}

#module-thai-supply .card-body {
    padding: 0.75rem 0.85rem 0.8rem;
}

#module-thai-supply .card-header {
    padding: 0.85rem 1rem;
}

#module-thai-supply .card-title-block h3 {
    font-size: 1.05rem;
}

#module-thai-supply .module-kicker {
    font-size: 0.68rem;
}

#module-thai-supply .tag {
    padding: 0.25rem 0.58rem;
    font-size: 0.67rem;
}

#module-thai-supply .module-specs {
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

#module-thai-supply .spec-pill {
    padding: 0.22rem 0.52rem;
    font-size: 0.68rem;
}

#module-thai-supply .insight-panel {
    margin-top: 0.55rem;
    padding: 0.62rem 0.75rem;
}

#module-thai-supply .insight-panel h4 {
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
}

#module-thai-supply .insight-panel li {
    margin-bottom: 0.22rem;
    font-size: 0.7rem;
    line-height: 1.45;
}

.inventory-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.72rem;
    margin-bottom: 0.9rem;
}

.inventory-metric {
    min-width: 0;
    padding: 0.7rem 0.78rem;
    border-radius: 14px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.inventory-metric span,
.inventory-metric em {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.35;
    font-style: normal;
}

.inventory-metric strong {
    display: block;
    margin: 0.22rem 0 0.18rem;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.15;
}

.inventory-metric[data-tone="hot"] strong {
    color: var(--accent-red);
}

.inventory-metric[data-tone="cool"] strong {
    color: var(--accent-green);
}

.inventory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
    gap: 0.85rem;
    align-items: stretch;
    min-width: 0;
}

.inventory-chart-container {
    height: 420px;
    margin-bottom: 0;
}

.inventory-side {
    display: grid;
    grid-template-rows: minmax(250px, 1fr) auto;
    gap: 0.75rem;
    min-width: 0;
}

.inventory-structure-container {
    height: 250px;
    min-height: 250px;
    margin-bottom: 0;
}

.inventory-readout {
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.inventory-readout h4 {
    margin-bottom: 0.45rem;
    color: var(--text-main);
    font-size: 0.9rem;
}

.inventory-readout p {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.62;
}

.inventory-brief {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.inventory-brief > div:first-child,
.inventory-evidence-grid article,
.inventory-table-panel,
.inventory-source-panel {
    border: 1px solid rgba(166, 186, 214, 0.12);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.025);
    border-radius: 18px;
}

.inventory-brief > div:first-child {
    padding: 0.95rem 1rem;
    border-left: 4px solid rgba(78, 203, 146, 0.78);
}

.inventory-brief span,
.inventory-evidence-grid span,
.mini-panel-header span,
.inventory-source-status span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.inventory-brief strong {
    display: block;
    margin: 0.18rem 0 0.36rem;
    color: var(--text-main);
    font-size: 1.35rem;
    line-height: 1.2;
}

.inventory-brief p {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.58;
}

.inventory-evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
}

.inventory-evidence-grid article {
    padding: 0.82rem 0.86rem;
    min-width: 0;
}

.inventory-evidence-grid strong {
    display: block;
    margin: 0.18rem 0 0.3rem;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.18;
}

.inventory-evidence-grid p {
    color: var(--text-soft);
    font-size: 0.68rem;
    line-height: 1.48;
}

.compact-note {
    margin: 0.48rem 0 0;
}

.inventory-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.inventory-table-panel,
.inventory-source-panel {
    padding: 0.82rem 0.88rem;
}

.mini-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.65rem;
}

.mini-panel-header h4 {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.25;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.compact-data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-soft);
    font-size: 0.72rem;
    min-width: 560px;
}

.compact-data-table th {
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 600;
    text-align: left;
    padding: 0.42rem 0.42rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.14);
    white-space: nowrap;
}

.compact-data-table td {
    padding: 0.46rem 0.42rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.08);
    white-space: nowrap;
}

.compact-data-table tr:last-child td {
    border-bottom: 0;
}

.trade-flow-brief {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
    gap: 0.95rem;
    margin-bottom: 1rem;
}

.trade-flow-brief > div:first-child,
.trade-flow-evidence-grid article,
.trade-flow-table-panel,
.trade-flow-chart-panel,
.trade-country-card {
    border: 1px solid rgba(166, 186, 214, 0.14);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
        rgba(255, 255, 255, 0.025);
    border-radius: 18px;
}

.trade-flow-brief > div:first-child {
    padding: 1.08rem 1.12rem;
    border-left: 4px solid rgba(78, 203, 146, 0.82);
    background:
        radial-gradient(circle at top right, rgba(78, 203, 146, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.024));
}

.trade-flow-brief span,
.trade-flow-evidence-grid span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.trade-flow-brief strong {
    display: block;
    margin: 0.18rem 0 0.36rem;
    color: var(--text-main);
    font-size: 1.18rem;
    line-height: 1.2;
}

.trade-flow-brief p,
.trade-flow-evidence-grid p,
.trade-empty {
    color: var(--text-soft);
    font-size: 0.72rem;
    line-height: 1.5;
}

.trade-flow-evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
}

.trade-flow-evidence-grid article {
    padding: 0.92rem 0.92rem;
}

.trade-flow-evidence-grid strong {
    display: block;
    margin: 0.18rem 0 0.3rem;
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.2;
}

.trade-source-grid,
.trade-monthly-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.trade-source-card,
.trade-monthly-card {
    border: 1px solid rgba(85, 128, 111, 0.16);
    background:
        radial-gradient(circle at top right, rgba(93, 159, 129, 0.11), transparent 34%),
        rgba(255, 255, 255, 0.68);
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(52, 91, 72, 0.06);
}

.trade-source-card {
    padding: 0.9rem;
}

.trade-source-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.trade-source-card-head span,
.trade-monthly-head span,
.trade-monthly-meta span,
.trade-monthly-source {
    color: #6a8178;
    font-size: 0.68rem;
    line-height: 1.45;
}

.trade-source-card-head strong {
    color: #203a32;
    font-size: 0.92rem;
}

.trade-source-list {
    display: grid;
    gap: 0.45rem;
}

.trade-source-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(85, 128, 111, 0.12);
    border-left-width: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
    padding: 0.58rem 0.64rem;
}

.trade-source-row strong {
    display: block;
    color: #203a32;
    font-size: 0.78rem;
    line-height: 1.25;
}

.trade-source-row span {
    display: block;
    color: #6a8178;
    font-size: 0.64rem;
    line-height: 1.35;
    margin-top: 0.12rem;
}

.trade-source-row em,
.trade-monthly-head em {
    font-style: normal;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.18rem 0.44rem;
    font-size: 0.62rem;
    font-weight: 700;
}

.status-work {
    border-left-color: #7aa877;
}

.status-work em {
    background: rgba(122, 168, 119, 0.14);
    color: #357050;
}

.status-blocked {
    border-left-color: #d6a24c;
}

.status-blocked em {
    background: rgba(214, 162, 76, 0.16);
    color: #9a6124;
}

.status-scope {
    border-left-color: #8aa3a0;
}

.status-scope em {
    background: rgba(138, 163, 160, 0.14);
    color: #55706b;
}

.trade-country-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
    margin-top: 0.72rem;
}

.trade-monthly-card {
    display: flex;
    flex-direction: column;
    min-height: 205px;
    padding: 0.78rem;
    border-left-width: 4px;
}

.trade-monthly-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
}

.trade-monthly-head strong {
    display: block;
    color: #203a32;
    font-size: 0.95rem;
    line-height: 1.2;
    margin-top: 0.08rem;
}

.trade-monthly-source {
    margin-top: 0.5rem;
    min-height: 2rem;
}

.trade-monthly-empty {
    flex: 1;
    margin-top: 0.55rem;
    border: 1px dashed rgba(85, 128, 111, 0.18);
    border-radius: 14px;
    background: rgba(247, 251, 248, 0.68);
    padding: 0.68rem;
}

.trade-monthly-empty strong {
    color: #27463d;
    font-size: 0.78rem;
}

.trade-monthly-empty p {
    color: #637d74;
    font-size: 0.68rem;
    line-height: 1.48;
    margin-top: 0.34rem;
}

.trade-monthly-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.62rem;
    border-top: 1px solid rgba(85, 128, 111, 0.1);
    padding-top: 0.48rem;
}

.trade-background-disclosure {
    margin-top: 0.9rem;
}

.trade-flow-primary-charts {
    margin-top: 1rem;
}

.trade-flow-history-grid,
.trade-flow-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.trade-flow-table-panel,
.trade-flow-chart-panel {
    padding: 0.92rem 0.96rem;
    min-width: 0;
}

.trade-flow-chart-wrap {
    height: clamp(280px, 32vw, 390px);
    margin-top: 0.72rem;
    padding: 0.5rem 0.35rem 0.1rem;
}

.trade-flow-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.trade-flow-country-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
    margin-top: 0.72rem;
}

.trade-flow-country-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 1px solid rgba(81, 123, 105, 0.14);
    background: rgba(255, 255, 255, 0.56);
    border-radius: 999px;
    color: #668078;
    font-size: 0.68rem;
    line-height: 1.2;
    padding: 0.35rem 0.58rem;
}

.trade-flow-country-pill strong {
    color: #1f5f49;
    font-family: var(--font-sans);
}

.trade-flow-country-pill em {
    color: #7b968c;
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.64rem;
}

.trade-flow-reading-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
    margin-top: 0.86rem;
}

.trade-flow-reading-grid article {
    border: 1px solid rgba(81, 123, 105, 0.14);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 252, 249, 0.54));
    border-radius: 18px;
    padding: 0.84rem 0.92rem;
    box-shadow: 0 14px 34px rgba(52, 91, 72, 0.055);
}

.trade-flow-reading-grid span {
    display: block;
    color: #6f8b82;
    font-size: 0.66rem;
    margin-bottom: 0.16rem;
}

.trade-flow-reading-grid strong {
    display: block;
    color: #203a32;
    font-size: 0.92rem;
    margin-bottom: 0.28rem;
}

.trade-flow-reading-grid p {
    color: #5f766f;
    font-size: 0.68rem;
    line-height: 1.5;
}

.trade-source-disclosure {
    opacity: 0.92;
}

.trade-country-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

.trade-country-card {
    padding: 0.76rem;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
        rgba(10, 22, 37, 0.24);
}

.trade-country-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.trade-country-head h5 {
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.2;
}

.trade-country-head span {
    color: var(--text-muted);
    font-size: 0.64rem;
    white-space: nowrap;
    border: 1px solid rgba(166, 186, 214, 0.12);
    border-radius: 999px;
    padding: 0.08rem 0.36rem;
    background: rgba(255, 255, 255, 0.035);
}

.trade-country-table {
    min-width: 320px;
    font-size: 0.66rem;
}

.trade-country-table th,
.trade-country-table td {
    padding: 0.36rem 0.34rem;
}

.signal-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 186, 214, 0.16);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-soft);
    font-size: 0.66rem;
}

.signal-chip.hot {
    color: var(--accent-red);
    border-color: rgba(234, 109, 117, 0.38);
    background: rgba(234, 109, 117, 0.10);
}

.signal-chip.cool {
    color: var(--accent-green);
    border-color: rgba(78, 203, 146, 0.36);
    background: rgba(78, 203, 146, 0.10);
}

.inventory-source-status {
    display: grid;
    gap: 0.55rem;
}

.inventory-source-status article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.7rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(166, 186, 214, 0.08);
}

.inventory-source-status article:last-child {
    border-bottom: 0;
}

.inventory-source-status strong {
    display: block;
    color: var(--text-main);
    font-size: 0.76rem;
}

.inventory-source-status em {
    align-self: start;
    color: var(--accent-green);
    font-size: 0.66rem;
    font-style: normal;
    white-space: nowrap;
}

.inventory-source-status p {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.42;
}

.enso-module .card-body {
    padding: 1rem 1.1rem 1.15rem;
}

.enso-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
    margin-bottom: 0.95rem;
}

.enso-metric {
    min-height: 86px;
    padding: 0.72rem 0.82rem;
    border-radius: 13px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.025);
}

.enso-metric span,
.enso-metric small {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.enso-metric strong {
    display: block;
    margin: 0.28rem 0 0.2rem;
    color: var(--text-main);
    font-size: 1.18rem;
    line-height: 1.15;
}

.enso-metric.signal strong {
    color: #f28b56;
}

.enso-overview {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
}

.enso-source-panel {
    min-width: 0;
    padding: 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.enso-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.enso-panel-head h4 {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.3;
}

.enso-panel-head p {
    margin-top: 0.16rem;
    color: var(--text-muted);
    font-size: 0.69rem;
}

.enso-cpc-crop {
    aspect-ratio: 1.92 / 1;
    overflow: hidden;
    border-radius: 9px;
    background: #fff;
}

.enso-main-image {
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-0.5%);
}

.enso-iri-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.enso-iri-images figure {
    min-width: 0;
}

.enso-iri-images img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: top center;
    border-radius: 9px;
    background: #fff;
}

.enso-iri-images figcaption {
    padding-top: 0.26rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-align: center;
}

.enso-note {
    margin-top: 0.58rem;
    color: var(--text-soft);
    font-size: 0.72rem;
    line-height: 1.48;
}

.enso-weekly-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    margin: 0.3rem 0 0.55rem;
}

.enso-weekly-header h4 {
    color: var(--text-main);
    font-size: 0.92rem;
}

.enso-weekly-header span {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.enso-weekly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
}

.enso-weekly-signal {
    min-width: 0;
    padding: 0.75rem 0.82rem 0.82rem;
    border-radius: 13px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.enso-signal-label {
    display: block;
    margin-bottom: 0.38rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    text-transform: uppercase;
}

.enso-weekly-signal strong {
    display: block;
    margin-bottom: 0.38rem;
    color: var(--text-main);
    font-size: 0.86rem;
}

.enso-weekly-signal strong em {
    margin-left: 0.34rem;
    color: var(--accent);
    font-size: 1.02rem;
    font-style: normal;
}

.enso-weekly-signal p {
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.58;
}

.iod-section {
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(166, 186, 214, 0.08);
}

.iod-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.iod-metric {
    min-height: 76px;
    padding: 0.68rem 0.78rem;
    border-radius: 12px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.026);
}

.iod-metric span,
.iod-metric small {
    display: block;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.42;
}

.iod-metric strong {
    display: block;
    margin: 0.24rem 0 0.18rem;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.18;
}

.iod-metric.signal strong {
    color: var(--accent);
}

.iod-metric.forward strong {
    color: #f28b56;
}

.iod-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 0.78rem;
    align-items: stretch;
}

.iod-chart-panel,
.iod-forecast-panel {
    min-width: 0;
    padding: 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.iod-chart-panel {
    display: flex;
    flex-direction: column;
}

.iod-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.iod-panel-head h5 {
    color: var(--text-main);
    font-size: 0.84rem;
    line-height: 1.3;
}

.iod-panel-head p {
    margin-top: 0.16rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.45;
}

.iod-chart-wrap {
    height: 286px;
}

.iod-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.iod-history-note {
    margin-top: 0.74rem;
    padding-top: 0.68rem;
    border-top: 1px solid rgba(47, 138, 103, 0.16);
    color: #315448;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}

.iod-history-note strong {
    display: block;
    margin-bottom: 0.24rem;
    color: #1e3f34;
    font-family: var(--font-family);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.iod-history-note p {
    color: #315448;
    font-size: 0.96rem;
    line-height: 1.74;
}

.iod-history-note span {
    display: block;
    margin-top: 0.34rem;
    color: #70877e;
    font-family: var(--font-family);
    font-size: 0.64rem;
    line-height: 1.48;
}

.iod-probability-list {
    display: grid;
    gap: 0.42rem;
    margin: 0.58rem 0;
}

.iod-probability-item {
    display: grid;
    grid-template-columns: minmax(74px, 0.28fr) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    padding: 0.46rem 0.52rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.iod-probability-item span {
    color: var(--text-muted);
    font-size: 0.64rem;
}

.iod-probability-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(166, 186, 214, 0.14);
}

.iod-probability-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #f2ad56);
}

.iod-probability-item strong {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-main);
    font-size: 0.68rem;
}

.iod-forecast-image {
    display: block;
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    margin-top: 0.55rem;
    border-radius: 10px;
    background: #fff;
}

.iod-forecast-image:not([src]) {
    display: none;
}

.enso-methodology {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.78rem;
}

.enso-methodology span {
    padding: 0.3rem 0.52rem;
    border-radius: 8px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.66rem;
    line-height: 1.4;
}

.supply-price-list {
    display: grid;
    gap: 0.65rem;
}

.supply-price-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.supply-price-item strong {
    color: var(--accent-gold);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

.supply-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(166, 186, 214, 0.1);
}

.supply-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
}

.supply-table th,
.supply-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.08);
    color: var(--text-soft);
    font-size: 0.86rem;
    text-align: left;
}

.supply-table th {
    color: var(--text-muted);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.supply-table tbody tr:last-child td {
    border-bottom: none;
}

.supply-table td:first-child {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-main);
    font-weight: 600;
}

.supply-table small {
    color: var(--text-muted);
    font-weight: 500;
}

.rank-cell {
    display: inline-flex;
    width: 1.55rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #0d1726;
    background: var(--accent-gold);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.muted-cell {
    color: var(--text-muted) !important;
}

.iframe-chart-container {
    width: 100%;
    height: 580px;
    margin-bottom: 0.45rem;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1523;
    border: 1px solid rgba(166, 186, 214, 0.08);
}

.iframe-chart-container.iframe-kline {
    height: 720px;
}

.iframe-chart-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.weather-frame-container {
    width: 100%;
    height: min(1320px, 86vh);
    min-height: 760px;
    margin-bottom: 0.45rem;
    border-radius: 18px;
    overflow: hidden;
    background: #f7f9fb;
    border: 1px solid rgba(166, 186, 214, 0.1);
}

.weather-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.weather-map-section {
    margin: 1.1rem 0;
    padding: 1rem;
    border: 1px solid rgba(166, 186, 214, 0.12);
    border-radius: 18px;
    background: rgba(8, 18, 33, 0.34);
}

.weather-map-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.weather-map-head h4 {
    margin: 0.18rem 0 0;
    color: var(--text-main);
    font-size: 1rem;
}

.weather-map-head > span {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: right;
}

.weather-map-grid {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.weather-map-grid-sea {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-map-grid-global {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.9rem;
}

.weather-map-card {
    overflow: hidden;
    border: 1px solid rgba(166, 186, 214, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.weather-map-card img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: contain;
    background: #f3f6f8;
}

.weather-map-grid-sea .weather-map-card img {
    height: auto;
}

.weather-map-large img {
    height: 300px;
}

.weather-map-grid-global .weather-map-card img {
    height: 300px;
}

.weather-map-caption {
    padding: 0.78rem 0.86rem;
    border-top: 1px solid rgba(166, 186, 214, 0.12);
}

.weather-map-caption strong {
    display: block;
    margin-bottom: 0.24rem;
    color: var(--text-main);
    font-size: 0.88rem;
}

.weather-map-caption span {
    display: block;
    color: var(--text-soft);
    font-size: 0.76rem;
    line-height: 1.55;
}

.mini-seasonal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 0.45rem;
    min-width: 0;
}

.mini-seasonal-card {
    border-radius: 18px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    overflow: hidden;
    min-width: 0;
}

.mini-seasonal-card-wide {
    grid-column: 1 / -1;
}

.mini-seasonal-head {
    padding: 0.95rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(166, 186, 214, 0.08);
}

.mini-seasonal-head h4 {
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 600;
}

.mini-seasonal-head p {
    margin-top: 0.24rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.mini-seasonal-frame {
    height: clamp(300px, 26vw, 360px);
    background: #0b1523;
}

.mini-seasonal-chart-frame {
    height: clamp(320px, 28vw, 390px);
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
}

.mini-seasonal-chart-frame canvas {
    width: 100% !important;
    height: 100% !important;
}

.mini-seasonal-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.insight-panel {
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(166, 186, 214, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.insight-panel h4 {
    margin-bottom: 0.75rem;
    color: var(--text-soft);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insight-panel ul {
    list-style: none;
}

.insight-panel li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.65rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.insight-panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 999px;
    background: var(--accent-gold);
    box-shadow: 0 0 10px rgba(201, 164, 94, 0.55);
}

.insight-panel li:last-child {
    margin-bottom: 0;
}

@media (max-width: 1280px) {
    .supply-layout {
        grid-template-columns: 1fr;
    }

    .inventory-layout {
        grid-template-columns: 1fr;
    }

    .inventory-brief,
    .inventory-lower-grid,
    .trade-flow-brief,
    .trade-source-grid,
    .trade-monthly-grid,
    .trade-flow-history-grid,
    .trade-flow-chart-grid,
    .trade-flow-reading-grid {
        grid-template-columns: 1fr;
    }

    .inventory-evidence-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trade-flow-evidence-grid,
    .trade-country-status-grid,
    .trade-country-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .supply-side-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mini-seasonal-grid {
        grid-template-columns: 1fr;
    }

    .enso-overview,
    .enso-weekly-grid,
    .iod-layout,
    .agri-enso-layout {
        grid-template-columns: 1fr;
    }

    .agri-enso-side {
        display: grid;
        grid-template-columns: 1fr;
    }

    .agri-enso-metrics {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .nitrogen-framework-body {
        grid-template-columns: 1fr;
    }

    .nitrogen-framework-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 204px;
    }

    .main-content {
        margin-left: 204px;
    }

    .logo h2 {
        font-size: 1.32rem;
    }

    .nav-menu li {
        gap: 0.55rem;
        padding: 0.55rem 0.58rem;
        font-size: 0.84rem;
    }
}

@media (max-height: 900px) and (min-width: 861px) {
    .sidebar {
        padding-top: 0.95rem;
        padding-bottom: 0.65rem;
    }

    .logo {
        padding-bottom: 0.58rem;
        margin-bottom: 0.58rem;
    }

    .logo .eyebrow {
        margin-bottom: 0.38rem;
        font-size: 0.62rem;
    }

    .logo h2 {
        font-size: 1.28rem;
    }

    .badge {
        margin-top: 0.42rem;
        padding: 0.2rem 0.52rem;
        font-size: 0.62rem;
    }

    .nav-menu li {
        min-height: 0;
        padding: 0.46rem 0.6rem;
        margin-bottom: 0.18rem;
        font-size: 0.82rem;
    }

    .icon {
        width: 1.45rem;
        height: 1.45rem;
        border-radius: 8px;
        font-size: 0.6rem;
    }

    .futures-ticker-wrapper {
        margin-top: 0.62rem;
        padding: 0.62rem;
    }

    .sidebar-section-header {
        margin-bottom: 0.42rem;
    }

    .quote-item {
        padding: 0.4rem 0.08rem;
    }

    .sidebar-footer {
        margin-top: 0.62rem;
        padding: 0.48rem 0.58rem;
    }

    .footer-meta-row {
        display: none;
    }
}

@media (max-width: 860px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(166, 186, 214, 0.12);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .mini-seasonal-grid {
        grid-template-columns: 1fr;
    }

    .inventory-evidence-grid,
    .trade-flow-evidence-grid,
    .trade-country-status-grid,
    .trade-country-table-grid,
    .inventory-source-status article {
        grid-template-columns: 1fr;
    }

    .inventory-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-chart-container {
        height: 360px;
    }

    .enso-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iod-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-seasonal-frame {
        height: 320px;
    }

    .weather-frame-container {
        height: 760px;
        min-height: 0;
    }

    .weather-actions {
        justify-content: flex-start;
    }

    .weather-map-head {
        flex-direction: column;
        gap: 0.4rem;
    }

    .weather-map-head > span {
        text-align: left;
    }

    .weather-map-grid-sea {
        grid-template-columns: 1fr;
    }

    .weather-map-grid-global {
        grid-template-columns: 1fr;
    }

    .weather-map-card img,
    .weather-map-large img,
    .weather-map-grid-global .weather-map-card img {
        height: auto;
    }

    .enso-panel-head,
    .enso-weekly-header,
    .iod-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .enso-iri-images {
        grid-template-columns: 1fr;
    }

    .iod-chart-wrap {
        height: 220px;
    }

    .ai-summary-topline,
    .agri-enso-head,
    .top-header,
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .site-refresh-actions {
        align-items: stretch;
        min-width: 0;
    }

    .site-refresh-status {
        max-width: none;
        text-align: left;
    }

    .agri-enso-actions {
        flex-wrap: wrap;
    }

    .agri-enso-chart-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .agri-enso-control-group {
        justify-content: center;
        width: 100%;
    }

    .agri-enso-main-wrap {
        height: 360px;
    }

    .agri-enso-nino-wrap {
        height: 150px;
    }

    .agri-enso-subchart-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.22rem;
    }

    .agri-enso-subchart-head strong {
        text-align: left;
    }

    .agri-enso-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nitrogen-framework-head {
        display: block;
    }

    .nitrogen-framework-head p {
        margin-top: 0.34rem;
        max-width: none;
        text-align: left;
    }

    .nitrogen-framework-side {
        grid-template-columns: 1fr;
    }

    .nitrogen-plot {
        min-height: 220px;
    }

    .summary-ticker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .ai-summary-auth input {
        width: 100%;
    }

    .grid-content {
        grid-template-columns: 1fr;
    }

    .span-2-col {
        grid-column: span 1;
    }
}

@media (min-width: 861px) and (max-width: 1280px) {
    .agri-enso-metrics {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .agri-enso-metric {
        min-height: 64px;
        padding: 0.28rem 0.34rem;
        border-radius: 8px;
    }

    .agri-enso-metric span {
        font-size: 0.53rem;
        line-height: 1.12;
    }

    .agri-enso-metric strong {
        margin-top: 0.06rem;
        font-size: 0.74rem;
        line-height: 1.06;
    }

    .agri-enso-metric em {
        margin-top: 0.08rem;
        font-size: 0.48rem;
        line-height: 1.12;
    }
}

@media (max-width: 480px) {
    .agri-enso-metrics,
    .summary-ticker {
        grid-template-columns: 1fr;
    }
}

/* Softer terminal palette, aligned with the light homepage. */
:root {
    --bg-dark: #edf6ef;
    --panel-bg: rgba(255, 255, 255, 0.78);
    --panel-bg-solid: #fbfffc;
    --glass-border: rgba(75, 118, 99, 0.18);
    --glass-border-strong: rgba(75, 118, 99, 0.28);
    --text-main: #1f352e;
    --text-soft: #516f64;
    --text-muted: #70877e;
    --accent-blue: #6ca8c8;
    --accent-cyan: #4f9f98;
    --accent-gold: #b9934d;
    --accent-green: #2f8a67;
    --accent-red: #c85f57;
    --shadow-lg: 0 22px 58px rgba(69, 104, 88, 0.14);
}

body {
    background:
        radial-gradient(circle at 12% 2%, rgba(143, 202, 220, 0.24), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(219, 190, 112, 0.15), transparent 24%),
        linear-gradient(135deg, #e5f5f3 0%, #f5f8ed 48%, #edf6ef 100%);
    color: var(--text-main);
}

.page-glow {
    opacity: 0.24;
}

.glass-panel,
.module-card,
.chart-panel,
.table-wrapper,
.agri-enso-panel,
.ai-summary-panel,
.enso-source-panel,
.weather-map-section,
.mini-seasonal-card {
    background: var(--panel-bg);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.sidebar {
    background: linear-gradient(180deg, rgba(252, 255, 252, 0.92), rgba(230, 244, 235, 0.88));
    border-right-color: rgba(78, 124, 103, 0.22);
}

.logo h2,
.top-header h1,
.card-header h2,
.card-header h3,
.module-card h2,
.module-card h3,
.ai-summary-analysis,
.enso-panel-head h4,
.weather-map-head h4 {
    color: var(--text-main);
}

.logo .eyebrow,
.eyebrow {
    color: var(--accent-green);
}

.badge,
.header-actions .action-btn,
.weather-pill,
.module-link-btn,
.mini-refresh-btn,
.module-update-badge {
    background: rgba(47, 138, 103, 0.10);
    border-color: rgba(47, 138, 103, 0.24);
    color: #286f56;
}

.data-source-note {
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(75, 118, 99, 0.16);
    color: var(--text-muted);
}

.action-btn.primary,
.nav-menu li.active,
.module-link-btn.primary {
    background: linear-gradient(135deg, #2f8a67, #4f9f98);
    border-color: rgba(47, 138, 103, 0.34);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(47, 138, 103, 0.20);
}

.nav-menu li {
    color: var(--text-soft);
}

.nav-menu li:hover {
    background: rgba(47, 138, 103, 0.08);
    color: var(--text-main);
}

.icon {
    background: rgba(108, 168, 200, 0.14);
    color: #31748a;
}

.nav-menu li.active .icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.futures-ticker-wrapper,
.sidebar-footer,
.summary-ticker,
.summary-ticker-item,
.enso-metric,
.agri-enso-metric,
.supply-side-panel,
.supply-note,
.enso-weekly-signal,
.weather-map-card,
.iframe-chart-container,
.weather-frame-container {
    background: rgba(255, 255, 255, 0.62);
    border-color: var(--glass-border);
}

.quote-name,
.summary-value,
.enso-metric strong,
.agri-enso-metric strong,
.supply-side-card strong {
    color: var(--text-main);
}

.quote-meta,
.quote-label,
.summary-label,
.summary-meta,
.enso-metric span,
.enso-metric small,
.module-specs,
.card-subtitle,
.weather-map-caption span {
    color: var(--text-muted);
}

.quote-change.positive,
.positive,
.accent-positive {
    color: var(--accent-green);
}

.quote-change.negative,
.negative,
.accent-negative {
    color: var(--accent-red);
}

.top-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(236, 249, 241, 0.74));
}

.card-header,
.weather-module .card-header {
    background: linear-gradient(135deg, rgba(47, 138, 103, 0.12), rgba(108, 168, 200, 0.10));
    border-bottom-color: var(--glass-border);
}

.agri-enso-chart-frame,
.weather-map-card img,
.enso-main-image,
.enso-iri-images figure,
.mini-seasonal-frame {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--glass-border);
}

.agri-enso-chart-frame {
    background:
        linear-gradient(180deg, rgba(250, 249, 241, 0.98), rgba(255, 252, 244, 0.96));
}

.weather-frame-container iframe {
    background: #f7fbf8;
}

.climate-story-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13.5rem;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.05rem 1.2rem;
    border-radius: 20px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 252, 238, 0.9), rgba(230, 246, 240, 0.82)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 251, 246, 0.74));
}

.climate-story-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(185, 147, 77, 0.18), transparent 22%),
        linear-gradient(180deg, rgba(47, 138, 103, 0.06), transparent 60%);
}

.climate-story-copy,
.climate-story-aside {
    position: relative;
    z-index: 1;
}

.climate-story-copy {
    max-width: 72rem;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}

@media (min-width: 861px) {
    .climate-story-copy {
        max-width: none;
        column-count: 2;
        column-gap: 1.25rem;
    }

    .climate-story-copy h2,
    .climate-story-copy span {
        break-inside: avoid;
    }
}

.climate-story-kicker {
    margin-bottom: 0.28rem;
    color: #9a7a3d;
    font-family: var(--font-family);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.climate-story-copy h2 {
    margin-bottom: 0.48rem;
    color: #1e3f34;
    font-size: 1.48rem;
    font-weight: 700;
    line-height: 1.18;
}

.climate-story-copy p {
    max-width: 68rem;
    color: #315448;
    font-size: 1.03rem;
    line-height: 1.72;
}

.climate-story-copy p + p {
    margin-top: 0.36rem;
}

.climate-story-copy span {
    display: inline-flex;
    margin-top: 0.54rem;
    color: #6f817a;
    font-family: var(--font-family);
    font-size: 0.72rem;
    line-height: 1.45;
}

.climate-story-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: 0.82rem 0.95rem;
    border: 1px solid rgba(185, 147, 77, 0.20);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(248, 244, 231, 0.56));
}

.climate-story-aside span {
    color: #b9934d;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
}

.climate-story-aside strong {
    margin-top: 0.2rem;
    color: #1f352e;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
    font-size: 1.38rem;
    line-height: 1.2;
}

.climate-story-aside small {
    margin-top: 0.46rem;
    color: #60766e;
    font-size: 0.78rem;
    line-height: 1.45;
}

.climate-story-aside em {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.7rem;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    background: rgba(47, 138, 103, 0.10);
    color: #2f8a67;
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .climate-story-panel {
        grid-template-columns: 1fr;
    }

    .climate-story-aside {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .climate-story-panel {
        padding: 0.92rem 1rem;
    }

    .climate-story-copy h2 {
        font-size: 1.3rem;
    }

    .climate-story-copy p {
        font-size: 0.95rem;
        line-height: 1.68;
    }
}
