/* ============================================================
   Privacy Policy Generator — Inner pages (FAQ, notice, published policy document)
   Loaded after styles.css, which provides the tokens, header, footer, hero, buttons, cards and FAQ styles.
   Only components that index.html does not already have live here.
   ============================================================ */

/* ---------- Header: current page ---------- */
.nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

/* ---------- Compact hero (same look as the home hero, single column) ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 7vw, 84px); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.page-hero .lead { max-width: 62ch; }
.page-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: .92rem; color: #b8c6ee; }
.page-meta li { display: inline-flex; align-items: center; gap: 8px; }
.page-meta .ic { width: 1.1em; height: 1.1em; color: var(--blue-300); }

.app-ident { display: inline-flex; align-items: center; gap: 14px; max-width: 100%; margin-bottom: 22px; padding: 8px 22px 8px 8px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; }
.app-ident .doc-icon { width: 48px; height: 48px; flex: none; }
.app-ident b { display: block; font-weight: 700; line-height: 1.25; }
.app-ident small { display: block; font-size: .82rem; color: #b8c6ee; }

.eyebrow .dot.is-warn { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }

/* ---------- Topic strip (cards that link to the sections below) ---------- */
.strip-grid-4 { grid-template-columns: repeat(4, 1fr); }
a.strip-item { color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
a.strip-item:hover { transform: translateY(-3px); border-color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); }
.strip-title { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }

/* ---------- FAQ page ---------- */
.faq-groups { display: grid; gap: clamp(44px, 6vw, 72px); }
.faq-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.section .faq-group-head h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.25; letter-spacing: -.02em; }
.faq details p + p { margin-top: -8px; }
.faq details a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Notice page ---------- */
.page-notice { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page-notice main { flex: 1; display: flex; flex-direction: column; }
.notice-hero { flex: 1; display: grid; align-items: center; padding: clamp(32px, 5vw, 72px) 0; }
.notice-card { max-width: 680px; margin-inline: auto; padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px); text-align: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 28px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); }
.notice-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 22px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); border-radius: 18px; box-shadow: 0 12px 28px -10px rgba(37, 99, 235, .9); }
.notice-icon .ic { width: 30px; height: 30px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice-card h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.notice-card .lead { margin-inline: auto; }
.notice-text { max-width: 54ch; margin: 14px auto 0; color: #c7d2f5; }
.notice-card .hero-cta { justify-content: center; }
.notice-foot { margin-top: 32px; padding-top: 22px; font-size: .9rem; color: #9fb0e0; border-top: 1px solid rgba(255, 255, 255, .12); }
.btn-back:hover .ic { transform: translateX(-3px); }

/* ---------- Published policy document ---------- */
.policy-wrap { padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 9vw, 112px); background: var(--bg-alt); }
.policy-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }

/* Contents list: sticky sidebar on desktop, a sticky scrolling chip bar on small screens */
.toc-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 20px; }
.toc-title { margin-bottom: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.toc-nav ol { columns: 1; }
.toc-nav li { align-items: baseline; padding: 0; }
.toc-nav li:last-child { border-bottom: 0; }
.toc-nav li::before { padding-top: 0; }
.toc-nav a { flex: 1; display: block; padding: 8px 0; color: var(--text-2); text-decoration: none; transition: color .15s; }
.toc-nav a:hover { color: var(--text); }
.toc-nav a.is-active { color: var(--blue); font-weight: 600; }

.policy-card { margin-bottom: 20px; padding: clamp(22px, 3.2vw, 34px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.policy-card > h2 { display: flex; align-items: center; gap: 14px; font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.policy-card > h2 .fi { width: 40px; height: 40px; border-radius: 10px; }
.policy-card > h2 .fi .ic { width: 20px; height: 20px; }

/* Body copy */
.prose > * + * { margin-top: 12px; }
.prose > h2 + * { margin-top: 18px; }
.prose > h3 { margin-top: 28px; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.prose > h3 + * { margin-top: 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.2rem; list-style: disc; }
.prose li { padding-left: .25rem; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
.prose a.link-ext { display: inline-flex; align-items: center; gap: 6px; }
.link-ext .ic { width: 1em; height: 1em; }

/* Callouts and tags */
.callout { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: rgba(37, 99, 235, .06); border: 1px solid rgba(37, 99, 235, .22); border-radius: var(--radius-sm); }
.prose > .callout { margin-top: 18px; }
.callout > .ic { margin-top: 2px; color: var(--blue); }
.callout p { margin: 0; }
.callout.is-warn { background: #fffbeb; border-color: #fcd34d; }
.callout.is-warn > .ic { color: #b45309; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border-radius: 999px; }
.tag-ok { color: #047857; background: #d1fae5; }
.tag-warn { color: #92400e; background: #fef3c7; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose > .table-wrap { margin-top: 14px; }
.prose > h3 + .table-wrap { margin-top: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th { padding: 12px 16px; text-align: left; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; vertical-align: top; color: var(--text-2); border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td:first-child { color: var(--text); font-weight: 600; }

/* Contact */
.prose .contact-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.prose > .contact-list { margin-top: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.contact-list li + li { margin-top: 0; }
.contact-label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.contact-value { display: block; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.prose .contact-value a { text-decoration: none; }
.prose .contact-value a:hover { text-decoration: underline; }
.doc-credit { margin-top: 24px; font-size: .84rem; text-align: center; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .strip-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .policy-wrap { padding-top: 0; }
  .policy-layout { display: block; } /* sticky needs a tall containing block, which a grid row would not give it */
  .policy-content { padding-top: 24px; }
  .policy-card { scroll-margin-top: 64px; }

  .toc-nav {
    top: var(--header-h); z-index: 20; margin-inline: calc(var(--gutter) / -2); padding: 0;
    background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none;
  }
  .toc-title { display: none; }
  .toc-nav ol { display: flex; gap: 8px; padding: 10px calc(var(--gutter) / 2); overflow-x: auto; scrollbar-width: none; }
  .toc-nav ol::-webkit-scrollbar { display: none; }
  .toc-nav li { flex: none; border-bottom: 0; }
  .toc-nav li::before { display: none; }
  .toc-nav a { flex: none; padding: 7px 14px; font-size: .86rem; font-weight: 600; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
  .toc-nav a.is-active { color: #fff; background: var(--blue); border-color: var(--blue); }
}

@media (max-width: 640px) {
  .strip-grid-4 { grid-template-columns: 1fr; }
  .app-ident { padding-right: 16px; }
  .callout { padding: 14px; }

  /* Tables become one card per row. The roles in the markup keep them tables for assistive tech. */
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .data-table tbody { display: grid; gap: 10px; }
  .data-table tr { padding: 14px 16px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .data-table td { padding: 0; border: 0; }
  .data-table td + td { margin-top: 10px; }
  .data-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
  .data-table td:first-child::before { display: none; }
}

/* Windows high-contrast / forced colours */
@media (forced-colors: active) {
  .policy-card, .toc-nav, .callout, .tag, .notice-card, .app-ident, a.strip-item, .contact-list li { border: 1px solid CanvasText; }
}
