:root {
  --bg: #f5f7f4;
  --surface: #fff;
  --ink: #203b32;
  --muted: #596b63;
  --line: #dce4dd;
  --green: #18553e;
  --light: #eaf2e9;
  --red: #b33332;
  --blue: #275aaa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    sans-serif;
  font-size: 18px;
  line-height: 1.65;
  word-break: keep-all;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 650;
  color: var(--ink);
  background: transparent;
  transition: background 0.15s;
}
button:hover {
  background: #e4ebe5;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #c1882c;
  outline-offset: 3px;
}
input,
select {
  background: #fff;
  border: 1.5px solid #aabbb0;
  border-radius: 9px;
  min-height: 56px;
  padding: 12px 14px;
  min-width: 0;
  color: var(--ink);
  width: 100%;
  font-size: 20px;
}
label {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.4;
  letter-spacing: -1.3px;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
}
strong {
  font-variant-numeric: tabular-nums;
}
small {
  font-size: 18px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--muted);
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 8px;
}
.primary {
  background: var(--green);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  padding: 14px 25px;
}
.primary:hover {
  background: #103f2d;
}
.secondary {
  background: #edf1ed;
  border: 1px solid var(--line);
}
.quiet {
  color: var(--muted);
  font-size: 18px;
}
.wide {
  width: 100%;
  justify-content: space-between;
}
.brand {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1.2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-dot {
  color: var(--green);
  margin-left: -9px;
}
.brand-icon {
  background: var(--green);
  color: white;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  text-align: center;
  line-height: 38px;
  font-size: 29px;
}
.heading-dot {
  color: #5b865b;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 0;
  z-index: 5;
  background: white;
  padding: 16px;
}
header {
  background: white;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px;
  margin: auto;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 20px;
}
.private-label {
  font-size: 17px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  background: #4e7755;
  border-radius: 50%;
  height: 8px;
  width: 8px;
  margin-right: 8px;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 42px 40px 20px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.page-heading p {
  margin-top: 9px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 16px;
}
.tab {
  border-radius: 0;
  padding: 12px 8px;
  border-bottom: 3px solid transparent;
}
.tab.active {
  border-color: var(--green);
  color: var(--green);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.stat > span {
  font-size: 18px;
  color: var(--muted);
}
.stat strong {
  font-size: 36px;
  line-height: 1.6;
  font-weight: 650;
}
.stat small {
  margin-left: 8px;
  font-weight: 400;
}
.stat p {
  font-size: 16px;
  color: var(--muted);
  margin-top: 7px;
}
.stat.accent {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.stat.accent span,
.stat.accent p {
  color: #e0ecdf;
}
.stat .date-value {
  font-size: 27px;
  line-height: 2.14;
}
.mini {
  float: right;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.select-label {
  font-size: 16px;
  color: var(--muted);
  min-width: 200px;
  margin: 0;
}
.select-label select {
  font-size: 18px;
  margin-top: 4px;
}
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.chart-toolbar strong {
  font-size: 32px;
  margin-right: 14px;
}
.pill {
  display: inline-block;
  font-size: 17px;
  border-radius: 7px;
  background: var(--light);
  padding: 4px 10px;
}
.positive {
  color: var(--red);
}
.negative {
  color: var(--blue);
}
.segments {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.segments button {
  font-size: 17px;
  padding: 8px 15px;
}
.segments .active {
  background: var(--light);
  color: var(--green);
}
.chart {
  height: 300px;
  margin-top: 16px;
  position: relative;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart svg text {
  font-family: inherit;
  font-size: 15px;
  fill: var(--muted);
}
.chart circle {
  fill: var(--green);
  stroke: white;
  stroke-width: 3;
}
.chart-foot {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  color: var(--muted);
}
.chart-foot i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 32px 0 16px;
}
.count {
  background: #e4ebe1;
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 17px;
}
.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stock-card {
  text-align: left;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: block;
  width: 100%;
  font-weight: 400;
}
.stock-card.selected {
  border: 2px solid var(--green);
  padding: 23px;
}
.stock-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.stock-top b {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.stock-card strong {
  display: block;
  font-size: 27px;
}
.stock-card .muted {
  font-size: 16px;
}
.stock-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 17px;
}
.records-panel {
  margin-top: 32px;
}
.backup-actions {
  display: flex;
  gap: 8px;
}
.record-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.search {
  position: relative;
  max-width: 380px;
  margin: 0;
  flex: 1;
}
.search span {
  position: absolute;
  left: 14px;
  top: 5px;
  font-size: 30px;
}
.search input {
  padding-left: 46px;
  font-size: 18px;
}
.table-head,
.record-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1.1fr 1fr 130px;
  align-items: center;
  gap: 16px;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
}
.table-head {
  font-size: 17px;
  background: #f5f7f4;
  color: var(--muted);
  border-radius: 8px;
}
.record-row .symbol {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  gap: 8px;
}
.row-actions button {
  padding: 8px;
  min-width: 52px;
  font-size: 17px;
}
.mobile-label {
  display: none;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.empty-symbol {
  font-size: 35px;
  background: var(--light);
  color: var(--green);
  border-radius: 15px;
  width: 64px;
  height: 64px;
}
.empty h3 {
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.empty p {
  max-width: 470px;
}
.stock-grid > .empty {
  grid-column: 1/-1;
  min-height: 180px;
  border: 1px dashed #b1c2b5;
  border-radius: 14px;
}
.chart > .empty {
  height: 100%;
}
.pagination {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}
.pagination:empty {
  display: none;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
  color: var(--muted);
  font-size: 15px;
}
footer > span:last-child {
  text-align: right;
}
.brand-small {
  font-weight: 750;
  font-size: 19px;
}
dialog {
  border: 0;
  border-radius: 20px;
  padding: 32px;
  max-width: 700px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 24px 90px #16382f33;
}
dialog::backdrop {
  background: #102d2677;
}
dialog p {
  margin: 10px 0 24px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.icon-button {
  font-size: 32px;
  width: 52px;
  padding: 0;
  background: #f0f4f0;
}
.rows-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
  font-weight: 650;
}
.rows-label span:last-child {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}
.entry-row {
  background: #f3f6f2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.entry-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.entry-row-head button {
  padding: 8px 12px;
}
.entry-fields {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 16px;
}
.entry-fields label:first-child {
  grid-column: 1/-1;
}
.entry-fields label {
  font-size: 18px;
  margin: 0;
}
.entry-fields input,
.entry-fields select {
  margin-top: 6px;
}
.add-row {
  border: 1.5px dashed #86a38e;
  color: var(--green);
  width: 100%;
  background: #fff;
  min-height: 58px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.error {
  color: var(--red);
  font-size: 18px;
  min-height: 0;
}
.error:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  background: #203b32;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  z-index: 10;
  font-size: 18px;
  width: max-content;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 70% 30%, #e3ebdf, transparent 60%);
}
[hidden] {
  display: none !important;
}
.login-card {
  max-width: 490px;
  width: 100%;
  background: white;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
}
.login-card .brand {
  margin-bottom: 44px;
}
.login-card h1 {
  font-size: 36px;
  margin-bottom: 16px;
}
.login-card form {
  margin-top: 32px;
}
.login-card form button {
  margin-top: 22px;
}
.login-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 16px;
  color: var(--muted);
}
@media (min-width: 1500px) {
  main,
  .header-inner {
    max-width: 1380px;
  }
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-head,
  .record-row {
    grid-template-columns: 1fr 1.2fr 1fr 1fr 120px;
    gap: 10px;
  }
  main {
    padding: 32px 24px;
  }
  .header-inner {
    padding: 18px 24px;
  }
  footer {
    flex-wrap: wrap;
  }
  footer > span:last-child {
    text-align: left;
    width: 100%;
  }
}
@media (max-width: 700px) {
  body {
    font-size: 18px;
  }
  .header-inner {
    padding: 12px 18px;
  }
  .brand {
    font-size: 23px;
  }
  .private-label {
    display: none;
  }
  .header-end {
    gap: 0;
  }
  .quiet {
    padding: 10px 12px;
  }
  main {
    padding: 28px 18px 16px;
  }
  .page-heading {
    display: block;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading .primary {
    width: 100%;
    margin-top: 22px;
    min-height: 60px;
  }
  .eyebrow {
    font-size: 16px;
  }
  .topline {
    display: block;
  }
  .topline > #today {
    display: none;
  }
  .tabs {
    gap: 20px;
  }
  .tab {
    font-size: 19px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat > span {
    font-size: 17px;
  }
  .stat strong {
    font-size: 30px;
  }
  .stat .date-value {
    font-size: 23px;
  }
  .stat p {
    font-size: 16px;
  }
  .stat small {
    font-size: 16px;
    margin-left: 4px;
  }
  .mini {
    display: none;
  }
  .panel {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .panel-heading {
    flex-wrap: wrap;
    gap: 16px;
  }
  h2 {
    font-size: 23px;
  }
  .select-label {
    width: 100%;
  }
  .chart-toolbar {
    flex-wrap: wrap;
  }
  .chart-toolbar > div:first-child {
    width: 100%;
  }
  .chart-toolbar strong {
    font-size: 29px;
  }
  .segments {
    width: 100%;
  }
  .segments button {
    flex: 1;
    font-size: 18px;
  }
  .chart {
    height: 250px;
  }
  .chart-foot {
    flex-direction: column;
    gap: 6px;
    font-size: 16px;
  }
  .section-heading > .muted {
    font-size: 16px;
  }
  .stock-grid {
    grid-template-columns: 1fr;
  }
  .stock-card {
    padding: 20px;
  }
  .stock-card.selected {
    padding: 19px;
  }
  .record-filters {
    flex-wrap: wrap;
  }
  .search {
    max-width: none;
    flex-basis: 100%;
  }
  .table-head {
    display: none;
  }
  .record-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px 0;
    gap: 10px 12px;
  }
  .record-row .symbol {
    grid-row: 1;
    grid-column: 1;
    font-size: 21px;
  }
  .record-row .record-date {
    grid-row: 2;
    grid-column: 1/-1;
    color: var(--muted);
    font-size: 17px;
  }
  .record-row .record-price {
    grid-row: 3;
    grid-column: 1;
    font-size: 22px;
  }
  .record-row .record-return {
    grid-row: 3;
    grid-column: 2;
    text-align: right;
  }
  .row-actions {
    grid-row: 1;
    grid-column: 2;
    justify-content: flex-end;
  }
  .row-actions button {
    background: #f2f5f0;
  }
  .mobile-label {
    display: block;
    font-size: 15px;
    color: var(--muted);
  }
  .backup-actions {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .backup-actions button {
    flex: 1;
  }
  .empty {
    padding: 24px 12px;
  }
  .empty p {
    font-size: 17px;
  }
  footer {
    gap: 12px;
    padding: 28px 0;
    font-size: 16px;
  }
  footer > span {
    width: 100%;
  }
  dialog {
    padding: 24px 18px;
    max-height: 94dvh;
    width: calc(100% - 20px);
  }
  .modal-actions button {
    flex: 1;
  }
  .entry-fields {
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 12px;
  }
  .entry-row {
    padding: 14px;
  }
  .rows-label {
    flex-direction: column;
    gap: 2px;
  }
  .login-card {
    padding: 28px 22px;
  }
  .login-card h1 {
    font-size: 32px;
  }
  .login-card .brand {
    margin-bottom: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.holding-details {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
.holding-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 0;
}
.holding-details dt {
  color: var(--muted);
}
.holding-details dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}
.stock-price .muted {
  display: block;
}
.stock-bottom {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.card-hint {
  display: block;
  text-align: right;
  color: var(--green);
  font-size: 16px;
  margin-top: 16px;
}
.trade-badge {
  display: inline-block;
  border-radius: 6px;
  background: #edf1eb;
  padding: 3px 9px;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
}
.record-date .trade-badge {
  display: table;
  margin-top: 6px;
}
.trade-badge.buy {
  color: #a12d2d;
  background: #fff0ec;
}
.trade-badge.sell {
  color: #235898;
  background: #edf4ff;
}
.trade-total {
  display: block;
  font-size: 16px;
  color: var(--muted);
}
.type-picker {
  border: 0;
  padding: 0;
  margin: 8px 0 20px;
  display: flex;
  gap: 10px;
}
.type-picker legend {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 10px;
}
.type-picker label {
  position: relative;
  flex: 1;
  margin: 0;
}
.type-picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
}
.type-picker span {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  border: 1.5px solid #aabbb0;
  border-radius: 9px;
  background: white;
  font-size: 20px;
}
.type-picker input:checked + span {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.type-picker input:focus-visible + span {
  outline: 3px solid #c1882c;
  outline-offset: 3px;
}
.quantity-label {
  grid-column: 1/-1;
}
.entry-row .entry-help {
  font-size: 17px;
  margin: 16px 0 0;
  color: var(--muted);
}
.entry-total {
  font-size: 21px;
  font-weight: 700;
  padding-top: 12px;
}
.entry-total:empty {
  display: none;
}
.stat > span {
  line-height: 1.5;
}
.record-price strong {
  overflow-wrap: anywhere;
}
.stock-top {
  align-items: start;
}
#confirm-message {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .record-date .trade-badge {
    display: inline-block;
    margin: 0 0 0 12px;
  }
  .record-row .record-price {
    font-size: 21px;
  }
  .stock-grid {
    gap: 14px;
  }
  .type-picker {
    gap: 8px;
  }
  .type-picker span {
    font-size: 19px;
  }
  .stock-top .trade-badge {
    font-size: 17px;
  }
  .holding-details {
    font-size: 19px;
  }
  .brand-dot {
    display: none;
  }
  .brand {
    font-size: 22px;
  }
  .stock-bottom {
    font-size: 18px;
  }
}
#record-modal .modal-actions {
  position: sticky;
  bottom: -32px;
  background: var(--surface);
  padding-bottom: 16px;
  z-index: 2;
}
button:active {
  filter: brightness(0.94);
}
@media (max-width: 700px) {
  #record-modal .modal-actions {
    bottom: -24px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}
.entry-fields .manual-symbol-label {
  grid-column: 1/-1;
}
.symbol-select {
  font-size: 19px;
}
.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.summary-heading label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
}
.summary-heading select {
  width: auto;
  font-size: 18px;
}
.summary-extra {
  margin: -10px 0 26px;
  font-size: 17px;
}
.stat strong {
  font-size: 28px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.broker-group {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 16px;
  background: #edf2eb;
}
.broker-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.broker-heading h3 {
  font-size: 25px;
  margin: 0;
  overflow-wrap: anywhere;
}
.broker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  padding: 18px 0 22px;
  border-top: 1px solid #c7d6c7;
  align-items: center;
}
.broker-summary > div {
  flex: 1;
  min-width: 140px;
}
.broker-summary > div > span {
  display: block;
  color: var(--muted);
  font-size: 17px;
}
.broker-summary strong {
  display: block;
  font-size: 21px;
  overflow-wrap: anywhere;
}
.currency-badge {
  background: white;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 17px;
}
.record-broker {
  display: block;
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
}
.entry-fields .broker-label,
.entry-fields .manual-broker-label,
.entry-fields .symbol-label {
  grid-column: 1/-1;
}
#stock-cards > .empty {
  border: 1px dashed #b1c2b5;
  border-radius: 14px;
}
@media (max-width: 700px) {
  .summary-heading {
    align-items: flex-start;
  }
  .summary-heading h2 {
    font-size: 22px;
  }
  .summary-heading label {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 16px;
  }
  .summary-heading select {
    min-height: 48px;
    padding: 8px 12px;
  }
  .stat strong {
    font-size: 24px;
  }
  .broker-group {
    padding: 18px 12px;
  }
  .broker-heading {
    padding: 0 4px;
  }
  .broker-heading h3 {
    font-size: 23px;
  }
  .broker-summary {
    gap: 14px;
    align-items: flex-start;
  }
  .broker-summary > div {
    min-width: calc(50% - 14px);
  }
  .currency-badge {
    flex-basis: 100%;
    width: max-content;
    flex-grow: 0;
  }
  .broker-summary strong {
    font-size: 20px;
  }
  .broker-group .stock-card {
    padding: 18px 14px;
  }
  .broker-group .stock-card.selected {
    padding: 17px 13px;
  }
  .summary-extra {
    font-size: 17px;
  }
}
.stock-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stock-item .stock-card {
  flex: 1;
}
.move-broker {
  font-size: 18px;
  width: 100%;
  background: #fff;
}
#move-custom-label {
  margin-top: 18px;
}
#move-description {
  overflow-wrap: anywhere;
}
.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-stats strong {
  font-size: 36px;
}
.compact-stats p {
  font-size: 17px;
}
.compact-stats {
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .compact-stats strong {
    font-size: 30px;
  }
  .compact-stats > article {
    padding: 18px 14px;
  }
  .compact-stats > article > span {
    font-size: 18px;
  }
  .compact-stats p {
    font-size: 16px;
  }
}
.broker-filter-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 18px;
}
.broker-filter-label select {
  min-width: 200px;
  width: auto;
  font-size: 20px;
}
@media (max-width: 700px) {
  .stocks-section > .section-heading {
    flex-wrap: wrap;
  }
  .broker-filter-label {
    width: 100%;
    align-items: center;
  }
  .broker-filter-label select {
    min-width: 0;
    flex: 1;
  }
}
.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  margin-top: 24px;
}
.chart-controls .segments {
  width: auto;
}
.chart-selectors {
  display: flex;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}
.chart-selectors label {
  font-size: 18px;
  min-width: 140px;
  margin: 0;
}
.chart-selectors select {
  margin-top: 6px;
  font-size: 19px;
}
.chart-value-label {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}
#chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
#chart-legend .cost-line {
  width: 20px;
  height: 0;
  border-top: 3px dashed #956525;
  background: transparent;
  border-radius: 0;
  vertical-align: middle;
}
.chart circle[data-series="costBasis"] {
  fill: #956525;
}
#chart-view {
  margin-top: 0;
}
#history {
  margin-top: 0;
}
.tabs {
  gap: 12px;
}
@media (max-width: 700px) {
  .tabs {
    justify-content: space-between;
    gap: 4px;
  }
  .tab {
    padding: 12px 6px;
    font-size: 18px;
    white-space: nowrap;
  }
  .chart-controls {
    display: block;
  }
  .chart-controls > .segments {
    width: 100%;
    margin-bottom: 16px;
  }
  .chart-scope button {
    flex: 1;
  }
  .chart-selectors {
    width: 100%;
    gap: 12px;
    margin-bottom: 16px;
  }
  .chart-selectors label {
    flex: 1;
    min-width: 0;
  }
  .chart-selectors select {
    width: 100%;
  }
  #chart-metrics button {
    font-size: 18px;
    flex: 1;
    padding: 10px;
  }
  .chart-value-label {
    font-size: 18px;
  }
  .chart-panel > .panel-heading {
    align-items: start;
  }
  .chart-controls .segments {
    max-width: 100%;
  }
}
