:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #f4f1ea;
  color: #1f2d27;
  --canvas: #f4f1ea;
  --canvas-deep: #ebe7de;
  --surface: #fdfbf7;
  --surface-muted: #f7f4ed;
  --ink: #1f2d27;
  --ink-soft: #59675f;
  --ink-faint: #7f8a83;
  --pine: #2a4034;
  --pine-deep: #1e3027;
  --moss: #718468;
  --moss-pale: #dce5c8;
  --lime: #d4e17a;
  --line: rgb(37 54 44 / 12%);
  --line-strong: rgb(37 54 44 / 18%);
  --shadow: 0 20px 55px rgb(43 54 44 / 8%);
  --shadow-soft: 0 10px 32px rgb(43 54 44 / 5%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 86% -14%, rgb(212 225 122 / 37%), transparent 29rem),
    radial-gradient(circle at -8% 28%, rgb(211 222 191 / 28%), transparent 24rem),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.public-app {
  min-height: 100vh;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: min(1160px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
}

.brand,
.profile-chip,
.workspace-nav,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  width: fit-content;
}

.brand-mark,
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  font-weight: 800;
}

.brand-mark {
  width: 39px;
  height: 39px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 13px;
  color: #f7f6ed;
  background: var(--pine-deep);
  box-shadow: 0 7px 17px rgb(31 45 39 / 14%);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -0.035em;
}

.brand-caption {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.workspace-nav {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(253 251 247 / 68%);
  box-shadow: var(--shadow-soft);
}

.workspace-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.workspace-nav a:hover,
.workspace-nav .nav-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 9px rgb(31 45 39 / 8%);
}

.header-actions {
  justify-content: flex-end;
}

.sign-in-button,
.primary-button,
.module-action {
  border: 0;
  color: var(--pine-deep);
  background: var(--lime);
  font-size: 13px;
  font-weight: 780;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.sign-in-button:hover,
.primary-button:hover,
.module-action:hover {
  background: #dfeb91;
  box-shadow: 0 10px 21px rgb(101 119 67 / 17%);
  transform: translateY(-1px);
}

.sign-in-button,
.primary-button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 12px;
}

.profile-chip {
  gap: 9px;
}

.avatar {
  width: 35px;
  height: 35px;
  border: 1px solid rgb(42 64 52 / 11%);
  border-radius: 50%;
  color: var(--pine-deep);
  background: var(--moss-pale);
  font-size: 11px;
}

.profile-chip-copy {
  display: grid;
  min-width: 0;
}

.profile-chip-copy strong,
.profile-chip-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.profile-chip-copy small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.sign-out-button {
  margin-left: 4px;
  padding: 7px 0 7px 9px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.sign-out-button:hover {
  color: var(--pine-deep);
}

.public-main {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.welcome-view {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(252px, 0.72fr);
  gap: 18px;
  align-items: stretch;
  width: min(100%, 930px);
  margin: 7vh auto 0;
}

.welcome-copy,
.welcome-panel,
.initial-profile,
.workspace-hero,
.module-card,
.finance-metrics article,
.empty-finance,
.privacy-note {
  border: 1px solid var(--line);
}

.welcome-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 65px);
  border-radius: 26px;
  background: rgb(253 251 247 / 78%);
  box-shadow: var(--shadow);
}

.welcome-copy::after {
  position: absolute;
  right: -44px;
  bottom: -52px;
  width: 160px;
  height: 160px;
  border: 1px solid rgb(113 132 104 / 18%);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--moss);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.055em;
}

h1 {
  max-width: 680px;
  margin-bottom: 19px;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 670;
  line-height: 0.98;
}

h2 {
  margin-bottom: 9px;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 680;
  line-height: 1.06;
}

h3 {
  margin-bottom: 9px;
  font-size: 20px;
  font-weight: 710;
}

.status-message,
.welcome-note,
.workspace-hero p,
.module-card p,
.initial-profile > p,
.finance-period,
.empty-finance p,
.privacy-note p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.status-message {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-weight: 680;
}

.welcome-note {
  position: relative;
  z-index: 1;
  max-width: 475px;
  margin-bottom: 0;
}

.welcome-panel {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 31px;
  border-color: transparent;
  border-radius: 26px;
  color: #eff1dc;
  background:
    radial-gradient(circle at 90% 7%, rgb(212 225 122 / 22%), transparent 9rem),
    linear-gradient(150deg, #304a3c, #22362c);
  box-shadow: 0 20px 48px rgb(31 45 39 / 18%);
}

.panel-icon,
.module-icon,
.finance-symbol,
.empty-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  font-weight: 780;
}

.panel-icon {
  border: 1px solid rgb(237 241 219 / 16%);
  color: var(--pine-deep);
  background: var(--lime);
  font-size: 19px;
}

.welcome-panel p {
  margin: 48px 0 6px;
  color: #bdcbbf;
  font-size: 11px;
  font-weight: 700;
}

.welcome-panel strong {
  color: #f4f5e8;
  font-size: 28px;
  font-weight: 680;
  letter-spacing: -0.05em;
}

.welcome-panel > span:last-child {
  max-width: 205px;
  margin-top: 8px;
  color: #c8d2c5;
  font-size: 13px;
  line-height: 1.5;
}

.initial-profile {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: clamp(28px, 5vw, 42px);
  border-radius: 22px;
  background: rgb(253 251 247 / 84%);
  box-shadow: var(--shadow-soft);
}

.initial-profile .eyebrow,
.initial-profile h2,
.initial-profile > p {
  grid-column: 1 / -1;
}

.initial-profile > p {
  margin-bottom: 9px;
}

.initial-profile label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 730;
}

.initial-profile input {
  width: 100%;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  outline: 0;
  background: var(--surface);
}

.initial-profile input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgb(113 132 104 / 12%);
}

.initial-profile .primary-button {
  justify-self: start;
  grid-column: 1 / -1;
  margin-top: 12px;
}

.workspace {
  min-height: 640px;
}

.workspace-view {
  animation: reveal 190ms ease-out;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.workspace-hero,
.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 270px;
  margin-bottom: 44px;
  padding: clamp(33px, 5vw, 56px);
  border-radius: 27px;
}

.workspace-hero {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  background:
    radial-gradient(circle at 91% 20%, rgb(212 225 122 / 20%), transparent 15rem),
    linear-gradient(132deg, #2b4336, #1e3027);
  box-shadow: 0 21px 50px rgb(31 45 39 / 16%);
}

.workspace-hero::before {
  position: absolute;
  right: -88px;
  bottom: -104px;
  width: 315px;
  height: 315px;
  border: 1px solid rgb(223 237 177 / 11%);
  border-radius: 50%;
  content: "";
}

.workspace-hero .eyebrow {
  color: #b4c987;
}

.workspace-hero h1 {
  max-width: 630px;
  color: #f4f4e9;
}

.workspace-hero p {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-bottom: 0;
  color: #c7d1c5;
}

.hero-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: clamp(120px, 18vw, 168px);
  height: clamp(120px, 18vw, 168px);
  place-items: center;
  border: 1px solid rgb(224 237 174 / 26%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(212 225 122 / 16%) 0 26%, transparent 27% 55%, rgb(230 239 208 / 8%) 56% 100%);
}

.hero-orbit span {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  border-radius: 17px;
  color: var(--pine-deep);
  background: var(--lime);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 29px;
}

.availability-badge,
.ready-badge,
.coming-soon {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.availability-badge {
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgb(253 251 247 / 63%);
}

.availability-badge > span,
.ready-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) repeat(2, minmax(0, 0.79fr));
  gap: 14px;
}

.module-card {
  display: flex;
  min-height: 278px;
  flex-direction: column;
  padding: 24px;
  border-radius: 19px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 19px 38px rgb(43 54 44 / 9%);
}

.module-card-featured {
  border-color: rgb(90 113 79 / 22%);
  color: var(--pine-deep);
  background:
    radial-gradient(circle at 94% 10%, rgb(245 249 215 / 92%), transparent 11rem),
    linear-gradient(140deg, #d8e5be, #eff2dd 74%);
}

.module-card-soon {
  justify-content: space-between;
  color: var(--ink);
}

.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
}

.module-icon {
  color: var(--pine-deep);
  background: rgb(255 255 255 / 62%);
  font-size: 18px;
}

.ready-badge {
  gap: 6px;
  padding: 6px 9px;
  color: #4a624c;
  background: rgb(255 255 255 / 55%);
}

.module-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.module-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 23px 0 15px;
}

.module-metrics div {
  padding: 10px;
  border: 1px solid rgb(56 82 59 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 34%);
}

.module-metrics dt {
  color: #62765f;
  font-size: 10px;
}

.module-metrics dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--pine-deep);
  font-size: 15px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  margin-top: auto;
  padding: 0 13px;
  border: 1px solid rgb(57 82 58 / 14%);
  border-radius: 11px;
  background: rgb(255 255 255 / 48%);
  box-shadow: none;
}

.module-icon-muted {
  color: var(--moss);
  background: var(--surface-muted);
  font-size: 18px;
}

.coming-soon {
  padding: 7px 9px;
  color: var(--ink-faint);
  background: var(--surface-muted);
}

.finance-header {
  min-height: 237px;
  border-color: rgb(90 113 79 / 18%);
  background:
    radial-gradient(circle at 96% 8%, rgb(212 225 122 / 30%), transparent 12rem),
    rgb(253 251 247 / 78%);
  box-shadow: var(--shadow-soft);
}

.finance-header h1 {
  margin-bottom: 8px;
}

.finance-header p {
  max-width: 590px;
}

.back-link {
  display: inline-flex;
  gap: 7px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
}

.back-link:hover {
  color: var(--pine-deep);
}

.finance-period {
  margin-bottom: 0;
  text-transform: capitalize;
}

.finance-symbol {
  flex: 0 0 auto;
  width: 75px;
  height: 75px;
  border: 1px solid rgb(48 74 60 / 14%);
  border-radius: 23px;
  color: var(--pine-deep);
  background: var(--lime);
  box-shadow: 0 12px 22px rgb(101 119 67 / 13%);
  font-size: 31px;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.finance-metrics article {
  min-height: 153px;
  padding: 21px;
  border-radius: 17px;
  background: rgb(253 251 247 / 76%);
  box-shadow: var(--shadow-soft);
}

.finance-metrics span,
.finance-metrics small {
  display: block;
  color: var(--ink-faint);
  font-size: 11px;
}

.finance-metrics strong {
  display: block;
  overflow: hidden;
  margin: 15px 0 8px;
  color: var(--ink);
  font-size: clamp(21px, 2.3vw, 29px);
  font-weight: 710;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-metric-accent {
  border-color: rgb(85 108 69 / 21%) !important;
  background: linear-gradient(145deg, #d8e6bd, #eef2da) !important;
}

.finance-metric-accent span,
.finance-metric-accent small {
  color: #60765d;
}

.empty-finance {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 27px;
  padding: clamp(27px, 5vw, 44px);
  border-radius: 21px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
}

.empty-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgb(255 255 255 / 15%);
  color: #f3f5e5;
  background: var(--pine);
  font-size: 21px;
}

.empty-finance h2 {
  max-width: 570px;
  margin-bottom: 9px;
  font-size: clamp(23px, 3vw, 31px);
}

.empty-finance p {
  max-width: 620px;
  margin-bottom: 0;
}

.statement-import {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px 25px;
  margin-top: 26px;
  padding: clamp(25px, 4vw, 39px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
}

.statement-import-intro h2 {
  max-width: 365px;
  font-size: clamp(23px, 3vw, 31px);
}

.statement-import-intro > p:last-child,
.account-setup p,
.statement-import-status p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.account-setup,
.statement-upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 13px;
  align-content: start;
}

.account-setup-copy,
.statement-upload-actions {
  grid-column: 1 / -1;
}

.account-setup-copy {
  margin-bottom: 2px;
}

.account-setup-copy .eyebrow {
  margin-bottom: 8px;
}

.account-setup h3 {
  margin-bottom: 5px;
  font-size: 19px;
}

.account-setup label,
.statement-upload-controls > label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 760;
}

.account-setup input,
.account-setup select,
.statement-upload-controls select,
.statement-file-control input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  outline: 0;
  background: var(--surface);
}

.account-setup select,
.statement-upload-controls select {
  cursor: pointer;
}

.account-setup input:focus,
.account-setup select:focus,
.statement-upload-controls select:focus,
.statement-file-control input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgb(113 132 104 / 12%);
}

.statement-upload-form {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.statement-file-control input {
  padding: 8px 11px;
  color: var(--ink-soft);
  font-size: 12px;
}

.statement-file-control small {
  display: block;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 10px;
}

.statement-upload-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 5px;
}

.secondary-button,
.text-button {
  border: 0;
  font-size: 12px;
  font-weight: 760;
}

.secondary-button {
  min-height: 41px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--pine-deep);
  background: var(--moss-pale);
  transition: background-color 150ms ease, transform 150ms ease;
}

.secondary-button:hover {
  background: #e4eccf;
  transform: translateY(-1px);
}

.text-button {
  padding: 6px 0;
  color: var(--ink-soft);
  background: transparent;
}

.text-button:hover {
  color: var(--pine-deep);
}

.statement-import-status {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 9px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.statement-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--moss);
}

.statement-import-status p {
  flex: 1 1 auto;
}

.import-jobs-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
  padding-top: 2px;
}

.import-job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.7fr) auto;
  gap: 10px 13px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 255 255 / 52%);
}

.import-job-copy {
  display: grid;
  gap: 3px;
}

.import-job-copy strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.import-job-copy span {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.import-job-account {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.import-job-account:focus {
  border-color: var(--moss);
  outline: 0;
  box-shadow: 0 0 0 4px rgb(113 132 104 / 12%);
}

.import-job-rebind {
  white-space: nowrap;
}

.finance-details {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 15px;
  margin-top: 26px;
}

.category-analytics {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
}

.category-analytics-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-analytics-heading .eyebrow {
  margin-bottom: 6px;
}

.category-analytics-heading h2 {
  margin-bottom: 7px;
  font-size: 23px;
}

.category-analytics-heading p:not(.eyebrow) {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.finance-period-picker {
  display: grid;
  flex: 0 0 auto;
  max-width: 390px;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 760;
}

.finance-period-picker-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.finance-period-presets,
.finance-period-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.finance-period-preset {
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 43%);
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.finance-period-preset:hover,
.finance-period-preset.is-selected {
  border-color: var(--moss);
  color: var(--pine-deep);
  background: rgb(220 229 200 / 72%);
}

.finance-period-custom {
  margin-top: 1px;
}

.finance-period-custom label {
  color: var(--ink-faint);
}

.finance-period-picker input {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-muted);
  font-size: 12px;
}

.finance-period-custom .secondary-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.finance-period-validation {
  margin: 0;
  color: #a54d3d;
  font-size: 11px;
  line-height: 1.35;
}

.expense-category-breakdown {
  display: grid;
  grid-template-columns: minmax(164px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 20px;
}

.category-analytics-note {
  margin: -8px 0 17px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.expense-category-visualization {
  display: grid;
  min-height: 206px;
  place-items: center;
  padding: 12px;
  border-radius: 17px;
  background: linear-gradient(145deg, rgb(220 229 200 / 55%), rgb(253 251 247 / 48%));
}

.expense-category-chart {
  display: grid;
  width: min(100%, 184px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--expense-category-chart, conic-gradient(var(--moss) 0 100%));
  box-shadow: inset 0 0 0 1px rgb(31 45 39 / 5%), 0 12px 28px rgb(43 54 44 / 11%);
}

.expense-category-chart-summary {
  display: grid;
  width: 64%;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 7px rgb(253 251 247 / 82%);
  text-align: center;
}

.expense-category-chart-summary span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 730;
}

.expense-category-chart-summary strong {
  color: var(--pine-deep);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.expense-category-list {
  display: grid;
  gap: 8px;
}

.expense-category-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 13px;
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: rgb(255 255 255 / 43%);
  font: inherit;
  text-align: left;
}

button.expense-category-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: 0 5px 14px rgb(31 45 39 / 5%);
}

.expense-category-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.expense-category-copy strong,
.expense-category-amount {
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.expense-category-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.expense-category-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--expense-category-color, var(--moss));
}

.expense-category-copy small {
  color: var(--ink-faint);
  font-size: 10px;
}

.expense-category-amount {
  align-self: center;
  color: var(--pine-deep);
  white-space: nowrap;
}

.expense-category-meter {
  width: 100%;
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 999px;
  background: var(--canvas-deep);
}

.expense-category-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--expense-category-color, var(--moss));
}

.cash-flow-analytics,
.uncategorized-suggestions {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
}

.cash-flow-heading,
.uncategorized-suggestions-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.cash-flow-heading .eyebrow,
.uncategorized-suggestions-heading .eyebrow {
  margin-bottom: 6px;
}

.cash-flow-heading h2,
.uncategorized-suggestions-heading h2 {
  margin-bottom: 7px;
  font-size: 23px;
}

.cash-flow-heading p:not(.eyebrow),
.uncategorized-suggestions-heading p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.cash-flow-controls {
  display: grid;
  gap: 7px;
  flex: 0 0 auto;
}

.cash-flow-range,
.cash-flow-granularity,
.uncategorized-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cash-flow-range-button,
.cash-flow-granularity-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 43%);
  font: inherit;
  font-size: 10px;
  font-weight: 760;
}

.cash-flow-range-button:hover,
.cash-flow-range-button.is-selected,
.cash-flow-granularity-button:hover,
.cash-flow-granularity-button.is-selected {
  border-color: var(--moss);
  color: var(--pine-deep);
  background: rgb(220 229 200 / 72%);
}

.cash-flow-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.cash-flow-summary .finance-details-empty {
  grid-column: 1 / -1;
}

.cash-flow-summary-item {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 255 255 / 43%);
}

.cash-flow-summary-item span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 740;
}

.cash-flow-summary-item strong {
  color: var(--pine-deep);
  font-size: 15px;
  letter-spacing: -0.03em;
}

.cash-flow-summary-expenses strong {
  color: #a54d3d;
}

.cash-flow-chart-viewport {
  overflow-x: auto;
  padding: 14px 12px 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgb(220 229 200 / 40%), rgb(253 251 247 / 40%));
}

.cash-flow-svg {
  display: block;
  min-width: 360px;
  width: 100%;
  height: 220px;
}

.cash-flow-axis {
  stroke: rgb(31 45 39 / 17%);
  stroke-width: 1;
}

.cash-flow-bar-income {
  fill: var(--moss);
}

.cash-flow-bar-expenses {
  fill: #c7795d;
}

.cash-flow-label {
  fill: var(--ink-faint);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

.cash-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin: 9px 2px 0;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 720;
}

.cash-flow-legend span::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  content: "";
}

.cash-flow-legend-income::before {
  background: var(--moss);
}

.cash-flow-legend-expenses::before {
  background: #c7795d;
}

.cash-flow-legend span:last-child::before {
  display: none;
}

.uncategorized-suggestions-list {
  display: grid;
  gap: 8px;
}

.uncategorized-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 255 255 / 43%);
}

.uncategorized-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.uncategorized-suggestion-pattern {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uncategorized-suggestion-copy small,
.uncategorized-suggestion-recommendation,
.uncategorized-suggestion-status {
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.4;
}

.uncategorized-suggestion-recommendation {
  color: var(--pine-deep);
  font-weight: 730;
}

.uncategorized-suggestion-select {
  min-width: 132px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-muted);
  font: inherit;
  font-size: 11px;
}

.uncategorized-suggestion-confirm {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.uncategorized-suggestion-status {
  grid-column: 1 / -1;
  margin: -2px 0 0;
}

.finance-detail-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(253 251 247 / 72%);
  box-shadow: var(--shadow-soft);
}

.finance-detail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.finance-detail-heading .eyebrow {
  margin-bottom: 6px;
}

.finance-detail-heading h2 {
  margin-bottom: 0;
  font-size: 23px;
}

.detail-count,
.transaction-category,
.transaction-account,
.possible-transfer {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
}

.detail-count {
  padding: 6px 8px;
  color: var(--ink-faint);
  background: var(--surface-muted);
}

.accounts-list,
.transactions-list {
  display: grid;
  gap: 9px;
}

.transactions-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: -4px 0 15px;
  padding: 0;
  border: 0;
}

.transactions-filter legend {
  width: 100%;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 760;
}

.transaction-filter-options {
  display: contents;
}

.transaction-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 43%);
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}

.transaction-filter-option input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: var(--pine);
}

.transactions-category-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: -6px 0 15px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--pine-deep);
  background: var(--moss-pale);
  font-size: 11px;
  font-weight: 760;
}

.transactions-category-filter .text-button {
  padding: 2px 0;
  color: var(--pine-deep);
  font-size: 10px;
}

.account-summary,
.transaction-row,
.finance-details-empty {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 255 255 / 43%);
}

.account-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 11px;
}

.account-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--pine-deep);
  background: var(--moss-pale);
  font-size: 12px;
  font-weight: 850;
}

.account-summary-copy,
.account-summary-balance,
.transaction-copy,
.transaction-meta {
  display: grid;
  min-width: 0;
}

.account-summary-copy strong,
.transaction-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary-copy small,
.account-summary-balance small,
.transaction-copy small,
.transaction-meta small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary-balance {
  justify-items: end;
}

.account-summary-balance strong {
  color: var(--pine-deep);
  font-size: 13px;
  font-weight: 790;
  letter-spacing: -0.03em;
}

.account-balance-form {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(145px, 1fr) auto;
  gap: 9px 10px;
  align-items: end;
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.account-balance-form-title {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 760;
}

.account-balance-form label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 730;
}

.account-balance-form input {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  outline: 0;
  background: var(--surface);
}

.account-balance-form input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgb(113 132 104 / 12%);
}

.account-balance-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-balance-actions .secondary-button {
  min-height: 39px;
  padding: 0 12px;
  white-space: nowrap;
}

.account-balance-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.account-available-balance,
.account-balance-warning {
  margin-top: 3px;
}

.account-balance-warning {
  color: #9d5f3f !important;
  font-weight: 720;
}

.transaction-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 10px 11px;
}

.transaction-meta {
  gap: 2px;
  padding-right: 3px;
}

.transaction-meta strong {
  color: var(--moss);
  font-size: 11px;
  font-weight: 780;
}

.transaction-copy {
  gap: 4px;
}

.transaction-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.transaction-category,
.transaction-account,
.possible-transfer {
  padding: 4px 6px;
}

.transaction-category,
.transaction-category-select {
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.transaction-category-select {
  max-width: 150px;
  padding: 3px 20px 3px 6px;
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
}

.transaction-account {
  color: var(--pine-deep);
  background: var(--moss-pale);
}

.possible-transfer {
  color: #536e57;
  background: var(--moss-pale);
}

.transaction-amount {
  justify-self: end;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.transaction-credit {
  color: #53704e;
}

.transaction-debit {
  color: var(--ink);
}

.load-more-transactions {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-muted);
  text-align: center;
}

.finance-details-empty {
  padding: 18px;
}

.finance-details-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
}

.finance-details-empty p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgb(253 251 247 / 48%);
}

.privacy-note > span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--pine-deep);
  background: var(--moss-pale);
  font-size: 11px;
  font-weight: 850;
}

.privacy-note p {
  margin: 0;
  font-size: 12px;
}

.sign-in-button:focus-visible,
.primary-button:focus-visible,
.sign-out-button:focus-visible,
.workspace-nav a:focus-visible,
.module-action:focus-visible,
.back-link:focus-visible,
.brand:focus-visible,
.initial-profile input:focus-visible,
.account-setup input:focus-visible,
.account-setup select:focus-visible,
.statement-upload-form input:focus-visible,
.statement-upload-form select:focus-visible,
.transactions-filter input:focus-visible,
.finance-period-picker input:focus-visible,
.finance-period-preset:focus-visible,
.cash-flow-range-button:focus-visible,
.cash-flow-granularity-button:focus-visible,
.transaction-category-select:focus-visible,
.uncategorized-suggestion-select:focus-visible,
button.expense-category-row:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgb(113 132 104 / 43%);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .app-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    width: min(100% - 32px, 680px);
  }

  .workspace-nav {
    justify-self: start;
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .public-main {
    width: min(100% - 32px, 680px);
    padding-top: 27px;
  }

  .welcome-view,
  .module-grid,
  .finance-details,
  .expense-category-breakdown,
  .cash-flow-summary {
    grid-template-columns: 1fr;
  }

  .expense-category-visualization {
    min-height: 184px;
  }

  .category-analytics-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-flow-heading,
  .uncategorized-suggestions-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-view {
    margin-top: 24px;
  }

  .welcome-panel {
    min-height: 205px;
  }

  .welcome-panel p {
    margin-top: 30px;
  }

  .module-card {
    min-height: 215px;
  }
}

@media (max-width: 580px) {
  .app-header {
    min-height: 72px;
  }

  .brand-caption,
  .profile-chip-copy,
  .sign-out-button {
    display: none;
  }

  .public-main {
    padding-bottom: 42px;
  }

  .welcome-copy,
  .workspace-hero,
  .finance-header {
    padding: 28px;
    border-radius: 21px;
  }

  h1 {
    font-size: clamp(36px, 11vw, 47px);
  }

  .workspace-hero,
  .finance-header,
  .empty-finance {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-orbit {
    display: none;
  }

  .initial-profile,
  .finance-metrics,
  .statement-import,
  .account-setup,
  .statement-upload-form,
  .account-balance-form {
    grid-template-columns: 1fr;
  }

  .initial-profile {
    padding: 26px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .statement-upload-actions,
  .statement-import-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-job-row {
    grid-template-columns: 1fr;
  }

  .import-job-rebind {
    justify-self: start;
  }

  .finance-detail-card {
    padding: 20px;
  }

  .account-balance-form {
    grid-column: 1 / -1;
  }

  .cash-flow-analytics,
  .uncategorized-suggestions {
    padding: 20px;
  }

  .uncategorized-suggestion {
    grid-template-columns: 1fr;
  }

  .finance-symbol {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
