:root {
  color-scheme: light;
  --bg: #EBE5DA;
  --ink: #000000;
  --green: #22C55E;
  --gold: #F2D06B;
  --muted: rgb(0 0 0 / .60);
  --faint: rgb(0 0 0 / .30);
  --hairline: rgb(0 0 0 / .18);
  --poster-shadow: 6px 6px 0 0 var(--green);
  --poster-shadow-gold: 6px 6px 0 0 var(--gold);
  font-family: Inter, "Arial Black", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 7vw 0 auto;
  z-index: 0;
  width: 72px;
  background: rgb(0 0 0 / .06);
  pointer-events: none;
}
body::after {
  content: "ETF / ROTATION / 2000";
  position: fixed;
  right: -108px;
  bottom: 14vh;
  z-index: 0;
  color: rgb(0 0 0 / .13);
  font: 900 92px/.9 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -7px;
  transform: rotate(-90deg);
  pointer-events: none;
}
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

body:not(.mobile-app-page) *,
body:not(.mobile-app-page) *::before,
body:not(.mobile-app-page) *::after {
  border-radius: 0 !important;
  box-shadow: none;
}

.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: auto;
}
.login-panel {
  width: min(520px, 100%);
  padding: 30px;
  border: 5px solid var(--ink);
  background: var(--bg);
  transform: rotate(-1deg);
  box-shadow: var(--poster-shadow);
}
.brand-mark {
  width: 68px;
  height: 68px;
  object-fit: cover;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 4px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
}
.login-panel h1 {
  display: inline-block;
  margin: 0 0 30px;
  padding: 9px 12px 11px;
  background: var(--ink);
  color: var(--gold);
  font-size: 42px;
  font-weight: 900;
  line-height: .9;
  letter-spacing: -3px;
  white-space: nowrap;
  box-shadow: var(--poster-shadow);
}
.latin-title {
  display: inline-block;
  margin-right: .08em;
  letter-spacing: .045em;
}
.login-panel label,
.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
}
.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 8px;
}
input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  outline: none;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}
input:focus {
  background: var(--gold);
  box-shadow: 4px 4px 0 0 var(--green);
}
.primary-button {
  min-height: 48px;
  padding: 0 20px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 0 var(--green);
}
.primary-button:disabled { opacity: .45; cursor: wait; }
.form-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0 28px 80px;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 142px;
  margin: 0 -28px 0;
  padding: 28px 28px 22px;
  border-bottom: 6px solid var(--ink);
  background: var(--bg);
}
.app-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 48%;
  bottom: -12px;
  height: 12px;
  background: var(--green);
}
.app-header h1 {
  display: inline-block;
  margin: 7px 0 0;
  padding: 8px 13px 12px;
  background: var(--ink);
  color: var(--gold);
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -5px;
  white-space: nowrap;
  transform: rotate(-2deg);
  box-shadow: var(--poster-shadow);
}
.eyebrow,
.section-kicker,
.time-badge,
.freshness {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
}
.header-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.icon-button {
  width: 54px;
  height: 54px;
  border: 4px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.freshness {
  align-self: center;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  transform: rotate(1deg);
}

.desktop-tabs {
  display: flex;
  gap: 0;
  align-items: stretch;
  min-height: 68px;
  margin: 12px -28px 0;
  border-bottom: 6px solid var(--ink);
  background: var(--ink);
}
.tab-button {
  min-width: 170px;
  padding: 0 22px;
  border: 0;
  border-right: 4px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -1px;
}
.tab-button:nth-child(2) { transform: rotate(-1deg); }
.tab-button.active {
  background: var(--green);
  color: var(--ink);
}
.tab-panel { display: none; padding: 34px 0; }
.tab-panel.active { display: block; }

.decision-summary {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -28px 34px;
  padding: 22px 28px;
  border-top: 6px solid var(--ink);
  border-bottom: 6px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  transform: rotate(-1deg);
}
.decision-summary:empty { display: none; }
.decision-summary.good { background: var(--green); }
.decision-summary.bad,
.decision-summary.closed { background: var(--gold); }
.decision-summary::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -18px;
  width: 120px;
  height: 18px;
  background: var(--ink);
}
.decision-summary strong {
  display: block;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -2px;
}
.decision-summary p {
  margin: 0;
  color: rgb(0 0 0 / .72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}
.decision-summary .summary-time {
  white-space: nowrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}

.next-action-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin: -14px -28px 34px;
  padding: 16px 28px;
  border-bottom: 5px solid var(--ink);
  background: var(--bg);
  box-shadow: inset 12px 0 0 var(--green);
}
.next-action-summary.target { box-shadow: inset 12px 0 0 var(--green); }
.next-action-summary.danger { box-shadow: inset 12px 0 0 var(--gold); }
.next-action-summary.add { box-shadow: inset 12px 0 0 var(--gold); }
.next-action-summary.hold,
.next-action-summary.muted { box-shadow: inset 12px 0 0 var(--muted); }
.next-action-summary strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}
.next-action-summary p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.page-section,
.trade-tool {
  margin: 0 -28px;
  padding: 34px 28px 38px;
  border-bottom: 6px solid var(--ink);
  background: transparent;
}
.muted-section {
  background: rgb(0 0 0 / .05);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-heading h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -4px;
}
.time-badge {
  padding: 5px 8px;
  border: 3px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  white-space: nowrap;
}
.market-status {
  margin: -6px 0 24px;
  padding: 16px 18px;
  border: 4px solid var(--ink);
  border-left-width: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  box-shadow: var(--poster-shadow-gold);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.rule-card {
  position: relative;
  min-width: 0;
  padding: 24px 24px 28px;
  border: 5px solid var(--ink);
  background: var(--bg);
  transform: rotate(-1deg);
  box-shadow: var(--poster-shadow-gold);
}
.rule-card:nth-child(even) {
  transform: rotate(1deg);
  box-shadow: var(--poster-shadow);
}
.rule-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 11px;
  background: var(--gold);
}
.rule-card.aggressive::before { background: var(--green); }
.rule-card h3 {
  margin: 14px 0 14px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -2px;
}
.rule-card .action {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 4px 9px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -1px;
}
.rule-card .action.buy { background: var(--green); }
.rule-card dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px 14px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.rule-card dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}
.rule-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.rule-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}
.rule-card .reason-lines {
  display: grid;
  gap: 6px;
}
.rule-card .reason-lines p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.rule-card dd .reason-lines p {
  color: var(--ink);
  font-weight: 900;
}
.ai-review {
  margin-top: 22px;
  padding: 18px;
  border: 5px solid var(--ink);
  background: rgb(242 196 20 / .18);
  box-shadow: 6px 6px 0 0 var(--green);
}
.ai-review-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--ink);
}
.ai-review-heading span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}
.ai-review-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.ai-review dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 14px;
  margin: 0;
}
.ai-review dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.ai-review dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;
}

.trade-review-section {
  background: rgb(35 194 94 / .08);
}
.trade-review-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  border: 5px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  box-shadow: 6px 6px 0 0 var(--green);
}
.trade-review-details summary::marker { content: ""; }
.trade-review-details summary::-webkit-details-marker { display: none; }
.trade-review-details summary span {
  font-size: 24px;
  letter-spacing: -1px;
}
.trade-review-details summary small {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}
.trade-review-details[open] summary small {
  color: var(--ink);
}
.trade-review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 22px;
  padding-right: 6px;
}
.trade-review-card {
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 5px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--poster-shadow);
  cursor: pointer;
}
.trade-review-card:hover,
.trade-review-card:focus-visible {
  outline: 0;
  background: var(--gold);
}
.trade-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.trade-review-top time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}
.trade-review-card strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.trade-review-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.trade-review-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding-top: 12px;
  border-top: 3px solid var(--ink);
}
.trade-review-card dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 900;
}
.trade-review-card dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.compact-empty {
  padding: 22px;
}

.holding-standard-section {
  background: rgb(0 0 0 / .035);
}
.capital-setting-section {
  background: rgb(0 0 0 / .045);
}
.capital-setting-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
}
.capital-option {
  min-height: 50px;
  border: 4px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 4px 4px 0 0 var(--gold);
  cursor: pointer;
}
.capital-option.active {
  background: var(--green);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.capital-option.pending {
  background: var(--gold);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.capital-option:disabled {
  opacity: .55;
  cursor: wait;
}
.capital-setting-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.capital-save-button {
  min-width: 150px;
}
.capital-save-button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.time-badge.pending {
  background: var(--gold);
}
.capital-setting-note {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}
.holding-standard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.holding-standard-grid article {
  min-width: 0;
  padding: 16px;
  border: 4px solid var(--ink);
  background: var(--bg);
  box-shadow: 5px 5px 0 0 var(--gold);
}
.holding-standard-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.holding-standard-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.report-details {
  margin-top: 28px;
  border-top: 4px dotted var(--ink);
}
.report-details summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 16px;
  border: 4px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  box-shadow: 5px 5px 0 0 var(--green);
  cursor: pointer;
  list-style: none;
}
.report-details summary::marker { content: ""; }
.report-details summary::-webkit-details-marker { display: none; }
.report-details summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
}
.report-details[open] summary::after { content: "-"; }
.report-body {
  margin-top: 22px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.78;
  overflow-wrap: anywhere;
}
.report-body h1,
.report-body h2,
.report-body h3 {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 22px 0 12px;
  padding: 0 0 5px;
  border-bottom: 5px solid var(--green);
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-body h1 span,
.report-body h2 span,
.report-body h3 span {
  color: inherit;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}
.report-body h1 { font-size: 28px; }
.report-body h2 { font-size: 22px; }
.report-body h3 { font-size: 18px; }
.report-body p { margin: 8px 0; }
.report-body blockquote {
  margin: 14px 0;
  padding: 12px 16px;
  border: 4px solid var(--ink);
  border-left-width: 12px;
  background: var(--bg);
}
.report-body blockquote .quote-heading {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 0 0 5px;
  border-bottom: 5px solid var(--green);
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-body blockquote .quote-heading span {
  color: inherit;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}
.report-body h1 .report-green,
.report-body h1 .report-red,
.report-body h1 .report-blue,
.report-body h1 .report-amber,
.report-body h1 .report-accent,
.report-body h2 .report-green,
.report-body h2 .report-red,
.report-body h2 .report-blue,
.report-body h2 .report-amber,
.report-body h2 .report-accent,
.report-body h3 .report-green,
.report-body h3 .report-red,
.report-body h3 .report-blue,
.report-body h3 .report-amber,
.report-body h3 .report-accent,
.report-body blockquote .quote-heading .report-green,
.report-body blockquote .quote-heading .report-red,
.report-body blockquote .quote-heading .report-blue,
.report-body blockquote .quote-heading .report-amber,
.report-body blockquote .quote-heading .report-accent {
  display: inline;
  padding: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}
.report-body ul { padding-left: 24px; }
.report-body hr {
  border: 0;
  border-top: 5px solid var(--ink);
  margin: 26px 0;
}
.report-green,
.report-red,
.report-blue,
.report-amber,
.report-accent {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}
.report-red,
.report-amber { text-decoration: none; }
.report-muted { color: var(--muted); font-weight: 900; }
.forecast-list {
  display: grid;
  width: 100%;
  border-block: 5px solid var(--ink);
}
.forecast-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 10px;
  border-bottom: 4px solid var(--ink);
  background: transparent;
}
.forecast-row:last-child { border-bottom: 0; }
.forecast-row > div {
  min-width: 0;
}
.forecast-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--green);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 900;
}
.forecast-row strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.forecast-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}
.forecast-details {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.forecast-details p {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}
.forecast-details p.forecast-note {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 4px;
  padding: 8px 10px;
  border-left: 6px solid var(--green);
  background: rgb(242 208 107 / .32);
}
.forecast-details p.forecast-note span {
  color: var(--ink);
}
.forecast-details b {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}
.forecast-details span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.forecast-archive-card {
  padding: 26px;
  border: 5px solid var(--ink);
  background: var(--bg);
  box-shadow: 8px 8px 0 0 var(--green);
}
.forecast-archive-card strong {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  background: var(--gold);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}
.forecast-archive-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
}

.position-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 -28px;
  border-top: 6px solid var(--ink);
  border-bottom: 6px solid var(--ink);
  background: transparent;
}
.position-overview > div {
  min-height: 168px;
  padding: 28px;
  border-right: 5px solid var(--ink);
  background: transparent;
}
.position-overview > div:last-child { border-right: 0; }
.position-overview strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  max-width: 100%;
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#positionPnl {
  font-size: clamp(26px, 2.9vw, 48px);
  line-height: 1.05;
}
.position-overview strong.profit,
.position-metric.profit strong,
.profit {
  color: var(--green);
  text-shadow: 1px 1px 0 var(--ink);
}
.position-overview strong.loss,
.position-metric.loss strong,
.loss {
  color: var(--gold);
  text-shadow: 1px 1px 0 var(--ink);
}
.position-list { display: grid; }
.position-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(108px, .72fr)) minmax(170px, .9fr) auto;
  gap: 16px 20px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 5px solid var(--ink);
}
.position-row.priority-danger,
.position-row.priority-target {
  background: rgb(35 194 94 / .08);
  margin-inline: -14px;
  padding-inline: 14px;
}
.position-row.priority-danger {
  background: rgb(250 204 21 / .14);
}
.position-row:last-child { border-bottom: 0; }
.position-name strong {
  display: block;
  color: var(--ink);
  font-size: 32px;
  font-weight: 900;
  line-height: .98;
  letter-spacing: -2px;
}
.position-action {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 8px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.position-action.target,
.position-action.add { background: var(--green); }
.position-action.danger { background: var(--gold); }
.position-action.hold,
.position-action.muted { background: var(--bg); color: var(--muted); }
.position-name span,
.position-metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 900;
}
.position-metric strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.position-metric.pnl strong {
  display: block;
  max-width: 100%;
  font-size: clamp(18px, 1.25vw, 22px);
  line-height: 1.15;
  white-space: normal;
}
.position-note {
  grid-column: 1 / -2;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.6;
}
.position-actions {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}
.small-button {
  min-height: 42px;
  padding: 0 18px;
  border: 4px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 4px 4px 0 0 var(--gold);
}
.small-button.buy-position {
  background: var(--green);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.empty-state {
  padding: 38px 0;
  color: var(--muted);
  text-align: center;
  border-block: 4px dotted var(--ink);
  font-weight: 900;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  margin-bottom: 22px;
  border: 4px solid var(--ink);
  background: var(--ink);
}
.segment {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-right: 3px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
}
.segment:last-child { border-right: 0; }
.segment.active {
  background: var(--green);
  color: var(--ink);
}
.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.trade-hint {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}

.trade-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 70;
  min-width: 164px;
  min-height: 116px;
  padding: 0 30px;
  border: 7px solid var(--ink);
  background: var(--green);
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  box-shadow: 9px 9px 0 0 var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, opacity .16s ease;
}

.trade-fab:hover {
  transform: translate(-2px, -2px) scale(1.03);
  box-shadow: 12px 12px 0 0 var(--ink);
}

.trade-fab:active {
  transform: translate(5px, 5px) scale(.96);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.trade-panel-open .trade-fab {
  opacity: 0;
  pointer-events: none;
  transform: translate(18px, 18px) scale(.75);
}

.trade-overlay[hidden],
.trade-panel[hidden] {
  display: none !important;
}

.trade-overlay {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgb(0 0 0 / .42);
  animation: tradeOverlayIn .16s ease both;
}

.trade-panel {
  position: fixed;
  right: 34px;
  bottom: 46px;
  z-index: 69;
  width: min(820px, calc(100vw - 68px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  margin: 0;
  padding: 34px;
  border: 7px solid var(--ink);
  background: var(--bg);
  box-shadow: 11px 11px 0 0 var(--green);
  animation: tradePanelIn .2s cubic-bezier(.18, .9, .28, 1.2) both;
}

@keyframes tradeOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tradePanelIn {
  from {
    opacity: 0;
    transform: translate(28px, 34px) scale(.94) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0);
  }
}

.trade-panel-heading {
  align-items: center;
  margin-bottom: 18px;
}

.trade-panel-heading h2 {
  margin: 0;
}

.trade-panel-heading .icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  font-size: 26px;
}

.discipline-section {
  background: rgb(0 0 0 / .035);
}
.discipline-headline {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 4px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 5px 5px 0 0 var(--green);
}
.discipline-details {
  margin-top: 14px;
  border-top: 4px solid var(--ink);
}
.discipline-details summary {
  padding: 14px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.discipline-list {
  display: grid;
  gap: 12px;
}
.discipline-item {
  padding: 14px;
  border: 4px solid var(--ink);
  background: var(--bg);
  box-shadow: 4px 4px 0 0 var(--gold);
}
.discipline-item.good {
  box-shadow: 4px 4px 0 0 var(--green);
}
.discipline-item.warn {
  background: rgb(250 204 21 / .2);
}
.discipline-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}
.discipline-item p,
.discipline-item small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}
.discipline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.discipline-stat {
  padding: 14px;
  border: 4px solid var(--ink);
  background: var(--bg);
}
.discipline-stat span,
.discipline-stat em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.discipline-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}
.discipline-stat p {
  margin: 8px 0;
  color: var(--ink);
  font-weight: 900;
}

.history-heading { align-items: end; }
.segmented.compact {
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  margin: 0;
}
.history-list {
  border-top: 5px solid var(--ink);
}
.history-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 5px solid var(--ink);
}
.trade-history-item {
  grid-template-columns: 140px 1fr auto auto;
}
.history-time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 900;
}
.history-content strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
}
.history-content p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.history-badge {
  align-self: center;
  padding: 5px 10px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}
.history-badge.trade { background: var(--green); }
.history-badge.sell { background: var(--gold); }
.delete-trade-button {
  min-height: 36px;
  padding: 0 12px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 3px 3px 0 0 var(--gold);
}
.delete-trade-button:disabled {
  opacity: .55;
  cursor: wait;
}
.report-history-item {
  width: 100%;
  border-inline: 0;
  border-top: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.report-history-item:hover,
.report-history-item:focus-visible {
  outline: 0;
  background: var(--gold);
  box-shadow: inset 10px 0 0 0 var(--green);
}

.modal-open {
  overflow: hidden;
}
.report-modal[hidden] {
  display: none !important;
}
.confirm-modal[hidden] {
  display: none !important;
}
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 46px 34px;
}
.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .74);
}
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-items: center;
  padding: 24px;
}
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .58);
}
.confirm-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 24px;
  border: 6px solid var(--ink);
  background: var(--bg);
  box-shadow: var(--poster-shadow-green);
}
.confirm-modal-panel h2 {
  margin: 4px 0 12px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
}
.confirm-modal-panel p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
}
.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 22px;
}
.danger-button {
  background: var(--gold);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  min-width: 116px;
  min-height: 46px;
  padding: 0 18px;
  border: 4px solid var(--ink);
  font-weight: 900;
}
.danger-button:disabled {
  opacity: .55;
  cursor: wait;
}
.report-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 72px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 30px 32px 34px;
  border: 6px solid var(--ink);
  background: var(--bg);
  box-shadow: var(--poster-shadow-gold);
  transform: none;
  overscroll-behavior: contain;
}
.report-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 5px solid var(--ink);
}
.report-modal-top > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.report-modal-panel h2 {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -4px;
  overflow-wrap: anywhere;
}
.report-modal-top .icon-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  min-height: 46px;
  font-size: 28px;
}
.report-modal-body {
  max-width: none;
  padding-bottom: 12px;
}

.mobile-tabs { display: none; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border: 4px solid var(--ink);
  background: var(--green);
  color: var(--ink);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
  body,
  input,
  .app-header {
    background: var(--bg);
    color: var(--ink);
  }
}

@media (max-width: 900px) {
  .app-shell { padding-inline: 18px; }
  .app-header { margin-inline: -18px; padding-inline: 18px; min-height: 124px; }
  .app-header h1 { font-size: clamp(34px, 8vw, 48px); letter-spacing: -3px; }
  .desktop-tabs,
  .decision-summary,
  .page-section,
  .trade-tool,
  .position-overview { margin-inline: -18px; }
  .rule-grid { grid-template-columns: 1fr; }
  .position-overview { grid-template-columns: repeat(2, 1fr); }
  .position-overview > div:nth-child(2) { border-right: 0; }
  .position-overview > div:nth-child(-n + 2) { border-bottom: 5px solid var(--ink); }
  .position-row { grid-template-columns: 1fr 1fr auto; }
  .position-name { grid-column: 1 / -1; }
  .position-note { grid-column: 1 / -1; }
  .position-metric.amount { display: none; }
  .position-metric.pnl { grid-column: 1 / 3; }
  .form-grid { grid-template-columns: 1fr; }
  .trade-fab {
    right: 20px;
    bottom: 104px;
  }
  .trade-panel {
    right: 14px;
    bottom: 160px;
    width: calc(100vw - 28px);
    max-height: calc(100vh - 184px);
    padding: 20px;
  }
}

@media (max-width: 720px) {
  .mobile-app-page .app-shell,
  .mobile-app-page .app-header,
  .mobile-app-page .desktop-tabs,
  .mobile-app-page .decision-summary,
  .mobile-app-page .page-section,
  .mobile-app-page .trade-tool,
  .mobile-app-page .position-overview {
    margin-inline: initial;
  }
}
