/* CopyKitty workspace: one spacing scale and one control system. */
:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: #252525;
  background: #fff;
  --line: #e9ebed;
  --muted: #6b7075;
  --surface: #f7f8f8;
  --panel-space: 28px;
  --section-space: 32px;
  --sidebar-width: 224px;
  --control-height: 44px;
  --button-radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
body.settings-open { overflow: hidden; }
main { margin-left: var(--sidebar-width); max-width: 1600px; min-width: 0; padding: 32px clamp(24px,4vw,64px) 64px; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.6px; margin: 0; font-weight: 600; }
h2 { font-size: 17px; line-height: 1.4; letter-spacing: -.3px; margin: 0 0 20px; font-weight: 600; }
h3 { font-size: 14px; margin: 24px 0 10px; }
p { margin: 12px 0; line-height: 1.6; }
.muted, small { color: var(--muted); font-size: 12px; line-height: 1.6; font-weight: 400; }
a { color: inherit; text-underline-offset: 4px; }
.actions, .section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.section-head { justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.actions { margin: 20px 0 0; }
.actions > :is(button,.button-link) { min-width: 128px; }

/* Tactile buttons without layout movement; all targets are at least 44px. */
button, .button-link {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4;
  min-height: var(--control-height); padding: 10px 16px; border: 1px solid #31343a;
  border-radius: var(--button-radius); background: #292c31; color: #fff;
  box-shadow: inset 0 1px 1px #ffffff18;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover:not(:disabled), .button-link:hover { background: #41454c; }
button.secondary, .button-link.secondary { background: #fff; color: #30343b; border-color: #e2e5e7; }
button.secondary:hover:not(:disabled), .button-link.secondary:hover { background: #f4f5f6; border-color: #c1c7cf; }
button:active:not(:disabled), .button-link:active { box-shadow: inset 0 1px 3px #00000020; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button[aria-busy=true] { cursor: progress; }
button.compact { min-height: var(--control-height); padding: 10px 14px; }
:where(button,a,summary,input,select,textarea,[tabindex]):focus-visible { outline: 2px solid #526b86; outline-offset: 3px; }
.text-link, .budget-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; }
.icon-button { width: 44px; height: 44px; padding: 8px; background: transparent; color: var(--muted); border: 0; box-shadow: none; font-size: 24px; flex: none; }
.icon-button:hover:not(:disabled) { background: #f1f2f3; }

/* Persistent identity and settings, separated from workspace navigation. */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 20px 14px 12px; border-right: 1px solid var(--line); background: #f8f9f9; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand { padding: 8px 10px; min-height: 56px; margin-bottom: 30px; }
.kitty-mark { width: 40px; height: 40px; object-fit: contain; flex: none; }
.brand-name { font-size: 18px; font-weight: 650; letter-spacing: -.4px; text-decoration: none; }
#workspace-picker { position: relative; border: 0; background: transparent; border-radius: 0; padding: 0; margin: 0 0 8px; }
#workspace-picker > summary { padding: 10px 12px; border-radius: 10px; gap: 8px; margin: 0; font-weight: 500; }
#workspace-picker > summary:hover { background: #eeefef; }
.role-caption { color: var(--muted); font-size: 12px; }
#current-role { font-size: 13px; }
#role-buttons { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #00000012; z-index: 6; }
#role-buttons, nav { display: grid; gap: 6px; }
#role-buttons button, nav button { justify-content: flex-start; text-align: left; min-height: 44px; padding: 10px 12px; border: 0; background: transparent; color: var(--muted); box-shadow: none; font-weight: 500; }
#role-buttons button:hover:not(:disabled), nav button:hover:not(:disabled) { background: #eef0f2; color: #252525; }
#role-buttons button[aria-pressed=true], nav button[aria-current=page] { background: #e9eded; color: #20242b; font-weight: 600; }
.nav-icon { width: 20px; height: 20px; flex: none; text-align: center; }
nav .nav-label { flex: 1; }
#navigation button { gap: 12px; font-size: 14px; }
.sidebar-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.sidebar-tools { margin: 0; }
#user-button, #user-button .cl-rootBox, #user-button .cl-userButton-root { width: 100%; }
#user-button .cl-userButtonTrigger { width: 100%; min-height: 52px; padding: 8px; background: transparent; color: #252525; border: 0; box-shadow: none; }
#user-button .cl-userButtonTrigger:hover { background: #eef0f2; }
#user-button .cl-userButtonBox { display: flex; flex-direction: row-reverse; width: 100%; justify-content: flex-end; gap: 10px; }
#user-button .cl-userButtonOuterIdentifier { padding: 0; text-align: left; white-space: normal; line-height: 1.4; }
#user-button .cl-avatarBox { flex: none; }
.mobile-navigation, .nav-caption { display: none; }
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); min-height: 44px; }
.page-header .actions { margin: 0 0 0 auto; }
.page-header .actions:empty { display: none; }
.page-header p { display: none; }

/* Stable panels, disclosure rows and section rhythm. */
section, details { border: 1px solid var(--line); border-radius: 12px; padding: var(--panel-space); margin: 0 0 var(--section-space); background: #fff; min-width: 0; }
section > :last-child, details > :last-child { margin-bottom: 0; }
section section, section details, details details { margin-top: 20px; }
summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 13px; font-weight: 600; line-height: 1.5; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid #7d8490; border-bottom: 1.5px solid #7d8490; transform: rotate(45deg); margin: -4px 4px 0 auto; flex: none; }
details[open] > summary { margin-bottom: 16px; }
details[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.inline-help { border: 0; border-radius: 0; padding: 0; background: transparent; margin: 16px 0 0; }
.inline-help > summary { justify-content: flex-start; width: fit-content; color: var(--muted); font-size: 12px; font-weight: 500; }
.inline-help > summary::after { margin-left: 8px; }
.inline-help p { max-width: 68ch; color: var(--muted); font-size: 12px; }
.cell-detail { border: 0; border-radius: 0; padding: 0; margin: 0; min-width: 112px; max-width: 350px; background: transparent; }
.cell-detail > summary { border: 1px solid #e9ebed; border-radius: 8px; min-height: 44px; padding: 10px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; background: #f9fafa; }
.cell-detail > summary:hover { background: var(--surface); }
.cell-detail pre { max-width: 44ch; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
pre { font: inherit; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { margin: 0; padding: 40px 16px; font-size: 13px; color: var(--muted); text-align: center; }
#error { color: #973d38; padding: 12px 0; margin: 0 0 16px; font-size: 13px; }
#error:empty, [role=status]:empty, .muted:empty, #rh-feed-error:empty, #paused-note:empty { display: none; }
.budget-warning, .connection-guidance { color: #79513a; font-size: 13px; line-height: 1.6; }
.connection-guidance { padding-left: 14px; border-left: 2px solid #c5a68e; }

/* Aligned form columns and a separate action row. */
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.5; min-width: 0; }
input, select { font: inherit; font-size: 14px; min-height: 44px; width: 100%; min-width: 0; padding: 10px 12px; color: #252525; border: 1px solid #d9dde2; border-radius: 10px; background: #fff; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237d8490' stroke-width='1.4'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; }
input:disabled, select:disabled { background-color: #f4f5f6; color: #717781; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 20px 24px; margin: 20px 0 24px; }
.wide { grid-column: 1/-1; }
fieldset { min-width: 0; padding: 20px 0 0; margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
legend { font-size: 15px; font-weight: 600; padding: 0 12px 0 0; }
fieldset > label { max-width: 400px; }
.check-label { flex-direction: row; align-items: flex-start; gap: 10px; margin: 18px 0; font-weight: 500; }
.check-label input { width: 18px; height: 18px; min-height: 18px; margin: 2px 0; flex: none; accent-color: #363a41; }
form > button { margin-top: 4px; min-width: 148px; }
#rule-fields { padding: 0; margin: 0; border: 0; }
#rule-fields:disabled { opacity: .6; }
#copy-rules-form > label { max-width: 440px; }
.rule-fields .check-label { align-self: start; padding-top: 24px; }
.budget-example { font-size: 12px; color: var(--muted); }
.step-status { font-weight: 400; color: var(--muted); }
.setup-steps { padding-left: 20px; line-height: 1.8; }
#instruction { padding: 20px; background: var(--surface); border-radius: 12px; margin-top: 20px; }

/* True tables: aligned numeric values, clear type hierarchy, one scroll region. */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.data-table { min-width: 0; width: 100%; }
.data-table.is-empty .data-table-scroll { border: 0; background: #fafbfb; }
.data-table.is-empty table { min-width: 0 !important; }
.data-table-toolbar, .data-table-tools, .data-table-footer, .table-pages { display: flex; align-items: center; gap: 12px; }
.data-table-toolbar { margin: 0 0 12px; flex-wrap: wrap; min-height: 44px; }
.data-table-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.data-table-toolbar > input { width: min(260px,100%); margin: 0; }
.data-table-tools { margin-left: auto; }
.data-table-scroll { max-height: 680px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
.data-table-scroll th { position: sticky; top: 0; z-index: 1; background: #fafbfb; }
.data-table-scroll td { padding-top: 18px; padding-bottom: 18px; }
.data-table-scroll tbody tr:hover { background: #f7f9fc; }
.data-table .table-sort { justify-content: flex-start; padding: 0; border: 0; border-radius: 3px; min-height: 32px; font: inherit; color: inherit; background: transparent; box-shadow: none; text-align: left; white-space: nowrap; }
.data-table .table-sort:hover { color: #15181d; background: transparent; }
.numeric-column .table-sort { margin-left: auto; }
.table-sort::after { display: none; }
.sort-arrow { font-size: 14px; color: #9299a3; opacity: 0; }
.table-sort:hover .sort-arrow, .table-sort:focus-visible .sort-arrow, th[aria-sort]:not([aria-sort=none]) .sort-arrow { opacity: 1; }
th[aria-sort]:not([aria-sort=none]) .sort-arrow { color: #222; }
.table-columns { position: relative; padding: 0; border: 0; margin: 0; background: transparent; }
.table-columns > summary { border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; min-height: 44px; font-size: 12px; margin: 0 !important; }
.column-choices { position: absolute; z-index: 4; right: 0; top: calc(100% + 6px); width: 220px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #00000012; }
.column-choices label { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px; min-height: 40px; font-size: 12px; margin: 0; cursor: pointer; }
.column-choices input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.data-table-footer { justify-content: space-between; flex-wrap: wrap; padding-top: 14px; color: var(--muted); font-size: 12px; }
.data-table-footer > label { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; font-size: 12px; }
.data-table-footer select { width: 74px; margin: 0; }
.table-pages > span { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.table-empty { padding: 36px 16px !important; text-align: center; color: var(--muted); }
@media(max-width:600px) {
  .data-table-toolbar > input { order: 3; width: 100%; }
  .data-table-tools { gap: 8px; }
  .data-table-tools > button { padding: 8px 10px; }
  .data-table-footer { gap: 12px; }
  .table-pages { width: 100%; justify-content: space-between; gap: 8px; }
}
table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 13px; }
th { padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f7f8f9; color: var(--muted); text-align: left; font-size: 12px; line-height: 1.4; font-weight: 600; white-space: nowrap; }
td { padding: 16px; border-bottom: 1px solid #edf0f2; vertical-align: top; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: normal; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
.numeric-column { text-align: right; white-space: nowrap; }
.contract-cell, .date-cell, .person-cell, .action-cell { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.contract-cell .ticker { font-size: 14px; letter-spacing: .3px; color: #171b20; }
.contract-cell > span { font-size: 12px; white-space: nowrap; }
.contract-cell small, .date-cell small, .person-cell small, .action-cell small { font-size: 11px; line-height: 1.5; }
.date-cell > span { white-space: nowrap; }
.action-cell strong { font-size: 13px; font-weight: 600; }
.person-cell { min-width: 160px; }
.person-cell small { font-size: 12px; overflow-wrap: anywhere; max-width: 260px; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.positive { color: #246843; }
.negative { color: #a0423d; }
.status-text { font-size: 12px; }
.row-actions { display: flex; align-items: flex-start; gap: 8px; }
.row-actions > :is(button,details) { flex: none; }
.row-actions button, .row-actions summary { white-space: nowrap; }
.access-menu > button { display: flex; width: 100%; margin-top: 10px; }
.access-menu[open] { min-width: 174px; }
.access-menu .inline-help { margin-top: 12px; }
#follower-list table { min-width: 720px; }
#follower-list td:last-child { width: 140px; }
#follower-count { margin-right: auto; }
#invite-panel:not([open]) { display: none; }
#workspace-strategies table, #workspace-followers table { min-width: 560px; }
#trade-report table { min-width: 830px; }
#trade-report td:last-child { min-width: 144px; }
#rule-comparison { margin-top: 12px; }
#rule-comparison table { min-width: 480px; }
#checks td:first-child { min-width: 150px; font-weight: 600; }
#checks td:nth-child(2) { min-width: 170px; }
#checks td:nth-child(3) { min-width: 210px; }
.copy-result { border-top: 1px solid var(--line); padding: 12px 0; }
.copy-result p { margin: 6px 0; font-size: 12px; }

/* One simulation summary; real account values stay inside Robinhood settings. */
.portfolio-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.portfolio-bar label { display: flex; flex-direction: row; align-items: center; gap: 12px; width: auto; max-width: 100%; color: var(--muted); font-size: 12px; font-weight: 400; }
.portfolio-bar select { width: 210px; font-size: 13px; }
#portfolio-description { display: none; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 40px; align-items: start; margin-bottom: 36px; }
.overview-grid > .results-panel { grid-column: 1; grid-row: 1; border: 0; padding: 0; margin: 0; }
.followed-strategy { grid-column: 2; grid-row: 1; padding: 24px; margin: 0; background: #fafbfb; }
.followed-strategy h2 { font-size: 16px; margin: 10px 0 4px; }
.portfolio-limits { display: block; margin: 24px 0; }
.portfolio-limits > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.portfolio-limits dt { font-size: 12px; }
.portfolio-limits dd { color: #252525; font-weight: 500; }
.strategy-shortcuts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.strategy-shortcuts .text-link { justify-content: center; font-size: 12px; font-weight: 400; }
.positions-panel { padding: 24px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.positions-panel .empty { background: #fafbfb; border-radius: 12px; }
.activity-panel { border: 0; padding: 0; }
[data-view=activity] > details { padding: 8px 0; border-width: 1px 0 0; border-radius: 0; background: transparent; }
[data-view=activity] > details > summary { font-weight: 500; color: var(--muted); }
[data-view=activity] > details > section { border: 0; padding: 8px 0; }
[data-view=workspace] > .results-panel { border: 0; padding: 0 0 32px; border-bottom: 1px solid var(--line); border-radius: 0; }
[data-view=workspace] > section:not(.results-panel), #follower-list-panel { border: 0; padding: 0; }
[data-view=workspace] > section:not(.results-panel) { margin-top: 36px; }
.followed-strategy .section-head { margin-bottom: 0; }
.followed-strategy p { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
#source-status, #my-rules-summary, #workspace-refresh { display: none; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.results-panel h2, #workspace-chart-total, .account-value-panel h2 { margin: 0; font-size: 40px; font-weight: 500; letter-spacing: -1px; line-height: 1.25; font-variant-numeric: tabular-nums; }
#results-chart, #workspace-results-chart { min-height: 224px; display: grid; align-items: center; }
#results-chart svg, #workspace-results-chart svg, #account-value-chart svg { display: block; width: 100%; height: auto; }
#chart-range, #workspace-chart-range { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
#personal-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.results-panel .cards { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.cards article { min-width: 0; padding: 0 24px; border-right: 1px solid var(--line); }
.cards article:first-child { padding-left: 0; }
.cards article:last-child { padding-right: 0; border-right: 0; }
.cards article p { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.cards article h2 { font-size: 24px; margin: 0; font-weight: 600; letter-spacing: -.4px; }
#workspace-note, #performance-note { color: var(--muted); font-size: 12px; }
#performance-details { padding-top: 8px; margin-top: 16px; }
.activity-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.report-actions { display: flex; align-items: center; gap: 12px; }
.report-actions > button { white-space: nowrap; }
.report-filters { grid-template-columns: 170px minmax(180px,300px); gap: 12px; margin: 0; flex: 1; }
#report-table-tools .data-table-toolbar { margin: 0; }
#report-table-tools .data-table-count { display: none; }
.sidebar button::after, #settings-navigation button::after { display: none; }
#workspace-strategy-field { width: 280px; max-width: 100%; }
.account-value-panel { padding: 0; border: 0; margin: 0; }
.account-value-panel .section-head { align-items: flex-start; }
.account-value-panel .text-link { font-size: 12px; }
.account-value-change { font-size: 13px; color: var(--muted); }
.account-chart-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.chart-periods { display: flex; gap: 4px; }
.chart-periods button { width: 44px; padding: 8px; color: var(--muted); background: transparent; border: 0; box-shadow: none; }
.chart-periods button[aria-pressed=true] { background: #eef0f2; color: #252525; }
#account-value-time { font-size: 11px; color: var(--muted); }

/* Settings are a single contained dialog, never a second scrolling page. */
#settings-dialog { width: min(1040px,calc(100vw - 64px)); max-width: none; height: min(800px,calc(100dvh - 64px)); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 90px #00000026; color: #252525; background: #fff; overflow: hidden; }
#settings-dialog::backdrop { background: #0006; }
.settings-layout { display: grid; grid-template-columns: 216px minmax(0,1fr); height: 100%; min-height: 0; position: relative; }
.settings-sidebar { background: #f8f9fa; border-right: 1px solid var(--line); padding: 28px 16px; }
.settings-sidebar h2 { margin: 0 12px 24px; font-size: 18px; }
#settings-content { padding: 36px; min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; scroll-padding: 24px; }
#settings-close { position: absolute; top: 8px; right: 8px; z-index: 1; }
.settings-pane > h2 { font-size: 23px; margin-bottom: 24px; padding-right: 22px; }
.settings-group, .settings-pane > section { padding: 0; border: 0; margin: 0; }
.settings-group > summary { display: none; }
.settings-pane p { max-width: 66ch; }
.settings-pane details { padding: 18px; margin-top: 20px; }
.settings-pane .inline-help { padding: 0; border: 0; }
.settings-pane .cell-detail { padding: 0; margin: 0; }
.settings-pane .settings-group { padding: 0; margin: 0; }
.settings-pane .fields { margin: 20px 0 24px; }
.settings-pane .actions { margin: 20px 0; }
.settings-pane .actions > :is(button,.button-link) { min-width: 148px; }
#channel-management, .settings-pane #budget-settings > section { padding: 0; border: 0; margin: 0; }
#channel-management > summary, #channel-management > .section-head > p, #broker-settings > p, #broker-settings > summary, #budget-settings > summary { display: none; }
#channel-management > .section-head { justify-content: flex-end; }
#budget-form > .fields { margin-top: 0; }
#rh-heading { margin-top: 0; font-size: 14px; font-weight: 600; }
#rh-options { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
#rh-options h3 { margin: 0 0 8px; }
#rh-options p { margin: 8px 0; }
#rh-connection-details #rh-limits { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
#rules-note { font-size: 12px; color: var(--muted); }
.callback-address { overflow-wrap: anywhere; font-size: 12px; }
dl { display: grid; grid-template-columns: minmax(130px,.8fr) minmax(0,1.4fr); gap: 16px; margin: 20px 0; font-size: 13px; line-height: 1.6; }
dt { font-weight: 500; color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
#master-deliveries-panel { padding: 0; border: 0; margin-top: 20px; }
#master-deliveries-panel > h2, #master-deliveries-panel > details { display: none; }
#market-validation-status { margin: 0; color: var(--muted); font-size: 13px; }

/* Strategy management and secondary practice tools. */
.strategy-list { margin: 0; }
.strategy-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.strategy-row:first-child { padding-top: 0; }
.strategy-row:last-child { border-bottom: 0; padding-bottom: 0; }
.strategy-row h2 { margin-bottom: 8px; font-size: 17px; }
.strategy-row p { font-size: 13px; color: var(--muted); margin: 8px 0; }
.strategy-actions, .creator-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.strategy-actions p { flex: 1; }
.creator-actions button { min-width: 145px; }
.creator-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; }
.creator-facts > span:last-child { flex-basis: 100%; }
.practice-picker { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.practice-picker label { flex: 1; min-width: 200px; }
#practice-result { margin-top: 24px; }
.calculator-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.calculator-results article { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.calculator-results p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.calculator-results strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.delivery-line { font-size: 12px; color: var(--muted); }
.budget-visual { display: flex; align-items: center; gap: 24px; }
.budget-ring { position: relative; width: 140px; height: 140px; flex: 0 0 140px; }
.budget-ring svg { width: 100%; height: 100%; }
.budget-ring circle { fill: none; stroke-width: 15; }
.ring-unused { stroke: #eceef1; }.ring-held { stroke: #404854; }.ring-pending { stroke: #9ca3af; }
.ring-caption { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.ring-caption strong { font-size: 24px; }.ring-caption span { font-size: 11px; color: var(--muted); }
.budget-breakdown { flex: 1; }.budget-breakdown dl { display: block; }.budget-breakdown dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.budget-breakdown dt { display: flex; align-items: center; gap: 8px; }.budget-dot { width: 8px; height: 8px; border-radius: 50%; }.budget-dot.held { background: #404854; }.budget-dot.pending { background: #9ca3af; }.budget-dot.unused { background: #eceef1; }

/* Sign-in uses the same visual scale without the private navigation. */
.login-home { display: none; }
.signed-out { background: #fafafa; }
.signed-out .sidebar, .signed-out .page-header { display: none; }
.signed-out main { margin: 0; max-width: none; padding: 0 20px; }
.signed-out .login-home { display: flex; align-items: center; gap: 8px; position: absolute; top: 28px; left: 32px; font-size: 18px; font-weight: 650; text-decoration: none; }
.signed-out #login { max-width: 440px; margin: 120px auto 60px; padding: 0; border: 0; background: none; text-align: center; }
.signed-out #login h2 { font-size: 30px; margin: 16px 0 8px; }
.signed-out #login > p { color: var(--muted); }
.login-kitty { object-fit: contain; }
#sign-in { display: flex; justify-content: center; margin-top: 28px; }
.signed-out #error { max-width: 440px; margin: 100px auto 0; }

/* Responsive navigation uses the same links and profile at every size. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#mobile-menu, #navigation-backdrop { display: none; }
@media(max-width:1180px) {
  :root { --sidebar-width: 208px; }
  main { padding: 28px 28px 56px; }
  .overview-grid { grid-template-columns: minmax(0,1fr) 232px; gap: 28px; }
  .followed-strategy { padding: 20px; }
  #settings-content { padding: 32px 26px; }
  .settings-layout { grid-template-columns: 196px minmax(0,1fr); }
}
@media(max-width:980px) {
  .overview-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .followed-strategy { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 24px; }
  .followed-strategy .eyebrow, .followed-strategy h2, .followed-strategy > p { grid-column: 1; }
  .portfolio-limits { display: flex; grid-column: 1/-1; gap: 24px; margin: 12px 0 0; }
  .portfolio-limits > div { gap: 12px; border: 0; }
  .strategy-shortcuts { grid-column: 2; grid-row: 1/4; justify-content: center; }
}
@media(max-width:740px) {
  :root { --panel-space: 20px; --section-space: 24px; }
  #mobile-menu { display: inline-flex; position: fixed; top: 16px; left: 12px; z-index: 10; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
  #mobile-menu svg { width: 20px; height: 20px; }
  .signed-out #mobile-menu { display: none; }
  .sidebar { width: 272px; transform: translateX(-100%); transition: transform .18s ease-out; z-index: 9; padding-top: 72px; }
  .sidebar-brand { margin-bottom: 24px; }
  .navigation-open { overflow: hidden; }
  .navigation-open .sidebar { transform: translateX(0); }
  #navigation-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: #0005; z-index: 8; }
  #navigation-backdrop::after { display: none; }
  main { margin: 0; padding: 20px 20px 40px; }
  .page-header { min-height: 40px; padding: 0 0 20px 48px; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
  h1 { font-size: 21px; }
  .page-header .actions { margin-left: auto; }
  .page-header button { font-size: 11px; padding: 8px 10px; min-width: 0; }
  .section-head { gap: 12px; }.section-head > label { width: 100%; }
  .fields { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .rule-fields .check-label { padding-top: 0; }
  .activity-controls { flex-wrap: wrap; gap: 12px; }
  .report-filters { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 12px; flex-basis: 100%; }
  #report-table-tools { margin-left: auto; }
  .results-panel h2, #workspace-chart-total, .account-value-panel h2 { font-size: 30px; }
  .cards article { padding: 0 14px; }.cards article h2 { font-size: 23px; }.cards article p { font-size: 11px; }
  .results-panel .section-head { align-items: flex-start; }.results-panel .text-link { font-size: 12px; }
  .portfolio-bar { margin-bottom: 24px; }.portfolio-bar label { width: 100%; }.portfolio-bar select { flex: 1; }
  .followed-strategy { display: block; padding: 20px; }
  .portfolio-limits { gap: 0; justify-content: space-between; margin: 16px 0; }
  .portfolio-limits > div { flex-direction: column; align-items: flex-start; gap: 4px; }
  .portfolio-limits dd { margin: 0; }
  .strategy-shortcuts { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .followed-strategy .text-link { font-size: 12px; }
  th { padding: 13px 14px; }td { padding: 14px; }
  #settings-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); border-radius: 18px; }
  .settings-layout { display: flex; flex-direction: column; }
  .settings-sidebar { padding: 20px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-sidebar h2 { margin: 0 0 14px; }
  .settings-sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
  .settings-sidebar nav button { min-width: 0; padding: 10px 12px; font-size: 12px; }
  #settings-content { padding: 24px 20px; flex: 1; }
  .settings-pane > h2 { font-size: 21px; }.settings-pane .actions { display: flex; }
  .settings-pane .actions > :is(button,.button-link) { flex: 1; min-width: 120px; }
  .settings-pane .creator-actions { display: grid; grid-template-columns: 1fr; }.creator-actions button { width: 100%; min-width: 0; }
  .calculator-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
  dl { grid-template-columns: 1fr; gap: 4px; }dd { margin-bottom: 12px; }
  .budget-visual { flex-direction: column; }.budget-breakdown { width: 100%; }
  .signed-out .login-home { top: 20px; left: 20px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
