.youth-page {
  --youth-paper: #f6f5f1;
  --youth-blue-soft: #eaf3f8;
  --youth-mint: #dff3ec;
  --youth-olive-soft: #edf0df;
  --youth-warm: #f2eadf;
  min-height: 100vh;
  background: var(--gray);
  color: var(--navy);
}

.youth-page button,
.youth-page input {
  font: inherit;
}

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

.youth-header {
  position: relative;
  z-index: 30;
  background:
    radial-gradient(circle at 12% 18%, rgba(49, 173, 190, 0.18), transparent 34%),
    linear-gradient(135deg, #001155 0%, #071d67 62%, #0068b4 150%);
  color: var(--white);
}

.youth-header-inner,
.youth-tabs,
.youth-main,
.youth-footer {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.youth-header-inner {
  min-height: 250px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-block: 48px;
}

.youth-header-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.youth-header-copy p {
  margin: 0 0 16px;
  color: #9ce4ec;
  font-size: var(--text-xs);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.youth-header-copy h1 {
  max-width: 920px;
  color: var(--white);
  font-size: clamp(3.4rem, 6.3vw, 5.75rem);
  font-weight: 780;
  line-height: 0.97;
  letter-spacing: -0.045em;
}

.youth-profile {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-top: calc(0.4875rem - 22px);
}

.youth-demo-badge {
  padding: 6px 9px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.youth-demo-badge[hidden] {
  display: none;
}

.youth-profile > .topbar-avatar {
  font-weight: 800;
}

.youth-profile-panel {
  position: absolute;
  inset: calc(100% + 10px) 0 auto auto;
  z-index: 60;
  width: min(340px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 24px 60px rgba(0, 17, 85, 0.24);
}

.youth-profile-panel[open] {
  display: grid;
  gap: 20px;
}

.youth-profile-panel::backdrop {
  background: rgba(0, 17, 85, 0.5);
}

.youth-profile-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.youth-profile-panel-top p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.youth-profile-panel-top button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--gray);
  color: var(--navy);
  cursor: pointer;
}

.youth-profile-panel-top button:focus-visible,
.youth-profile-actions a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.youth-profile-panel-top svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.youth-profile-summary {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  column-gap: 14px;
}

.youth-profile-summary > span {
  grid-row: 1 / span 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: var(--text-ui);
  font-weight: 800;
}

.youth-profile-summary h2,
.youth-profile-summary p {
  margin: 0;
}

.youth-profile-summary h2 {
  align-self: end;
  font-size: 1.3rem;
}

.youth-profile-summary h2:focus {
  outline: none;
}

.youth-profile-summary p {
  align-self: start;
  color: var(--muted);
  font-size: var(--text-sm);
}

.youth-profile-note {
  margin: 0;
  border-radius: 14px;
  padding: 14px;
  background: var(--youth-blue-soft);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.youth-profile-note.is-error {
  background: var(--ist-warn);
  color: var(--danger);
}

.youth-profile-actions {
  display: grid;
  gap: 10px;
}

.youth-main {
  padding-block: 24px 64px;
}

.youth-eyebrow,
.youth-card-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.youth-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.youth-tabs button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-ui);
  font-weight: 700;
  cursor: pointer;
}

.youth-tabs button[aria-selected="true"] {
  background: var(--navy);
  color: var(--white);
}

.youth-tabs button:focus-visible,
.youth-button:focus-visible,
.youth-text-button:focus-visible,
.youth-link-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.youth-tab-panel {
  animation: youth-panel-in 180ms ease-out;
}

@keyframes youth-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.youth-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.youth-balance-card,
.youth-next-card,
.youth-card,
.youth-calm-card,
.youth-guideline-card,
.youth-check-summary,
.youth-capture-kpi {
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.youth-capture-kpis {
  display: grid;
  gap: 18px;
}

.youth-capture-kpis {
  grid-template-columns: 1.15fr 1fr 1fr;
  margin-bottom: 18px;
}

.youth-capture-kpi {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 26px 28px;
}

.youth-capture-kpi > span,
.youth-capture-kpi > small {
  color: var(--muted);
}

.youth-capture-kpi > span {
  font-size: var(--text-sm);
  font-weight: 700;
}

.youth-capture-kpi > strong {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.youth-capture-kpi.is-primary {
  border-color: var(--navy);
  background: var(--navy-gradient);
  color: var(--white);
}

.youth-capture-kpi.is-primary > span,
.youth-capture-kpi.is-primary > small {
  color: #dce7f6;
}

.youth-capture-kpi small b {
  color: var(--flow-available-text);
}

.youth-analysis-controls {
  width: min(100%, 520px);
  margin: 12px auto 32px;
}

.youth-analysis-period {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.youth-analysis-period legend {
  margin-bottom: 7px;
  padding: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}

.youth-analysis-period-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.youth-analysis-period-options label {
  min-height: 46px;
  align-items: center;
  font-weight: 700;
}

.youth-analysis-period > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.youth-analysis-period > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  text-align: center;
}

.youth-analysis-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.youth-analysis-summary-balance {
  min-height: 200px;
  display: grid;
  align-content: center;
  padding: 30px;
  background: var(--navy-gradient);
  color: var(--white);
}

.youth-analysis-summary.is-negative .youth-analysis-summary-balance {
  background: var(--danger);
}

.youth-analysis-summary-balance .youth-card-kicker {
  color: #9ce4ec;
}

.youth-analysis-summary .youth-analysis-summary-balance h2 {
  margin: 0;
  color: var(--white);
  font-size: var(--text-ui);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
}

.youth-analysis-summary-balance > strong {
  margin-top: 8px;
  font-size: var(--text-display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.youth-analysis-summary-balance > strong.is-pending-balance {
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.youth-analysis-summary-balance > p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-ui);
  font-weight: 400;
  line-height: 1.35;
}

.youth-analysis-summary-budget {
  display: grid;
  align-content: center;
  gap: 0;
  padding: 30px;
}

.youth-analysis-summary-budget > div {
  margin-bottom: 10px;
}

.youth-analysis-summary-budget p {
  margin: 0;
}

.youth-analysis-summary-budget > div > p {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.youth-analysis-summary-budget > strong {
  display: block;
  margin-top: 8px;
  font-size: var(--text-ui);
  font-weight: 750;
  text-align: left;
}

.youth-page .youth-analysis-budget-progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
}

.youth-analysis-budget-progress-track {
  fill: var(--gray-mid);
}

.youth-analysis-budget-progress-fill {
  fill: var(--navy);
}

.youth-analysis-budget-progress-fill-line,
.youth-analysis-budget-progress-over-line {
  stroke-width: 10px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.youth-analysis-budget-progress-fill-line {
  stroke: var(--navy);
}

.youth-analysis-budget-progress-over-line {
  stroke: var(--danger);
}

.youth-analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.youth-analysis-grid .youth-card,
.youth-analysis-trend {
  overflow: hidden;
  border: 1px solid #dde3e7;
  border-radius: var(--radius);
  padding: 34px;
}

.youth-analysis-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.youth-analysis-grid .youth-card-heading > div,
.youth-analysis-trend .youth-card-heading > div {
  width: 100%;
  min-width: 0;
}

.youth-analysis-card-meta .youth-card-kicker,
.youth-analysis-card-meta > p {
  margin: 0;
}

.youth-analysis-card-meta > p:last-child {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.youth-expense-rows {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.youth-expense-row {
  display: grid;
  gap: 6px;
}

.youth-expense-row .expense-share-bar {
  margin-top: 0;
}

.youth-expense-row .expense-row-head > span {
  display: flex;
  align-items: center;
}

.youth-expense-row .expense-row-dot {
  flex: none;
}

.youth-page .stats-category-color-0 {
  --stats-category-color: #1f82be;
}

.youth-page .stats-category-color-1 {
  --stats-category-color: #145e8b;
}

.youth-page .stats-category-color-2 {
  --stats-category-color: #083957;
}

.youth-page .stats-category-color-3 {
  --stats-category-color: #6672f3;
}

.youth-page .stats-category-color-4 {
  --stats-category-color: #2b18a3;
}

.youth-page .stats-category-color-5 {
  --stats-category-color: #ba7b9f;
}

.youth-page .stats-category-color-6 {
  --stats-category-color: #915f7c;
}

.youth-page .stats-category-color-7 {
  --stats-category-color: #932380;
}

.youth-page .stats-category-color-8 {
  --stats-category-color: #c833ae;
}

.youth-page .stats-category-color-9 {
  --stats-category-color: #4532ef;
}

.youth-expense-dot-unplanned {
  background: var(--danger);
}

.youth-expense-row-meta,
.youth-expense-total-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.youth-expense-comparison {
  font-weight: 400;
  text-align: right;
}

.youth-expense-total-meta {
  flex-wrap: wrap;
  gap: 4px 8px;
}

.youth-expense-total-meta > * {
  white-space: nowrap;
}

.youth-expense-total-meta .youth-expense-comparison {
  margin-left: auto;
}

.youth-expense-unplanned-line {
  stroke: var(--danger);
}

.youth-expense-total {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.youth-expense-total .expense-share-bar {
  margin-top: 0;
}

.youth-expense-total-fill,
.youth-expense-total-fill-line {
  fill: var(--navy);
  stroke: var(--navy);
}

.youth-analysis-trend {
  margin-top: 18px;
}

.youth-analysis-trend svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.youth-trend-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  margin: 24px 0 6px;
  padding: 0;
}

.youth-trend-tabs .stats-series-button {
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  font-size: var(--text-xs);
  line-height: 1.2;
  white-space: nowrap;
}

.youth-trend-income-salary {
  fill: var(--success);
}

.youth-trend-income-extra {
  fill: var(--saving-youth);
}

.youth-trend-income-line {
  --stats-series-color: var(--success);
}

.youth-page [data-chart-tooltip]:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.youth-balance-card {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 15%, rgba(49, 173, 190, 0.32), transparent 31%),
    var(--navy-gradient);
  color: var(--white);
}

.youth-balance-card > p,
.youth-balance-card > span {
  margin: 0;
  color: #dce7f6;
}

.youth-balance-card > p {
  font-size: var(--text-base);
  font-weight: 700;
}

.youth-balance-card > strong {
  margin: 10px 0 8px;
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.youth-balance-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.youth-next-card {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  background: var(--youth-blue-soft);
}

.youth-card-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.youth-card-label b {
  color: var(--flow-available-text);
}

.youth-next-card > strong {
  margin: 28px 0 6px;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
}

.youth-next-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.youth-calendar-line {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 30px;
}

.youth-calendar-line i {
  height: 8px;
  border-radius: 999px;
  background: #cbd9e5;
}

.youth-calendar-line i.is-next {
  background: var(--flow-available-text);
}

.youth-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: var(--text-ui);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.youth-button-primary {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
}

.youth-button-light {
  border: 1px solid var(--white);
  background: var(--white);
  color: var(--navy);
}

.youth-button-secondary {
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
}

.youth-button:disabled {
  border-color: var(--line);
  background: var(--gray-mid);
  color: var(--muted);
  cursor: default;
}

.youth-link-button,
.youth-text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: var(--text-ui);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.youth-link-button {
  color: var(--white);
}

.youth-text-button {
  color: var(--navy);
}

.youth-money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.youth-money-grid article {
  min-height: 140px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}

.youth-money-grid article:last-child {
  border-right: 0;
}

.youth-money-grid span,
.youth-money-grid small {
  color: var(--muted);
}

.youth-money-grid span {
  font-size: var(--text-sm);
  font-weight: 700;
}

.youth-money-grid strong {
  font-size: var(--text-large);
  letter-spacing: -0.03em;
}

.youth-section-grid,
.youth-form-layout,
.youth-check-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.youth-capture-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.youth-overview-column {
  display: grid;
  gap: 24px;
  min-width: 0;
}

html:not(.is-standalone) .youth-capture-layout {
  grid-template-areas:
    "overview overview"
    "form entries";
}

html:not(.is-standalone) .youth-entry-form {
  grid-area: form;
}

html:not(.is-standalone) .youth-overview-column {
  display: contents;
}

html:not(.is-standalone) .youth-month-overview {
  grid-area: overview;
}

html:not(.is-standalone) .youth-recent-card {
  grid-area: entries;
}

.youth-card,
.youth-calm-card,
.youth-check-summary {
  padding: 24px;
}

.youth-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.youth-card-heading h2,
.youth-calm-card h2,
.youth-panel-heading h2,
.youth-check-summary h2 {
  margin: 0;
  font-size: var(--text-title);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.youth-card h2,
.youth-calm-card h2,
.youth-check-summary h2,
.youth-analysis-summary h2 {
  font-weight: 800;
}

.youth-page progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--gray-mid);
  accent-color: var(--flow-saving-text);
}

.youth-page progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--gray-mid);
}

.youth-page progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--flow-saving-text);
}

.youth-entry-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.youth-entry-list li {
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.youth-entry-list li:last-child {
  border-bottom: 0;
}

.youth-entry-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 18px;
  padding: 12px 8px;
  color: var(--navy);
  text-align: left;
}

.youth-entry-tap {
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.youth-entry-tap:active {
  background: rgba(0, 104, 180, 0.08);
}

.youth-entry-tap:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.youth-entry-copy,
.youth-entry-side {
  display: contents;
}

.youth-entry-row strong {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.youth-entry-list small {
  grid-column: 1;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
}

.youth-entry-side > b {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  color: var(--flow-expense);
  font-size: 0.92rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

.youth-entry-list li.is-income .youth-entry-side > b {
  color: var(--flow-available-text);
}

.youth-entry-list li.is-neutral .youth-entry-side > b {
  color: var(--navy);
}

.youth-entry-actions {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.youth-form-layout,
.youth-check-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  margin-top: 0;
}

.youth-check-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  align-items: start;
}

.youth-entry-form {
  display: grid;
}

.youth-entry-form .capture-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
}

.youth-entry-form .capture-heading > div {
  display: contents;
}

.youth-entry-form .capture-heading .youth-card-kicker {
  grid-column: 1 / -1;
  grid-row: 1;
}

.youth-entry-form .capture-heading h2 {
  grid-column: 1;
  grid-row: 2;
}

.youth-entry-form .capture-heading .entry-edit-delete {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.youth-entry-form .capture-heading h2,
.youth-month-overview .overview-head h2,
.youth-recent-card .recent-head h2 {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.youth-capture-layout .youth-card-kicker {
  font-weight: 800;
  letter-spacing: 0.09em;
}

.youth-entry-form .field > span,
.youth-entry-form .currency-amount-field > label,
.youth-entry-form .quick-categories-label {
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.youth-entry-types span {
  font-weight: 700;
}

[data-income-meta],
[data-spent-meta] {
  white-space: nowrap;
}

.youth-entry-types input:checked + span {
  font-weight: 800;
}

.youth-entry-form input,
.youth-entry-form select,
.youth-entry-form textarea {
  font-weight: 500;
}

.youth-entry-form .quick-category-button,
.youth-entry-actions .quick-category-button {
  font-size: 0.82rem;
  font-weight: 500;
}

.youth-entry-types {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.youth-currency-amount-row {
  grid-template-columns: minmax(0, 1fr) 88px;
}

.youth-currency-code {
  height: var(--control-height);
  display: grid;
  place-items: center;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-btn);
  background: var(--gray);
  color: var(--navy);
  font-size: var(--text-ui);
  font-weight: 700;
}

.youth-entry-form .quick-categories {
  margin-top: -2px;
}

.youth-entry-form .youth-button-primary {
  width: 100%;
}

.youth-entry-form-actions {
  display: grid;
  gap: 8px;
}

.youth-entry-form-actions .youth-button {
  width: 100%;
  font-weight: 800;
}

.youth-month-totals .stat {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  border-radius: var(--radius-btn);
  padding: 14px;
}

.youth-month-totals .stat-label {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.45;
}

.youth-month-totals .stat.accent .stat-label {
  color: var(--white);
  font-weight: 600;
}

.youth-month-totals .stat.accent.is-negative {
  background: var(--danger);
}

.youth-month-totals .stat-value {
  margin-top: 6px;
  font-size: var(--text-title);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.youth-month-totals .stat-value.is-pending-balance {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.youth-pending-balance-action {
  width: 100%;
  margin-top: 14px;
}

.youth-month-totals .stat-meta {
  margin-top: 4px;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.45;
}

.youth-month-totals .stat {
  padding: 16px;
}

.youth-month-totals .stat-label,
.youth-month-totals .stat-meta {
  font-size: var(--text-ui);
  line-height: 1.35;
}

.youth-month-totals .stat-label {
  font-weight: 500;
}

.youth-month-totals .stat-value:not(.is-pending-balance) {
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.youth-month-totals .stat-meta {
  margin-top: 6px;
  font-weight: 600;
}

.youth-month-totals .stat.accent .stat-meta {
  font-weight: 400;
}

.youth-recent-card {
  min-width: 0;
  background: var(--white);
}

.youth-recent-card .youth-recent-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--navy);
  font-size: var(--text-ui);
  font-weight: 600;
  cursor: pointer;
}

.youth-recent-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.youth-recent-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.youth-recent-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.youth-recent-status {
  text-align: center;
}

.youth-recent-status:empty {
  display: none;
}

.youth-entry-kind {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
}

.youth-entry-kind label {
  cursor: pointer;
}

.youth-entry-kind input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.youth-entry-kind span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: var(--text-ui);
  font-weight: 700;
}

.youth-entry-kind input:checked + span {
  background: var(--navy);
  color: var(--white);
}

.youth-entry-kind input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.youth-field-label,
.youth-category-fieldset legend {
  margin-bottom: 8px;
  font-size: var(--text-ui);
  font-weight: 700;
}

.youth-field-label small {
  color: var(--muted);
  font-weight: 500;
}

.youth-amount-field {
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 0 18px;
  background: var(--white);
}

.youth-amount-field span {
  color: var(--muted);
  font-weight: 700;
}

.youth-amount-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 750;
  text-align: right;
}

.youth-category-fieldset {
  margin: 0 0 24px;
  border: 0;
  padding: 0;
}

.youth-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.youth-category-grid label {
  min-width: 0;
  cursor: pointer;
}

.youth-category-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.youth-category-grid span {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}

.youth-category-grid input:checked + span {
  border-color: var(--navy);
  background: var(--youth-blue-soft);
  color: var(--navy);
}

.youth-category-grid input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.youth-text-field {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--navy);
}

.youth-text-field:focus,
.youth-amount-field:focus-within {
  outline: 3px solid rgba(0, 104, 180, 0.2);
  outline-offset: 2px;
}

.youth-form-status {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 700;
}

.youth-entry-status {
  color: var(--navy);
}

.youth-entry-status.error {
  color: var(--danger);
}

.youth-entry-status:empty {
  display: none;
}

.youth-calm-card,
.youth-check-summary {
  align-self: stretch;
  border-color: #c8dfd7;
  background: var(--youth-mint);
}

.youth-calm-card p:last-child,
.youth-check-summary p:last-child {
  margin: 20px 0 0;
  color: #264b42;
  line-height: 1.6;
}

.youth-month-summary dl {
  display: grid;
  margin: 24px 0 0;
}

.youth-month-summary {
  align-self: start;
}

.youth-month-summary dl > div {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(0, 17, 85, 0.12);
}

.youth-month-summary dl > div.is-total {
  border-bottom: 0;
  font-weight: 800;
}

.youth-month-summary dt,
.youth-month-summary dd {
  margin: 0;
}

.youth-panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 42px;
  margin: 12px 0 32px;
}

.youth-panel-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.youth-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  align-items: start;
  gap: 18px;
}

.youth-budget-column {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  gap: 18px;
}

.youth-budget-editor-card {
  display: grid;
  gap: 0;
}

.youth-budget-income-card {
  background: var(--white);
}

.youth-budget-section-heading {
  align-items: end;
}

.youth-budget-editor-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 128px 104px 44px;
  column-gap: 16px;
  row-gap: 12px;
}

.youth-budget-editor-head {
  padding: 0 14px 5px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.youth-budget-editor-head[hidden],
.youth-budget-drag-handle[hidden] {
  display: none;
}

.youth-budget-editor-head span:nth-child(3) {
  text-align: right;
}

.youth-budget-editor-head span:nth-child(4) {
  text-align: center;
}

.youth-budget-editor-list {
  display: grid;
  gap: 10px;
}

.youth-budget-editor-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.youth-budget-editor-row.is-draft > .youth-budget-position {
  grid-column: 1 / -1;
}

.youth-budget-position {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px 104px 44px;
  column-gap: 16px;
  row-gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--white);
}

.youth-budget-row-summary {
  display: none;
}

.youth-budget-inline-editor {
  display: contents;
}

.youth-budget-inline-editor[hidden] {
  display: none;
}

.youth-budget-position > .youth-budget-fix {
  grid-column: 3;
  grid-row: 1;
}

.youth-budget-inline-editor > .youth-budget-name-field {
  grid-column: 1;
  grid-row: 1;
}

.youth-budget-inline-editor > .youth-budget-amount-field {
  grid-column: 2;
  grid-row: 1;
}

.youth-budget-row-actions {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.youth-budget-row-actions .youth-budget-done {
  display: none;
}

.youth-budget-draft-action {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
}

.youth-budget-draft-action.is-cancel {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.youth-budget-draft-action.is-confirm {
  border: 2px solid transparent;
  background-clip: padding-box;
}

.youth-budget-draft-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.youth-budget-editor-row.is-draft .youth-budget-row-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 8px;
}

.youth-budget-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: var(--text-ui);
}

.youth-budget-automatic-help {
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.youth-budget-checkbox-example {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 3px;
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.youth-budget-automatic-help strong {
  color: var(--navy);
}

.youth-budget-income-row {
  background: var(--white);
}

.youth-budget-editor-row input:not([type="checkbox"]) {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--white);
  color: var(--navy);
}

.youth-budget-editor-row input:not([type="checkbox"]):focus {
  outline: 3px solid rgba(0, 104, 180, 0.2);
  outline-offset: 1px;
  border-color: var(--accent);
}

.youth-budget-name-field,
.youth-budget-amount-field {
  min-width: 0;
}

.youth-budget-name-field {
  display: grid;
}

.youth-budget-name-input {
  width: 100%;
  font-weight: 700;
}

.youth-budget-amount-field {
  display: grid;
}

.youth-budget-field-label {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.youth-budget-amount-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.youth-budget-amount-control > span:first-child {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.youth-budget-amount-field input {
  width: 100%;
  text-align: right;
}

.youth-budget-fix {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
}

.youth-budget-fix input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navy);
}

@media (min-width: 821px) {
  .is-standalone .youth-check-layout {
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  }

  .youth-budget-field-label,
  .youth-budget-fix > span {
    display: none;
  }
}

.youth-budget-drag-handle,
.youth-budget-delete {
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.youth-budget-drag-handle {
  width: 44px;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}

.youth-budget-delete {
  width: 44px;
}

.youth-budget-drag-handle:active {
  cursor: grabbing;
}

.youth-budget-drag-handle:hover {
  background: var(--youth-warm);
  color: var(--navy);
}

.youth-budget-delete:hover {
  background: var(--youth-warm);
  color: var(--flow-expense);
}

.youth-budget-drag-handle:focus-visible,
.youth-budget-delete:focus-visible,
.youth-budget-add-action:focus-visible,
.youth-budget-row-summary:focus-visible,
.youth-budget-fix input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.youth-budget-drag-handle svg {
  width: 20px;
  height: 24px;
  fill: currentColor;
}

.youth-budget-delete svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.youth-budget-add-action {
  min-height: 44px;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  border: 1px solid rgba(0, 17, 85, 0.16);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--navy);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 750;
  cursor: pointer;
}

.youth-budget-add-action > span:first-child {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  position: relative;
  font-size: 0;
}

.youth-budget-add-action > span:first-child::before,
.youth-budget-add-action > span:first-child::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.youth-budget-add-action > span:first-child::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.youth-budget-add-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.youth-budget-add-action:hover > span:first-child {
  background: var(--accent);
}

.youth-budget-editor-list.is-sorting {
  user-select: none;
}

.youth-budget-editor-list.is-sorting .youth-budget-add-action {
  visibility: hidden;
}

.youth-budget-editor-row.is-dragging {
  z-index: 4;
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(0, 17, 85, 0.2);
  cursor: grabbing;
}

.youth-budget-editor-row.is-shifting {
  z-index: 2;
}

.youth-budget-editor-status {
  min-height: 0;
  margin: 10px 0 -10px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.youth-budget-editor-status:empty {
  display: none;
}

.youth-budget-summary {
  position: sticky;
  grid-column: 2;
  grid-row: 1;
  top: 100px;
  background: var(--navy);
  color: var(--white);
}

.youth-budget-summary .youth-card-kicker {
  color: #9ce4ec;
}

.youth-budget-summary h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.youth-budget-totals {
  display: grid;
  gap: 0;
  margin: 28px 0 20px;
}

.youth-budget-totals div {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.youth-budget-totals dt {
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.45;
}

.youth-budget-totals dd {
  margin: 0;
  color: var(--white);
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1.45;
}

.youth-plan-status {
  border-radius: 12px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.45;
}

.youth-plan-effective {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  border: 0;
  padding: 0;
}

.youth-plan-effective legend {
  width: 100%;
  margin-bottom: 7px;
  padding: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.youth-plan-effective > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.youth-plan-effective label {
  min-width: 0;
  cursor: pointer;
}

.youth-plan-effective input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.youth-plan-effective span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}

.youth-plan-effective input:checked + span {
  background: var(--white);
  color: var(--navy);
}

.youth-plan-effective input:focus-visible + span {
  outline: 3px solid #9ce4ec;
  outline-offset: 2px;
}

.youth-plan-pending-income {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border-radius: 12px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.12);
}

.youth-plan-pending-income[hidden] {
  display: none;
}

.youth-plan-pending-income p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.45;
}

.youth-plan-pending-income .youth-button-secondary {
  justify-self: start;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.youth-budget-help {
  margin: -4px 8px 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.youth-guideline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 18px;
  padding: 28px 32px;
  background: var(--youth-blue-soft);
}

.youth-guideline-card > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.youth-guideline-card {
  margin-top: 18px;
  background: #fff3c9;
}

.youth-check-card > p:not(.youth-card-kicker):not(.youth-form-status) {
  margin: 0 0 25px;
  color: var(--muted);
  line-height: 1.55;
}

.youth-check-card > h2 {
  margin: 0 0 12px;
}

.youth-check-period {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
  text-align: right;
}

.youth-check-overview .overview-head {
  flex-direction: row;
  align-items: baseline;
}

.youth-check-overview {
  border-color: var(--line);
  background: var(--white);
}

.youth-balance-reconcile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.youth-balance-reconcile > div {
  min-width: 0;
}

.youth-balance-reconcile strong {
  color: var(--navy);
  font-size: var(--text-ui);
}

.youth-balance-reconcile p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.youth-balance-reconcile .youth-check-guidance {
  font-size: var(--text-base);
}

.youth-balance-reconcile-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.youth-balance-reconcile .youth-button {
  flex: none;
}

.youth-reserve-explanation {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.youth-check-prompts {
  margin: -4px 0 0;
  padding: 0;
  list-style: none;
}

.youth-check-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
}

.youth-check-row label {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.youth-check-row input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--navy);
}

.youth-check-row input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.youth-check-row input:disabled,
.youth-check-row input:disabled + span {
  cursor: default;
}

.youth-check-row label > span {
  display: grid;
  gap: 5px;
}

.youth-check-row strong {
  font-size: var(--text-ui);
  line-height: 1.35;
}

.youth-check-row small {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.youth-check-status {
  margin: 14px 0 0;
  color: var(--navy);
}

.youth-check-status:empty {
  display: none;
}

.youth-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.youth-check-status:not(:empty) + .youth-check-actions {
  margin-top: 8px;
}

.youth-check-summary {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 0;
  border-color: var(--navy);
  background: var(--navy-gradient);
  color: var(--white);
}

.youth-check-summary > p:not(.youth-card-kicker),
.youth-check-summary p:last-child {
  color: rgba(255, 255, 255, 0.8);
}

.youth-check-summary .youth-card-kicker {
  color: #9ce4ec;
}

.youth-check-summary h2,
.youth-check-summary strong {
  color: var(--white);
}

.youth-check-kpis .youth-check-available.stat.accent {
  background: var(--navy-gradient);
}

.youth-check-kpis .youth-check-available.stat.accent.is-negative {
  background: var(--danger);
}

.youth-check-schedule span {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.45;
}

.youth-check-summary > p:not(.youth-card-kicker) {
  margin: 14px 0 0;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
}

.youth-check-schedule strong {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.45;
}

.youth-check-schedule {
  display: grid;
  margin: 26px 0 22px;
  border-block: 1px solid rgba(255, 255, 255, 0.22);
}

.youth-check-schedule > div {
  display: grid;
  gap: 5px;
  padding-block: 16px;
}

.youth-check-schedule > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.youth-check-schedule span,
.youth-check-schedule small {
  color: rgba(255, 255, 255, 0.72);
}

.youth-check-schedule small {
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.45;
}

.youth-check-summary .youth-button {
  align-self: flex-start;
}

.youth-check-overview + .youth-check-layout {
  margin-top: 18px;
}

.youth-balance-dialog[open],
.youth-onboarding-dialog[open] {
  width: min(500px, calc(100% - 32px));
}

.youth-onboarding-dialog .youth-card-kicker {
  margin-bottom: 5px;
}

.youth-balance-form {
  display: grid;
  gap: 20px;
}

.youth-balance-calculated {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-block: 1px solid var(--line);
}

.youth-balance-calculated span,
.youth-balance-form .field > span {
  color: var(--navy);
  font-size: var(--text-sm);
  font-weight: 750;
}

.youth-balance-calculated strong {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.youth-balance-form .field {
  display: grid;
  gap: 6px;
}

.youth-balance-preview {
  margin: 0;
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--youth-blue-soft);
  color: var(--navy);
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.45;
}

.youth-balance-form .youth-form-status {
  min-height: 0;
  margin: -8px 0 0;
}

.youth-balance-form .youth-form-status:empty {
  display: none;
}

.youth-balance-actions {
  flex-wrap: wrap;
}

html.is-standalone .youth-profile-panel[open],
html.is-standalone .youth-balance-dialog[open] {
  height: max-content;
  max-height: calc(100dvh - 32px);
  align-content: start;
  grid-auto-rows: max-content;
}

html.is-standalone .youth-profile-actions,
html.is-standalone .youth-balance-form {
  align-content: start;
  grid-auto-rows: max-content;
}

.youth-check-agreement {
  margin-top: 18px;
}

.youth-check-agreement > p {
  margin: -10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.youth-check-reference {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.youth-check-reference summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  font-size: var(--text-ui);
  font-weight: 750;
  color: var(--navy);
  cursor: pointer;
}

.youth-check-reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.youth-check-reference-grid h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.youth-check-contract {
  grid-column: 1 / -1;
}

.youth-check-contract-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.youth-check-contract-facts > div {
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  background: var(--youth-paper);
}

.youth-check-contract-facts span,
.youth-check-contract-facts small {
  color: var(--muted);
}

.youth-check-contract-facts span {
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.youth-check-contract-facts strong {
  color: var(--navy);
  font-size: var(--text-ui);
}

.youth-check-contract-facts small {
  line-height: 1.45;
}

.youth-rule-list {
  counter-reset: youth-rule;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.youth-rule-list li {
  counter-increment: youth-rule;
  min-height: 96px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto 1fr;
  align-content: start;
  column-gap: 12px;
  row-gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  background: var(--youth-blue-soft);
}

.youth-rule-list li::before {
  content: counter(youth-rule, decimal-leading-zero);
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.youth-rule-list span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.youth-check-parent-costs {
  align-self: start;
  border-radius: 16px;
  padding: 22px;
  background: var(--youth-warm);
}

.youth-check-parent-costs ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: #554739;
}

.youth-main .youth-card h2,
.youth-main .youth-check-summary h2 {
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.youth-footer {
  min-height: 112px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
}

.youth-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.youth-footer-brand img {
  border: 1px solid var(--line);
  border-radius: 11px;
}

.youth-footer-brand p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.youth-footer-brand strong {
  color: var(--navy);
  font-size: var(--text-ui);
  font-weight: 800;
}

.youth-footer-brand span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .youth-capture-layout {
    grid-template-columns: 1fr;
  }

  html:not(.is-standalone) .youth-capture-layout {
    grid-template-areas:
      "overview"
      "form"
      "entries";
  }
}

@media (max-width: 820px) {
  .youth-main {
    padding-top: 42px;
  }

  .youth-panel-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .youth-overview-grid,
  .youth-section-grid,
  .youth-form-layout,
  .youth-check-layout,
  .youth-plan-layout,
  .youth-analysis-grid,
  .youth-analysis-summary,
  .youth-check-reference-grid {
    grid-template-columns: 1fr;
  }

  .youth-trend-tabs,
  .is-standalone .youth-trend-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .is-standalone .youth-trend-tabs .quick-category-button {
    min-width: 0;
  }

  .youth-capture-kpis {
    grid-template-columns: 1fr;
  }

  .youth-check-contract-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .youth-money-grid {
    grid-template-columns: 1fr;
  }

  .youth-money-grid article {
    min-height: 110px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .youth-money-grid article:last-child {
    border-bottom: 0;
  }

  .youth-budget-summary {
    position: static;
    grid-column: 1;
    grid-row: 1;
  }

  .youth-budget-column {
    grid-column: 1;
    grid-row: 2;
  }

  .youth-budget-editor-head {
    display: none;
  }

  .youth-budget-editor-list {
    gap: 8px;
  }

  .youth-budget-editor-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
    align-items: start;
  }

  .youth-budget-drag-handle {
    align-self: start;
    margin-top: 10px;
  }

  .youth-budget-position {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0 8px;
    padding: 10px 10px 10px 14px;
  }

  .youth-budget-row-summary {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--navy);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .youth-budget-row-summary strong {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--text-ui);
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .youth-budget-row-summary span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 750;
    white-space: nowrap;
  }

  .youth-budget-position > .youth-budget-fix {
    width: 44px;
    min-height: 44px;
    grid-column: 2;
    grid-row: 1;
  }

  .youth-budget-fix > span {
    display: none;
  }

  .youth-budget-inline-editor {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr);
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }

  .youth-budget-inline-editor[hidden] {
    display: none;
  }

  .youth-budget-inline-editor > .youth-budget-name-field {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .youth-budget-inline-editor > .youth-budget-amount-field {
    width: min(100%, 150px);
    grid-column: 1;
    grid-row: auto;
  }

  .youth-budget-row-actions,
  .youth-budget-editor-row.is-draft .youth-budget-row-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .youth-budget-editor-row.is-draft .youth-budget-row-actions {
    width: auto;
    display: flex;
    justify-self: end;
  }

  .youth-budget-row-actions .youth-budget-done {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 0;
    background-clip: padding-box;
  }

  .youth-budget-row-actions .youth-budget-done svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .youth-budget-add-action {
    width: auto;
    justify-content: center;
    justify-self: stretch;
    margin-left: 50px;
  }
}

@media (max-width: 600px) {
  .youth-check-period {
    text-align: right;
  }

  .youth-balance-reconcile {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .youth-balance-reconcile .youth-button {
    width: 100%;
  }

  .youth-balance-reconcile-actions {
    width: 100%;
    display: grid;
  }

  .youth-balance-actions {
    display: grid;
  }

  .youth-balance-dialog .youth-balance-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    align-items: stretch;
  }

  .youth-balance-actions .primary,
  .youth-balance-actions .link-btn {
    width: 100%;
    min-width: 0;
    padding-inline: 6px;
  }

  .youth-onboarding-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .youth-check-contract-facts {
    grid-template-columns: 1fr;
  }

  .youth-header-inner,
  .youth-tabs,
  .youth-main,
  .youth-footer {
    width: min(100% - 32px, 1120px);
  }

  .youth-header-inner {
    min-height: 220px;
    padding-block: 40px 44px;
  }

  .youth-header-copy h1 {
    font-size: clamp(2.55rem, 11.5vw, 3.2rem);
    line-height: 0.98;
  }

  .youth-profile-panel {
    position: fixed;
    inset: auto 16px 16px;
    width: auto;
  }

  .youth-main {
    padding-block: 24px 72px;
  }

  .youth-tabs {
    position: sticky;
    top: 0;
    z-index: 25;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
    overflow: hidden;
  }

  .youth-tabs button {
    min-width: 0;
    padding-inline: 2px;
    font-size: var(--text-sm);
    white-space: nowrap;
  }

  .youth-entry-form {
    scroll-margin-top: 76px;
  }

  .youth-entry-row {
    gap: 5px 12px;
    padding-inline: 0;
  }

  .youth-entry-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: end;
  }

  .youth-balance-card,
  .youth-next-card {
    min-height: 260px;
  }

  .youth-balance-card {
    padding: 30px 24px;
  }

  .youth-balance-card > strong {
    font-size: 3.15rem;
  }

  .youth-balance-actions {
    width: 100%;
    display: grid;
    gap: 6px;
  }

  .youth-check-actions {
    display: grid;
  }

  .youth-check-actions .youth-button {
    width: 100%;
  }

  .youth-link-button {
    justify-self: start;
  }

  .youth-next-card,
  .youth-card,
  .youth-calm-card,
  .youth-check-summary,
  .youth-analysis-grid .youth-card,
  .youth-analysis-trend {
    padding: 24px;
  }

  .youth-capture-kpi {
    min-height: 120px;
    padding: 22px;
  }

  .youth-analysis-summary-balance,
  .youth-analysis-summary-budget {
    padding: 24px;
  }

  .youth-analysis-summary-balance {
    min-height: 180px;
  }

  .youth-analysis-summary-budget > div {
    display: block;
  }

  .youth-analysis-trend .youth-card-heading {
    display: grid;
  }

  .youth-analysis-card-meta > p:last-child {
    white-space: normal;
  }

  .youth-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .youth-budget-editor-head {
    display: none;
  }

  .youth-budget-name-field,
  .youth-budget-amount-field {
    gap: 5px;
  }

  .youth-budget-field-label {
    display: block;
  }

  .youth-budget-editor-row input:not([type="checkbox"]) {
    height: 42px;
  }

  .youth-budget-summary {
    padding: 24px;
  }

  .youth-budget-totals {
    margin: 20px 0 14px;
  }

  .youth-budget-totals div {
    min-height: 48px;
  }

  .youth-plan-status {
    padding: 11px 13px;
  }

  .youth-panel-heading {
    margin-top: 4px;
  }

  .youth-guideline-card {
    display: grid;
    gap: 16px;
    padding: 24px;
  }

  .youth-rule-list {
    grid-template-columns: 1fr;
  }

  .youth-footer {
    min-height: 116px;
  }

}

@media (max-width: 340px) {
  .youth-tabs {
    grid-template-columns: 0.92fr 1fr 0.74fr 1.4fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .youth-tab-panel,
  .toast {
    animation: none;
    transition: none;
  }
}
