.chart-page { min-width: 0; padding: 0; overflow: clip; }
.chart-head { gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.chart-head h2 { margin: 0; color: var(--ink); font-size: 1.15rem; }
.chart-head p { margin: 5px 0 0; color: var(--muted); font-size: .875rem; }
.chart-actions, .chart-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chart-body { min-width: 0; }
.chart-body h3, [data-chart-proposal] h3 { margin: 18px 20px 10px; font-size: .95rem; }
.chart-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 14px 20px; }
.chart-filters .field:first-child { flex: 1 1 245px; }
.chart-filters .field { flex: 0 1 148px; margin: 0; }
.chart-check { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: var(--ink); font-size: .875rem; }
.chart-check input { accent-color: var(--teal); }
.chart-table table { min-width: 630px; }
.chart-table .chart-group-row th { padding: 4px 15px; background: #f2f5f8; }
.chart-group-button, .chart-disclosure {
  min-height: 29px; color: var(--ink); border: 0; border-radius: 4px; background: transparent; font: inherit; cursor: pointer;
}
.chart-group-button { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 2px 6px; font-size: .87rem; font-weight: 690; }
.chart-group-button span { width: 13px; text-align: center; color: var(--teal); font-size: 1rem; }
.chart-disclosure, .chart-disclosure-placeholder { display: inline-grid; place-items: center; flex: 0 0 25px; width: 25px; }
.chart-disclosure { color: var(--teal); font-size: 1.05rem; }
.chart-group-button:hover, .chart-disclosure:hover { background: #e5eeef; }
.chart-cell-identity { display: flex; align-items: center; padding-left: calc(var(--account-depth, 0) * 17px); }
.chart-account-link { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; font-weight: 600; }
.chart-code { font-variant-numeric: tabular-nums; font-size: .83rem; color: #526177; }
.chart-summary-row td { background: #f7f9fb; font-weight: 640; }
.chart-amount { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 670; }
.chart-status { display: inline-block; padding: 3px 7px; background: #e8f3ed; color: #236245; border-radius: 4px; font-size: .77rem; font-weight: 650; }
.chart-status.muted { background: #edf0f4; color: #4c596c; }
.chart-tabs { border-bottom: 1px solid var(--line); padding: 0 16px; gap: 2px 10px; }
.chart-tabs a { color: var(--muted); display: inline-block; padding: 12px 6px 10px; text-decoration: none; font-size: .875rem; font-weight: 630; border-bottom: 2px solid transparent; }
.chart-tabs a[aria-current] { color: var(--teal); border-bottom-color: var(--teal); }
.chart-detail { min-width: 0; }
.chart-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); margin: 0; gap: 13px 16px; padding: 16px 20px; }
.chart-facts div { min-width: 0; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.chart-facts dt { margin-bottom: 6px; color: var(--muted); font-size: .8rem; }
.chart-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.chart-detail-note { display: block; color: var(--muted); margin-top: 4px; }
.chart-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; max-width: 980px; }
.chart-span { grid-column: 1 / -1; }
.chart-fields .field { margin: 0; }
.chart-download { align-self: end; }
.chart-migration { border: 1px solid var(--line); background: var(--soft); padding: 12px; border-radius: 6px; }
.chart-migration p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.chart-migration .field { margin-top: 7px; }
[data-chart-proposal] { min-width: 0; }
[data-chart-proposal] h3, [data-chart-proposal] p { margin-left: 0; }
[data-chart-proposal] .chart-table table { min-width: 540px; }
@media (max-width: 620px) {
  .chart-head { align-items: flex-start; padding: 14px; }
  .chart-filters { padding: 12px 14px; gap: 8px; }
  .chart-filters .field { flex: 1 1 125px; }
  .chart-fields { grid-template-columns: minmax(0,1fr); }
  .chart-facts { padding: 14px; }
  .chart-table table { min-width: 600px; }
}

.hedge .chart-page {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:.375rem;
  box-shadow:0 1px 2px #0000000d;
}
.hedge .chart-head { padding:.5rem .875rem; background:color-mix(in oklch,var(--muted) 60%,transparent); }
.hedge .chart-head h2 { color:var(--foreground); font-size:.8125rem; }
.hedge .chart-head p { color:var(--muted-foreground); font-size:.75rem; }
.hedge .chart-facts dt,.hedge .chart-detail-note { color:var(--muted-foreground); }
.hedge .chart-facts dd { font-size:.8125rem; }
.hedge .chart-list-controls {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.5rem .75rem;
  padding:.5rem .75rem;
  border-bottom:1px solid var(--border);
}
.hedge .chart-group-pills,.hedge .chart-list-controls .chart-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.25rem;
}
.hedge .chart-group-pills button {
  padding:.125rem .625rem;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--card);
  color:var(--muted-foreground);
  font-size:.75rem;
}
.hedge .chart-group-pills button:hover { background:var(--muted); }
.hedge .chart-group-pills button[aria-pressed="true"] {
  border-color:var(--primary);
  background:var(--primary);
  color:var(--primary-foreground);
}
.hedge .chart-list-controls .field {
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:.25rem;
  color:var(--muted-foreground);
  font-size:.75rem;
}
.hedge .chart-list-controls .field select { min-height:1.75rem; padding-block:.125rem; font-size:.75rem; }
.hedge .chart-list-controls .chart-check { min-height:1.75rem; color:var(--muted-foreground); padding-inline:.25rem; font-size:.75rem; }
.hedge .chart-list-controls .btn { min-height:1.75rem; padding:.125rem .5rem; font-size:.75rem; }
.hedge .chart-version-note { color:var(--muted-foreground); font-size:.75rem; padding:.375rem .875rem; }
.hedge .chart-group:not(:last-child) { border-bottom:1px solid var(--border); }
.hedge .chart-group > header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:.75rem;
  padding:.375rem .875rem;
  background:var(--sidebar);
  color:var(--sidebar-foreground);
}
.hedge .chart-group > header :is(h3,.chart-amount) { font-weight:600; font-size:.75rem; }
.hedge .chart-group > header .chart-amount { font-weight:400; }
.hedge .chart-group-button {
  min-height:0;
  color:inherit;
  gap:.375rem;
  padding:0;
  font-size:inherit;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.hedge .chart-group-button:hover { background:transparent; text-decoration:underline; }
.hedge .chart-group-button span { color:inherit; font-size:.875rem; }
.hedge .chart-table table { width:100%; border-collapse:collapse; font-size:.8125rem; }
.hedge .chart-table :is(th,td) { padding:.375rem .75rem; border-bottom:1px solid color-mix(in oklch,var(--border) 70%,transparent); }
.hedge .chart-table th {
  padding-block:.5rem;
  color:var(--muted-foreground);
  background:color-mix(in oklch,var(--muted) 70%,transparent);
  font-size:.6875rem;
  letter-spacing:.045em;
  text-align:left;
  text-transform:uppercase;
}
.hedge .chart-table tbody tr:nth-of-type(even) { background:color-mix(in oklch,var(--muted) 30%,transparent); }
.hedge .chart-table tbody tr:hover { background:color-mix(in oklch,var(--accent) 60%,transparent); }
.hedge .chart-table tbody tr:last-child td { border-bottom:0; }
.hedge .chart-list .chart-table table { min-width:30rem; }
.hedge .chart-list .chart-table :is(th,td):first-child { width:5rem; }
.hedge .chart-list .chart-table :is(th,td):nth-child(3) { width:7rem; }
.hedge .chart-list .chart-table :is(th,td):last-child { text-align:right; width:10rem; }
.hedge .chart-list .chart-table :is(th,td):last-child .chart-amount { display:inline; }
.hedge .chart-table .chart-summary-row td { background:transparent; font-weight:600; }
.hedge .chart-cell-identity { padding-left:calc(var(--account-depth,0)*.8rem); }
.hedge .chart-cell-identity > div { min-width:0; }
.hedge .chart-cell-identity small { color:var(--muted-foreground); display:block; font-size:.75rem; font-weight:400; overflow-wrap:anywhere; }
.hedge .chart-disclosure,.hedge .chart-disclosure-placeholder { width:1rem; min-height:1rem; flex-basis:1rem; }
.hedge .chart-disclosure-placeholder:only-child { width:0; flex-basis:0; }
.hedge .chart-disclosure:hover { color:var(--accent-foreground); background:var(--accent); }
.hedge :is(.chart-code,.chart-amount) { font-family:var(--font-mono,monospace); font-variant-numeric:tabular-nums; }
.hedge .chart-code { color:var(--primary); font-size:.8125rem; }
.hedge .chart-account-link { color:var(--foreground); font-weight:500; }
.hedge .chart-account-link:hover { color:var(--primary); }
.hedge .chart-account-link.chart-inactive { color:var(--muted-foreground); text-decoration:line-through; }
.hedge .chart-amount { font-weight:400; }
.hedge .chart-status {
  padding:.125rem .375rem;
  color:#065f46;
  background:#ecfdf5;
  box-shadow:inset 0 0 0 1px #05966933;
  border-radius:.25rem;
  font-size:.6875rem;
  font-weight:500;
}
.hedge .chart-status.muted { background:var(--muted); color:var(--muted-foreground); box-shadow:inset 0 0 0 1px var(--border); }
.hedge.dark .chart-status:not(.muted),.dark .hedge .chart-status:not(.muted) { background:#10b9811a; color:#6ee7b7; box-shadow:inset 0 0 0 1px #34d39940; }
.hedge .chart-form-section { display:grid; gap:.75rem; padding:1rem; border-bottom:1px solid var(--border); }
.hedge .chart-form-section:last-child { border-bottom:0; }
.hedge .chart-form-section h3 {
  color:var(--muted-foreground);
  font-size:.6875rem;
  font-weight:600;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.hedge .chart-account-drawer .workspace-task-fields { padding:0; }
@media (min-width:640px) {
  .hedge .he-record-drawer.chart-account-drawer { width:28rem; max-width:min(100vw,28rem); }
  .hedge .chart-form-section .chart-fields { grid-template-columns:minmax(0,1fr) minmax(0,2fr); }
}
