/* ============================================================
   Senior-friendly layer (loaded after app.css)
   - larger text, strong contrast, big touch targets (>=56px)
   - clear focus, plain labels, big tiles, bottom tab bar on phones
   - user controls: text size (A-/A+) and high contrast
   ============================================================ */
:root { --fs: 1.2; --ink: #16201b; --muted: #3f4a44; }
html { font-size: calc(16px * var(--fs)); }
html[data-fs="1"] { --fs: 1.2; } html[data-fs="2"] { --fs: 1.4; } html[data-fs="3"] { --fs: 1.65; } html[data-fs="0"] { --fs: 1.05; }
body { font-size: 1rem; line-height: 1.85; color: var(--ink); }
.hint, .section-sub, .stat-card .lbl, .hero p.sub { color: var(--muted) !important; font-size: 1rem; }
.hint { font-size: .95rem; }
a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.btn, .main-nav a, .tile, .tabbar a, .card h2 a { text-decoration: none; }

/* focus that can be seen */
:focus-visible { outline: 4px solid #1a56c8; outline-offset: 3px; border-radius: 8px; }

/* big, forgiving controls */
.btn { min-height: 56px; padding: 14px 30px; font-size: 1.05rem; line-height: 1.4; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-sm { min-height: 48px; padding: 10px 20px; font-size: 1rem; }
.btn-gold { background: #8a6420; color: #fff; }          /* 5.9:1 on white */
.btn-outline { border-width: 3px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=url], input[type=number], select, textarea {
  min-height: 56px; font-size: 1.05rem; padding: 14px 16px; border: 2px solid #7b8a82; border-radius: 14px;
}
label { font-size: 1.05rem; margin-top: 20px; }
.check input, input[type=checkbox], input[type=radio] { width: 26px !important; height: 26px; }
.badge { font-size: .95rem; padding: 4px 14px; }
.alert { font-size: 1.05rem; border-width: 2px; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); } h2 { font-size: clamp(1.5rem, 4vw, 2rem); } h3 { font-size: 1.3rem; }

/* header: simple, big */
.header-inner { padding: 12px 20px; }
.main-nav a { font-size: 1.05rem; padding: 12px 16px; min-height: 48px; display: inline-flex; align-items: center; }
.nav-admin { color: #7a5712; }
.lang-switch { color: #7a5712 !important; border-width: 2px; }
.nav-toggle { display: none; font-size: 1.15rem; font-weight: 800; border: 3px solid var(--emerald); border-radius: 14px; padding: 10px 18px; min-height: 52px; background: #fff; }
.nav-more summary { font-size: 1.05rem; padding: 12px 16px; min-height: 48px; }
.nav-more > div a { padding: 14px 16px; font-size: 1.05rem; }

/* accessibility toolbar */
.a11y-bar { display: flex; gap: 6px; align-items: center; }
.a11y-bar button { min-width: 48px; min-height: 48px; border-radius: 12px; border: 2px solid var(--emerald); background: #fff; color: var(--emerald); font: inherit; font-weight: 800; cursor: pointer; }
.a11y-bar button[aria-pressed="true"] { background: var(--emerald); color: #fff; }
.a11y-bar .fs-minus { font-size: .95rem; } .a11y-bar .fs-plus { font-size: 1.3rem; }

/* "What would you like to do?" tiles */
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tile { display: flex; align-items: center; gap: 18px; padding: 22px; background: #fff; border: 3px solid var(--emerald); border-radius: 20px; color: var(--ink); min-height: 112px; box-shadow: var(--shadow); transition: transform .15s; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); background: #f0f8f4; }
.tile .t-ico { font-size: 2.6rem; line-height: 1; flex: none; }
.tile strong { display: block; font-size: 1.3rem; color: var(--emerald); line-height: 1.3; }
.tile span.t-sub { display: block; font-size: 1rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.tile.primary { background: var(--emerald); border-color: var(--emerald); }
.tile.primary strong, .tile.primary .t-sub { color: #fff; }
.tile.primary:hover { background: var(--cedar); }
.quick { padding: 36px 0 8px; } .quick h2 { text-align: center; margin: 0 0 22px; }

/* phone bottom tab bar */
.tabbar { display: none; }
@media (max-width: 1100px) {
  body { padding-bottom: 92px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; padding: 12px 16px 20px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow-lg); max-height: 75vh; overflow: auto; }
  .main-nav.open { display: flex; }
  .main-nav a, .nav-more summary { font-size: 1.2rem; padding: 16px; border-bottom: 1px solid #e3e8e4; width: 100%; }
  .nav-more > div { position: static; box-shadow: none; padding: 0 12px; }
  .site-header { position: sticky; }
  .a11y-bar { justify-content: center; padding: 10px 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: #fff; border-top: 3px solid var(--emerald); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; font: inherit; font-size: .9rem; font-weight: 800; color: var(--emerald); background: none; border: 0; cursor: pointer; padding: 6px 2px; }
  .tabbar .ti { font-size: 1.7rem; line-height: 1; }
  .tabbar a[aria-current="page"] { background: #e6f4ee; }
  .tile { min-height: 100px; }
}

/* high contrast mode */
html[data-contrast="high"] { --ink: #000; --muted: #000; --emerald: #003b2a; --cedar: #005a40; --ivory: #fff; }
html[data-contrast="high"] body { background: #fff; }
html[data-contrast="high"] .card, html[data-contrast="high"] .tile { border: 3px solid #000; box-shadow: none; }
html[data-contrast="high"] .hero { background: #fff; }
html[data-contrast="high"] .btn-outline { border-color: #000; color: #000; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* second pass: calmer header, shorter hero */
.brand, .brand * { text-decoration: none !important; }
.a11y-bar button { padding: 0 12px; font-size: 1rem; }
.a11y-bar .contrast-btn { font-size: .95rem; }
.main-nav { gap: 2px; }
.main-nav a { padding: 10px 12px; }
@media (min-width: 1101px) { .header-inner { flex-wrap: wrap; } .main-nav { flex-wrap: wrap; justify-content: flex-end; } }
.hero { padding: 36px 20px 44px; }
.hero-cedar { width: min(150px, 40vw); margin-bottom: 10px; }
.hero-actions { display: none; }          /* replaced by the big tiles right below */
.hero p.sub { margin-bottom: 0; }

/* third pass: one-row desktop header, tiles visible without scrolling */
@media (min-width: 1101px) {
  .main-nav > a:first-of-type { display: none; }            /* brand already links home */
  .main-nav a, .nav-more summary { padding: 8px 10px; font-size: 1rem; }
  .lang-switch { padding: 6px 12px !important; min-height: 44px; }
  .header-inner { flex-wrap: nowrap; padding: 8px 16px; }
  .brand-text small { display: none; }
}
.hero { padding: 22px 20px 20px; }
.hero-cedar, .hero .hero-en, .hero p.sub { display: none; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 6px; }
.hero .slogan { font-size: 1.15rem; margin: 0; }
.quick { padding-top: 22px; }
@media (min-width: 1101px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .a11y-bar { gap: 4px; margin-inline-end: 6px; } .a11y-bar button { min-width: 44px; min-height: 44px; padding: 0 8px; }
  .main-nav a, .nav-more summary { padding: 8px 8px; font-size: .98rem; }
  .brand-text strong { font-size: 1rem; }
  .main-nav { flex-wrap: nowrap; }
}
@media (min-width: 1101px) { .main-nav a, .nav-more summary { white-space: nowrap; } }
input[type=range] { height: 40px; width: 100%; accent-color: var(--emerald); }
input[type=range]::-webkit-slider-thumb { width: 32px; height: 32px; }
input[type=range]::-moz-range-thumb { width: 32px; height: 32px; }
.wizard-steps .step { font-size: .95rem; padding: 10px 16px; }
.photo-add { min-height: 56px; }
