:root {
  --ink: #17332e;
  --forest: #123c35;
  --forest-light: #1f5b50;
  --paper: #f7f8f3;
  --white: #fff;
  --line: #d9ded4;
  --muted: #65716c;
  --moss: #c9d8a8;
  --hamaca: #93c90f;
  --sun: #e8b44d;
  --danger: #a33b36;
  --shadow: 0 18px 50px rgba(26, 56, 49, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.has-dashboard-access #accessGate { display: none !important; }
.has-dashboard-access #reportsView { display: block !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 243, .92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { min-width: 0; min-height: 44px; color: var(--forest); text-decoration: none; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--forest); color: white; border-radius: 9px 9px 9px 2px; font-family: "Newsreader", serif; font-size: 20px; }
.brand-name { white-space: nowrap; }
.brand-credit { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.brand-credit::before { content: "|"; margin-right: 10px; color: var(--line); }
.topbar-actions { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.topbar-link, .text-button { color: var(--forest); font-size: 13px; font-weight: 700; text-decoration: none; }
.topbar-link { min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.text-button { min-width: 44px; min-height: 44px; border: 0; padding: 0 8px; background: transparent; }
.save-status { font-size: 13px; color: var(--muted); }

main { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.intro { padding: clamp(58px, 9vw, 108px) 0 64px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 50px; align-items: end; }
.eyebrow, .section-kicker, .matter-label { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 700; color: var(--forest-light); }
.intro .eyebrow { grid-column: 1 / -1; margin: 0 0 -30px; }
h1 { font-family: "Newsreader", serif; font-size: clamp(52px, 8vw, 96px); font-weight: 500; letter-spacing: -.055em; line-height: .88; margin: 0; }
h1 em { color: var(--forest-light); font-weight: 500; }
.intro-copy { margin: 0 0 6px; color: var(--muted); font-size: 16px; max-width: 420px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.general { padding: clamp(26px, 4vw, 46px); display: grid; grid-template-columns: 1fr 2fr; gap: 52px; }
.section-heading h2, .matters-heading h2 { margin: 7px 0 0; font-family: "Newsreader", serif; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; font-weight: 600; }
.general-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.general-grid label:first-child { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
input, textarea, select {
  width: 100%; scroll-margin-block: 100px; border: 1px solid #c9d0c6; border-radius: 10px; background: #fbfcf9; color: var(--ink); padding: 13px 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
select { min-height: 50px; cursor: pointer; }
textarea { resize: vertical; min-height: 104px; }
input:focus, textarea:focus, select:focus { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(31, 91, 80, .12); background: white; }
input::placeholder, textarea::placeholder { color: #737f79; font-weight: 400; opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; box-shadow: 0 0 0 3px rgba(163, 59, 54, .1); }
.field-error { display: block; color: var(--danger); font-size: 13px; font-weight: 600; line-height: 1.35; }
.form-error-summary { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #dba5a1; border-radius: 10px; background: #fff4f3; color: #812d29; font-size: 14px; font-weight: 700; }

.matters-section { padding: 80px 0 0; }
.matters-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.button { border: 0; border-radius: 10px; min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 32px; font-weight: 700; }
.button-secondary { background: #e7eddf; color: var(--forest); }
.button-secondary:hover { background: #dce7d0; }
.button-primary { background: var(--sun); color: #2f290f; min-width: 210px; }
.button-primary:hover { background: #f0bd55; transform: translateY(-1px); }
.button:disabled { opacity: .65; cursor: wait; transform: none; }

.matters-list { display: grid; gap: 22px; }
.matter-card { display: grid; grid-template-columns: 116px 1fr; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); animation: reveal .32s ease both; }
.matter-index { background: var(--forest); color: white; padding: 30px 24px; display: flex; flex-direction: column; align-items: flex-start; }
.matter-index span { text-transform: uppercase; letter-spacing: .15em; font-size: 9px; opacity: .7; }
.matter-index strong { font-family: "Newsreader", serif; font-size: 48px; font-weight: 500; line-height: 1; margin-top: 6px; }
.matter-index-line { width: 1px; flex: 1; min-height: 90px; background: rgba(255,255,255,.24); margin: 22px 0 0 7px; }
.matter-body { padding: clamp(25px, 4vw, 42px); }
.matter-title-row { display: flex; justify-content: space-between; align-items: start; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 23px; margin-bottom: 28px; }
.matter-title-copy { min-width: 0; flex: 1; }
.matter-title { overflow: hidden; font-family: "Newsreader", serif; font-size: 28px; margin: 4px 0 0; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.remove-button { min-width: 76px; min-height: 44px; flex: 0 0 auto; color: var(--danger); border: 1px solid #e5c0bd; border-radius: 9px; padding: 0 12px; background: #fff7f6; font-size: 12px; font-weight: 700; }
.remove-button:hover { border-color: var(--danger); background: #fff0ef; }
.matter-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field-wide { grid-column: 1 / -1; }
.matter-details { border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; }
.matter-details summary { min-height: 58px; padding: 10px 46px 10px 16px; display: flex; flex-direction: column; justify-content: center; position: relative; cursor: pointer; list-style: none; }
.matter-details summary::-webkit-details-marker { display: none; }
.matter-details summary::after { content: "+"; position: absolute; right: 17px; top: 50%; color: var(--forest-light); font-size: 24px; font-weight: 400; transform: translateY(-50%); }
.matter-details[open] summary::after { content: "−"; }
.matter-details summary > span { color: var(--forest); font-size: 13px; font-weight: 700; }
.matter-details summary small { color: var(--muted); font-size: 12px; font-weight: 400; }
.matter-details-grid { padding: 18px 16px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.add-card { width: 100%; margin-top: 22px; border: 1px dashed #aebbaa; border-radius: var(--radius); padding: 26px; background: transparent; color: var(--forest); display: grid; grid-template-columns: 42px auto; grid-template-rows: auto auto; column-gap: 14px; text-align: left; align-items: center; }
.add-card > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e7eddf; font-size: 24px; }
.add-card strong { align-self: end; }
.add-card small { color: var(--muted); align-self: start; }
.add-card:hover { border-color: var(--forest-light); background: rgba(255,255,255,.55); }

.form-footer { margin: 54px 0 100px; padding: 24px 28px; background: var(--forest); color: white; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); }
.form-footer > div { display: flex; flex-direction: column; }
.form-footer span { font-size: 13px; opacity: .72; }
.form-footer .button span { opacity: 1; font-size: inherit; }
.site-footer { background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }
.site-footer-inner { width: min(1160px, calc(100% - 40px)); min-height: 96px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-footer-brand { display: flex; align-items: center; gap: 13px; }
.site-footer-brand img { display: block; width: 34px; height: auto; }
.site-footer-brand p { margin: 0; color: var(--forest); font-family: "Newsreader", serif; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.site-footer-brand p span { margin-right: 2px; color: var(--muted); font-family: "DM Sans", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.site-footer-context { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(380px, calc(100% - 48px)); background: var(--ink); color: white; border-radius: 12px; padding: 15px 18px; box-shadow: 0 16px 40px rgba(0,0,0,.2); transform: translateY(120px); opacity: 0; transition: .3s ease; z-index: 50; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }

/* Archivo semanal */
.reports-main { min-height: calc(100vh - 222px); }
.access-gate { width: min(820px, 100%); margin: clamp(56px, 10vw, 120px) auto; padding: clamp(28px, 5vw, 58px); display: grid; grid-template-columns: 80px 1fr; gap: clamp(24px, 5vw, 54px); }
.access-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: var(--moss); font-family: "Newsreader", serif; font-size: 38px; }
.access-gate h1 { margin: 8px 0 20px; font-size: clamp(42px, 7vw, 68px); line-height: .96; }
.access-gate p:not(.eyebrow):not(.form-error) { max-width: 560px; color: var(--muted); }
.access-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 28px; }
.access-form .button { white-space: nowrap; }
.form-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.form-error.is-status { color: var(--forest-light); }
.reports-hero { padding: clamp(54px, 8vw, 94px) 0 48px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 54px; align-items: end; }
.reports-hero h1 { max-width: 700px; font-size: clamp(42px, 6vw, 68px); line-height: .98; }
.reports-hero > p { max-width: 400px; margin: 0 0 6px; color: var(--muted); }
.reports-hero .eyebrow { margin: 0 0 20px; }
.week-bar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: stretch; min-height: 112px; border-radius: var(--radius); overflow: hidden; background: var(--forest); color: white; box-shadow: var(--shadow); }
.week-bar > div { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.week-bar span { margin-bottom: 5px; color: rgba(255,255,255,.66); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 700; }
.week-bar strong { font-family: "Newsreader", serif; font-size: clamp(25px, 4vw, 38px); font-weight: 500; line-height: 1.1; }
.week-arrow { border: 0; background: rgba(255,255,255,.06); color: white; font-size: 25px; transition: background .2s; }
.week-arrow:hover { background: rgba(255,255,255,.14); }
.week-arrow:focus-visible, .topbar-link:focus-visible, .text-button:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.reports-summary { min-height: 27px; margin: 27px 2px 20px; color: var(--muted); font-size: 13px; font-weight: 700; }
.reports-content { display: grid; gap: 54px; padding-bottom: 100px; }
.organization-group { display: grid; grid-template-columns: 1fr; gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; }
.organization-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.organization-heading h2 { margin: 0; font-family: "Newsreader", serif; font-size: clamp(30px, 4vw, 46px); line-height: 1; }
.organization-heading span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.organization-reports { display: grid; gap: 20px; }
.archive-report { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: white; box-shadow: var(--shadow); }
.archive-report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: clamp(22px, 4vw, 34px); background: #edf1e8; }
.report-id { color: var(--forest-light); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 700; }
.archive-report h3 { margin: 4px 0 0; font-family: "Newsreader", serif; font-size: 29px; line-height: 1.05; }
.report-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 12px; color: var(--muted); }
.report-meta span { text-transform: capitalize; }
.report-meta strong { color: var(--ink); }
.archive-matters { padding: 0 clamp(20px, 4vw, 34px); }
.archive-matter { border-bottom: 1px solid var(--line); }
.archive-matter:last-child { border-bottom: 0; }
.archive-matter summary { min-height: 70px; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; list-style: none; cursor: pointer; }
.archive-matter summary::-webkit-details-marker { display: none; }
.archive-matter-number { font-family: "Newsreader", serif; font-size: 22px; line-height: 1; color: var(--forest-light); }
.matter-select { min-width: 44px; min-height: 44px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 9px; cursor: pointer; }
.matter-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  display: grid;
  place-content: center;
  border: 2px solid var(--forest);
  border-radius: 0;
  background: white;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.matter-checkbox::before { content: ""; width: 10px; height: 6px; border: solid white; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transform-origin: center; transition: transform .12s ease; }
.matter-checkbox:hover { background: #f0f4ee; border-color: var(--forest-light); }
.matter-checkbox:checked { background: var(--forest); border-color: var(--forest); }
.matter-checkbox:checked::before { transform: rotate(-45deg) scale(1); }
.matter-checkbox:focus-visible { outline: 3px solid var(--hamaca); outline-offset: 3px; box-shadow: none; }
.archive-matter summary strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.archive-matter-toggle { color: var(--muted); font-size: 11px; }
.archive-matter[open] .archive-matter-toggle { font-size: 0; }
.archive-matter[open] .archive-matter-toggle::after { content: "Cerrar"; font-size: 11px; }
.archive-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 0 0 28px 54px; }
.archive-field { padding: 18px 0; border-top: 1px solid #edf0eb; }
.archive-field span { color: var(--forest-light); text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 700; }
.archive-field p { margin: 7px 0 0; white-space: pre-wrap; font-size: 13px; }
.empty-detail { color: var(--muted); font-size: 13px; }
.archive-empty { padding: clamp(32px, 6vw, 64px); text-align: center; }
.archive-empty > span { color: var(--forest-light); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; }
.archive-empty h2 { margin: 10px 0; font-family: "Newsreader", serif; font-size: clamp(30px, 5vw, 48px); }
.archive-empty p { margin: 0; color: var(--muted); }
.archive-load-error { padding: 24px; border: 1px solid #e3b7b4; border-radius: 12px; background: #fff3f2; color: var(--danger); }
.dashboard-notice { min-height: 22px; margin: -12px 0 22px; color: var(--forest-light); font-size: 13px; font-weight: 700; }
.dashboard-notice.error { color: var(--danger); }
.delete-toolbar { position: fixed; left: 50%; bottom: 22px; z-index: 40; width: min(620px, calc(100% - 32px)); transform: translateX(-50%); padding: 14px 16px 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: #212322; color: white; box-shadow: 0 20px 55px rgba(0,0,0,.28); }
.delete-toolbar span { font-size: 13px; font-weight: 700; }
.delete-selected { min-height: 44px; padding: 0 16px; border: 0; border-radius: 9px; background: #d75d54; color: white; font-size: 12px; font-weight: 700; }
.delete-selected:hover { background: #e16960; }
.delete-selected:disabled { opacity: .65; cursor: wait; }
.agenda-main { min-height: calc(100vh - 222px); }
.agenda-hero { padding: clamp(54px, 8vw, 94px) 0 48px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 54px; align-items: end; }
.agenda-hero h1 { max-width: 700px; font-size: clamp(42px, 6vw, 68px); line-height: .98; }
.agenda-hero > p { max-width: 400px; margin: 0 0 6px; color: var(--muted); }
.agenda-hero .eyebrow { margin: 0 0 20px; }
.agenda-toolbar { display: grid; grid-template-columns: 1.4fr .8fr auto; gap: 14px; align-items: end; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #edf1e8; }
.agenda-toolbar label, .agenda-form-grid label { display: grid; gap: 8px; }
.agenda-toolbar label > span, .agenda-toolbar label, .agenda-dialog label > span { color: var(--forest-light); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.agenda-toolbar .button { min-width: 230px; }
.agenda-summary { min-height: 27px; margin: 27px 2px 20px; color: var(--muted); font-size: 13px; font-weight: 700; }
.agenda-tabs { display: flex; gap: 8px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.agenda-tab { min-height: 48px; padding: 0 17px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 700; }
.agenda-tab span { display: inline-grid; min-width: 22px; height: 22px; margin-left: 5px; place-items: center; border-radius: 99px; background: #e7eddf; color: var(--forest); font-size: 11px; }
.agenda-tab.is-active { border-bottom-color: var(--forest); color: var(--forest); }
.agenda-list { display: grid; gap: 14px; padding-bottom: 100px; }
.agenda-card { display: grid; grid-template-columns: 92px 1fr auto; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.agenda-card.is-overdue { border-color: #e4c0bd; }
.agenda-date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--forest); color: white; }
.agenda-date strong { font-family: "Newsreader", serif; font-size: 44px; line-height: .9; font-weight: 500; }
.agenda-date span { margin-top: 8px; color: var(--moss); text-transform: uppercase; font-size: 11px; font-weight: 700; }
.agenda-date.prospecto { background: #5a3b86; }.agenda-date.notificado { background: #1f5b73; }.agenda-date.confirmado { background: #2e631f; }.agenda-date.rechazado { background: var(--danger); }.agenda-date.re-agendado { background: #74551b; }
.agenda-card-body { min-width: 0; padding: 23px 26px; }
.agenda-card-top { display: flex; justify-content: space-between; gap: 18px; }
.agenda-card h2 { margin: 0 0 5px; font-family: "Newsreader", serif; font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
.agenda-card-top p { margin: 0; color: var(--muted); font-size: 14px; }
.agenda-status { flex: 0 0 auto; align-self: flex-start; min-height: 28px; padding: 6px 10px; border-radius: 99px; background: #e7eddf; color: var(--forest); font-size: 11px; font-weight: 700; }
.agenda-status.confirmado { background: #dcedcf; color: #2e631f; }.agenda-status.rechazado { background: #f9e1df; color: var(--danger); }.agenda-status.re-agendado { background: #fff0c9; color: #74551b; }
.agenda-status.prospecto { background: #e6def4; color: #5a3b86; }.agenda-status.notificado { background: #dcebf3; color: #1f5b73; }
.agenda-card-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 17px; color: var(--forest-light); font-size: 12px; font-weight: 700; }
.agenda-note { color: var(--muted); font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
.agenda-card-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 20px; border-left: 1px solid var(--line); }
.agenda-card-actions button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--forest); font-size: 12px; font-weight: 700; }.agenda-card-actions button:last-child { color: var(--danger); }
.agenda-empty { padding: clamp(32px, 6vw, 64px); text-align: center; }.agenda-empty span { color: var(--forest-light); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; }.agenda-empty h2 { margin: 10px 0; font-family: "Newsreader", serif; font-size: clamp(30px, 5vw, 48px); }.agenda-empty p { margin: 0; color: var(--muted); }
.agenda-dialog { width: min(700px, calc(100% - 28px)); border: 0; border-radius: var(--radius); padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.28); }.agenda-dialog::backdrop { background: rgba(18,60,53,.55); backdrop-filter: blur(3px); }.agenda-dialog form { padding: clamp(25px, 5vw, 42px); }.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }.dialog-heading h2 { margin: 8px 0 0; font-family: "Newsreader", serif; font-size: 38px; }.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 32px; line-height: 1; }.agenda-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }.agenda-form-grid .field-wide { grid-column: 1 / -1; }.agenda-form-grid input, .agenda-form-grid select, .agenda-form-grid textarea, .agenda-toolbar input, .agenda-toolbar select { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 12px 13px; background: white; color: var(--ink); }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }.dialog-actions .button { min-width: 150px; }

/* Legibilidad mínima de la pantalla de reportes */
.reports-page .brand-credit,
.reports-page .topbar-link,
.reports-page .text-button,
.reports-page .eyebrow,
.reports-page label,
.reports-page .form-error,
.reports-page .week-bar span,
.reports-page .reports-summary,
.reports-page .organization-heading span,
.reports-page .report-id,
.reports-page .report-meta,
.reports-page .archive-matter summary strong,
.reports-page .archive-matter-toggle,
.reports-page .archive-matter[open] .archive-matter-toggle::after,
.reports-page .archive-field span,
.reports-page .archive-field p,
.reports-page .empty-detail,
.reports-page .archive-empty > span,
.reports-page .dashboard-notice,
.reports-page .delete-toolbar span,
.reports-page .delete-selected,
.reports-page .site-footer-brand p span,
.reports-page .site-footer-context { font-size: 16px; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(147, 201, 15, .32); }
@media (max-width: 760px) {
  main { width: min(100% - 28px, 680px); }
  .topbar { height: 64px; padding: 0 14px; }
  .brand { gap: 8px; }
  .brand-credit { display: none; }
  .topbar-link, .text-button { min-height: 44px; font-size: 14px; }
  .intro { grid-template-columns: 1fr; gap: 26px; padding: 44px 0 48px; }
  .intro .eyebrow { margin: 0 0 -8px; }
  .eyebrow, .section-kicker, .matter-label { font-size: 12px; }
  .general { padding: 24px 20px; grid-template-columns: 1fr; gap: 28px; }
  .general-grid, .matter-fields, .matter-details-grid { grid-template-columns: 1fr; }
  .general-grid label:first-child, .field-wide { grid-column: auto; }
  label { gap: 7px; font-size: 14px; }
  input, textarea, select { min-height: 48px; padding: 11px 12px; font-size: 16px; }
  textarea { min-height: 88px; }
  .field-error { font-size: 14px; }
  .matters-section { padding-top: 58px; }
  .matter-card { grid-template-columns: 1fr; }
  .matter-index { padding: 13px 20px; flex-direction: row; align-items: baseline; gap: 8px; }
  .matter-index span { font-size: 12px; }
  .matter-index strong { font-size: 28px; margin: 0; }
  .matter-index-line { display: none; }
  .matter-body { padding: 22px 18px 24px; }
  .matter-title-row { gap: 12px; padding-bottom: 18px; margin-bottom: 22px; }
  .matter-title { font-size: 25px; }
  .remove-button { min-width: 72px; min-height: 44px; padding: 0 10px; font-size: 13px; }
  .matter-fields { gap: 18px; }
  .matter-details { grid-column: auto; }
  .matter-details summary { min-height: 62px; }
  .matter-details summary > span { font-size: 14px; }
  .matter-details summary small { font-size: 13px; }
  .matter-details-grid { padding: 16px; gap: 18px; }
  .matters-heading { align-items: start; }
  #addMatterTop { display: none; }
  .add-card { min-height: 84px; padding: 16px 18px; }
  .add-card > span { width: 44px; height: 44px; }
  .add-card small { font-size: 13px; }
  .form-footer { position: static; margin: 32px 0 56px; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 14px; }
  .form-footer > div { display: none; }
  .form-footer .button { width: 100%; min-height: 46px; }
  .site-footer-inner { width: min(100% - 28px, 680px); min-height: 88px; justify-content: flex-start; }
  .site-footer-brand { gap: 11px; }
  .site-footer-brand img { width: 30px; }
  .site-footer-brand p { font-size: 17px; }
  .site-footer-context { display: none; }
  .topbar-actions { gap: 12px; }
  .save-status { display: none; }
  .reports-main { width: min(100% - 28px, 680px); }
  .access-gate { grid-template-columns: 1fr; }
  .access-mark { width: 54px; height: 54px; font-size: 29px; }
  .access-form { grid-template-columns: 1fr; }
  .access-form .button { width: 100%; }
  .reports-hero { grid-template-columns: 1fr; gap: 22px; }
  .week-bar { grid-template-columns: 50px 1fr 50px; min-height: 100px; }
  .week-bar > div { padding: 15px 8px; }
  .organization-group { grid-template-columns: 1fr; gap: 18px; }
  .organization-heading { position: static; flex-direction: column; gap: 8px; }
  .archive-report-header { flex-direction: column; gap: 14px; }
  .report-meta { align-items: flex-start; text-align: left; }
  .archive-matter summary { grid-template-columns: 58px 1fr; gap: 10px; padding: 7px 0; }
  .archive-matter-toggle { grid-column: 2; margin-top: -10px; font-size: 12px; }
  .archive-matter[open] .archive-matter-toggle::after { font-size: 12px; }
  .archive-fields { grid-template-columns: 1fr; padding-left: 42px; }
  .matter-select { min-width: 48px; min-height: 44px; gap: 6px; }
  .archive-matter-number { font-size: 19px; }
  .report-id, .archive-field span, .archive-empty > span { font-size: 12px; }
  .archive-field p, .empty-detail, .reports-summary, .dashboard-notice { font-size: 14px; }
  .week-bar span { font-size: 12px; }
  .delete-toolbar { bottom: 10px; padding: 12px; gap: 10px; }
  .delete-toolbar span { font-size: 12px; }
  .delete-selected { padding: 0 12px; }
  .agenda-hero { grid-template-columns: 1fr; gap: 22px; }
  .agenda-toolbar { grid-template-columns: 1fr; }
  .agenda-toolbar .button { width: 100%; }
  .agenda-card { grid-template-columns: 64px 1fr; }
  .agenda-date strong { font-size: 34px; }
  .agenda-card-body { padding: 18px 16px; }
  .agenda-card h2 { font-size: 23px; }
  .agenda-card-top { flex-direction: column; gap: 12px; }
  .agenda-status { align-self: flex-start; }
  .agenda-card-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; padding: 0 16px 16px; border-left: 0; }
  .agenda-form-grid { grid-template-columns: 1fr; }
  .agenda-form-grid .field-wide { grid-column: auto; }
  .dialog-actions { flex-direction: column-reverse; }.dialog-actions .button { width: 100%; }
}
