:root {
  font-family: var(--brand-font, system-ui, sans-serif);
  color: #172b43;
  background: #f4f6f9;
  --teal: #135fae;
  --border: #dbe4ee;
  --ink: #172b43;
  --muted: #465b72;
  --paper: #fff;
  --gold: #dfbd79;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a {
  color: var(--teal);
}
:focus-visible {
  outline: 3px solid #2674ca;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 9;
  background: white;
  padding: 0.7rem;
}
.skip:focus {
  top: 1rem;
}
#sidebar {
  width: 235px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #172b43;
  color: #f9faf5;
  display: flex;
  flex-direction: column;
  padding: 30px 16px max(22px, env(safe-area-inset-bottom));
  overflow: auto;
}
.brand,
.mobilebrand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
}
.brand {
  padding: 0 9px 32px;
  font-size: 1.3rem;
}
.brand img,
.mobilebrand img {
  border-radius: 11px;
  object-fit: contain;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.035em;
  color: #d9c99f;
}
.icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
nav button,
.profile {
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  border: 0;
  text-align: left;
  min-height: 46px;
  color: inherit;
}
.navbtn {
  width: 100%;
  border-radius: 10px;
  padding: 10px 14px;
  color: #e3eee7;
  margin: 2px 0;
  font-weight: 520;
}
.navbtn[aria-current='page'] {
  background: #265149;
  color: #fff;
}
.navbtn:hover,
.profile:hover {
  background: #21423c;
}
.profile {
  margin-top: auto;
  border-top: 1px solid #dbe4ee;
  padding: 18px 8px 0;
  overflow-wrap: anywhere;
}
.avatar,
.symbol {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #e2eee4;
  color: #28614e;
  font-weight: 650;
}
.shell {
  margin-left: 235px;
}
header {
  height: 78px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 65px);
}
.breadcrumb {
  color: var(--muted);
  font-size: 0.92rem;
}
.mobilebrand,
#mobile {
  display: none;
}
#switches {
  display: flex;
  gap: 10px;
  min-width: 0;
  align-items: center;
}
#switches select {
  font: inherit;
  padding: 7px 4px;
  max-width: 210px;
  border: 0;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
main {
  max-width: 1390px;
  margin: auto;
  padding: clamp(22px, 4vw, 56px) clamp(18px, 4vw, 64px) 70px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.055em;
  line-height: 1.04;
  font-weight: 680;
}
h2 {
  font-size: 1.32rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.04rem;
}
.head,
.row,
.actions,
.cardhead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.head,
.cardhead {
  justify-content: space-between;
}
.head {
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.kicker,
.meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.kicker {
  margin: 0 0 7px;
}
.primary,
.outline,
.light,
.textbtn,
.iconbtn {
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary {
  background: var(--teal);
  color: #fff;
}
.primary:hover {
  background: #0c4d92;
}
.outline,
.iconbtn {
  background: white;
  border-color: #c4d4e6;
  color: #234b73;
}
.light {
  background: #f4e6c7;
  color: #322a16;
}
.textbtn {
  color: #135fae;
  background: transparent;
}
.iconbtn {
  padding: 9px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(22px, 3.4vw, 42px);
  background: #172b43;
  color: #fff;
  border-radius: 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hero:after {
  content: '';
  position: absolute;
  inset: -150% -55% -150% 46%;
  z-index: -1;
  opacity: 0.24;
  pointer-events: none;
  background: repeating-radial-gradient(
    ellipse at center,
    transparent 0 21px,
    #b5a576 22px 23px,
    transparent 24px 39px
  );
  transform: rotate(-22deg);
}
.hero .meta {
  color: #edf3fc;
}
.hero h2 {
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
  margin: 0.4rem 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.stats,
.columns {
  display: grid;
  gap: 16px;
}
.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 24px;
}
.stat,
.panel {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 17px;
}
.stat {
  padding: 18px;
}
.stat strong {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 4px;
}
.stat .symbol {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  float: right;
}
.columns {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}
.panel {
  padding: clamp(16px, 2.1vw, 26px);
  min-width: 0;
  margin-bottom: 16px;
}
.cardhead {
  margin-bottom: 14px;
}
.cardhead > h2 {
  overflow-wrap: anywhere;
}
.list {
  display: grid;
}
.listitem {
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid #e6ebe4;
  padding: 14px 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.listitem:first-child {
  border-top: 0;
}
.listitem .copy {
  flex: 1;
  min-width: 0;
}
.listitem h3 {
  margin: 0 0 4px;
}
.listitem .symbol {
  border-radius: 12px;
}
.listitem .time {
  min-width: 3.25em;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #476153;
}
.pill {
  display: inline-block;
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 580;
  padding: 3px 9px;
  border-radius: 8px;
  background: #edf1ec;
  color: #395344;
}
.pill.warn {
  background: #f8e8c6;
  color: #724b10;
}
.pill.done {
  background: #dcefdc;
  color: #315f39;
}
.empty {
  color: var(--muted);
  line-height: 1.55;
  padding: 12px 0;
}
.filters,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filters {
  margin-bottom: 18px;
}
.filters button {
  border: 1px solid #c2d0c4;
  border-radius: 99px;
  background: #fff;
  padding: 9px 16px;
  min-height: 44px;
  color: var(--ink);
}
.filters button[aria-pressed='true'] {
  background: #234d42;
  color: #fff;
  border-color: #234d42;
}
.form {
  display: grid;
  gap: 15px;
}
.form label,
.form legend {
  font-size: 0.95rem;
  font-weight: 570;
}
.form label {
  display: grid;
  gap: 6px;
}
.form input,
.form select,
.form textarea {
  border: 1px solid #a9bbb0;
  background: white;
  color: var(--ink);
  border-radius: 9px;
  min-height: 45px;
  padding: 9px 11px;
  width: 100%;
}
.form textarea {
  resize: vertical;
  min-height: 80px;
}
.form label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
  font-weight: 400;
}
.form input[type='checkbox'] {
  min-height: 0;
  width: 20px;
  height: 20px;
  flex: none;
  margin: 3px 0;
  accent-color: var(--teal);
}
.form .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 6px;
}
.error {
  color: #8e341e;
  font-weight: 580;
  line-height: 1.4;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--ink);
  padding: 24px;
  width: min(480px, calc(100% - 24px));
  max-height: 90dvh;
}
dialog::backdrop {
  background: #07251db3;
}
dialog .cardhead {
  align-items: flex-start;
}
dialog .context {
  border-left: 3px solid var(--gold);
  padding: 5px 10px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: var(--muted);
}
.report p {
  margin: 5px 0;
}
.report section {
  margin: 18px 0;
}
.report .listitem {
  break-inside: avoid;
}
.long {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.tools button {
  justify-content: flex-start;
  text-align: left;
  min-height: 55px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #153c32;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 24px #172b4326;
  z-index: 6;
  max-width: 90vw;
}
.onboard {
  max-width: 720px;
}
.onboard p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}
.money {
  font-size: 2rem;
}
.only-print {
  display: none;
}
@media (max-width: 1000px) {
  #sidebar {
    width: 202px;
  }
  .shell {
    margin-left: 202px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 13px;
  }
  .stat .symbol {
    display: none;
  }
}
@media (max-width: 760px) {
  #sidebar,
  .breadcrumb {
    display: none;
  }
  .shell {
    margin: 0;
  }
  .mobilebrand {
    display: flex;
    font-size: 1rem;
    white-space: nowrap;
  }
  header {
    height: auto;
    min-height: 65px;
    padding: 8px 14px;
    gap: 5px;
  }
  #switches {
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  #switches select {
    font-size: 0.875rem;
    max-width: 145px;
    min-height: 32px;
  }
  #mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: #fffffff9;
    border-top: 1px solid var(--border);
    padding: 4px 2px max(4px, env(safe-area-inset-bottom));
    align-items: center;
  }
  #mobile button {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 0.76rem;
    line-height: 1.25;
    min-width: 0;
    min-height: 50px;
    color: var(--muted);
    border-radius: 9px;
    padding: 2px;
  }
  #mobile button[aria-current='page'] {
    color: #135fae;
    background: #e8f1fd;
    font-weight: 700;
  }
  main {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
  }
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats {
    gap: 6px;
  }
  .stat {
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }
  .stat .meta {
    font-size: 0.83rem;
  }
  .stat strong {
    font-size: 1.45rem;
  }
  .listitem {
    gap: 8px;
  }
  .listitem .symbol {
    display: none;
  }
  .listitem .time {
    min-width: 2.75em;
  }
  .head {
    gap: 10px;
  }
  .head .primary {
    padding: 8px 12px;
  }
  #notice:not(:empty) {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .form .pair {
    grid-template-columns: 1fr;
  }
  .mobilebrand img {
    width: 29px;
    height: 29px;
  }
}
@media (max-width: 380px) {
  #switches select {
    max-width: 110px;
  }
  .stat .meta {
    font-size: 0.8rem;
  }
  .panel {
    padding: 13px;
  }
  .head {
    align-items: flex-start;
  }
}
@media print {
  html,
  body,
  main,
  .shell {
    background: #fff !important;
    margin: 0;
    padding: 0;
    color: #111;
  }
  .only-print {
    display: block;
  }
  #sidebar,
  header,
  #mobile,
  #modal,
  #notice,
  .head,
  .noprint,
  .skip {
    display: none !important;
  }
  .panel.report {
    padding: 0;
    border: 0;
  }
  .report .symbol {
    display: none;
  }
  .report .listitem {
    padding: 8px 0;
  }
  .report h2 {
    font-size: 1.5rem;
  }
  @page {
    margin: 15mm;
  }
}
#switches {
  overflow: hidden;
}
#switches select {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
