/* SILVERLOCKE — a small, reusable stylesheet. No framework required.
   Change these named colors to change the look of every page. */
:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #201c24;
  --muted: #68616c;
  --accent: #735191;
  --panel: #eae4ee;
  --line: #d0c7d5;
  --reading-size: 1.125rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #18151d;
  --ink: #f3eee5;
  --muted: #c0b6c9;
  --accent: #b79ad7;
  --panel: #26212e;
  --line: #514757;
}

/* Foundations */
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 Arial, sans-serif; }
main, .site-header, .site-footer { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
main { min-height: 65vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, .wordmark { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
h1 { font-size: clamp(3.6rem, 6.5vw, 6rem); line-height: .99; letter-spacing: -.055em; margin: 22px 0 28px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.14; letter-spacing: -.03em; margin: 0 0 22px; }
h3 { font-size: 1.5rem; line-height: 1.3; }
h1 em, h2 em { font-weight: 400; }
h1 span, .wordmark span { color: var(--accent); }
p { margin: 0 0 1.25em; }
small, .small { font-size: .85rem; }
button, summary { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 24px; padding: 12px; z-index: 5; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }
.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; }

/* The same header and footer appear on every page. */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 30px 26px; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 1.6rem; line-height: 1.02; letter-spacing: -.04em; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 28px; }
.site-header nav a { padding-block: 10px; font-size: .9rem; text-decoration: none; }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 32px 40px; margin-top: 90px; border-top: 1px solid var(--line); font-size: .85rem; }
.site-footer p { margin: 0; }
.site-footer small { color: var(--muted); font-size: .75rem; }

/* Reusable vocabulary: buttons, labels, notes, columns. */
.eyebrow { color: var(--accent); font-size: .68rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; margin-bottom: 22px; }
.intro { font-size: 1.125rem; line-height: 1.7; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 28px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 32px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font-size: .85rem; transition: transform .2s, background-color .2s; }
.button:hover { color: var(--paper); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.button-outline { background: transparent; color: var(--ink); }
.text-link { display: inline-block; padding-block: 8px; font-size: .9rem; text-decoration-thickness: 1px; }
.download { font-size: .8rem; color: var(--muted); padding-block: 10px; }
.note { padding: 20px 24px; background: var(--panel); border-left: 3px solid var(--accent); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
details { border-block: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; padding: 8px 0; }
details[open] summary { margin-bottom: 18px; }

/* Home page */
.hero { display: grid; grid-template-columns: 1.45fr 1fr; gap: 64px; align-items: center; padding-block: 76px 80px; }
.hero h1 { font-size: clamp(3.4rem, 5.8vw, 5.3rem); }
.hero .eyebrow { margin-bottom: 28px; }
.portrait { margin: 12px 0 0; }
.portrait img { width: 100%; border: 10px solid var(--paper); outline: 1px solid var(--line); box-shadow: 12px 12px 0 var(--panel); }
.portrait figcaption { margin: 28px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: .8rem; line-height: 1.5; font-style: italic; }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 70px; align-items: center; background: var(--panel); border-top: 2px solid var(--accent); padding: 42px 46px; }
.feature h2 { font-size: 2.3rem; margin: 0; }
.feature p:not(.eyebrow) { font-size: .95rem; }
.feature .text-link { padding-bottom: 0; }
.section-heading { padding-top: 90px; margin-bottom: 44px; }
.section-heading .eyebrow { margin-bottom: 16px; }
.margin-note { font: italic 1.65rem/1.45 Georgia, serif; color: var(--muted); padding-right: 24px; }
.closing { margin-top: 70px; padding: 60px 24px; border-block: 1px solid var(--line); text-align: center; }
.closing h2 { font-size: 3.5rem; margin-bottom: 28px; }

/* Reading pages */
.page-heading { padding-block: 70px 64px; }
.page-heading h1 { margin-top: 18px; }
.page-heading .intro { margin-bottom: 0; }
.reading-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 80px; align-items: start; }
.prose { max-width: 72ch; font-family: Georgia, 'Times New Roman', serif; font-size: var(--reading-size); line-height: 1.85; }
.prose p { margin-bottom: 1.5em; }
.prose h2 { margin: 60px 0 24px; }
.prose h2:first-child { margin-top: 0; }
.prose a { text-decoration-thickness: 1px; }
.shelf-note { max-width: 277px; color: var(--muted); font-size: .9rem; }
.shelf-note img { margin-bottom: 24px; }
.shelf-note p { margin-bottom: 20px; }
.story { padding: 34px 0; border-top: 1px solid var(--line); }
.story:first-child { padding-top: 0; border-top: 0; }
.story .eyebrow { margin-bottom: 14px; }
.story h2 { font-size: 2.15rem; }
.story > p:not(.eyebrow) { font: var(--reading-size)/1.8 Georgia, serif; }
.story .actions { margin-top: 12px; }
.contents { position: sticky; top: 30px; }
.contents nav { display: grid; gap: 16px; font-size: .85rem; }
.contents .eyebrow { margin-bottom: 20px; }
.link-group { margin-bottom: 56px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 18px; text-decoration: none; font-size: 1rem; }
.link-list a:hover { text-decoration: underline; }

/* Optional enhancements created by site.js. All content works without them. */
.reading-tools { display: flex; flex-wrap: wrap; gap: 6px; width: min(1160px, calc(100% - 96px)); margin: 16px auto -10px; justify-content: flex-end; }
.reading-tools button, .copy-button { min-height: 36px; border: 1px solid var(--line); padding: 6px 12px; color: var(--muted); background: transparent; font-size: .75rem; }
.reading-tools button:hover, .copy-button:hover { border-color: var(--ink); color: var(--ink); }
.reading-tools button[aria-pressed="true"] { background: var(--panel); color: var(--ink); }
.reading-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; z-index: 10; pointer-events: none; }
.arrival { animation: arrive .6s ease both; }
@keyframes arrive { from { opacity: .3; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* The owner's component guide */
.guide { margin-inline: auto; }
code { font: .85em/1.5 ui-monospace, Menlo, monospace; }
pre { background: var(--panel); padding: 20px; overflow-x: auto; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.example { padding-block: 28px; border-top: 1px solid var(--line); }
.example h2 { margin-top: 0; }
.sample { padding-block: 12px; }
.sample p:last-child { margin-bottom: 0; }

/* Responsive layout: the same simple HTML becomes one column on small screens. */
@media (max-width: 900px) {
  main, .site-header, .site-footer, .reading-tools { width: calc(100% - 48px); }
  .hero { gap: 36px; }
  .hero h1 { font-size: 3.7rem; }
  .reading-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .feature { gap: 36px; padding: 32px; }
  .feature h2 { font-size: 1.9rem; }
}
@media (max-width: 680px) {
  .site-header { display: block; padding-top: 24px; }
  .wordmark { display: inline-block; }
  .site-header nav { margin-top: 22px; gap: 14px 24px; }
  .reading-tools { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; padding-block: 52px; gap: 32px; }
  .hero h1 { font-size: clamp(2.7rem, 10vw, 4.2rem); }
  .hero .intro br { display: none; }
  .portrait { width: min(100%, 400px); }
  .feature, .columns, .reading-layout { grid-template-columns: 1fr; gap: 30px; }
  .feature { padding: 28px 24px; }
  .section-heading { padding-top: 58px; }
  .margin-note { max-width: 26ch; font-size: 1.4rem; }
  .page-heading { padding-block: 50px 44px; }
  h1 { font-size: clamp(3rem, 12vw, 4.5rem); }
  .contents { position: static; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
  .shelf-note { max-width: 100%; }
  .shelf-note img { max-width: 220px; }
  .closing h2 { font-size: 2.5rem; }
  .site-footer { margin-top: 60px; align-items: flex-start; flex-direction: column; }
  .prose { line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root, :root[data-theme="dark"] { --paper: white; --ink: black; --muted: #333; --accent: black; --line: #aaa; --panel: #eee; }
  .site-header nav, .reading-tools, .reading-progress, .contents, .copy-button, .skip-link { display: none; }
  main, .site-header, .site-footer { width: 100%; }
  .reading-layout { display: block; }
  .prose { max-width: none; font-size: 11pt; }
  .page-heading, .hero { padding-block: 20px; }
  .story, figure { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
