/* Complementos para el contenido de condiciones generales.
   Colores, tipografia y componentes base: estilos oficiales de www.etm.cl. */
html { scroll-behavior: smooth; }
.conditions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  margin-top: 2rem;
}
.conditions-content { min-width: 0; max-width: 48rem; }
.toc { min-width: 0; }
.toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .5rem;
  color: var(--color-brand-700);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.toc-title::-webkit-details-marker { display: none; }
.toc-title::after { content: "+"; font-size: 1.25rem; }
.toc-panel[open] > .toc-title { margin-bottom: .75rem; }
.toc-panel[open] > .toc-title::after { content: "−"; }
.toc nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.toc a {
  display: block;
  padding: .625rem 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .5rem;
  color: var(--color-slate-700);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s, background-color .15s;
}
.toc a:hover { background: var(--color-slate-50); }
.toc a[aria-current="location"] {
  border-color: var(--color-brand-700);
  color: #fff;
  background: var(--color-brand-700);
  font-weight: 600;
}
.toc-tools { margin: 1rem 0 0; padding: 0 1rem; }
.tool-button {
  cursor: pointer;
  padding: .5rem .75rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .5rem;
  color: var(--color-brand-700);
  font-size: .875rem;
  font-weight: 600;
}
.tool-button:hover { background: var(--color-brand-50); }
.hero-copy, .intro-panel, .term-section { color: var(--color-slate-700); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.hero-action {
  padding: .625rem 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .5rem;
  color: var(--color-brand-700);
  font-size: .875rem;
  font-weight: 600;
}
.hero-action:hover { background: var(--color-brand-50); }
.version { margin-top: 1rem; color: var(--color-slate-500); font-size: .875rem; }
.quick-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  margin: 1.5rem 0 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--color-slate-200);
  border-radius: 1rem;
  background: var(--color-slate-50);
}
.fact-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .75rem;
  background: #fff;
}
.fact-icon { flex: 0 0 1.5rem; color: var(--color-brand-700); }
.fact-icon svg { width: 1.5rem; height: 1.5rem; }
.fact-card strong { display: block; color: var(--color-slate-900); font-size: .875rem; font-weight: 700; }
.fact-card span { display: block; margin-top: .25rem; color: var(--color-slate-600); font-size: .875rem; }
.article { display: grid; gap: 2.5rem; }
.intro-panel strong, .term-section strong { font-weight: 600; }
.term-section { scroll-margin-top: 5rem; }
.section-heading { display: flex; align-items: baseline; gap: .5rem; }
.section-number { color: var(--color-slate-900); font-size: 1.25rem; font-weight: 700; }
.section-number::after { content: "."; }
.term-section h2 { color: var(--color-slate-900); font-size: 1.25rem; line-height: 1.4; font-weight: 700; }
.term-section h3 { margin-top: 1.5rem; color: var(--color-slate-900); font-size: 1rem; font-weight: 700; }
.term-section p { margin-top: .75rem; }
.term-section ul, .term-section ol { margin-top: .75rem; padding-left: 1.25rem; }
.term-section ul { list-style: disc; }
.term-section ol { list-style: decimal; }
.term-section li + li { margin-top: .5rem; }
.term-section a { color: var(--color-brand-700); font-weight: 600; }
.term-section a:hover { color: var(--color-brand-900); }
.callout {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--color-slate-200);
  border-radius: 1rem;
  background: var(--color-slate-50);
  color: var(--color-slate-700);
  font-size: .875rem;
}
.callout > strong:first-child { color: var(--color-brand-700); }
.two-columns, .policy-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; margin-top: 1.5rem; }
.mini-card, .policy-item, .weight-card {
  padding: 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: .75rem;
  background: #fff;
}
.mini-card { background: var(--color-slate-50); }
.mini-card h3 { margin-top: 0; }
.mini-card p, .policy-item span { font-size: .875rem; }
.policy-grid { padding: 1.25rem; border: 1px solid var(--color-slate-200); border-radius: 1rem; background: var(--color-slate-50); }
.policy-item strong, .policy-item span { display: block; }
.policy-item strong { margin-bottom: .5rem; color: var(--color-slate-900); }
.weight-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--color-slate-200); border-radius: 1rem; background: var(--color-slate-50); }
.weight-card b { display: block; color: var(--color-slate-900); font-size: 1.5rem; line-height: 1.3; font-weight: 800; }
.weight-card span { display: block; margin-top: .25rem; color: var(--color-slate-600); font-size: .875rem; }
.weight-plus { display: grid; place-items: center; color: var(--color-brand-700); font-weight: 600; }
.contact-card { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--color-slate-200); border-radius: 1rem; background: var(--color-slate-50); }
.contact-card h3 { margin-top: 0; }
.contact-card p { font-size: .875rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.contact-actions a { overflow-wrap: anywhere; font-size: .875rem; }
.legal-links { display: grid; gap: .75rem; margin-top: 1.5rem; }
.legal-link { display: block; padding: 1rem; border: 1px solid var(--color-slate-200); border-radius: .75rem; background: var(--color-slate-50); }
.legal-link strong, .legal-link span { display: block; }
.legal-link span { margin-top: .25rem; color: var(--color-slate-600); font-size: .875rem; font-weight: 400; }
.back-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .5rem; color: #fff; background: var(--color-brand-700); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .15s; }
.back-top.visible { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--color-brand-800); }
.back-top svg { width: 1.25rem; height: 1.25rem; }
main :focus-visible, .back-top:focus-visible { outline: 2px solid var(--color-brand-700); outline-offset: 3px; }
@media (min-width: 640px) {
  .quick-facts, .two-columns, .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-facts, .callout, .policy-grid, .weight-box, .contact-card { padding: 1.5rem; }
  .weight-box { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  .conditions-layout { grid-template-columns: 16rem minmax(0, 1fr); gap: 3rem; }
  .toc { position: sticky; top: 8rem; max-height: calc(100dvh - 9rem); overflow-y: auto; scrollbar-width: thin; }
  .toc-title { padding: 0 1rem; border: 0; color: var(--color-slate-600); pointer-events: none; }
  .toc-title::after { display: none; }
  .toc nav { display: grid; gap: .25rem; }
  .toc a { border-color: transparent; }
  .term-section { scroll-margin-top: 8rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  header, footer, .toc, .hero-actions, .back-top { display: none !important; }
  .conditions-layout { display: block; }
  .conditions-content { max-width: none; }
  .term-section, .fact-card, .callout, .weight-box { break-inside: avoid; }
  main > section { padding: 0 !important; }
  body { font-size: 10.5pt; }
}
