/* Info and legal pages (#/info/<slug>) + the footer's new pieces. Loaded after app.css. */

.info-page { padding-bottom: 24px; }
.ip-wrap { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) 16px 32px; }
.ip-wrap.has-toc { max-width: 1120px; display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 0 56px; justify-content: center; align-items: start; }
.ip-wrap.has-toc > .ip-crumbs, .ip-wrap.has-toc > .ip-head, .ip-wrap.has-toc > .ip-related { grid-column: 2; }
.ip-wrap.has-toc > .ip-toc { grid-column: 1; grid-row: 3 / span 2; position: sticky; top: calc(var(--nav-h) + 20px); }
.ip-wrap.has-toc > .ip-body { grid-column: 2; grid-row: 3; }

.ip-crumbs { display: flex; gap: 8px; font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 18px; }
.ip-crumbs a { color: var(--text-3); }
.ip-crumbs a:hover { color: var(--text); }

.ip-head { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.ip-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(225, 29, 42, 0.12); color: var(--red-2); margin-bottom: 14px; }
.ip-ic svg { width: 22px; height: 22px; }
.ip-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; margin: 0 0 12px; line-height: 1.3; color: var(--text); }
.ip-lead { color: var(--text-2); font-size: 1.05rem; line-height: 1.85; margin: 0 0 16px; }
.ip-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; color: var(--text-3); font-size: var(--fs-s); }
.ip-print { height: 34px; }

.ip-toc details { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--ink-1); padding: 12px 14px; }
.ip-toc summary { cursor: pointer; font-weight: 700; color: var(--text); display: flex; gap: 8px; align-items: center; list-style: none; }
.ip-toc summary::-webkit-details-marker { display: none; }
.ip-toc summary svg { width: 16px; height: 16px; color: var(--text-3); }
.ip-toc ol { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; max-height: calc(100vh - var(--nav-h) - 120px); overflow: auto; }
.ip-toc a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--text-2); font-size: var(--fs-s); line-height: 1.5; }
.ip-toc a:hover, .ip-toc a:focus-visible { background: var(--ink-3); color: var(--text); }

.ip-body { color: var(--text-2); font-size: 1.02rem; line-height: 1.9; }
:root[dir="rtl"] .ip-body { line-height: 1.95; }
.ip-sec { scroll-margin-top: calc(var(--nav-h) + 16px); margin-bottom: 30px; }
.ip-sec:focus { outline: none; }
.ip-sec h2 { font-size: 1.22rem; font-weight: 700; color: var(--text); margin: 0 0 10px; line-height: 1.5; }
.ip-body p { margin: 0 0 12px; }
.ip-body ul, .ip-body ol { margin: 0 0 12px; padding-inline-start: 1.4em; }
.ip-body li { margin-bottom: 6px; }
.ip-body li::marker { color: var(--red-2); }
.ip-body b { color: var(--text); font-weight: 600; }
.ip-body a, .ip-owner a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.ip-body a:hover { text-decoration-color: #fff; }
.ip-body .big-contact { font-size: 1.3rem; font-weight: 700; }
.ip-owner { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--text-3); }

.ip-related { margin-top: 28px; }
.ip-related h3 { font-size: var(--fs-s); color: var(--text-3); margin: 0 0 12px; font-weight: 600; }
.ip-related div { display: flex; flex-wrap: wrap; gap: 10px; }
.ip-related a { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: var(--fs-s); }
.ip-related a:hover { color: #fff; border-color: var(--red); }
.ip-related svg { width: 16px; height: 16px; }

.ip-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ip-card { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--ink-1); color: var(--text); }
.ip-card:hover { border-color: var(--red); }
.ip-card svg { width: 20px; height: 20px; color: var(--red-2); flex: none; }

@media (max-width: 960px) {
  .ip-wrap.has-toc { display: block; max-width: 760px; }
  .ip-toc { margin-bottom: 26px; }
  .ip-toc ol { max-height: none; }
}

/* ---------- footer additions ---------- */
.foot-tag { display: block; margin-top: 2px; }
.foot-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.foot-controls .chip { height: 36px; }
.foot-col h4 { margin: 0 0 4px; }
.foot-toggle { all: unset; display: flex; width: 100%; justify-content: space-between; align-items: center; cursor: default; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.foot-toggle svg { display: none; width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.foot-links { display: grid; gap: 10px; }
.foot-links a { color: var(--text-2); font-size: var(--fs-s); transition: color 0.2s; }
.foot-links a:hover { color: #fff; }
.foot-org a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.foot-org a:hover { color: #fff; }
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; gap: 0; }
  .foot-brand { margin-bottom: 20px; }
  .foot-col { border-top: 1px solid var(--line); gap: 0; }
  .foot-col h4 { margin: 0; }
  .foot-toggle { cursor: pointer; padding: 14px 0; min-height: 24px; }
  .foot-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  .foot-toggle svg { display: block; }
  .foot-col.open .foot-toggle svg { transform: rotate(180deg); }
  .foot-links { display: none; padding-bottom: 14px; }
  .foot-col.open .foot-links { display: grid; }
  .foot-links a { padding-block: 6px; }
  .foot-bar { flex-direction: column; align-items: flex-start; }
}

/* ---------- print ---------- */
@media print {
  #nav, #tabbar, #overlay, #watch, #toasts, .foot-pro, .ip-toc, .ip-print, .ip-related, .ip-crumbs, #boot, .skip { display: none !important; }
  html, body, .page, .info-page { background: #fff !important; color: #000 !important; }
  .page { padding-top: 0 !important; }
  .ip-wrap, .ip-wrap.has-toc { display: block; max-width: none; padding: 0; }
  .ip-title, .ip-sec h2, .ip-body b { color: #000 !important; }
  .ip-body, .ip-lead, .ip-meta, .ip-owner { color: #222 !important; }
  .ip-ic { display: none; }
  .ip-body a, .ip-owner a { color: #000 !important; }
  .ip-sec { break-inside: avoid-page; }
}
