/* Homepage: one neutral surface, quiet borders and consistent spacing. */
.home-dashboard {
    --bg: #fff;
    --card: #fff;
    --text: #202923;
    --muted: #68736c;
    --line: #e5e9e6;
    --soft: #f6f8f6;
    --blue: #18583e;
    --shadow: none;
}
.home-dashboard .topmoat-side-menu a { font-weight: 600; border-radius: 8px; }
.home-dashboard .topmoat-side-menu a.active { background: #eef5ef; color: #18583e; }
.home-dashboard .topmoat-side-login-card { border-color: var(--line); border-radius: 10px; }
.home-dashboard .topmoat-side-login-card button:not(.is-secondary) { background: #18583e; font-weight: 600; }
body.home-dashboard .home-layout { width: calc(100% - 48px) !important; max-width: 1250px !important; }
.home-dashboard .content { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 16px; padding-bottom: 40px; }
.home-dashboard .section { gap: 16px; }
.home-dashboard :is(.home-services, .home-style-promo, .home-market-news-layout, .home-article-grid, .news-layout) { min-width: 0; max-width: 100%; }
.home-dashboard .section-head { align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.home-section-copy { min-width: 0; }
.home-dashboard .section-head h2 { margin: 0; color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -.035em; white-space: normal; word-break: keep-all; }
.home-section-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.home-dashboard .section-head small { flex-shrink: 1; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.6; white-space: normal; }
.home-dashboard .section-head small.stale { color: #9a6030; }
.home-dashboard .section-head small:empty { display: none; }
.home-dashboard .section-more-link { display: inline-flex; align-items: center; min-height: 44px; color: #506759; font-size: 12px; font-weight: 500; background: transparent; border: 0; padding: 0; text-decoration: none; }
.home-dashboard .section-more-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-dashboard .card { border-color: var(--line); box-shadow: none; }
.home-dashboard [hidden] { display: none !important; }

/* Market and news share a row when there is room to read both. */
.home-market-news-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 32px; min-width: 0; }
.home-market-column { display: grid; gap: 28px; min-width: 0; }
.home-dashboard .news-layout { grid-template-columns: minmax(0, 1fr); }
.home-dashboard .news-content { max-width: none; }
.home-dashboard .index-board-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.home-dashboard .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-dashboard .index-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; min-height: 0; padding: 12px; border: 1px solid #edf0ed; border-radius: 10px; background: #f8faf8; }
.home-dashboard .index-card:hover { border-color: #dbe3dc; background: #f5f8f5; }
.home-dashboard .index-info { display: grid; gap: 6px; min-width: 0; }
.home-dashboard .index-name { gap: 6px; color: #3e4942; font-size: 12px; font-weight: 600; white-space: normal; }
.home-dashboard .index-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #eaf0f5; color: #587592; }
.home-dashboard .index-icon svg { display: block; width: 32px; height: 32px; }
.home-dashboard .index-icon--korea, .home-dashboard .index-icon--us, .home-dashboard .index-icon--japan, .home-dashboard .index-icon--taiwan { background: #edf0f2; }
.home-dashboard .index-icon--tech, .home-dashboard .index-icon--ethereum { background: #eeedf8; color: #7765a9; }
.home-dashboard .index-icon--industry, .home-dashboard .index-icon--smallcap { background: #e8f1ec; color: #4e8166; }
.home-dashboard .index-icon--volatility { background: #f5eaf0; color: #ad6885; }
.home-dashboard .index-icon--gold, .home-dashboard .index-icon--bitcoin { background: #faf0dc; color: #af852f; }
.home-dashboard .index-label { min-width: 0; overflow-wrap: anywhere; }
.home-dashboard .live-dot { width: 5px; height: 5px; }
.home-dashboard .index-icon .live-dot { position: absolute; right: -1px; bottom: -1px; width: 7px; height: 7px; border: 1.5px solid #f8faf8; }
.home-dashboard .index-line { justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; min-width: 0; }
.home-dashboard .index-line .price { color: var(--text); font-size: 14px; font-weight: 650; }
.home-dashboard .index-line .percent { min-width: 0; padding: 0; background: transparent; font-size: 12px; font-weight: 600; }

.home-dashboard #macro .macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; align-items: stretch; gap: 8px; }
.home-dashboard .risk-gauge { min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: none; }
.home-dashboard .risk-gauge-header { flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.home-dashboard .risk-gauge-label { max-width: 100%; color: #56655b; font-size: 12px; font-weight: 500; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.home-dashboard .risk-gauge-status { max-width: 100%; padding: 2px 5px; font-size: 10px; font-weight: 500; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.home-dashboard .risk-gauge-main { flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 10px; }
.home-dashboard .risk-gauge-value { max-width: 100%; font-size: 22px; font-weight: 650; line-height: 1.25; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-dashboard .risk-gauge-percent { margin-left: auto; color: var(--muted); font-size: 10px; white-space: normal; }
.home-dashboard .risk-gauge-bar { height: 4px; background: #edf1ed; }
.home-dashboard .risk-gauge-scale { gap: 6px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.home-dashboard .risk-gauge-scale span { min-width: 0; line-height: 1.5; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.home-dashboard .risk-gauge-scale span:last-child { text-align: right; }

/* News stays a readable list rather than a stack of decorated cards. */
.home-dashboard .news-card { border-radius: 12px; overflow: hidden; }
.home-dashboard .news-item { grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: start; gap: 10px; min-height: 64px; padding: 16px; }
.home-news-number { padding-top: 3px; color: #8c9990; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.home-news-copy { min-width: 0; }
.home-dashboard .news-title { color: #303c34; font-size: 14px; font-weight: 500; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.home-dashboard .news-entry:not(:last-child), .home-dashboard .news-item[aria-expanded="true"] { border-color: #edf0ed; }
.home-dashboard .news-item:hover, .home-dashboard .news-item[aria-expanded="true"] { background: #f8faf8; }
.home-dashboard .news-item .chevron { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 24px; color: #89978d; font-size: 20px; }
.home-dashboard .badge-row { flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.home-dashboard .badge { max-width: 100%; min-height: 20px; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.home-dashboard .news-detail { padding: 16px 42px 20px; background: #fafbf9; color: #59685e; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.home-dashboard .news-detail p { margin: 0; }
.news-toolbar, .news-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; color: #68736c; font-size: 12px; }
.news-toolbar select, .news-toolbar button, .news-controls button { min-height: 44px; padding: 8px 14px; border: 1px solid #e5e9e6; border-radius: 8px; background: #fff; color: #375c43; font: inherit; font-weight: 500; cursor: pointer; }
.news-toolbar select { max-width: 100%; }
.news-toolbar button { margin-left: auto; }
.news-controls span { margin-right: auto; }
.news-controls button:disabled { opacity: .5; cursor: default; }
.news-status { margin: 0; color: #9a4f31; font-size: 12px; line-height: 1.6; }
.news-status:empty { display: none; }

.home-dashboard .sector-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.home-dashboard .sector-card { align-items: stretch; justify-content: flex-start; min-width: 0; min-height: 0; padding: 14px; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; box-shadow: none; }
.home-dashboard .sector-card:hover { transform: none; border-color: #adbdaf; background: #fafbf9; box-shadow: none; }
.home-dashboard .sector-title-wrap { justify-content: flex-start; gap: 7px; }
.home-dashboard .sector-icon { display: inline-flex; flex: 0 0 20px; height: 20px; align-items: center; font-size: 18px; }
.home-dashboard .sector-name { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.home-dashboard .sector-compare { padding: 0; gap: 0; background: transparent; border-radius: 0; }
.home-dashboard .sector-compare-item { align-items: flex-start; min-width: 0; gap: 4px; }
.home-dashboard .sector-compare-item + .sector-compare-item { padding-left: 10px; border-left: 1px solid #e8ede8; }
.home-dashboard .sector-compare-label { color: var(--muted); font-size: 10px; font-weight: 500; }
.home-dashboard .sector-compare-item .sector-change { font-size: 18px; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.home-dashboard .home-article-grid { gap: 20px; }
.home-dashboard .home-article-card { border-radius: 12px; box-shadow: none; }
.home-dashboard .home-article-card:hover { transform: none; border-color: #adbdaf; box-shadow: none; }
.home-dashboard .home-article-card:hover .home-article-thumb img { transform: none; }
.home-dashboard .home-article-body { padding: 16px; gap: 0; }
.home-dashboard .home-article-category { align-self: flex-start; margin-bottom: 8px; padding: 0; color: #4b7259; font-size: 11px; font-weight: 500; }
.home-dashboard .home-article-title { color: var(--text); font-size: 16px; font-weight: 650; line-height: 1.6; letter-spacing: -.025em; }
.home-dashboard .home-article-subtitle { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.home-dashboard .home-article-meta { padding-top: 14px; color: #77827a; font-size: 11px; font-weight: 400; }
.home-dashboard .home-article-thumb-placeholder { background: #31553d; }
.home-dashboard .home-article-empty { color: var(--muted); font-size: 13px; }

.home-dashboard #modal .modal-sheet { max-height: 90dvh; border: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.home-dashboard #modal .modal-title { color: var(--text); }
.home-dashboard #modal .sector-detail-metric { background: #f8faf8; border-color: var(--line); }
.home-dashboard #modal .sector-detail-row.is-active-etf { background: #f2f7f1; }
.home-dashboard #modal .sector-detail-main strong { color: #28583b; }
.home-dashboard #modal .sector-detail-list { border-color: var(--line); border-radius: 10px; }
.home-dashboard :is(.news-item, .sector-card, .home-article-card, .section-more-link, .news-toolbar select, .news-toolbar button, .news-controls button):focus-visible { outline: 2px solid #27835a; outline-offset: 3px; }

@media (max-width: 1099px) {
    .home-market-news-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .home-dashboard .index-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-dashboard #macro .macro-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .home-dashboard .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .home-dashboard .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-dashboard #macro .macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 680px) {
    .home-dashboard .topmoat-side-menu a { min-height: 44px; }
    body.home-dashboard .home-layout { width: calc(100% - 32px) !important; padding-top: 12px !important; }
    .home-dashboard .content { padding-top: 0; padding-bottom: 24px; gap: 24px; }
    .home-dashboard .section { gap: 12px; }
    .home-market-news-layout { gap: 28px; }
    .home-market-column { gap: 28px; }
    .home-dashboard .section-head { gap: 6px 12px; }
    .home-dashboard .section-head h2 { font-size: 18px; }
    .home-section-description { margin-top: 4px; font-size: 12px; }
    .home-dashboard .section-head small { font-size: 10px; }
    .home-dashboard .index-card { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 10px; gap: 10px; }
    .home-dashboard .index-icon { width: 40px; height: 40px; border-radius: 10px; }
    .home-dashboard .index-icon svg { width: 30px; height: 30px; }
    .home-dashboard .index-line { flex-direction: column; align-items: flex-start; gap: 2px; }
    .home-dashboard .index-line .price { font-size: 14px; }
    .home-dashboard .risk-gauge { padding: 12px 10px; }
    .home-dashboard .risk-gauge-value { font-size: 21px; }
    .home-dashboard .risk-gauge-scale { font-size: 9px; }
    .home-dashboard .news-item { grid-template-columns: 18px minmax(0, 1fr) 14px; padding: 14px 12px; gap: 8px; }
    .home-dashboard .news-title { font-size: 13px; }
    .home-dashboard .news-detail { padding: 14px 18px 18px 38px; font-size: 13px; }
    .news-controls { gap: 8px; }
    .home-dashboard .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .home-dashboard .sector-card { padding: 6px 8px; gap: 4px; }
    .home-dashboard .sector-title-wrap { gap: 5px; }
    .home-dashboard .sector-icon { flex-basis: 18px; height: 18px; font-size: 16px; }
    .home-dashboard .sector-name,
    .home-dashboard .sector-compare-item .sector-change { font-size: 12px; }
    .home-dashboard .sector-compare-item { gap: 2px; }
    .home-dashboard .sector-compare-item + .sector-compare-item { padding-left: 8px; }
    .home-dashboard .home-article-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .home-dashboard .home-article-card { flex-direction: column; align-items: stretch; }
    .home-dashboard .home-article-thumb { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 0; background: #f6f8f6; }
    .home-dashboard .home-article-thumb:has(img) { aspect-ratio: auto; }
    .home-dashboard .home-article-thumb img { position: static; width: 100%; height: auto; object-fit: contain; }
    .home-dashboard .home-article-thumb-placeholder { padding: 12px 8px; }
    .home-dashboard .home-article-thumb-brand { font-size: 12px; }
    .home-dashboard .home-article-thumb-badge { padding: 0; font-size: 10px; background: transparent; }
    .home-dashboard .home-article-body { min-width: 0; padding: 12px; }
    .home-dashboard .home-article-category { margin-bottom: 5px; font-size: 10px; }
    .home-dashboard .home-article-title { font-size: 14px; line-height: 1.5; }
    .home-dashboard .home-article-subtitle { display: none; }
    .home-dashboard .home-article-meta { flex-wrap: wrap; padding-top: 8px; font-size: 10px; }
}
@media (max-width: 359px) {
    .home-dashboard .index-line .price { font-size: 13px; }
    .home-dashboard .index-line .percent { font-size: 11px; }
    .home-dashboard .index-card { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
    .home-dashboard .index-icon { width: 36px; height: 36px; }
    .home-dashboard .index-icon svg { width: 28px; height: 28px; }
    .home-dashboard .risk-gauge-status { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .home-dashboard :is(.index-card, .sector-card, .home-article-card, .home-article-thumb img) { transition: none; transform: none; }
}

/* Daily advance / unchanged / decline counts. */
.breadth-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.65fr) minmax(0,1fr);gap:12px}
.breadth-market-slot{display:flex;min-width:0}
.home-dashboard .breadth-market-slot .sector-card{width:100%;display:flex;flex-direction:column;justify-content:center;gap:24px;padding:22px;text-align:left}
.breadth-market-slot .sector-title-wrap{align-self:flex-start}
.breadth-market-slot .sector-compare{width:100%}
@media(max-width:1100px){.breadth-grid{grid-template-columns:minmax(0,1fr)}.home-dashboard .breadth-market-slot .sector-card{gap:16px;padding:18px}}
.breadth-card{padding:22px;min-width:0}
.breadth-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap}
.breadth-card-head .breadth-coverage{margin:0 0 0 auto;text-align:right;white-space:nowrap}
.breadth-card h3{margin:0;font-size:18px;color:var(--text)}
.breadth-card h3>span{display:block;margin-top:5px;font-size:11px;letter-spacing:.07em;color:var(--muted)}
.breadth-meta,.breadth-note{font-size:12px;color:var(--muted);line-height:1.6;margin:12px 0 0}
.breadth-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:22px 0 14px;font-size:14px}
.breadth-stat{min-width:0}
.breadth-stat:nth-child(2){text-align:center}
.breadth-stat:last-child{text-align:right}
.breadth-stat>span{display:block;white-space:nowrap}
.breadth-percent{display:block;margin-top:6px;font-size:clamp(14px,2vw,22px);line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}
.breadth-counts small{display:block;margin-top:4px;font-size:11px}
.breadth-up{color:var(--up)}.breadth-flat{color:var(--muted)}.breadth-down{color:var(--down)}
.breadth-bar{display:flex;height:10px;overflow:hidden;border-radius:5px;background:var(--soft)}
.breadth-segment{display:flex;align-items:center;justify-content:center;min-width:0;color:#fff;font-weight:750;font-size:clamp(12px,1.6vw,23px)}
.breadth-segment span{white-space:nowrap;overflow:hidden}
.breadth-bg-up{background:var(--up)}.breadth-bg-flat{background:var(--muted)}.breadth-bg-down{background:var(--down)}
.breadth-axis{display:flex;justify-content:space-between;margin-top:9px;color:var(--muted);font-size:10px}
@media(max-width:700px){.breadth-grid{grid-template-columns:minmax(0,1fr)}.breadth-card{padding:18px}.breadth-segment{font-size:20px}}


/* Market breadth: shared card rhythm with a compact benchmark comparison. */
.home-dashboard #marketBreadth .breadth-card,
.home-dashboard #marketBreadth .sector-card{border:1px solid var(--line);border-radius:12px;box-shadow:none}
.home-dashboard #marketBreadth .breadth-card{padding:14px;background:#fff}
#marketBreadth .breadth-card-head{gap:8px}
#marketBreadth .breadth-card h3{font-size:15px;letter-spacing:-.035em}
#marketBreadth .breadth-coverage{padding:3px 6px;border-radius:6px;background:var(--soft);font-size:10px;line-height:1.5}
#marketBreadth .breadth-counts{margin:14px 0 10px;font-size:12px}
#marketBreadth .breadth-percent{margin-top:4px;font-size:clamp(16px,1.7vw,22px);font-weight:750;letter-spacing:-.025em}
#marketBreadth .breadth-axis{margin-top:5px;font-size:9px;color:var(--muted)}
#marketBreadth .breadth-note{margin-top:8px;font-size:10px;color:var(--muted)}
.home-dashboard #marketBreadth .breadth-market-slot .sector-card{display:flex;justify-content:flex-start;gap:0;padding:12px 14px;background:#f6f8f6;transition:background .15s,border-color .15s}
.home-dashboard #marketBreadth .breadth-market-slot .sector-card:hover{background:#eef5ef;border-color:#b9cdbf}
.home-dashboard #marketBreadth .breadth-market-slot .sector-card:focus-visible{outline:2px solid #18583e;outline-offset:3px}
.market-summary-head{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;margin-bottom:8px}
.market-summary-title{display:flex;align-items:center;gap:7px;font-size:18px;font-weight:700;letter-spacing:-.03em;color:var(--text);white-space:nowrap}
.market-summary-flag{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:14px}
.market-summary-link{display:flex;align-items:center;gap:3px;white-space:nowrap;font-size:9px;color:#506759;font-weight:500}
.market-summary-link>span{font-size:13px}
.market-summary-values{display:grid;gap:2px;width:100%;flex:0}
.market-summary-value{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:4px 0;border:0;border-radius:0;background:transparent}
.market-summary-value>span{font-size:18px;line-height:1.3;color:var(--text);font-weight:600;white-space:nowrap}
.market-summary-value>strong{font-size:18px;line-height:1.3;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.025em;white-space:nowrap}
.market-summary-gap{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;margin-top:8px;padding-top:8px;border-top:1px solid #dfe7e1;font-size:12px;color:var(--muted)}
.market-summary-gap strong{font-size:12px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.home-dashboard #marketBreadth .breadth-market-slot .sector-card{padding:12px 14px}.market-summary-values{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.market-summary-value{flex-wrap:wrap}.market-summary-head{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){.home-dashboard #marketBreadth .breadth-market-slot .sector-card{transition:none}}

/* Five risk indicators span the full content row. */
.home-dashboard #macro .macro-grid{grid-template-columns:repeat(5,minmax(0,1fr)) !important}
@media(max-width:1100px){.home-dashboard #macro .macro-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}}
@media(max-width:680px){.home-dashboard #macro .macro-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media(max-width:359px){.home-dashboard #macro .macro-grid{grid-template-columns:minmax(0,1fr) !important}}
