:root {
  color-scheme: light;
  --rst-bg: #eef0f2;
  --rst-surface: #ffffff;
  --rst-surface-2: #f5f6f7;
  --rst-text: #1f2328;
  --rst-text-muted: #59616b;
  --rst-line: #d5d9de;
  --rst-line-strong: #8a929c;
  --rst-accent: #c2410c;
  --rst-accent-strong: #9a3412;
  --rst-accent-soft: #fdeee6;
  --rst-on-accent: #ffffff;
  --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rst-radius: 4px;
  --rst-radius-sm: 3px;
  --rst-depth-ambient: rgb(15 23 42 / 0.06);
  --rst-depth-contact: rgb(15 23 42 / 0.08);
  --steel: #2b3036;
}

body { margin: 0; background: var(--rst-bg); color: var(--rst-text); font-family: var(--rst-font); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--rst-text-muted); }
.small { font-size: 0.85rem; }
.r { text-align: right; }

.band { background: var(--steel); color: #f3f4f6; border-bottom: 3px solid var(--rst-accent); }
.band-inner { max-width: 72rem; margin: 0 auto; padding: 0.9rem 1rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.band .mark { flex: none; }
.band h1 { margin: 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: 0.01em; color: #fff; }
.band .company { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: #c9ced4; }
.band-meta { margin: 0 0 0 auto; font-size: 0.8rem; color: #c9ced4; }

main.rst-page { max-width: 72rem; margin: 0 auto; padding: 1rem; box-sizing: border-box; }
main section { margin-bottom: 1.5rem; }
h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.6rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.section-head p { margin: 0 0 0.6rem; font-size: 0.85rem; }

.panel { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); padding: 1rem; }
.notice { border: 1px solid; border-radius: var(--rst-radius); padding: 0.65rem 0.85rem; margin: 0 0 1rem; }
.notice-error { background: #fdecec; border-color: #e3a5a5; color: #7f1d1d; }
.notice-ok { background: #e8f5ec; border-color: #9fd0ae; color: #14532d; }

.log-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem 1rem; align-items: end; }
.log-form .rst-field { margin: 0; min-width: 0; }
.field-note { grid-column: 1 / 3; }
.field-submit button { width: 100%; min-height: 2.75rem; font-weight: 600; justify-content: center; text-align: center; }
.rst-input { width: 100%; box-sizing: border-box; min-height: 2.75rem; }
.opt { font-weight: 400; color: var(--rst-text-muted); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.kpi { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rst-text-muted); }
.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.chart { margin: 0; }
.chart figcaption { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.bars { margin: 0; display: grid; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 6.5rem; align-items: center; gap: 0.6rem; }
.bar-row dt { font-size: 0.9rem; }
.bar-row dd { margin: 0; }
.bar-track { background: var(--rst-surface-2); border: 1px solid var(--rst-line); height: 1.1rem; border-radius: 2px; overflow: hidden; }
.bar-track svg { display: block; width: 100%; height: 100%; }
.bar-num { text-align: right; font-weight: 600; font-size: 0.9rem; }
.bar-num .muted { font-weight: 400; }

.table-wrap { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); overflow-x: auto; }
table.log { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.log th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rst-text-muted); background: var(--rst-surface-2); border-bottom: 1px solid var(--rst-line-strong); padding: 0.55rem 0.75rem; white-space: nowrap; }
.log th.r { text-align: right; }
.log td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rst-line); vertical-align: top; }
.log tbody tr:last-child td { border-bottom: 0; }
.log td.note { overflow-wrap: anywhere; color: var(--rst-text); }
.chip { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 3px; background: #e5e7eb; color: #1f2328; border: 1px solid #c7ccd2; font-variant-numeric: tabular-nums; }
.empty { color: var(--rst-text-muted); }
.foot { margin-top: 2rem; text-align: center; }

input:is([type=date], [type=time], [type=datetime-local]) { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; display: block; min-height: 2.75rem; }

@media (max-width: 760px) {
  .log-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .field-note, .field-submit { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .band-meta { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .log-form { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 6.5rem minmax(0, 1fr) 5.5rem; gap: 0.45rem; }
  .kpi-value { font-size: 1.3rem; }
  .table-wrap { overflow: visible; background: transparent; border: 0; }
  .log thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .log, .log tbody, .log tr, .log td { display: block; }
  .log tr { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); margin-bottom: 0.5rem; padding: 0.35rem 0; }
  .log td { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.5rem; border: 0; padding: 0.25rem 0.75rem; text-align: left; }
  .log td.r { text-align: left; }
  .log td > * { justify-self: start; }
  .log td::before { content: attr(data-label); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rst-text-muted); }
}

/* Example mode: one-line note at the top of the showcase copy. */
.example-note { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0.5rem 1rem; text-align: center; font-family: var(--rst-font, system-ui, sans-serif); font-size: 0.875rem; line-height: 1.4; font-weight: 400; letter-spacing: normal; text-transform: none; background: var(--rst-accent-soft); color: var(--rst-text); }
.example-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
