:root {
  color-scheme: light;
  --ink: #182c32;
  --muted-ink: #475e66;
  --surface: #fff;
  --canvas: #eef4f3;
  --line: #cbdad9;
  --brand: #104f50;
  --focus: #8c390d;
  font: 1rem/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
main { max-width: 76rem; margin: auto; padding: clamp(.75rem, 3vw, 2rem); min-width: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 .7rem; }
h2 { font-size: clamp(1.2rem, 3vw, 1.45rem); }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
section, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
section { padding: clamp(.75rem, 2.3vw, 1.35rem); margin-block: 1rem; }
small, .muted, .helptext { color: var(--muted-ink); }
input, select, textarea, button { font: inherit; }
input:not([type="hidden"]), select, textarea {
  min-height: 2.75rem; max-width: 100%; padding: .45rem .6rem;
  border: 1px solid #657b7d; border-radius: .45rem; color: var(--ink); background: white;
}
button {
  min-height: 2.75rem; padding: .45rem .8rem; border: 1px solid var(--brand);
  border-radius: .45rem; color: white; background: var(--brand); cursor: pointer;
}
button:hover { background: #163f40; }
nav, .actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
nav a, .actions > a { display: inline-flex; align-items: center; min-height: 2.75rem; }
nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: .16em; }
.filters { align-items: end; }
.filters label { display: block; }
.notice, .warning, .errorlist, .empty-state {
  padding: .65rem .9rem; border-radius: .45rem; overflow-wrap: anywhere;
}
.notice { background: #e5f3ed; color: #174d36; }
.warning { background: #fff0ce; color: #5e3907; }
.errorlist { background: #fcebed; color: #841d31; padding-inline-start: 1.8rem; }
.empty-state { background: var(--canvas); color: var(--muted-ink); }
.skip-link, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus {
  z-index: 1; inset: .5rem auto auto .5rem; width: auto; height: auto;
  padding: .65rem; clip-path: none; background: white;
}
.site-bar { background: #123c3c; color: white; }
.site-shell {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.2rem;
  max-width: 76rem; margin: auto; padding: .45rem clamp(.75rem, 3vw, 2rem);
}
.site-bar a { color: #fff; }
.site-bar :focus-visible { outline-color: #fbd087; }
.site-brand { font-weight: 800; letter-spacing: .08em; text-decoration: none; padding-block: .5rem; }
.site-nav { flex: 1 1 auto; }
.site-bar button { border-color: #9ebeb8; }
.profile-link { max-width: min(16rem, 100%); overflow-wrap: anywhere; }
.hero {
  padding: clamp(1rem, 4vw, 2.25rem); margin: 0 0 1rem;
  background: #dbece7; border: 1px solid #bcd7cd; border-radius: 1rem;
}
.hero p { margin-block: 0 .55rem; }
.tiles, .cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .75rem;
}
.tile, .cards > div {
  background: white; border: 1px solid var(--line); border-radius: .75rem;
  padding: 1rem; min-width: 0; overflow-wrap: anywhere; margin: 0;
}
.tile h2 { margin: 0 0 .5rem; }
.tile p { margin: .45rem 0; }
.tile strong, .cards dd { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.table-scroll table { width: 100%; border-collapse: collapse; }
.table-scroll th, .table-scroll td { text-align: start; padding: .55rem; border-bottom: 1px solid var(--line); }
.narrow { max-width: 34rem; }
.narrow form label { display: block; }
.narrow form input:not([type="hidden"]) { width: 100%; }
.narrow form button { margin-block-start: .75rem; }
.finance-nav { margin-block-end: 1rem; }
@media (max-width: 40rem) {
  .site-nav { order: 1; flex-basis: 100%; }
  .site-shell > form { margin-inline-start: auto; }
}
@media print {
  .no-print, .skip-link { display: none !important; }
  body { background: white; }
}

.filters > p { margin: 0; }
.calendar-modes a { padding-inline: .65rem; border-radius: .45rem; }
.calendar-modes a[aria-current="page"] { background: var(--brand); color: white; }
.calendar-grid .day { min-height: 3.25rem; }
.calendar-grid .day[aria-current="date"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.calendar-grid .day:focus-visible { outline: 3px solid var(--focus); outline-offset: -1px; }
.calendar-grid .father, .legend .father { background: #dcecfb; color: #173d62; }
.calendar-grid .mother, .legend .mother { background: #f4e1ed; color: #5a2146; }
.week-grid .day { min-height: 4rem; }
.care-share { display: block; width: min(100%, 6rem); height: .7rem; margin-block: .2rem; }
.care-share.father { accent-color: #173d62; }
.care-share.mother { accent-color: #5a2146; }

@media print {
  main { max-width: none; padding: 0; }
}

.finance-list, .finance-history, .finance-charts, .finance-heading {
  overflow-wrap: anywhere;
}

.finance-history {
  border-block-start: 1px solid #d8e1eb;
  padding-block: .75rem;
}

.finance-reason {
  white-space: pre-wrap;
}

.finance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.finance-charts dt {
  font-weight: 650;
}

.finance-charts dd {
  margin: .3rem 0 1rem;
}

.finance-charts dd div {
  display: grid;
  grid-template-columns: minmax(9rem, auto) minmax(4rem, 20rem);
  align-items: center;
  gap: .5rem;
}

.finance-charts meter {
  width: 100%;
}

.case-text { overflow-wrap: anywhere; }
.case-notes { white-space: pre-wrap; }
.case-entry { border-block-start: 1px solid var(--line); padding-block: .75rem; }

@media print {
  .case-entry h3, .case-text h2 { break-after: avoid; }
  .case-entry { break-inside: avoid; }
}

.narrow .case-form input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-inline-end: .4rem;
}

.import-row {
  min-inline-size: 0;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.narrow .import-row input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-inline-end: .4rem;
}

.document-form { display: grid; gap: .8rem; max-width: 42rem; }
.document-form label { display: block; font-weight: 600; }
.document-form :is(input:not([type="hidden"]), textarea) { width: 100%; }
.document-form button { justify-self: start; }
.document-description { overflow-wrap: anywhere; }

@media screen {
  .high-contrast {
    --ink: #fff;
    --muted-ink: #fff;
    --surface: #000;
    --canvas: #000;
    --line: #fff;
    --brand: #ffeb00;
    --focus: #ffeb00;
    color-scheme: dark;
  }
  .high-contrast :is(body, header, section, article, .panel, .site-bar, .card, .tile,
     .cards > div, .notice, .warning, .empty-state, .errorlist, .skip-link,
     input:not([type="hidden"]), textarea, select, .calendar-grid .day, .legend span) {
    background: #000;
    color: #fff;
    border-color: #fff;
  }
  .high-contrast :is(a, .cards dt, small, .helptext) { color: #ffeb00; }
  .high-contrast :is(button, .calendar-modes a[aria-current="page"]) {
    background: #ffeb00;
    color: #000;
    border-color: #ffeb00;
  }
  .high-contrast :focus-visible { outline: 3px solid #ffeb00; }
}

@media print {
  nav, form, button { display: none !important; }
  :root { --ink: #000; --surface: #fff; --canvas: #fff; --brand: #000; }
  h1, h2, h3 { break-after: avoid; }
}

.document-results li,
.document-description,
.document-form {
    overflow-wrap: anywhere;
}

.document-form input[type="file"] {
    max-inline-size: 100%;
}

/* WIKTOR_PUBLIC_WELCOME_V1 */
.welcome-shell {
    width: min(1100px, calc(100% - 2rem));
    margin: 2rem auto 4rem;
}
.welcome-hero {
    padding: clamp(1.5rem, 5vw, 3.5rem);
    border-radius: 1.4rem;
    background: linear-gradient(135deg, #123c3c, #24645e);
    color: #fff;
    box-shadow: 0 12px 35px #123c3c20;
}
.welcome-kicker {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    opacity: .85;
}
.welcome-hero h1 {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    margin: .5rem 0;
    line-height: 1;
}
.welcome-lead {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    max-width: 48rem;
}
.welcome-hero p {
    max-width: 54rem;
}
.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.5rem;
}
.welcome-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .9rem 1.3rem;
    border-radius: .7rem;
    background: #fbd087;
    color: #123c3c !important;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}
.welcome-button:hover {
    filter: brightness(.95);
}
.welcome-button-secondary {
    background: transparent;
    border: 1px solid #fff;
    color: #fff !important;
}
.welcome-section {
    margin-block: 2.8rem;
}
.welcome-section > h2,
.welcome-privacy h2,
.welcome-join h2 {
    color: #123c3c;
}
.welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.welcome-card {
    padding: 1.35rem;
    border: 1px solid #dce5e2;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 4px 16px #123c3c0b;
}
.welcome-card h3 {
    margin: .55rem 0;
    color: #123c3c;
}
.welcome-card p {
    margin-bottom: 0;
}
.welcome-icon {
    font-size: 1.8rem;
}
.welcome-privacy,
.welcome-join {
    padding: clamp(1.2rem, 4vw, 2rem);
    margin-block: 2rem;
    border-radius: 1rem;
    background: #f0f5f3;
}
.welcome-privacy li {
    margin-block: .45rem;
}
.welcome-join {
    background: #f8f5ed;
}
.welcome-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #52635f;
}
.welcome-footer strong {
    color: #123c3c;
    letter-spacing: .15em;
}
@media (max-width: 600px) {
    .welcome-shell {
        width: calc(100% - 1rem);
        margin-top: 1rem;
    }
    .welcome-hero {
        border-radius: 1rem;
    }
    .welcome-actions,
    .welcome-button {
        width: 100%;
        box-sizing: border-box;
    }
}
/* END WIKTOR_PUBLIC_WELCOME_V1 */
