/* Páginas interiores de arien.cl (términos, privacidad, 404). Mismas reglas base, header y footer que la homepage. */
:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 96px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; background: var(--ar-bg); color: var(--ar-fg); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ar-bg); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ar-focus); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--ar-surface); padding: 8px 12px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding: 12px 0 0; pointer-events: none; }
.top .wrap { pointer-events: auto; display: flex; align-items: center; gap: 32px; height: 60px; width: calc(100% - 16px); max-width: 1200px; padding: 0 16px; background: color-mix(in srgb, var(--ar-surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: var(--ar-r-md); border: 1px solid var(--ar-border); }
@media (min-width: 1216px) { .top .wrap { padding: 0 24px; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { height: 38px; width: auto; display: block; }
.brand .wordmark { position: relative; top: 3px; }
.wordmark { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--ar-r-sm); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--ar-accent); color: var(--ar-on-accent); }
.btn-primary:hover { filter: brightness(.92); }
.top .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; margin-left: auto; }

/* Documento legal */
.doc { max-width: 760px; margin: 0 auto; padding: 72px 24px 112px; }
@media (max-width: 640px) { .doc { padding: 48px 16px 80px; } }
.doc .eyebrow { margin: 0 0 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ar-accent-fg); }
.doc h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -.015em; text-wrap: pretty; }
.doc .meta { margin: 16px 0 0; font-size: 14px; color: var(--ar-fg-2); }
.doc .lead { font-size: 18px; line-height: 1.55; color: var(--ar-fg-2); margin: 24px 0 0; }
.doc .toc { margin: 40px 0 8px; padding: 20px 24px; background: var(--ar-surface); border: 1px solid var(--ar-border); border-radius: var(--ar-r-md); }
.doc .toc p { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ar-fg-2); }
.doc .toc ol { margin: 0; padding-left: 20px; columns: 2 260px; column-gap: 32px; font-size: 14px; }
.doc .toc li { break-inside: avoid; padding: 2px 0; }
.doc .toc a { text-decoration: none; color: var(--ar-fg-2); }
.doc .toc a:hover { color: var(--ar-fg); text-decoration: underline; text-underline-offset: 3px; }
.doc section { padding-top: 40px; }
.doc h2 { margin: 0 0 12px; font-weight: 600; font-size: clamp(22px, 2.6vw, 26px); line-height: 1.25; letter-spacing: -.01em; text-wrap: pretty; }
.doc h3 { margin: 24px 0 8px; font-weight: 600; font-size: 17px; line-height: 1.35; }
.doc p, .doc li { text-wrap: pretty; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc section a, .doc .lead a { color: var(--ar-fg); text-decoration: underline; text-decoration-color: var(--ar-accent); text-underline-offset: 3px; }
.doc .note { margin: 20px 0; padding: 16px 20px; background: var(--ar-tint); border-radius: var(--ar-r-md); font-size: 15px; }
.doc .note p:last-child { margin-bottom: 0; }
.doc .table { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--ar-border); border-radius: var(--ar-r-md); background: var(--ar-surface); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--ar-border); }
.doc th { font-weight: 600; background: var(--ar-band); }
.doc tr:last-child td { border-bottom: 0; }
.doc .todo { background: var(--ar-warn-bg); padding: 0 4px; border-radius: 2px; font-weight: 600; }
.doc .todo { background: var(--ar-warn-bg); padding: 0 4px; border-radius: 2px; font-weight: 600; }
.doc .linkish { font: inherit; color: var(--ar-fg); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--ar-accent); text-underline-offset: 3px; cursor: pointer; }
.doc .back { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--ar-border); font-size: 15px; }

/* Footer */
footer { padding: 40px 0 48px; background: var(--ar-band); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
footer .legal { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 13px; }
footer .legal a { color: var(--ar-fg-2); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
footer .legal a:hover, footer .legal a[aria-current="page"] { color: var(--ar-fg); }
.seg { display: inline-flex; border: 1px solid var(--ar-border); border-radius: var(--ar-r-sm); overflow: hidden; }
.seg button { font: inherit; font-size: 13px; font-weight: 500; color: var(--ar-fg-2); background: transparent; border: 0; padding: 8px 12px; min-height: 36px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.seg button .icon { width: 16px; height: 16px; }
.seg button[aria-pressed="true"] { color: var(--ar-fg); background: var(--ar-surface); box-shadow: inset 0 -2px 0 var(--ar-accent); }

@media print { .top, footer, .toc { display: none; } .doc { padding: 0; } body { background: #fff; } }
