:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  background: #f4f5f1;
  color: #1c241f;
  --ink: #1c241f;
  --muted: #66736b;
  --line: #d9ded7;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --brand: #156f5b;
  --brand-dark: #0d4d42;
  --accent: #c9562a;
  --warn: #a94435;
  --good: #c34235;
  --bad: #0f7a4f;
  --shadow: 0 16px 42px rgba(36, 48, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(21, 111, 91, 0.07), transparent 320px),
    #f4f5f1;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.top-actions,
.form-actions,
.filter-row,
.search-row,
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.small-button,
.primary-button,
.ghost-button,
.text-button,
.tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.icon-button {
  width: 40px;
  padding: 0;
}

.text-button {
  padding: 0 13px;
}

.icon-button svg,
.small-button svg,
.primary-button svg,
.ghost-button svg,
.text-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.danger {
  color: var(--warn);
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-strip > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 76px;
  box-shadow: 0 8px 28px rgba(36, 48, 42, 0.05);
}

.label,
label > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 7px;
}

.status-strip strong {
  display: block;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.status-strip small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.account-switcher {
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 16px;
  box-shadow: 0 8px 28px rgba(36, 48, 42, 0.05);
}

.switcher-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.switcher-actions {
  display: flex;
  gap: 6px;
}

.switcher-label {
  color: var(--muted);
  font-size: 13px;
}

.chip-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.scope-chip {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
}

.scope-chip.active {
  border-color: var(--brand);
  background: #e8f3ef;
  color: var(--brand-dark);
  font-weight: 700;
}

.mini-button {
  width: 40px;
  height: 34px;
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.panel,
.content-area {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.entry-panel {
  padding: 18px;
  position: sticky;
  top: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.panel-title span {
  color: var(--brand);
  background: #e6f2ee;
  border: 1px solid #c5ded6;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

form {
  display: grid;
  gap: 13px;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 111, 91, 0.12);
}

.search-row input {
  min-width: 0;
}

.small-button {
  width: 42px;
  flex: 0 0 42px;
  padding: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.compat-hidden {
  display: none;
}

.conversion-fields {
  display: grid;
  gap: 10px;
}

.conversion-fields[hidden] {
  display: none;
}

.fund-result {
  min-height: 44px;
  border: 1px dashed #cbd4cc;
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fund-result strong {
  color: var(--ink);
}

.primary-button,
.ghost-button {
  padding: 0 14px;
}

.primary-button {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  flex: 1;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.ghost-button {
  background: #f8faf7;
}

.hint-box {
  margin-top: 14px;
  border: 1px solid #e0ddd0;
  background: #fff9e9;
  color: #6e5c25;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.content-area {
  min-width: 0;
  overflow: hidden;
}

.toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 0 16px;
  background: #f8faf7;
}

.tab.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.filter-row input {
  width: min(320px, 42vw);
}

.refresh-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1380px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 13px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #f8faf7;
  position: sticky;
  top: 0;
  z-index: 1;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3) {
  text-align: left;
}

.fund-name {
  display: grid;
  gap: 3px;
  min-width: 160px;
}

.fund-name strong {
  font-size: 13px;
}

.fund-name span,
.subtle {
  color: var(--muted);
  font-size: 12px;
}

.positive {
  color: var(--good);
}

.negative {
  color: var(--bad);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #fbfcfa;
}

.sparkline {
  display: block;
  width: 180px;
  height: 74px;
  margin-left: auto;
}

.chart-axis {
  stroke: #cfd6d0;
  stroke-width: 1;
}

.chart-grid {
  stroke: #e8ece8;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-label {
  fill: var(--muted);
  font-size: 10px;
  font-family: inherit;
}

.chart-date {
  font-size: 9px;
}

.chart-crosshair {
  opacity: 0;
  stroke: #7d8a82;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-dot {
  opacity: 0;
  fill: #ffffff;
  stroke: currentColor;
  stroke-width: 2;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
}

.chart-tooltip rect {
  fill: rgba(28, 36, 31, 0.92);
}

.chart-tooltip text {
  fill: #ffffff;
  font-size: 8px;
  font-family: inherit;
}

.large-tooltip text {
  font-size: 11px;
}

.chart-hit {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.trade-marker {
  pointer-events: none;
}

.trade-marker-dot {
  fill: #ffffff;
  stroke-width: 1.6;
}

.trade-marker-line {
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.7;
}

.trade-marker-label {
  font-family: inherit;
  font-weight: 700;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 1.4px;
}

.trade-marker-buy {
  color: var(--good);
}

.trade-marker-buy .trade-marker-dot,
.trade-marker-buy .trade-marker-line {
  stroke: var(--good);
}

.trade-marker-buy .trade-marker-label {
  fill: var(--good);
}

.trade-marker-sell {
  color: var(--bad);
}

.trade-marker-sell .trade-marker-dot,
.trade-marker-sell .trade-marker-line {
  stroke: var(--bad);
}

.trade-marker-sell .trade-marker-label {
  fill: var(--bad);
}

.chart-point:hover .chart-crosshair,
.chart-point:hover .chart-dot,
.chart-point:hover .chart-tooltip,
.chart-point:focus-within .chart-crosshair,
.chart-point:focus-within .chart-dot,
.chart-point:focus-within .chart-tooltip {
  opacity: 1;
}

.compact-button {
  height: 40px;
  padding: 0 11px;
}

.type-buy,
.type-sell,
.type-dividend_cash,
.type-dividend_reinvest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
}

.type-buy {
  color: var(--good);
  background: #e7f5ee;
}

.type-sell {
  color: var(--accent);
  background: #fff0e8;
}

.type-dividend_cash,
.type-dividend_reinvest {
  color: var(--brand);
  background: #e6f2ee;
}

.row-action {
  border: 0;
  background: transparent;
  color: var(--warn);
  padding: 6px;
}

.row-action.neutral {
  color: var(--brand);
}

.row-action svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  text-align: center !important;
  color: var(--muted);
  padding: 42px 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 28px));
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(19, 29, 24, 0.24);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
}

.toast[data-tone="error"] {
  background: var(--warn);
}

.toast[hidden] {
  display: none;
}

.factor-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.45fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.market-copy {
  align-self: center;
  min-width: 0;
}

.factor-panel h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.factor-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.factor-mode {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.factor-mode label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 11px;
  color: var(--ink);
  font-size: 13px;
}

.factor-mode input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.market-auto-card {
  min-width: 0;
  border: 1px solid #c5ded6;
  border-radius: 8px;
  background: #eef7f4;
  padding: 11px 12px;
}

.market-auto-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.market-auto-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.market-auto-card p {
  margin: 6px 0 0;
  font-size: 12px;
}

.manual-factor-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.manual-factor-grid label {
  min-width: 0;
}

.manual-factor-grid select:disabled {
  color: #7d8a82;
  background: #edf0ed;
  cursor: not-allowed;
}

.intel-summary {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.intel-summary > div,
.strategy-grid > div,
.strategy-levels > div {
  min-width: 0;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.intel-summary span,
.strategy-grid span,
.strategy-levels span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.intel-summary strong,
.strategy-grid strong,
.strategy-levels strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.intel-grid {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.intel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.intel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.strategy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 86px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}

.strategy-badge.buy {
  color: var(--good);
  background: #fff2ef;
  border-color: #f1c5bd;
}

.strategy-badge.sell {
  color: var(--accent);
  background: #fff0e8;
  border-color: #edc9b8;
}

.strategy-badge.hold {
  color: var(--brand);
  background: #e6f2ee;
  border-color: #c5ded6;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.strategy-levels {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.strategy-levels > div {
  background: #fbfcfa;
}

.trend-note {
  margin-top: 10px;
  border: 1px solid #e0ddd0;
  border-radius: 8px;
  background: #fff9e9;
  color: #6e5c25;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.intel-columns {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.35fr;
  gap: 12px;
  margin-top: 12px;
}

.intel-columns section {
  min-width: 0;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.intel-columns h3 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0;
}

.intel-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.intel-columns li + li {
  margin-top: 6px;
}

.intel-empty {
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 42px 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(19, 29, 24, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(19, 29, 24, 0.28);
  padding: 16px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2,
.sync-grid h3 {
  margin: 0;
  letter-spacing: 0;
}

.modal-head h2 {
  font-size: 18px;
}

.sync-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
}

.sync-grid > div {
  min-width: 0;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.sync-grid h3 {
  font-size: 15px;
}

.sync-grid p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
}

textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 111, 91, 0.12);
}

.full-button {
  width: 100%;
  margin-top: 10px;
}

.modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-modal {
  width: min(1180px, 100%);
}

.edit-modal {
  width: min(680px, 100%);
}

.edit-form {
  padding-top: 14px;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
}

.detail-summary > div {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-summary strong {
  font-size: 18px;
}

.detail-chart-grid,
.detail-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.detail-chart-grid > div,
.detail-lists > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}

.detail-chart-grid h3,
.detail-lists h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
}

.chart-box {
  min-height: 240px;
  background: #ffffff;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  overflow: hidden;
}

.large-chart {
  display: block;
  width: 100%;
  height: 240px;
  color: var(--brand);
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  color: var(--muted);
  font-size: 13px;
}

.mini-table-wrap {
  max-height: 340px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #edf0ec;
  border-radius: 8px;
}

.mini-table {
  min-width: 0;
}

.mini-table th,
.mini-table td {
  padding: 10px 12px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .entry-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 14px;
  }

  .topbar,
  .toolbar,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .filter-row,
  .tabs {
    width: 100%;
  }

  .icon-button {
    flex: 1;
  }

  .text-button {
    flex: 2;
    width: auto;
  }

  .status-strip,
  .two-col {
    grid-template-columns: 1fr;
  }

  .account-switcher {
    padding: 10px;
  }

  .switcher-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .scope-chip {
    min-height: 32px;
    padding: 0 11px;
    font-size: 13px;
  }

  .filter-row input,
  .tab,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .refresh-status {
    width: 100%;
    text-align: center;
  }

  .content-area {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .toolbar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(36, 48, 42, 0.06);
    padding: 10px 12px;
  }

  td {
    min-height: 34px;
    border-bottom: 1px solid #edf0ec;
    padding: 8px 0;
    text-align: right;
    display: grid;
    grid-template-columns: minmax(84px, 36%) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    text-align: left;
  }

  td:nth-child(2),
  td:nth-child(3) {
    text-align: right;
  }

  td.fund-cell {
    display: block;
    text-align: left;
    padding-top: 4px;
  }

  td.fund-cell::before {
    display: none;
  }

  td:last-child {
    border-bottom: 0;
  }

  .fund-name {
    min-width: 0;
  }

  .row-action {
    justify-self: end;
    min-width: 40px;
    min-height: 36px;
    border: 1px solid #efd0ca;
    border-radius: 8px;
    background: #fff7f5;
  }

  .sparkline {
    width: 100%;
    max-width: 220px;
    height: auto;
  }

  .empty-state {
    display: block;
    border: 1px dashed var(--line);
    background: var(--panel);
    border-radius: 8px;
    box-shadow: none;
  }

  .empty-state::before {
    display: none;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }

  .sync-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary,
  .factor-panel,
  .manual-factor-grid,
  .intel-summary,
  .strategy-grid,
  .strategy-levels,
  .intel-columns,
  .detail-chart-grid,
  .detail-lists {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    gap: 8px;
  }

  .detail-chart-grid > div,
  .detail-lists > div {
    padding: 10px;
  }

  .mini-table-wrap table,
  .mini-table-wrap tbody,
  .mini-table-wrap tr,
  .mini-table-wrap td {
    display: revert;
    width: auto;
  }

  .mini-table-wrap tr {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .mini-table-wrap td {
    min-height: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: right;
  }

  .mini-table-wrap td::before {
    content: none;
  }

  .mini-table {
    min-width: 420px;
  }

  textarea {
    min-height: 150px;
    font-size: 11px;
  }
}
