/*
 * reading.css - THE PUBLIC READING PAGES' OWN LOOK (owner, 2026-11-08): the privacy
 * policy, the terms, contact, the blogs and their posts. Loaded by BOTH layouts -
 * the public one (lib/guest.php, with landing.css) and, for someone signed in, the
 * app's (lib/layout.php, with app.css) - so these pages read the same either way
 * while the header and footer around them are the ones the visitor expects.
 * Only rules for what is INSIDE these pages belong here.
 */

/* The colors these rules use, whichever stylesheet is loaded with them. */
.doc-page, .blog-tiles, .content-buttons, .content-legal, .draft-note {
  --cyan: #39d6ff; --navy: #070e1a; --navy-2: #0e1f33; --navy-3: #15304d; --line: #22394f;
  --ink: #dfe6ec; --muted: #9fb0bf; --amber: #e3b341;
}
.doc-page .narrow { max-width: 46rem; }

/* --- Privacy and terms (privacy.php, terms.php): readable document pages --- */
.doc-page { padding-top: 2.5rem; }
.doc-page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.doc-page h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: #fff; }
.doc-page p, .doc-page li { color: var(--ink); line-height: 1.6; }
.doc-page ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.doc-page li { margin: 0.35rem 0; }

/* --- Content pages (owner, 2026-10-26; www/content.php): a series' list and
   its blog-style pages. Dates show the day only. ------------------------- */
.content-page .series-link { margin: 0 0 0.4rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.content-page .series-link a { color: var(--muted, #9fb0bf); text-decoration: none; }
.content-page .published { display: block; margin: 0 0 1.4rem; color: var(--muted, #9fb0bf); font-size: 0.9rem; }
.content-body a { text-decoration: underline; text-underline-offset: 2px; }
/* Lists of posts read as text; the accent only on the one pointed at (cobalt reduction). */
.content-list a { color: var(--ink); text-decoration: none; }
.content-list a:hover, .content-list a:focus-visible { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.content-body strong { color: #fff; }
.content-index { list-style: none; padding: 0; margin: 1.5rem 0; }
.content-index li { padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.content-index .content-title { color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.content-index .content-title:hover { text-decoration: underline; }
.content-index .published { margin: 0.2rem 0 0.4rem; }
.content-index p { margin: 0; }
.draft-note { padding: 0.5rem 0.8rem; border: 1px solid #7a6025; border-left: 4px solid #e3b341; border-radius: 6px;
              background: #2a220e; color: #e3b341; }

/* --- The blog index (owner, 2026-10-26): glossy 300px tiles, each a 3:1 hero
   banner with the title and intro underneath. -------------------------- */
.blog-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 300px)); justify-content: center;
              gap: 1.25rem; margin: 1.75rem 0 1rem; }
.blog-tile { display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(57, 214, 255, 0.22); border-radius: 14px;
             background: linear-gradient(160deg, var(--navy-3) 0%, var(--navy-2) 70%);
             box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
             color: var(--ink); text-decoration: none; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.blog-tile:hover, .blog-tile:focus-visible { transform: translateY(-3px); border-color: rgba(57, 214, 255, 0.6);
             box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(57, 214, 255, 0.25), 0 0 24px rgba(57, 214, 255, 0.15); }
.blog-tile-hero { position: relative; display: block; aspect-ratio: 3 / 1; overflow: hidden; background: #0b1626; }
.blog-tile-hero img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-tile:hover .blog-tile-hero img { transform: scale(1.04); }
/* The gloss: a soft sheen across the top of the banner. */
.blog-tile-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
             background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 38%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.25) 100%); }
.blog-tile-blank { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 1rem;
             background: radial-gradient(circle at 25% 30%, rgba(57, 214, 255, 0.35), transparent 55%), linear-gradient(135deg, #15304d, #0b1626);
             color: rgba(255, 255, 255, 0.75); font-family: var(--heading); font-weight: 700; font-size: 0.95rem; text-align: center; }
.blog-tile-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.85rem 1rem 1.1rem; }
.blog-tile-title { color: #fff; font-family: var(--heading); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.blog-tile-date { color: var(--muted); font-size: 0.8rem; }
.blog-tile-intro { color: var(--ink); font-size: 0.9rem; line-height: 1.5;
             display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* A post's hero banner, at the top of the post. */
.content-hero { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1;   /* height: auto - the img carries width/height attributes for page speed */
                object-fit: cover; margin: 0.4rem 0 1.2rem; border-radius: 12px;
                border: 1px solid rgba(57, 214, 255, 0.22); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }

/* BUTTONS UNDER A POST (owner, 2026-11-08; lib/content.php, content_buttons()): one centered, two apart
   like the top buttons in the app (space-evenly), each as wide as the longest words (--top-w). Then the
   "not legal advice" note, after a wide gap. */
.content-buttons { display: flex; justify-content: space-evenly; align-items: center; gap: 1rem; margin: 48px 0 0; flex-wrap: wrap; }
.content-buttons .button { flex: 0 0 var(--top-w, auto); text-align: center; white-space: nowrap; box-shadow: none; color: var(--navy); }
.content-buttons .button:hover { filter: brightness(1.12); }
.content-buttons .cta-blue  { background: var(--cyan); }
.content-buttons .cta-green { background: #6fd393; }
.content-buttons .cta-red   { background: #f07c74; }
.content-buttons .cta-amber { background: var(--amber); }
.content-buttons .cta-white { background: #ffffff; }
.content-buttons .cta-gray  { background: var(--muted); }
.content-legal { margin: 96px 0 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.blog-tile-hero.start-blog-name::after { display: none; }
.start-blog-name { display: flex; align-items: center; justify-content: center; padding: 0 1rem; background: #0b1626;
                   color: #fff; font-family: var(--heading); font-weight: 700; font-size: 1.2rem; text-align: center; }
/* Only as many columns as there are blogs, so the tiles sit centered too. */
.series-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 300px)); }
.blogs-page h1, .blogs-page .lede { text-align: center; }
.blogs-page .lede { margin: 0 auto 2rem; }
