/* REVOR — Práctica Multidisciplinaria de Servicios Profesionales (Manabí, Ecuador) */
:root {
  --paper: #faf9f5;
  --sheet: #ffffff;
  --tint: #f2efe8;
  --oxford: #1b2a4a;
  --oxford-light: #283d69;
  --ochre: #b45309;
  --ink: #1e232a;
  --gray: #5b626d;
  --rule: #d8d3c8;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.folio {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Centered Editorial Masthead Header */
.masthead {
  background: var(--sheet);
  border-top: 4px solid var(--oxford);
  border-bottom: 1px solid var(--rule);
}
.masthead-top {
  padding: 24px 0 18px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.masthead-word {
  font-family: var(--serif);
  font-size: 2.1rem;
  letter-spacing: 0.28em;
  color: var(--oxford);
  font-weight: 700;
  display: inline-block;
  padding-left: 0.28em;
}
.masthead-sub {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 5px;
}

.masthead-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  min-height: 50px;
  padding: 8px 0;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}
.masthead-nav a:hover, .masthead-nav a.here {
  color: var(--oxford);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.dossier-link {
  color: var(--ochre) !important;
  font-weight: 700;
}

/* Editorial Newspaper Front Lead */
.editorial-lead {
  padding: 52px 0 60px;
  border-bottom: 1px solid var(--rule);
}
.lead-columns {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 48px;
  align-items: start;
}
.lead-article {
  padding-right: 40px;
  border-right: 1px solid var(--rule);
}
.rubric {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 14px;
}
.lead-article h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.95rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--oxford);
  margin-bottom: 20px;
}
.lead-article p {
  font-size: 1.06rem;
  color: var(--gray);
  margin-bottom: 18px;
}

.cta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.btn-ed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--oxford);
  background: var(--oxford);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-ed:hover { background: var(--oxford-light); }
.btn-ed-ghost {
  background: transparent;
  color: var(--oxford);
}
.btn-ed-ghost:hover { background: var(--tint); }
.btn-ed-ochre {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #fff;
}

/* Right Column Practice Index */
.practice-index h2 {
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--oxford);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--oxford);
  margin-bottom: 14px;
}
.idx-entry {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.idx-entry strong {
  display: block;
  font-size: 0.96rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.idx-entry span {
  font-size: 0.84rem;
  color: var(--gray);
}
.idx-entry:hover strong { color: var(--ochre); }

/* Tabular Fee Schedule (Tarifario) */
.chapter { padding: 60px 0; border-bottom: 1px solid var(--rule); }
.chapter-tint { background: var(--tint); }

.chapter-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.chapter-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 400;
  color: var(--oxford);
}

.tarifario-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.area-switches { display: flex; flex-wrap: wrap; gap: 8px; }
.area-switch {
  padding: 7px 15px;
  border: 1px solid var(--rule);
  background: var(--sheet);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
}
.area-switch.active {
  background: var(--oxford);
  border-color: var(--oxford);
  color: #ffffff;
}

.fee-ledger {
  background: var(--sheet);
  border: 1px solid var(--rule);
}
.ledger-head {
  display: grid;
  grid-template-columns: 95px 1.6fr 0.8fr 110px 135px;
  gap: 14px;
  padding: 12px 20px;
  background: var(--oxford);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ledger-row {
  border-bottom: 1px solid var(--rule);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-main {
  display: grid;
  grid-template-columns: 95px 1.6fr 0.8fr 110px 135px;
  gap: 14px;
  padding: 16px 20px;
  align-items: center;
}
.l-code { font-size: 0.8rem; font-weight: 700; color: var(--ochre); }
.l-title strong { display: block; font-size: 1rem; color: var(--ink); }
.l-title button {
  background: none;
  border: none;
  color: var(--oxford);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 2px;
}
.l-mod { font-size: 0.86rem; color: var(--gray); }
.l-fee { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; color: var(--oxford); }
.ledger-detail {
  display: none;
  padding: 0 20px 16px 129px;
  font-size: 0.9rem;
  color: var(--gray);
}
.ledger-row.expanded .ledger-detail { display: block; }

/* 3-Step Horizontal Wizard (/contratar) */
.stepper-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
  background: var(--sheet);
  margin-bottom: 32px;
}
.step-tab {
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  border-right: 1px solid var(--rule);
}
.step-tab:last-child { border-right: none; }
.step-tab.active {
  background: var(--oxford);
  color: #ffffff;
}

.wizard-box {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 32px;
  max-width: 820px;
  margin: 0 auto;
}
.wiz-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wiz-field { margin-bottom: 16px; }
.wiz-field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--oxford); }
.wiz-field input, .wiz-field select, .wiz-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: 0.92rem;
}

/* Editorial Footer */
.firm-footer {
  background: var(--sheet);
  border-top: 3px solid var(--oxford);
  padding: 48px 0 28px;
}
.firm-ft-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.firm-ft-grid h4 {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--oxford);
  margin-bottom: 12px;
}
.firm-ft-grid a, .firm-ft-grid p {
  display: block;
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 7px;
}
.firm-ft-grid a:hover { color: var(--ochre); }
.firm-colophon {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--gray);
}

.doc-body { max-width: 780px; padding: 48px 0 76px; }
.doc-body h1 { font-family: var(--serif); font-size: 2rem; color: var(--oxford); margin-bottom: 14px; }
.doc-body h2 { font-family: var(--serif); font-size: 1.2rem; color: var(--oxford); margin: 24px 0 8px; }
.doc-body p, .doc-body li { color: var(--gray); font-size: 0.95rem; margin-bottom: 10px; }
.doc-body ul { padding-left: 20px; }

@media (max-width: 880px) {
  .lead-columns { grid-template-columns: 1fr; }
  .lead-article { padding-right: 0; border-right: none; border-bottom: 1px solid var(--rule); padding-bottom: 28px; }
  .ledger-head { display: none; }
  .ledger-main { grid-template-columns: 1fr; gap: 6px; }
  .ledger-detail { padding-left: 20px; }
  .firm-ft-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .firm-ft-grid, .wiz-field-grid, .stepper-bar { grid-template-columns: 1fr; }
  .masthead-nav { gap: 16px; font-size: 0.78rem; }
}
