/* ═══ YoonDream Palette ═══ */
:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #222831;
  --md-primary-fg-color--light: #393E46;
  --md-primary-fg-color--dark: #1a1f27;
  --md-accent-fg-color: #c9a84c;
  --md-typeset-a-color: #393E46;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #222831;
  --md-primary-fg-color--light: #393E46;
  --md-primary-fg-color--dark: #1a1f27;
  --md-accent-fg-color: #FFD369;
  --md-typeset-a-color: #FFD369;
  --md-default-bg-color: #1a1f27;
}

/* ═══ Global — smaller text ═══ */
.md-typeset { font-size: 0.62rem; line-height: 1.55; }
.md-typeset h1 { font-size: 1.25rem; font-weight: 800; margin: 0 0 0.3em; }
.md-typeset h2 { font-size: 1rem; font-weight: 700; margin: 0.8em 0 0.3em; }
.md-typeset h3 { font-size: 0.78rem; font-weight: 600; margin: 0; }
.md-typeset p { margin: 0.2em 0; }
.md-typeset table { font-size: 0.6rem; }
.md-typeset hr { margin: 0.8em 0; }
.md-nav__link { font-size: 0.65rem; }
.md-typeset .admonition, .md-typeset details { font-size: 0.62rem; }
.md-header { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ═══ Tool Card Grid ═══ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.tool-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-left: 3px solid #FFD369;
  border-radius: 5px;
  padding: 8px 12px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.tool-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}
a.tool-card { text-decoration: none !important; color: inherit !important; display: block; }
a.tool-card:hover { border-color: #FFD369; }
.tool-card h3 { margin: 0 0 2px; font-size: 0.72rem; font-weight: 700; }
.tool-card p { margin: 0; font-size: 0.6rem; color: var(--md-default-fg-color--light); line-height: 1.5; }

/* ═══ Status ═══ */
.status { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 0.5rem; font-weight: 600; margin-top: 3px; }
.status-done { background: #d4edda; color: #155724; }
.status-wip { background: #fff3cd; color: #856404; }

/* ═══ Hero ═══ */
.hero-banner {
  background: linear-gradient(135deg, #222831 0%, #393E46 100%);
  border-radius: 8px;
  padding: 20px 28px;
  color: white;
  margin-bottom: 12px;
}
.hero-banner h1 { color: #FFD369 !important; font-size: 1.3rem !important; margin-bottom: 2px !important; }
.hero-banner p { color: #bbb; font-size: 0.65rem; margin: 0; }

/* ═══ Dashboard Cards ═══ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.dash-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  min-width: 0;
}
.dash-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #FFD369;
}
.dash-card .dash-icon { font-size: 22px; margin-bottom: 4px; }
.dash-card .dash-num { font-size: 1.35rem; font-weight: 800; color: #FFD369; line-height: 1; }
.dash-card .dash-title { font-size: 0.68rem; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card .dash-desc { font-size: 0.54rem; color: var(--md-default-fg-color--light); margin-top: 2px; line-height: 1.35; word-break: keep-all; overflow-wrap: break-word; }

/* 5-column dash grid (forced single row on wide screens) */
@media (min-width: 601px) {
  .dash-grid-5 { grid-template-columns: repeat(5, 1fr) !important; }
}

/* ═══ Total Strip (summary banner under dash-grid) ═══ */
.total-strip {
  background: linear-gradient(135deg, #222831 0%, #393E46 100%);
  border-radius: 8px;
  padding: 14px 20px;
  margin: 10px 0 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  color: white;
}
.total-strip .ts-left {
  display: flex; align-items: center; gap: 12px;
  padding-right: 24px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.total-strip .ts-icon { font-size: 28px; line-height: 1; }
.total-strip .ts-left-text { display: flex; flex-direction: column; }
.total-strip .ts-num {
  font-size: 2rem; font-weight: 800; color: #FFD369; line-height: 1;
}
.total-strip .ts-label {
  font-size: 0.55rem; color: #bbb; margin-top: 3px;
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}
.total-strip .ts-right {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.total-strip .ts-stats {
  display: flex; align-items: center; gap: 8px; font-size: 0.68rem; color: #EEEEEE;
}
.total-strip .ts-stats strong { color: #FFD369; font-size: 0.85rem; font-weight: 800; margin-left: 2px; }
.total-strip .ts-sep { color: #666; }
.total-strip .ts-percent {
  margin-left: auto; font-size: 0.62rem; font-weight: 700; color: #FFD369;
}
.total-strip .ts-bar {
  height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden;
}
.total-strip .ts-bar-fill {
  height: 100%; width: 80.7%;
  background: linear-gradient(90deg, #c9a84c 0%, #FFD369 100%);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255,211,105,0.4);
}

@media (max-width: 500px) {
  .total-strip { grid-template-columns: 1fr; gap: 12px; padding: 12px 14px; }
  .total-strip .ts-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding-right: 0; padding-bottom: 10px; }
  .total-strip .ts-num { font-size: 1.6rem; }
}

/* ═══ Stat Row (compact) ═══ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin: 8px 0; }
.stat-card { background: #222831; border-radius: 6px; padding: 10px 6px; text-align: center; }
.stat-card .num { font-size: 1.2rem; font-weight: 800; color: #FFD369; line-height: 1; }
.stat-card .label { font-size: 0.52rem; color: #aaa; margin-top: 2px; }

/* ═══ Emphasis Box ═══ */
.emphasis-box {
  background: #222831; border-radius: 6px; padding: 10px 14px;
  color: #ccc; margin: 8px 0; display: flex; align-items: center; gap: 8px;
  font-size: 0.62rem; line-height: 1.5;
}
.emphasis-box strong { color: #FFD369; }
.emphasis-box .icon { font-size: 18px; flex-shrink: 0; }

/* ═══ Section header with link ═══ */
.section-header {
  display: flex; align-items: center; gap: 8px;
  margin: 0.6em 0 0.2em; padding-bottom: 4px;
  border-bottom: 2px solid #FFD369;
}
.section-header .sh-icon { font-size: 16px; }
.section-header .sh-title { font-size: 0.85rem; font-weight: 700; }
.section-header .sh-count { background: #FFD369; color: #222831; padding: 1px 8px; border-radius: 10px; font-size: 0.52rem; font-weight: 700; }
.section-header a { margin-left: auto; font-size: 0.55rem; color: var(--md-accent-fg-color); text-decoration: none; font-weight: 600; }
.section-header a:hover { text-decoration: underline; }

/* ═══ Mock UI (docs version) ═══ */
.mock { background: var(--md-default-bg-color); border-radius: 6px; overflow: hidden; font-size: 0.58rem; border: 1px solid var(--md-default-fg-color--lightest); box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: flex; flex-direction: column; }
.mock-h { background: #222831; color: #fff; padding: 5px 10px; display: flex; align-items: center; justify-content: space-between; }
.mock-h em { color: #FFD369; font-style: normal; font-weight: 700; font-size: 0.65rem; }
.mock-h .mock-badge { background: #FFD369; color: #222831; padding: 1px 7px; border-radius: 8px; font-size: 0.5rem; font-weight: 700; }
.mock-b { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.mock-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.mock-btn { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 0.5rem; font-weight: 600; white-space: nowrap; }
.mock-btn.accent { background: #FFD369; color: #222831; }
.mock-btn.dark { background: #222831; color: #FFD369; }
.mock-btn.mid { background: #393E46; color: #fff; }
.mock-btn.light { background: #fff; color: #222831; border: 1px solid #ddd; }
.mock-list { background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.mock-lh { background: #f0f0f0; padding: 2px 6px; font-size: 0.48rem; font-weight: 600; color: #666; display: flex; gap: 4px; border-bottom: 1px solid #ddd; }
.mock-lr { padding: 3px 6px; font-size: 0.52rem; display: flex; gap: 4px; align-items: center; border-bottom: 1px solid #f0f0f0; }
.mock-lr:nth-child(even) { background: #f9f9f9; }
.mock-cb { width: 8px; height: 8px; border: 1px solid #999; border-radius: 2px; flex-shrink: 0; }
.mock-cb.ck { background: #FFD369; border-color: #FFD369; }
.mock-f { background: #fff; padding: 4px 8px; border-top: 1px solid #ddd; display: flex; align-items: center; justify-content: space-between; font-size: 0.45rem; color: #999; }
.mock-f em { color: #FFD369; font-weight: 600; font-style: normal; }
.mock-inp { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 1px 5px; font-size: 0.5rem; }
.mock-sel { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 1px 5px; font-size: 0.5rem; }
.mock-sb { display: inline-block; padding: 1px 5px; border-radius: 6px; font-size: 0.42rem; font-weight: 600; }
.mock-tab-bar { display: flex; gap: 1px; padding: 3px 8px 0; background: var(--md-default-bg-color); }
.mock-tab { padding: 2px 8px; font-size: 0.5rem; font-weight: 600; border-radius: 3px 3px 0 0; background: #ddd; color: #666; }
.mock-tab.act { background: #fff; color: #222831; }

/* Featured tool row */
.featured-row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin: 8px 0; align-items: stretch; }
.featured-desc { display: flex; flex-direction: column; gap: 4px; }
.featured-desc h3 { font-size: 0.8rem; font-weight: 700; margin: 0; }
.featured-desc p { font-size: 0.58rem; color: var(--md-default-fg-color--light); line-height: 1.5; margin: 0; }

/* ═══ Dark mode fixes ═══ */
[data-md-color-scheme="slate"] .stat-card { background: #2a303a; }
[data-md-color-scheme="slate"] .emphasis-box { background: #2a303a; }
[data-md-color-scheme="slate"] .hero-banner { background: linear-gradient(135deg, #2a303a 0%, #393E46 100%); }
[data-md-color-scheme="slate"] .dash-card { border-color: #393E46; }
[data-md-color-scheme="slate"] .dash-card:hover { border-color: #FFD369; }
[data-md-color-scheme="slate"] .mock-list { background: #2a303a; border-color: #393E46; }
[data-md-color-scheme="slate"] .mock-lh { background: #333; color: #aaa; border-color: #393E46; }
[data-md-color-scheme="slate"] .mock-lr { border-color: #333; }
[data-md-color-scheme="slate"] .mock-lr:nth-child(even) { background: #252a33; }
[data-md-color-scheme="slate"] .mock-f { background: #2a303a; border-color: #393E46; }
[data-md-color-scheme="slate"] .mock-inp, [data-md-color-scheme="slate"] .mock-sel { background: #2a303a; border-color: #393E46; color: #ccc; }
[data-md-color-scheme="slate"] .mock-btn.light { background: #2a303a; color: #ccc; border-color: #393E46; }

/* ═══ Mobile Responsive ═══ */
@media (max-width: 400px) {
  .dash-grid { grid-template-columns: 1fr; gap: 6px; }
  .dash-card { padding: 12px 10px; }
  .dash-card .dash-num { font-size: 1.3rem; }
  .tool-grid { grid-template-columns: 1fr; gap: 6px; }
  .hero-banner { padding: 16px 18px; }
  .hero-banner h1 { font-size: 1.1rem !important; }
  .section-header .sh-title { font-size: 0.78rem; }
  .emphasis-box { padding: 10px 12px; flex-direction: column; align-items: flex-start; }
}
@media (min-width: 401px) and (max-width: 600px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
