:root {
  font-family: "DM Sans", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #202d27;
  background: #f4f6f2;
  --surface: #fff;
  --border: #dce4db;
  --muted: #586962;
  --green: #286354;
  --dark-green: #17483d;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button, select, summary { cursor: pointer; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid #236b59; outline-offset: 3px; }
[hidden] { display: none !important; }
[data-icon] { display: inline-flex; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 10; left: 12px; top: 12px; padding: 12px; transform: translateY(-150%); background: white; border-radius: 8px; }
.skip:focus { transform: translateY(0); }

.layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #eef2eb; border-right: 1px solid #dce4db; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 27px 17px 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 0; width: fit-content; }
.brand-mark { width: 38px; height: 38px; background: var(--dark-green); border-radius: 11px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 10px; }
.brand-mark i { width: 4px; height: 8px; background: #d6e7a8; border-radius: 3px; transform: skewY(-15deg); }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; }
.brand-copy { display: grid; }
.brand-copy strong { font-size: 23px; letter-spacing: -.05em; line-height: 1; }
.brand-copy small { margin-top: 7px; font-size: 8px; font-weight: 750; letter-spacing: .14em; color: var(--muted); }
.navigation { display: grid; gap: 7px; margin-top: 45px; }
.navigation a { display: flex; gap: 11px; align-items: center; min-height: 43px; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: #45564e; white-space: nowrap; }
.navigation a:hover { background: #e2e9df; }
.navigation a[aria-current="page"] { color: #194e42; font-weight: 700; background: #dce9dd; }
.navigation svg { width: 19px; height: 19px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #dce4db; padding: 15px 5px 3px; display: flex; gap: 9px; align-items: center; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.workspace-mark { background: #dce7dd; border-radius: 8px; width: 31px; height: 31px; display: grid; place-items: center; font-weight: 750; color: var(--dark-green); }

.main { min-width: 0; }
.main:focus { outline: none; }
.topline { min-height: 61px; padding: 0 clamp(22px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e1e7df; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.breadcrumb strong { color: #293a32; font-weight: 650; }
.demo { white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; border: 1px solid #cfded0; background: #e7efe3; border-radius: 24px; color: #315948; padding: 5px 10px; font-size: 11px; font-weight: 700; }
.demo i { width: 6px; height: 6px; border-radius: 50%; background: #468367; }
.page { max-width: 1560px; margin: auto; padding: 28px clamp(22px, 3vw, 48px) 15px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(29px, 3vw, 43px); letter-spacing: -.045em; line-height: 1.15; font-weight: 760; }
.page-header p { color: var(--muted); font-size: 14px; margin-top: 9px; line-height: 1.6; }
.filters { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.select-shell { display: flex; align-items: center; position: relative; background: var(--surface); border: 1px solid #d4dfd4; border-radius: 8px; color: #354b3f; }
.select-shell [data-icon] { position: absolute; pointer-events: none; }
.select-shell [data-icon]:first-child { left: 10px; }
.select-shell [data-icon]:last-child { right: 8px; }
.select-shell svg, .export svg { width: 15px; height: 15px; }
.select-shell select { border: 0; background: transparent; appearance: none; border-radius: 8px; font-size: 12px; min-height: 39px; min-width: 109px; padding: 7px 28px 7px 31px; width: 100%; }
.export { display: inline-flex; align-items: center; gap: 7px; justify-content: center; min-height: 40px; border: 1px solid var(--dark-green); border-radius: 8px; background: var(--dark-green); color: #fff; padding: 8px 12px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.export:hover { background: #246452; }
.date-strip { margin: 18px 0 15px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 11px; row-gap: 4px; color: var(--muted); font-size: 12px; }
.date-strip #date-window { color: #30473b; font-weight: 650; }
.date-divider { width: 1px; height: 12px; background: #cdd9cd; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; min-width: 0; }
.metric-card { padding: 15px 17px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.metric-top h2 { font-size: 13px; font-weight: 650; color: #465c50; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #eaf1e8; color: #2f6553; flex: 0 0 auto; }
.metric-icon svg { width: 16px; height: 16px; }
.metric-value { display: block; font-family: Bahnschrift, "DM Sans", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.032em; font-size: clamp(23px, 2.7vw, 39px); font-weight: 650; margin: 9px 0 10px; white-space: nowrap; }
.metric-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.delta { padding: 3px 6px; border-radius: 5px; font-weight: 720; white-space: nowrap; }
.delta.up { background: #e4f1e6; color: #256245; }
.delta.down { background: #f8e7e1; color: #8e3728; }
.delta.flat { background: #edf1ef; color: #485b54; }
.metric-highlight { background: var(--dark-green); color: #fff; border-color: var(--dark-green); }
.metric-highlight .metric-top h2, .metric-highlight .metric-foot { color: #d3e6dc; }
.metric-highlight .metric-icon { background: #326453; color: #e0eebd; }
.metric-highlight .delta.up { background: #dfedb7; color: #274d3c; }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(270px, 1fr); gap: 17px; margin-bottom: 17px; }
.chart-grid:has(.trend-values[open]) { align-items: start; }
.panel { padding: 18px 20px 13px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.panel-head h2 { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.panel-head p { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.segmented { flex-shrink: 0; display: flex; flex-wrap: wrap; max-width: 100%; background: #eef2ed; border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button { background: transparent; border: 1px solid transparent; border-radius: 6px; min-height: 29px; padding: 3px 8px; color: #4e6257; font-size: 11px; white-space: nowrap; }
.segmented button:hover { color: #16493c; }
.segmented button[aria-pressed="true"] { color: #174c3e; background: white; border-color: #dce5db; font-weight: 700; }
.chart-area { margin-top: 11px; position: relative; }
.chart-area canvas { display: block; width: 100%; height: 192px; }
.tooltip { display: grid; gap: 4px; position: absolute; top: 0; pointer-events: none; max-width: 100%; z-index: 1; padding: 9px 11px; background: #1e3b31; color: white; box-shadow: 0 4px 18px #223a3526; border-radius: 8px; font-size: 11px; white-space: nowrap; }
.tooltip strong { color: #e0edca; }
.chart-legend { display: flex; gap: 16px; align-items: center; min-height: 22px; color: #475c52; font-size: 11px; }
.chart-legend span { display: flex; gap: 6px; align-items: center; }
.chart-legend i { border-top: 2px solid #2e705a; width: 15px; }
.chart-legend span:last-child i { border-top: 2px dashed #81918a; }
.trend-values { margin-top: 3px; font-size: 11px; color: #416151; }
.trend-values summary { width: max-content; min-height: 24px; line-height: 24px; }
.trend-values table { min-width: 290px; margin-top: 6px; }
.trend-values table th, .trend-values table td { padding: 6px 8px; }

.share-panel { min-height: 305px; }
.ring { position: relative; width: 130px; aspect-ratio: 1; margin: 12px auto 11px; display: grid; place-items: center; border-radius: 50%; }
.ring-label { width: 102px; aspect-ratio: 1; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.ring-label strong { font-family: Bahnschrift, "DM Sans", sans-serif; font-size: 31px; line-height: 1; letter-spacing: -.04em; }
.ring-label span { font-size: 10px; color: var(--muted); margin-top: 5px; }
.legend { display: grid; gap: 3px; padding: 0; margin: 0; list-style-type: none; }
.legend li { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; column-gap: 9px; align-items: center; font-size: 12px; color: #364c41; min-height: 24px; }
.legend li > a, .legend li > div { display: flex; align-items: center; gap: 8px; min-height: 26px; min-width: 0; }
.legend li > a:hover { text-decoration: underline; }
.legend li i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--tone); }
.legend li strong, .share-percent { font-variant-numeric: tabular-nums; text-align: right; }
.share-percent { color: var(--muted); }

.table-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-scroll { position: relative; overflow-x: auto; }
.table-panel .table-scroll { margin-top: 10px; }
table { width: 100%; min-width: 545px; border-collapse: collapse; white-space: nowrap; font-size: 12px; }
thead { background: #eff3ee; }
th, td { text-align: right; padding: 9px 12px; }
th:first-child { text-align: left; }
thead th { color: #475c51; font-size: 11px; font-weight: 650; }
thead th:first-child { border-radius: 7px 0 0 7px; }
thead th:last-child { border-radius: 0 7px 7px 0; }
tbody tr:not(:last-child) { border-bottom: 1px solid #e9eee8; }
tbody tr:has(a):hover { background: #f8faf7; }
td { font-variant-numeric: tabular-nums; color: #374b42; }
tbody th { color: #253c30; font-weight: 600; }
.detail-cell { width: 37px; }
.detail-cell a { display: inline-flex; color: #387361; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 6px; }
.detail-cell a:hover { background: #e3eee4; }
.detail-cell svg { width: 15px; height: 15px; }
.channel-link { display: inline-flex; align-items: center; gap: 8px; }
.channel-link:hover strong { text-decoration: underline; }
.channel-link small { display: block; font-weight: 400; font-size: 10px; color: var(--muted); margin-top: 3px; }
.channel-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--tone); background: var(--tint); }
.channel-icon svg { width: 16px; height: 16px; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--muted); font-size: 11px; padding: 14px 0 4px; }

@media (max-width: 1190px) {
  .page-header { align-items: flex-start; flex-direction: column; gap: 13px; }
  .layout { grid-template-columns: 193px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { padding-inline: 10px; }
  .layout { grid-template-columns: 162px minmax(0, 1fr); }
  .brand { padding-left: 4px; gap: 8px; }
  .brand-copy small { font-size: 7px; }
  .chart-grid { grid-template-columns: 1fr; }
  .share-panel { min-height: auto; }
  .share-panel .legend { margin-inline: auto; max-width: 440px; }
  .metric-card { padding: 12px; }
}
@media (max-width: 720px) {
  .layout { display: block; }
  .sidebar { background: #eef2eb; border-right: 0; border-bottom: 1px solid var(--border); position: static; height: auto; padding: 12px 13px 8px; }
  .brand { padding-top: 0; }
  .brand-mark { width: 32px; height: 32px; padding-bottom: 7px; }
  .navigation { display: flex; margin-top: 12px; gap: 4px; flex-wrap: wrap; }
  .navigation a { padding: 7px 8px; gap: 4px; min-height: 35px; font-size: 12px; }
  .navigation svg { width: 15px; height: 15px; }
  .sidebar-footer { display: none; }
  .topline { min-height: 44px; padding-inline: 16px; }
  .page { padding: 18px 14px 11px; }
  .metrics { gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { gap: 12px; }
  .panel { padding: 13px 14px 11px; }
  .segmented button { padding-inline: 6px; }
  .trend-head { flex-wrap: wrap; align-items: flex-start; }
  .chart-area canvas { height: 172px; }
}
