:root {
  font: clamp(16px, 15px + .2vw, 18px)/1.5 "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  --ink: #183054;
  --muted: #536784;
  --line: #dbe5f3;
  --blue: #265cdf;
  --deep: #173a96;
  --paper: #fff;
  color: var(--ink);
  background: #f2f6fd;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 90% 0%, #dfeaff 0, transparent 42rem), #f3f7fe; }
a { color: var(--deep); text-underline-offset: .24em; }
header { background: #12274d; color: #fff; }
.header-shell { width: min(89rem, 100% - 2.5rem); margin: auto; min-height: 5.15rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.2rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; font-size: .94rem; }
.brand strong { display: block; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .8rem; background: #80aaff; color: #12274d; font-size: 1.2rem; font-weight: 800; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
nav a, button.quiet { color: #eff4ff; text-decoration: none; padding: .55rem .76rem; border-radius: .55rem; font-size: .92rem; }
nav a:hover, nav a[aria-current="page"] { background: #2b4370; }
nav form { margin-left: .35rem; }
button.quiet { min-height: 2.35rem; background: transparent; border: 1px solid #7b90b3; }
button.quiet:hover { background: #2b4370; }
main { width: min(89rem, 100% - 2.5rem); margin: 2rem auto 3rem; }
h1 { margin: 0 0 .35rem; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.04em; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .7rem; }
p { margin: .35rem 0 1rem; color: var(--muted); }
.login, .entry { max-width: 49rem; margin: 2rem auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 1.15rem; padding: clamp(1.3rem, 5vw, 3rem); box-shadow: 0 .75rem 2.75rem #24467713; }
.login { max-width: 32rem; margin-top: clamp(2rem, 8vh, 6.5rem); border-top: .28rem solid #6798ff; }
.login p:last-child { margin-bottom: 0; }
label { display: grid; gap: .4rem; font-size: .95rem; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 3.15rem; padding: .65rem .85rem; border-radius: .65rem; border: 1px solid #adc0dc; color: var(--ink); background: #fff; font: inherit; }
input::placeholder { color: #667b98; }
input:hover, select:hover { border-color: #708fbf; }
.login form, .entry form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.fields { display: grid; gap: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
button, .button { font: 650 .98rem "Segoe UI", system-ui, sans-serif; display: inline-grid; place-items: center; min-height: 3.15rem; padding: .65rem 1rem; border-radius: .65rem; border: 1px solid transparent; color: #fff; background: var(--blue); text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #1c47b7; }
button.secondary, .button.secondary { background: #edf3ff; color: var(--deep); border-color: #c4d4f4; }
button.secondary:hover, .button.secondary:hover { background: #dfebff; }
.heading, .range { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.heading { justify-content: space-between; align-items: start; margin: 1.6rem 0 .8rem; }
.heading p { margin-bottom: 0; }
.range { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; }
.ledger-bar { margin-bottom: 1.1rem; }
.ledger-bar select { min-width: 12rem; }
.totals { display: grid; gap: .8rem; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 1rem 0; }
.totals > div { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; border-top: .22rem solid #9ab8ff; }
.totals > div:last-child { background: #e4edff; border-top-color: #386ae4; }
dt { font-size: .92rem; color: var(--muted); }
dd { margin: .3rem 0 0; overflow-wrap: anywhere; font-weight: 750; font-size: clamp(1.05rem, 2.5vw, 1.45rem); font-variant-numeric: tabular-nums; }
.grid { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .72rem .9rem; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #e9f0ff; color: #233f72; font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #f8faff; }
td:not(:nth-child(2)), th:not(:nth-child(2)) { white-space: nowrap; }
td:nth-child(n+3), th:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
td a { display: inline-block; padding: .2rem .5rem; border-radius: .4rem; border: 1px solid #d2def3; text-decoration: none; background: #f1f6ff; }
.account-list { list-style: none; padding: 0; }
.account-list li { display: grid; padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
.account-list span { color: var(--muted); }
.error { color: #8a2032; background: #fff0f2; border: 1px solid #f4d3da; border-radius: .55rem; padding: .65rem .8rem; }
:focus-visible { outline: 3px solid #7f9ff7; outline-offset: 2px; }
@media (max-width: 700px) {
  main, .header-shell { width: calc(100% - 1.5rem); }
  main { margin-top: 1rem; }
  nav { width: 100%; }
  nav a, button.quiet { padding-inline: .55rem; }
  .totals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .range { align-items: stretch; }
  .range label { flex: 1 1 9rem; }
  .ledger-bar label { flex-basis: 100%; }
  .ledger-bar select { min-width: 0; }
}

.sign-in-page { background: radial-gradient(ellipse at 10% 0%, #d7e4f1, transparent 56%), #f1ebe3; }
.sign-in-page > header { display: none; }
.sign-in-page > main {
  width: min(67rem, 100% - 2rem);
  min-height: 100vh;
  margin: auto;
  display: grid;
  align-items: center;
  padding-block: 2rem;
}
.welcome-layout {
  --welcome-ink: #17253b;
  --welcome-gold: #eec783;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 29rem;
  overflow: hidden;
  border-radius: 1.35rem;
  background: #fffdf9;
  box-shadow: 0 1.4rem 4rem #25294722;
}
.welcome-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.3rem);
  background: radial-gradient(ellipse at 88% 117%, #344e66, transparent 68%), #19293c;
  color: #fff7e9;
}
.welcome-copy { position: relative; z-index: 1; max-width: 24rem; }
.welcome-mark {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 2.1rem;
  border-radius: .65rem;
  border: 1px solid #eec78377;
  font: 1.65rem Georgia, serif;
  color: var(--welcome-gold);
}
.welcome-copy h1 { font: 400 clamp(2.35rem, 4.8vw, 3.8rem)/1 Georgia, serif; letter-spacing: -.042em; text-wrap: balance; }
.welcome-copy h1 span { display: block; font: 600 clamp(1rem, 1.8vw, 1.4rem)/1.35 "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; color: var(--welcome-gold); margin-bottom: .4rem; }
.welcome-copy p { max-width: 17rem; margin: 1.2rem 0 0; color: #e0e8f1; }
.welcome-art {
  position: absolute;
  right: -4.5rem;
  bottom: -10rem;
  width: clamp(19rem, 48vw, 39rem);
  aspect-ratio: 1;
  transform: rotate(-15deg);
  border-radius: 50%;
  border: 1px solid #eec7833c;
  box-shadow: 0 0 0 2.5rem #eec78309, 0 0 0 5.3rem #eec78308, 0 0 0 8rem #eec78306;
  background: repeating-linear-gradient(90deg, transparent 0 2.75rem, #eec78313 2.75rem 2.8rem);
  pointer-events: none;
}
.welcome-sheet { position: absolute; inset: 25% 22%; padding: 1.5rem; border-radius: .8rem; background: #12233777; border: 1px solid #eec78340; }
.welcome-sheet i { display: block; height: .26rem; margin: 1.25rem 0; border-radius: 1rem; background: #eec78345; }
.welcome-sheet i:nth-child(2n) { width: 65%; }
.sign-in-side { display: grid; place-items: center; padding: clamp(1.35rem, 4vw, 2.6rem); }
.sign-in-form { width: min(100%, 24rem); color: var(--welcome-ink); }
.sign-in-form h2 { margin: 0 0 .55rem; font: 400 clamp(2rem, 4vw, 3.1rem)/1.1 Georgia, serif; letter-spacing: -.02em; }
.sign-in-form form { display: grid; gap: 1.1rem; margin-top: 1.7rem; }
.sign-in-form label { gap: .4rem; }
.sign-in-form input { min-height: 3.05rem; border-color: #b9c3d1; background: #fff; }
.sign-in-form button { min-height: 3.05rem; background: #203d5c; }
.sign-in-form button:hover { background: #142b46; }
.sign-in-activation { margin-top: 1.5rem; font-size: .96rem; }
.sign-in-activation a { color: #294d72; }
.account-home {
  padding: clamp(1.4rem, 6vw, 4.2rem);
  border-radius: 1rem;
  background: radial-gradient(ellipse at 88% 0%, #3e6488, transparent 65%), #172c48;
  color: #f9f3e8;
}
.account-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: .9rem; margin-top: 1.35rem; }
.account-actions a {
  display: grid;
  gap: .25rem;
  min-height: 8rem;
  align-content: center;
  padding: 1.35rem 1.5rem;
  background: #fffdf9;
  color: #172c48;
  border: 1px solid transparent;
  border-radius: .75rem;
  text-decoration: none;
}
.account-actions a:hover { background: #ebf2ff; border-color: #8ba3c6; }
.account-actions strong { font-size: 1.15rem; }
.account-actions span { color: #536784; }
.export-status { margin: .5rem 0 0; }
.export-status:empty { display: none; }
button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 700px) {
  .sign-in-page > main { width: min(35rem, 100% - 1.25rem); padding-block: .65rem; }
  .welcome-layout { grid-template-columns: 1fr; min-height: auto; }
  .welcome-side { min-height: 16rem; padding: 1.65rem 1.75rem; }
  .welcome-mark { width: 2.35rem; height: 2.35rem; font-size: 1.35rem; margin-bottom: .85rem; }
  .welcome-copy h1 { font-size: clamp(2.2rem, 8vw, 3.25rem); }
  .welcome-copy p { margin-top: .8rem; }
  .welcome-art { right: -8rem; bottom: -10rem; }
  .sign-in-side { padding: 1.65rem 1.75rem 1.95rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .welcome-copy, .sign-in-form, .account-home { animation: welcome-in .48s ease-out both; }
  .sign-in-form { animation-delay: .08s; }
  .welcome-art { animation: welcome-drift 9s ease-in-out 2 alternate; }
  .account-actions a { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
  .account-actions a:is(:hover, :focus-visible) { transform: translateY(-.2rem); box-shadow: 0 .5rem 1.2rem #08172c40; }
  button, .button { transition: background-color .18s ease, border-color .18s ease; }
  @keyframes welcome-in {
    from { opacity: 0; transform: translateY(.45rem); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes welcome-drift {
    from { transform: translate(0, 0) rotate(-15deg); }
    to { transform: translate(-1.2rem, -.8rem) rotate(-6deg); }
  }
}

  .prime-workspace { --blue:#116c61; --deep:#124e49; }
  .prime-header { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between;
    background:linear-gradient(120deg,#123d39,#206960); color:white; border-radius:1.2rem; padding:clamp(1.2rem,4vw,2.8rem); }
  .prime-header p { margin:0; color:#ddf5ee; }
  .prime-workspace .totals > div { border-top-color:#78b5a8; }
  .prime-workspace .totals > div:last-child { background:#e7f6f1; border-top-color:#116c61; }
  .prime-tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:.55rem; }
  .prime-tools .button { text-align:center; }
  .prime-tools .secondary { background:white; color:#124e49; border-color:#c5ddd7; }
  .prime-tools .secondary:hover { background:#e7f6f1; }
  .prime-workspace section { scroll-margin-top:1rem; }
  .prime-workspace .entry { max-width:none; }
  .prime-workspace textarea { margin-bottom:.5rem; }
  .prime-reminders { margin:0 0 .8rem; border:1px solid var(--line); border-radius:.65rem; background:white; }
  .prime-reminders label { display:flex; align-items:center; padding:.35rem; }
  .prime-reminders input { width:1.25rem; min-height:auto; height:1.25rem; accent-color:var(--blue); }
  @media(max-width:550px) {
    .prime-workspace .fields { grid-template-columns:1fr; }
    .prime-tools { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
