/* Políticas y 404 de liontude.com. Tokens, cabecera y pie vienen de landing.css. */

.liontude-page {
  --sand: #eee9df;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Footer: the landing footer with a rule above. */
.liontude-page .site-footer { border-top: 1px solid var(--line); }

/*
 * Policies. <main> holds the body of liontude/content byte for byte, so every rule targets
 * its children: no wrapper is added. Column 2 holds the contents list wherever it appears.
 */
.liontude-document .site-main {
  flex: 1 0 auto;
  width: min(1240px, calc(100% - 112px));
  margin-inline: auto;
  padding-block: 82px 120px;
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(220px, 272px);
  justify-content: space-between;
  column-gap: 64px;
  align-content: start;
}
.liontude-document .site-main > * { grid-column: 1; }
.liontude-document .site-main > * + * { margin-top: 20px; }

.liontude-document .site-main > h1 {
  grid-column: 1 / -1;
  max-width: 1000px;
  order: -2;
  margin-bottom: 28px;
  font-size: clamp(46px, 6.2vw, 92px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.065em;
}
.liontude-document .site-main > :is(h1 + *, h1 + nav + *) { margin-top: 0; }

/* Contents: sticky beside the text; the large span covers the longest policy. */
.liontude-document .site-main > nav {
  grid-column: 2;
  grid-row: 2 / span 400;
  align-self: start;
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  margin: 0 -10px;
  padding: 0 10px 10px;
}
.liontude-document .site-main > nav h2 { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.liontude-document .site-main > nav h2::before { content: ""; width: 7px; height: 7px; flex-shrink: 0; background: var(--orange); }
.liontude-document .site-main > nav ol { padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.liontude-document .site-main > nav li { border-top: 1px solid var(--line); }
.liontude-document .site-main > nav a { display: block; padding-block: 10px; font-size: 13px; font-weight: 600; line-height: 1.45; text-decoration: none; }
.liontude-document .site-main > nav a:hover { color: var(--orange-ink); }

/* Running text */
.liontude-document .site-main > :is(p, ul) { font-size: 17px; line-height: 1.75; }
.liontude-document .site-main strong { font-weight: 650; }
.liontude-document .site-main > h2 {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.liontude-document .site-main > h2:target { border-top-color: var(--orange); }
.liontude-document .site-main > h2 + * { margin-top: 24px; }
.liontude-document .site-main > h3 { margin-top: 44px; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.03em; }
.liontude-document .site-main > h3 + * { margin-top: 12px; }
.liontude-document .site-main > ul { padding: 0; list-style: none; }
.liontude-document .site-main > ul li { position: relative; padding-left: 24px; }
.liontude-document .site-main > ul li + li { margin-top: 10px; }
.liontude-document .site-main > ul li::before { content: ""; position: absolute; left: 2px; top: .74em; width: 6px; height: 6px; background: var(--orange); }
.liontude-document .site-main > hr { height: 0; margin: 0; border: 0; }
.liontude-document .site-main code { padding: .1em .35em; background: var(--sand); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .84em; overflow-wrap: anywhere; hyphens: none; }
.liontude-document .site-main mark { padding: 0 .2em; background: #ffcfaa; color: var(--ink); }

/* Tables carry a header row, except the document record. */
.liontude-document .site-main > table { width: 100%; margin-top: 32px; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.liontude-document .site-main > table + p { margin-top: 32px; }
.liontude-document .site-main > table td { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.liontude-document .site-main > table :is(td, th):last-child { padding-right: 0; }
.liontude-document .site-main > table th { padding: 0 20px 12px 0; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-align: left; text-transform: uppercase; vertical-align: bottom; }

/*
 * Document record: only the effective and last-updated dates (rows 4 and 5) reach the reader,
 * as one line under the title. Both policies point readers to that date. scripts/check-site.py
 * fails if those rows move.
 */
.liontude-document .site-main > table:first-of-type { order: -1; display: block; width: auto; margin-top: 0; font-size: 13px; }
.liontude-document .site-main > table:first-of-type + p { margin-top: 64px; }
.liontude-document .site-main > table:first-of-type tbody { display: flex; flex-wrap: wrap; gap: 4px 36px; }
.liontude-document .site-main > table:first-of-type tr { display: flex; align-items: baseline; gap: 12px; }
.liontude-document .site-main > table:first-of-type tr:not(:nth-child(4), :nth-child(5)) { display: none; }
.liontude-document .site-main > table:first-of-type td { padding: 0; border: 0; }
.liontude-document .site-main > table:first-of-type td:first-child { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.liontude-document .site-main > table:first-of-type td:first-child strong { font-weight: 650; }

/* 404 */
.liontude-404 .site-main { flex: 1 0 auto; display: flex; }
.liontude-404 .not-found { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; column-gap: 30px; padding-block: 82px 96px; }
.liontude-404 h1 { font-size: clamp(56px, 7.2vw, 104px); font-weight: 650; line-height: 1.035; letter-spacing: -.07em; }
.liontude-404 .button { display: inline-flex; align-items: center; justify-content: center; min-width: 210px; min-height: 56px; margin-top: 40px; padding: 17px 22px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 650; text-decoration: none; transition: background .2s; }
.liontude-404 .button:hover { background: var(--orange-ink); }
.liontude-404 .not-found-art { width: min(100%, 460px); height: auto; justify-self: end; }
.liontude-404 .not-found-art .pulse { transform-box: view-box; transform-origin: center; animation: liontude-breathe 8s ease-in-out infinite; }
.liontude-404 .not-found-art .piece { transform-box: fill-box; transform-origin: center; transform: rotate(12deg); animation: liontude-drift 8s ease-in-out infinite; }
@keyframes liontude-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
@keyframes liontude-drift { 0%, 100% { transform: translate(0, 0) rotate(12deg); } 50% { transform: translate(-4px, -6px) rotate(9deg); } }

@media (min-width: 1600px) {
  .liontude-document .site-main, .liontude-404 .not-found { padding-top: 100px; }
}

@media (max-width: 1100px) {
  .liontude-document .site-main { width: calc(100% - 72px); padding-top: 65px; }
  .liontude-404 .not-found { column-gap: 10px; padding-top: 65px; }
}

/* Below 900 px: the contents list keeps its second column at 900 px itself. */
@media (max-width: 899.98px) {
  .liontude-document .site-main { grid-template-columns: minmax(0, 680px); }
  .liontude-document .site-main > h1 ~ nav { grid-column: 1; grid-row: auto; position: static; max-height: none; overflow: visible; margin: 48px 0 0; padding: 0; }
}

@media (max-width: 760px) {
  .liontude-document .site-main { width: calc(100% - 40px); padding-block: 45px 80px; }
  .liontude-document .site-main > h1 { margin-bottom: 20px; }
  .liontude-document .site-main > :is(p, ul) { font-size: 16px; line-height: 1.7; }
  .liontude-document .site-main > h2 { margin-top: 60px; padding-top: 22px; font-size: 25px; }
  .liontude-document .site-main > h3 { margin-top: 36px; font-size: 20px; }
  .liontude-document .site-main > table { font-size: 13px; line-height: 1.5; hyphens: auto; }
  .liontude-document .site-main > table td { padding: 12px 12px 12px 0; }
  .liontude-document .site-main > table th { padding-right: 12px; font-size: 10px; letter-spacing: .1em; }
  .liontude-document .site-main > table:first-of-type tbody { display: grid; grid-template-columns: max-content 1fr; align-items: baseline; gap: 4px 14px; }
  .liontude-document .site-main > table:first-of-type tr { display: contents; }
  .liontude-document .site-main > table:first-of-type + p { margin-top: 48px; }
  .liontude-document .site-main > table:first-of-type td:first-child { font-size: 10px; letter-spacing: .1em; }

  .liontude-404 .not-found { grid-template-columns: 1fr; padding-block: 45px 56px; }
  .liontude-404 h1 { font-size: clamp(54px, 15vw, 88px); }
  .liontude-404 .button { margin-top: 32px; }
  .liontude-404 .not-found-art { width: min(100%, 340px); margin: 44px auto 0; justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .liontude-page *, .liontude-page *::before, .liontude-page *::after { animation: none !important; }
}

@media (forced-colors: active) {
  .liontude-document .site-main > ul li::before, .liontude-document .site-main > nav h2::before { forced-color-adjust: none; background: CanvasText; }
}

@media print {
  .liontude-page { display: block; min-height: 0; font-size: 11pt; color: #000; background: #fff; }
  .liontude-page :is(.site-nav, .back-top, .not-found-art) { display: none; }
  .liontude-document .site-main { width: 100%; display: block; padding-block: 24px; }
  .liontude-document .site-main > nav { position: static; max-height: none; overflow: visible; margin: 24px 0 0; padding: 0; }
  .liontude-document .site-main > h1 { font-size: 30pt; margin-bottom: 24px; }
  .liontude-document .site-main > :is(p, ul) { font-size: 11pt; }
  .liontude-document .site-main > h2 { margin-top: 28px; break-after: avoid; }
  .liontude-document .site-main > table tr { break-inside: avoid; }
}
