/* ============================================================================
   Landing page styles. Plain CSS, no framework.

   The landing page used to load the Tailwind Play CDN (about 400 KB of
   JavaScript) to style a page that needs a few hundred lines of CSS. This
   file replaces it there; the guide pages and the tutorial viewer still use
   Tailwind. site.css (skip link, focus rings, form-control floor) loads first.

   One typeface: the reader's own system sans-serif. One accent: blue.
   Dark mode follows the `dark` class that theme.js puts on <html>.
   Bump landing.css?v= in index.html when this file changes.
   ============================================================================ */

:root {
    --bg: #ffffff;
    --bg-raised: #ffffff;
    --text: #1f2937;
    --strong: #111827;
    --body: #374151;
    --muted: #4b5563;
    --faint: #6b7280;
    --rule: #e5e7eb;
    --rule-strong: #111827;
    --sep: #d1d5db;
    --border: #d1d5db;
    --border-hover: #6b7280;
    --accent: #1d4ed8;
    --accent-on: #ffffff;
    --accent-on-muted: #dbeafe;
    --masthead: rgba(255, 255, 255, 0.92);
    color-scheme: light;
}

html.dark {
    --bg: #111827;
    --bg-raised: #1f2937;
    --text: #e5e7eb;
    --strong: #f9fafb;
    --body: #d1d5db;
    --muted: #9ca3af;
    --faint: #9ca3af;
    --rule: #1f2937;
    --rule-strong: #e5e7eb;
    --sep: #4b5563;
    --border: #4b5563;
    --border-hover: #9ca3af;
    --accent: #60a5fa;
    --accent-on: #0b1220;
    --accent-on-muted: #0b1220;
    --masthead: rgba(17, 24, 39, 0.92);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tabular { font-variant-numeric: tabular-nums; }
.sep { color: var(--sep); }

.wrap {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }

/* ---- masthead ----------------------------------------------------------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--masthead);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}
.brand { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    color: var(--faint);
    white-space: nowrap;
}
.wordmark:hover { color: var(--accent); }
.wordmark-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #9ca3af;
    transform: translateY(-1px);
}
html.dark .wordmark-dot { background: #6b7280; }
.brand-slash { color: var(--sep); }
.brand-site { font-size: 1.25rem; font-weight: 600; color: var(--strong); padding: 0.5rem 0; }
.masthead-topics { display: none; margin-left: auto; margin-right: 1.25rem; gap: 1.5rem; font-size: 0.875rem; }
.masthead-topics a { color: var(--muted); white-space: nowrap; }
.masthead-topics a:hover { color: var(--accent); }
@media (min-width: 768px) { .masthead-topics { display: flex; } }

.icon-btn {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--faint);
    cursor: pointer;
}
.icon-btn:hover { background: var(--rule); color: var(--accent); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }
.only-light { display: block; }
.only-dark { display: none; }
html.dark .only-light { display: none; }
html.dark .only-dark { display: block; }
@media (min-width: 1024px) { .icon-btn { width: 2.25rem; height: 2.25rem; } }

/* ---- statement ---------------------------------------------------------- */
main { flex: 1 0 auto; }
.intro { padding: 2.5rem 0 1.5rem; }
@media (min-width: 640px) { .intro { padding-top: 3.5rem; } }
.intro h1 { font-size: 1.875rem; line-height: 1.2; font-weight: 600; color: var(--strong); }
@media (min-width: 640px) { .intro h1 { font-size: 2.25rem; } }
.lede { margin-top: 0.75rem; max-width: 42rem; font-size: 1rem; line-height: 1.65; color: var(--body); }
@media (min-width: 640px) { .lede { font-size: 1.125rem; } }
.stats { margin-top: 0.75rem; font-size: 0.875rem; color: var(--faint); }
.format-key { margin-top: 1rem; font-size: 0.875rem; line-height: 1.65; color: var(--muted); }
.format-key span { display: inline-block; margin-right: 1.25rem; }
.format-key b { font-weight: 500; color: var(--body); }

/* ---- recently updated --------------------------------------------------- */
.recent { padding: 1.25rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.recent h2 { font-size: 0.875rem; font-weight: 600; color: var(--strong); }
.recent ul { margin-top: 0.5rem; }
.recent li { font-size: 0.9375rem; margin-top: 0.375rem; color: var(--faint); }
.recent a { font-weight: 500; color: var(--accent); }
.recent a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---- controls ----------------------------------------------------------- */
.controls { padding: 2rem 0 1.5rem; }
.controls-row { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 1024px) { .controls-row { flex-direction: row; align-items: center; } }
.format-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fmt-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--body);
    cursor: pointer;
}
@media (min-width: 1024px) { .fmt-btn { padding: 0.375rem 0.75rem; } }
.fmt-btn:hover { border-color: var(--border-hover); }
.fmt-btn .count { color: var(--faint); }
.fmt-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.fmt-btn[aria-pressed="true"] .count { color: var(--accent-on-muted); }
.search { position: relative; }
@media (min-width: 1024px) { .search { margin-left: auto; width: 18rem; } }
.search svg {
    position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
    width: 1rem; height: 1rem; color: var(--faint); pointer-events: none;
}
.search input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg-raised);
    color: var(--strong);
    font-size: 1rem;
}
@media (min-width: 1024px) { .search input { padding-top: 0.375rem; padding-bottom: 0.375rem; font-size: 0.875rem; } }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); outline: none; }
.filter-status { margin-top: 0.75rem; min-height: 1.25rem; font-size: 0.875rem; color: var(--faint); }

/* ---- subject sections --------------------------------------------------- */
.subject { margin: 1.5rem 0 3.5rem; padding-top: 1.5rem; border-top: 3px solid var(--rule-strong); scroll-margin-top: 5rem; }
.subject-head { display: flex; align-items: baseline; gap: 0.75rem; }
.subject h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--strong); }
@media (min-width: 640px) { .subject h2 { font-size: 1.875rem; } }
.subject-count { font-size: 0.875rem; color: var(--faint); }
@media (min-width: 640px) { .subject-count { font-size: 1rem; } }
.subject-blurb { margin: 0.5rem 0 1rem; color: var(--muted); }
.entries { border-bottom: 1px solid var(--rule); }

.entry { border-top: 1px solid var(--rule); }
.entry > a { display: block; padding: 1rem 0; }
@media (min-width: 640px) {
    .entry > a { display: grid; grid-template-columns: 1fr 15rem; column-gap: 2rem; }
}
.entry-title { display: block; font-size: 1rem; font-weight: 600; color: var(--strong); }
@media (min-width: 640px) { .entry-title { font-size: 1.0625rem; } }
.entry > a:hover .entry-title { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-desc { display: block; margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.entry-status { display: block; margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.5; color: var(--body); }
.entry-status b, .sheet-note b { font-weight: 600; }
.entry-meta { display: block; margin-top: 0.5rem; font-size: 0.875rem; color: var(--faint); }
.entry-meta span { display: block; }
@media (min-width: 640px) { .entry-meta { margin-top: 0.25rem; text-align: right; } }

.sheets { border-top: 1px solid var(--rule); padding: 1rem 0; font-size: 0.9375rem; line-height: 2; }
.sheets-label { color: var(--muted); }
.sheet { white-space: nowrap; }
.sheet a {
    color: var(--strong);
    text-decoration: underline;
    text-decoration-color: var(--sep);
    text-underline-offset: 2px;
}
.sheet a:hover { color: var(--accent); text-decoration-color: currentColor; }
.sheet-notes { margin-top: 0.5rem; }
.sheet-note { display: block; font-size: 0.875rem; line-height: 1.5; color: var(--body); margin-top: 0.25rem; }

.filter-empty { padding: 3rem 0; color: var(--muted); }

/* ---- footer (shared chrome; mirrors vinothhaldorai.com) ----------------- */
.site-footer { margin-top: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.footer-row { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 640px) { .footer-row { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; font-size: 0.875rem; }
.footer-nav a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 0; color: var(--muted); }
@media (min-width: 1024px) { .footer-nav a { padding: 0; } }
.footer-nav a:hover { color: var(--accent); }
.now-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.socials { display: flex; align-items: center; gap: 0.25rem; }
.footer-base {
    margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.75rem; color: var(--faint);
}
@media (min-width: 640px) { .footer-base { flex-direction: row; align-items: center; justify-content: space-between; } }
