:root {
  color-scheme: light;
  --page: #f4f7fa;
  --surface: #ffffff;
  --text: #142b42;
  --muted: #526579;
  --line: #d8e1e9;
  --accent: #087f68;
  --accent-light: #e6f5ef;
  --button: #123756;
  --button-text: #ffffff;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.5; }
button { font: inherit; cursor: pointer; }
.site-header, .bottom-nav { background: var(--surface); border-color: var(--line); }
.site-header { position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line); }
.header-inner, .nav-inner, main { width: min(100% - 2rem, 900px); margin: 0 auto; }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-logo { display: block; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; }
.brand-name { margin: 0; font-size: 1.05rem; }
.school-name { color: var(--muted); font-size: .8rem; }
main { min-height: calc(100vh - 132px); padding: 1.5rem 0 2rem; }
.view h1 { margin: 0 0 1rem; font-size: 1.65rem; }
.view .details-title { margin: 0 0 1rem; font-size: 1.65rem; }
.intro { margin: -.5rem 0 1.25rem; color: var(--muted); }
.search-label { display: block; margin-bottom: .35rem; font-weight: bold; }
.job-search { width: 100%; min-height: 44px; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.job-search:focus-visible { outline: 3px solid #db8b28; outline-offset: 2px; }
.search-status { min-height: 1.5em; margin: .35rem 0 .75rem; color: var(--muted); font-size: .9rem; }
.job-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel, .job-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.job-card h2, .panel h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.company, .muted { color: var(--muted); }
.job-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.tag { background: var(--accent-light); color: var(--accent); border-radius: 5px; padding: .2rem .5rem; font-size: .85rem; }
.job-card p { margin: .5rem 0 1rem; }
.primary, .secondary { min-height: 42px; padding: .55rem .9rem; border: 0; border-radius: 6px; font-weight: bold; }
.primary { background: var(--button); color: var(--button-text); }
.secondary { background: var(--accent-light); color: var(--text); }
.primary:focus-visible, .secondary:focus-visible, .nav-button:focus-visible { outline: 3px solid #db8b28; outline-offset: 3px; }
.progress { height: 12px; margin: .7rem 0; overflow: hidden; background: var(--line); border-radius: 8px; }
.progress span { display: block; width: 45%; height: 100%; background: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1rem; }
.stat { padding: .75rem; background: var(--page); border-radius: 7px; }
.stat strong, .stat span { display: block; }
.stat span { color: var(--muted); font-size: .85rem; }
.profile-heading { display: flex; align-items: center; gap: 1rem; }
.profile-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-facts { display: grid; gap: .75rem; margin: 1rem 0 0; }
.profile-facts dt { color: var(--muted); font-size: .85rem; }
.profile-facts dd { margin: 0; font-weight: bold; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.study-progress { width: 45%; }
.profile-quote { margin: 1rem 0 .4rem; padding-left: .75rem; border-left: 3px solid var(--accent); }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: var(--button); color: white; font-weight: bold; }
.bottom-nav { position: sticky; bottom: 0; border-top: 1px solid var(--line); }
.nav-inner { display: flex; justify-content: space-around; gap: .5rem; padding: .5rem 0; }
.nav-button { flex: 1; min-height: 44px; padding: .4rem; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: bold; }
.nav-button[aria-current="page"] { background: var(--accent-light); color: var(--accent); }
.notice { border-left: 4px solid var(--accent); }
.application-dialog { width: min(560px, calc(100% - 2rem)); max-height: 90vh; overflow-y: auto; margin: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.application-dialog::backdrop { background: rgb(7 20 31 / 65%); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.application-form { display: grid; gap: .5rem; }
.application-form label { margin-top: .5rem; font-weight: bold; }
.application-form input, .application-form textarea { width: 100%; padding: .65rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.application-form input:focus-visible, .application-form textarea:focus-visible { outline: 3px solid #db8b28; outline-offset: 2px; }
.field-hint { color: var(--muted); font-size: .85rem; }
.form-actions { display: flex; justify-content: flex-end; margin-top: .5rem; }
.application-success { padding: 1rem; border-radius: 6px; background: var(--accent-light); color: var(--text); }
.income-panel { margin-top: 1rem; }
.income-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.income-heading h2 { margin: 0; }
.income-heading p { margin: .25rem 0 0; }
.income-status { flex: 0 0 auto; padding: .25rem .55rem; border-radius: 999px; background: var(--accent-light); color: var(--accent); font-size: .85rem; font-weight: bold; }
.income-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.income-totals div { padding: .75rem; background: var(--page); border-radius: 7px; }
.income-totals strong, .income-totals span { display: block; }
.income-totals span { color: var(--muted); font-size: .85rem; }
.month-list { display: grid; gap: .9rem; margin-top: 1rem; }
.month-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 5rem; align-items: center; gap: .75rem; }
.month-row strong { text-align: right; }
.month-track { height: 10px; overflow: hidden; border-radius: 8px; background: var(--line); }
.month-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.income-calculator label { display: block; margin: 1rem 0 .4rem; font-weight: bold; }
.calculator-controls { display: flex; gap: .5rem; }
.calculator-controls input { min-width: 0; min-height: 44px; flex: 1; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.calculator-controls input:focus-visible { outline: 3px solid #db8b28; outline-offset: 2px; }
.calculator-result { min-height: 1.5em; margin-bottom: 0; font-weight: bold; }
.notice-panel { border-left: 4px solid var(--accent); }

@media (max-width: 620px) {
  .job-list { grid-template-columns: 1fr; }
  .profile-panels { grid-template-columns: 1fr; }
  main { padding-top: 1rem; }
  .stats { gap: .4rem; }
  .stat { padding: .55rem; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .header-inner { min-height: 52px; }
  .nav-inner { padding: .25rem 0; }
  .nav-button { min-height: 38px; }
  main { padding-top: .75rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #15212b;
    --surface: #202f3b;
    --text: #edf4f7;
    --muted: #bac8d1;
    --line: #40515e;
    --accent: #70d6b3;
    --accent-light: #25483f;
    --button: #d1f0e4;
    --button-text: #142b42;
  }
}