/* Finca Terol - additive accessibility improvements. 2026-09-29 */
:root { --ft-focus:#bd4a00; }
html { scroll-behavior:auto; }
body { overflow-wrap:break-word; }
/* Persistent user-controlled text sizing scales relative units without disabling browser zoom. */
html.ft-text-large { font-size:125%; }
html.ft-text-larger { font-size:150%; }
a, button, input, textarea, select, summary { touch-action:manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline:3px solid var(--ft-focus) !important; outline-offset:3px !important;
  box-shadow:0 0 0 2px #fff !important;
}
/* On keyboards, the skip link becomes the very first visible item. */
.ft-skip-link { position:fixed; top:8px; left:8px; z-index:100000; background:#fff;
  color:#122c29; border:3px solid #122c29; font-weight:800; padding:12px 18px;
  transform:translateY(-175%); }
.ft-skip-link:focus { transform:none; }
#main-content:focus { outline:none; }
#main-content { scroll-margin-top:95px; }
.ft-access-toolbar { display:flex; flex-wrap:wrap; gap:9px; align-items:center; padding:8px 0; }
.ft-access-toolbar button { min-height:44px; border:2px solid currentColor; background:#fff;
 color:#164f49; font-size:1rem; font-weight:750; padding:7px 11px; }
.ft-access-toolbar button[aria-pressed="true"] { background:#164f49; color:#fff; }
.ft-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important;
 margin:-1px!important; border:0!important; overflow:hidden!important; clip-path:inset(50%)!important; white-space:nowrap!important; }
/* Big links and flexible content improve motor accessibility and high browser zoom. */
.sidebar a, .tools a { min-height:40px; display:inline-flex; align-items:center; }
button, input[type="submit"], input[type="button"] { min-height:44px; }
input, textarea, select { max-width:100%; }
.section-preview-dialog, .section-upload-dialog, .profile-crop-dialog { max-width:calc(100vw - 18px); }
.section-preview-dialog iframe { max-width:100%; }
@media (max-width:900px) {
 .layout { grid-template-columns:1fr; gap:16px; }
 .sidebar { display:flex; flex-wrap:wrap; gap:6px; }
 .top { flex-wrap:wrap; padding-block:12px; }
 .section-document-actions { flex-wrap:wrap; }
}
@media (max-width:560px) {
 .shell { padding-inline:12px; }
 .ft-access-toolbar { width:100%; }
 .section-document-row { flex-wrap:wrap; }
}
/* Accessible contrast mode: explicit text/background/border colors including dynamic elements. */
html.ft-high-contrast { --ink:#0b0b0b; --teal:#064b36; --soft:#fff; --line:#222; --muted:#333;
 --ft-focus:#a52b00; }
html.ft-high-contrast body, html.ft-high-contrast .site-header,
html.ft-high-contrast .block,html.ft-high-contrast .panel,
html.ft-high-contrast .section-documents-list,html.ft-high-contrast .chatline,
html.ft-high-contrast .section-document-row,html.ft-high-contrast dialog { background:#fff; color:#000; }
html.ft-high-contrast .sidebar a:hover,html.ft-high-contrast .sidebar .active { background:#f4f4f4; color:#000; outline:1px solid #333; }
html.ft-high-contrast a { color:#064b36; text-decoration:underline; text-underline-offset:2px; }
html.ft-high-contrast button:not(.quiet),html.ft-high-contrast input[type="submit"] { background:#064b36; color:#fff; border:1px solid #fff; }
html.ft-high-contrast .alert { background:#fff3f0; color:#661300; border:2px solid #661300; }
html.ft-high-contrast .success { background:#edfff1; color:#063b1c; border:2px solid #176338; }
html.ft-high-contrast input,html.ft-high-contrast select,html.ft-high-contrast textarea { background:#fff; color:#000; border:2px solid #222; }
html.ft-high-contrast .ft-access-open, html.ft-high-contrast .ft-access-dialog button { background:#fff; color:#064b36; border:2px solid #064b36; }
html.ft-high-contrast .ft-access-dialog button[aria-pressed="true"] { background:#064b36; color:#fff; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }
@media (forced-colors:active) { a:focus-visible,button:focus-visible,input:focus-visible { outline:3px solid Highlight!important; } }

/* Single-button accessibility settings modal: keyboard and screen-reader friendly. */
.ft-access-open { display:inline-flex; gap:.4em; align-items:center; justify-content:center; min-height:44px; padding:.5em .85em; background:#fff; border:2px solid #16534b; border-radius:8px; color:#16534b; font:inherit; font-weight:700; cursor:pointer; }
.ft-access-dialog { box-sizing:border-box; color:#142b2a; background:#fff; border:2px solid #16534b; border-radius:12px; padding:1.25rem; width:min(92vw,480px); max-height:85dvh; overflow:auto; box-shadow:0 18px 50px #0007; }
.ft-access-dialog::backdrop { background:#111b1dbb; }
.ft-access-dialog h2 { margin:0 0 .75rem; font-size:1.35em; }
.ft-access-dialog p { margin:.5rem 0 1rem; }
.ft-access-dialog fieldset { border:2px solid #637b76; border-radius:8px; padding:.75em; margin:1em 0; min-width:0; }
.ft-access-dialog legend { font-weight:700; padding:0 .3em; }
.ft-access-dialog .ft-size-options { display:grid; gap:.55em; }
.ft-access-dialog label { display:flex; gap:.65em; align-items:center; min-height:44px; cursor:pointer; }
.ft-access-dialog input[type=radio],.ft-access-dialog input[type=checkbox] { width:1.3em; height:1.3em; flex-shrink:0; accent-color:#16534b; }
.ft-access-dialog .ft-modal-actions { display:flex; justify-content:flex-end; margin-top:1em; }
.ft-access-dialog button { min-height:44px; border:2px solid #16534b; border-radius:8px; padding:.45em 1em; background:#16534b; color:#fff; font:inherit; font-weight:700; cursor:pointer; }
html.ft-high-contrast .ft-access-dialog { color:#000; background:#fff; border:3px solid #000; }
html.ft-high-contrast .ft-access-open { background:#fff; color:#064b36; border:2px solid #064b36; }
html.ft-high-contrast .ft-access-dialog fieldset { border:2px solid #000; }
@media (max-width:560px){.ft-access-open { margin-top:.4rem; } .ft-access-dialog { padding:.9rem; }}

/* Curated palette: foreground is a dark #102a29 on selected light backgrounds.
   Original buttons keep their own background/foreground pair. High contrast always wins. */
html:not(.ft-colors-suspended) .ft-custom-bg { background:var(--ft-personal-bg)!important; color:var(--ft-personal-text)!important; }
html:not(.ft-colors-suspended) .ft-custom-bg:is(input,textarea,select) { color:var(--ft-personal-text)!important; border-color:#34544f!important; }
html:not(.ft-colors-suspended) .ft-custom-bg :is(h1,h2,h3,h4,h5,h6,p,span,small,label,legend):not(button *) { color:var(--ft-personal-text); }
html:not(.ft-colors-suspended) .ft-custom-bg a:not(.button) { color:#074c42!important; text-decoration:underline; }
.ft-access-dialog .ft-color-swatches { display:flex; flex-wrap:wrap; gap:.7rem; margin:.75rem 0 1rem; }
.ft-access-dialog .ft-color-option { width:50px; min-height:52px; display:flex; flex-direction:column; justify-content:center; gap:.15rem; cursor:pointer; }
.ft-access-dialog .ft-color-chip { display:flex; justify-content:center; align-items:center; width:36px; height:36px; border:2px solid #36514e; border-radius:6px; font-size:26px; color:#122a28; }
.ft-access-dialog .ft-color-option:has(input:checked) .ft-color-chip { outline:3px solid #a33700; outline-offset:2px; }
.ft-access-dialog .ft-color-option input { margin:0; }
.ft-access-dialog .ft-color-title { display:block; font-weight:700; margin-top:.9rem; }
.ft-access-dialog #ft-access-area,.ft-access-dialog #ft-access-target { width:100%; min-height:44px; margin:.35rem 0 .85rem; border:2px solid #34544f; color:#142b2a; background:#fff; padding:.35em; }
.ft-access-dialog .ft-colors-reset { background:#fff!important; color:#164b41!important; border:2px solid #164b41!important; margin:.65rem 0; }
.ft-access-dialog .ft-color-notice { font-size:.9em; }
.ft-access-dialog .ft-color-status { min-height:1.2em; font-weight:700; }
html.ft-high-contrast .ft-custom-bg,html.ft-high-contrast .ft-custom-bg:is(input,textarea,select) { background:#fff!important; color:#000!important; }
html.ft-high-contrast .ft-custom-bg a { color:#064b36!important; }
