/* Liora's documents (/guide, /privacy, /terms, /policies): long-form reading on top of library.css's tokens. */

.doc-main { max-width: 820px; margin: 0 auto; padding: 18px 16px 0; }

.doc-tabs {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px;
}
.doc-tabs a {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
    color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.doc-tabs a:hover { color: var(--text); border-color: var(--gold); }
.doc-tabs a.active { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: var(--ink); border-color: transparent; font-weight: 700; }

.doc {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(20px, 4vw, 44px); box-shadow: var(--shadow);
    line-height: 1.7; font-size: 1.02rem; color: var(--text); min-width: 0;
}
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 6px; }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin: 2.1em 0 0.5em; padding-top: 0.2em; }
.doc h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 1.6em 0 0.4em; color: var(--gold); }
.doc h4 { font-size: 1.02rem; margin: 1.3em 0 0.3em; }
.doc-updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.4em; }
.doc p { margin: 0.8em 0; }
.doc a { color: var(--gold); text-underline-offset: 3px; }
.doc a:hover { color: var(--gold-2); }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.4em; margin: 0.7em 0; }
.doc li { margin: 0.35em 0; }
.doc li > ul, .doc li > ol { margin: 0.3em 0; }
.doc code {
    font-size: 0.9em; padding: 0.12em 0.4em; border-radius: 6px;
    background: rgba(255, 184, 0, 0.12); color: var(--text); overflow-wrap: anywhere;
}
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.doc blockquote {
    margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--gold);
    background: rgba(255, 184, 0, 0.07); border-radius: 0 14px 14px 0;
}
.doc blockquote p { margin: 0; }

/* Tables scroll inside their own box on phones instead of stretching the page. */
.table-wrap { overflow-x: auto; margin: 1.1em 0; border: 1px solid var(--line); border-radius: 14px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.94rem; min-width: 480px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.doc tbody tr:last-child td { border-bottom: 0; }

/* "All policies" (docs_web.index_tiles): the features as tiles in number order, with a filter box above them.
   Links are plain text until you point at them; the tile lifts and the arrow nudges forward. */
.policy-filter { margin: 1em 0 0.8em; }
.policy-filter label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.policy-filter input {
    width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 12px;
    border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
    font: inherit; font-size: 1rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.policy-filter input::placeholder { color: var(--muted); opacity: 0.8; }
.policy-filter input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.18); }
.doc ul.policy-tiles {
    list-style: none; padding: 0; margin: 0.4em 0 1em;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.doc ul.policy-tiles li { margin: 0; }
.doc ul.policy-tiles li[hidden] { display: none; }
.doc a.policy-tile {
    display: flex; align-items: center; gap: 12px; height: 100%; box-sizing: border-box;
    padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
    color: var(--text); text-decoration: none; line-height: 1.35;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.doc a.policy-tile:hover, .doc a.policy-tile:focus-visible {
    color: var(--text); background: rgba(255, 184, 0, 0.08); border-color: var(--line-strong); transform: translateY(-1px);
}
.policy-no { flex: 0 0 auto; min-width: 2ch; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold); font-size: 0.9rem; }
.policy-name { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.policy-go { flex: 0 0 auto; color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s var(--ease); }
.doc a.policy-tile:hover .policy-go, .doc a.policy-tile:focus-visible .policy-go { color: var(--gold); transform: translateX(3px); }
.policy-none { color: var(--muted); }
@media (max-width: 600px) {
    .doc ul.policy-tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .doc a.policy-tile, .policy-go { transition: none; }
    .doc a.policy-tile:hover, .doc a.policy-tile:hover .policy-go { transform: none; }
}

@media (max-width: 600px) {
    .doc { font-size: 0.98rem; border-radius: 18px; }
    .doc h2 { font-size: 1.3rem; }
}

/* The "Get the app" page (/app, templates/app.html + static/js/app-page.js). */
.app-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.app-icon { flex-shrink: 0; border-radius: 22px; box-shadow: 0 10px 30px rgba(255, 170, 30, 0.28); }
.app-page h1 em { font-style: italic; color: var(--gold); }
.app-lead { color: var(--muted); margin: 0.3em 0 0; }
.app-status, .app-discord {
    margin: 1em 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255, 184, 0, 0.07); line-height: 1.55;
}
.app-status { border-color: var(--gold); font-weight: 600; }
.app-install { margin: 1.2em 0; text-align: center; }
.app-install-btn {
    min-height: 52px; padding: 12px 30px; border: 0; border-radius: 999px; cursor: pointer;
    font: 700 1.08rem var(--sans, inherit); color: var(--ink);
    background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 8px 24px rgba(255, 150, 20, 0.4);
}
.app-install-btn:active { transform: scale(0.98); }
.app-note { color: var(--muted); font-size: 0.92rem; margin: 0.6em 0 0; }
.app-steps { display: grid; gap: 14px; margin-top: 1.2em; }
.app-card { border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px 14px; }
.app-card h2 { font-size: 1.25rem; margin: 0.8em 0 0.3em; padding-top: 0; }
.app-card-mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.app-card-mine h2::after {
    content: "your device"; margin-left: 10px; padding: 2px 10px; border-radius: 999px; vertical-align: middle;
    font: 700 0.72rem var(--sans, inherit); letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ink); background: linear-gradient(135deg, var(--gold), var(--gold-2));
}
.app-key {
    display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 4px; border-radius: 6px;
    border: 1px solid var(--line-strong); font-size: 0.9em; line-height: 1;
}
[hidden].app-status, [hidden].app-install { display: none; }

@media (max-width: 600px) {
    .app-hero { flex-direction: column; text-align: center; gap: 12px; }
    .app-icon { width: 80px; height: 80px; }
}
.app-warn { border-color: #e0680d; background: rgba(224, 104, 13, 0.1); font-weight: 500; }
[hidden].app-warn { display: none; }
.app-install-btn .ico { width: 20px; height: 20px; }
