:root {
  color-scheme: light;
  --navy: #27426d;
  --taupe: #bfae9d;
  --text: #182940;
  --muted: #546477;
  --line: #e3ded7;
  --paper: #f8f6f3;
  font: 15px/1.45 system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, input, select, textarea { border-radius: 8px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1500px; margin: auto; padding: 10px 30px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand, .account, .week-controls, .filters, .checks { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; width: 76px; height: 53px; object-fit: contain; }
.eyebrow { color: var(--navy); font-weight: 750; font-size: .72rem; letter-spacing: .13em; }
.account { color: var(--muted); }
main { max-width: 1500px; margin: auto; padding: 36px 30px 56px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
h1 { color: var(--navy); font: 500 clamp(2rem, 4vw, 3.15rem)/1.12 Georgia, serif; margin: 7px 0 9px; }
h2 { font-size: 1.04rem; }
.muted, .summary { color: var(--muted); }
.demo { margin-left: 8px; padding: 3px 6px; border-radius: 5px; background: #eae1d7; letter-spacing: .04em; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: white; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px; }
.week-controls, .filters { flex-wrap: wrap; }
.week-controls h2 { margin: 0 4px; }
.filters label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .86rem; }
.filters input { width: 145px; }
.quiet, .primary, .danger { border: 1px solid var(--line); padding: 8px 12px; background: white; color: var(--navy); font-weight: 650; }
.quiet:hover, .task:hover { background: #f3eee8; }
a.quiet { border-radius: 8px; text-decoration: none; }
.primary { border-color: var(--navy); color: white; background: var(--navy); padding: 10px 15px; }
.primary:hover { background: #1a3358; }
.danger { color: #8a3336; margin-right: auto; }
.arrow { min-width: 38px; font-size: 1.25rem; line-height: 1; }
input, select, textarea { border: 1px solid #cfc8bf; padding: 8px 9px; color: var(--text); background: white; min-width: 0; }
.summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 1px; font-size: .85rem; }
.board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
.day { min-height: 300px; border: 1px solid var(--line); border-radius: 12px; background: #f3efe9; min-width: 0; }
.day.current { border-color: var(--navy); }
.day-header { display: flex; justify-content: space-between; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); padding: 9px; }
.day-header h3 { font-size: .87rem; }
.day-date { display: block; font-size: 1.25rem; color: var(--navy); }
.day.current .day-header { background: #e5ebf4; border-radius: 11px 11px 0 0; }
.day-content { padding: 8px; display: grid; gap: 7px; }
.task { display: grid; gap: 4px; text-align: left; width: 100%; background: white; color: var(--text); border: 1px solid var(--line); border-left: 3px solid var(--taupe); padding: 8px; overflow-wrap: anywhere; }
.task.work { border-left-color: var(--navy); }
.task.health { border-left-color: #718176; }
.task.done { background: #eef2ed; }
.task small, .empty { color: var(--muted); font-size: .79rem; }
.task-time { color: var(--navy); font-weight: 750; font-size: .78rem; }
.task-note { white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.empty { padding: 4px; }
@font-face {
  font-family: Hanken;
  src: url('/hanken-grotesk.ttf') format('truetype');
  font-display: swap;
}
body:has(.login:not([hidden])) { background: #f7f5f2; }
body:has(.login:not([hidden])) .site-header { display: none; }
main:has(.login:not([hidden])) { padding: 0; }
.login {
  max-width: 500px;
  margin: 50px auto;
  padding: 25px;
  color: #263c5c;
  font: 16px/1.55 Hanken, Arial, sans-serif;
}
.login > img { display: block; width: min(220px, 100%); height: 140px; object-fit: contain; margin: 0 auto 32px; }
.login > h1, .login > p { text-align: center; }
.login > h1 { color: inherit; font: 700 32px/1.2 Hanken, Arial, sans-serif; letter-spacing: -.6px; margin: 0 0 16px; }
.login > .eyebrow { color: inherit; font-size: 11px; letter-spacing: 1.9px; margin-bottom: 12px; }
.login form { margin-top: 28px; padding: 30px; border: 1px solid #e6e0d9; border-radius: 10px; background: white; }
.login h2 { margin: 0 0 16px; font-size: 23px; line-height: 1.3; }
.login label { display: grid; gap: 7px; margin-bottom: 18px; font-size: 14px; font-weight: 650; }
.login input { width: 100%; min-height: 44px; padding: 10px 12px; border-color: #bdb9b3; border-radius: 6px; color: inherit; }
.login button { width: 100%; padding: 11px 19px; border-radius: 7px; }
.login [role="alert"] { margin-bottom: 24px; padding: 17px 20px; border-left: 4px solid var(--navy); border-radius: 4px; background: #eae2d8; }
@media (max-width: 750px) { .login { margin: 15px auto; } }
.form-grid label { display: grid; gap: 5px; font-weight: 650; }
dialog { width: min(540px, calc(100% - 24px)); border: 1px solid var(--line); border-radius: 14px; color: var(--text); padding: 22px; }
dialog::backdrop { background: #172a49a6; }
.dialog-heading, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-actions { justify-content: end; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 15px 0; }
.full { grid-column: 1 / -1; }
.checks { gap: 20px; flex-wrap: wrap; }
.checks input { accent-color: var(--navy); }
#notice, #form-error, #horse-day-error, #horse-manager-error { padding: 9px; background: #f7e9df; border-radius: 7px; margin: 8px 0; }
.views { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.views [aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: white; }
.toolbar > #time-filters:not([hidden]) { margin-left: auto; }
.horse-board { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.horse-board table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; min-width: 870px; }
.horse-board th, .horse-board td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.horse-board tr > :last-child { border-right: 0; }
.horse-board tbody tr:last-child > * { border-bottom: 0; }
.horse-board th { padding: 10px; text-align: left; background: #f3efe9; color: var(--navy); overflow-wrap: anywhere; }
.horse-board th[scope="col"] { text-transform: capitalize; }
.horse-board .horse-name { position: sticky; left: 0; z-index: 1; width: 132px; }
.horse-board td { padding: 4px; vertical-align: top; }
.horse-board .horse-today { background: #eaf0f8; }
.horse-date { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); }
.horse-cell { width: 100%; min-height: 54px; display: grid; align-content: start; gap: 5px; padding: 3px; text-align: left; background: transparent; border: 1px solid transparent; color: var(--text); }
.horse-cell:hover { border-color: var(--taupe); background: #fff; }
.horse-plus { align-self: center; justify-self: center; color: var(--muted); font-size: 1.1rem; padding-top: 8px; }
.horse-note { display: grid; gap: 2px; padding: 5px; background: #edf0f6; border-radius: 5px; font-size: .8rem; overflow-wrap: anywhere; }
.horse-note strong { color: var(--navy); }
.horse-note span { white-space: pre-wrap; }
.horse-care { background: #edf2ec; }
.horse-appointment { background: #f2e8dc; }
.horse-empty { display: grid; gap: 6px; margin-bottom: 12px; padding: 16px; color: var(--muted); }
.horse-empty h2 { color: var(--navy); font-size: 1rem; }
.horse-fields { display: grid; gap: 10px; margin-top: 12px; }
.horse-fields label, .horse-add-form label { display: grid; gap: 4px; font-weight: 650; }
.horse-fields textarea { resize: vertical; }
.horse-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 14px; }
.horse-list { padding: 0; margin: 10px 0 0; list-style: none; }
.horse-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 0; overflow-wrap: anywhere; }
.horse-list li:last-child { border-bottom: 0; }
@media (max-width: 1050px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } .day { min-height: 170px; } }
@media (max-width: 690px) {
  main { padding: 23px 13px 35px; }
  .header-inner { padding: 8px 13px; }
  .account span { display: none; }
  .intro { display: grid; justify-items: start; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters label span { display: none; }
  .horse-board .horse-name { width: 104px; }
}
@media (max-width: 410px) {
  .board { grid-template-columns: 1fr; }
  .day { min-height: 95px; }
  .day-date { display: inline; margin-left: 6px; }
  .form-grid { grid-template-columns: 1fr; }
}
