/* secondshanti.org/as — shared stylesheet for the public landing
 * (/as/), the essay shelves (/as/essays/, /as/private/), and every
 * essay page under those.
 *
 * Book content has its own stylesheet at /as/book/css/book.css.
 *
 * System fonts only; no JavaScript, no external font loading.
 * Devanagari falls through via the appended sans-serif stack: the
 * browser picks a Devanagari face automatically when it needs to
 * render glyphs the serif body cannot supply.
 */

:root {
  --measure: 38rem;
  --fg: #1c1c1c;
  --fg-quiet: #555;
  --bg: #fafaf7;
  --rule: #cdcabf;
  --link: #1e3a8a;
  --link-hover: #1d4ed8;
  --code-bg: rgba(0, 0, 0, 0.05);
  --quote-fg: #333;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  padding: 1.5rem 1.25rem 3rem;
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  font-family: Charter, Georgia, "Times New Roman", Times,
               "Noto Sans Devanagari", "Kohinoor Devanagari",
               "Devanagari MT", "Arial Unicode MS", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
h1 { font-size: 1.7rem; letter-spacing: -0.01em; margin-top: 0.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4, h5, h6 { font-size: 1rem; font-style: italic; font-weight: 600; }

p { margin: 0 0 1rem; hyphens: auto; }

em, i, cite { font-style: italic; }
strong, b { font-weight: 700; }

blockquote {
  margin: 1.25rem 0 1.25rem 1.5rem;
  padding-left: 0;
  font-style: italic;
  color: var(--quote-fg);
}
blockquote p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem auto;
  max-width: 8rem;
}

ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

code, pre {
  font-family: "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: 0.92em;
}
code {
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
}
pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  background: var(--code-bg);
  border-radius: 4px;
}
pre code { background: none; padding: 0; }

table {
  border-collapse: collapse;
  margin: 1.25rem 0;
  width: 100%;
  font-size: 0.94em;
}
th, td {
  border-bottom: 1px solid var(--rule);
  padding: 0.45rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
th { font-weight: 700; border-bottom-width: 2px; }

/* Essay-shelf entry — short title + description block. */
.shelf-entry {
  margin: 1.25rem 0;
}
.shelf-entry .title { font-weight: 700; }
.shelf-entry .description {
  margin-top: 0.2rem;
  font-style: italic;
  color: var(--quote-fg);
}

/* Calls-to-action on the landing page. */
.cta-list {
  margin: 1.75rem 0;
}
.cta-list .cta {
  display: block;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.cta-list .description {
  font-style: italic;
  color: var(--quote-fg);
}

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88em;
  color: var(--fg-quiet);
}
footer p { margin: 0.35rem 0; }
footer a { color: var(--fg-quiet); }
footer a:hover { color: var(--link-hover); }

.build-info {
  margin-top: 0.55rem;
  font-size: 0.92em;
  color: var(--fg-quiet);
  letter-spacing: 0.01em;
}
.build-info code {
  background: none;
  padding: 0;
  font-size: 1em;
}

@media (max-width: 600px) {
  html { font-size: 17px; }
  body { padding: 1rem 1rem 2rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.2rem; }
}

@media print {
  body {
    max-width: none;
    padding: 0;
    font-size: 12pt;
    color: black;
    background: white;
  }
  a { color: inherit; text-decoration: none; border-bottom: none; }
  footer { border-top: 1px solid #888; }
}
