/* jaybooks.app: one stylesheet, no build step.
   Colours follow .claude/design.md (Jay Blue #235E9C, ink #1A1C20,
   warm white #FBFBFE, dove gray #ECEEF5). Sizes are in rem so the page
   follows the reader's text size and stays readable at 200% zoom. */

:root {
  color-scheme: light dark;
  --bg: #FBFBFE;
  --surface: #ECEEF5;
  --ink: #1A1C20;
  --ink-soft: #43474E;
  --accent: #235E9C;
  --rule: #D5D8E2;
  --notice-bg: #F2DFC4;
  --notice-ink: #4A3317;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1E2128;
    --ink: #E4E5EA;
    --ink-soft: #B4B8C2;
    --accent: #A6C8FF;
    --rule: #343842;
    --notice-bg: #3D2F1B;
    --notice-ink: #F2DFC4;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header and footer */

.site-header {
  padding-top: 1.25rem;   /* side padding comes from .wrap */
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.wordmark img {
  display: block;
  height: 44px;
  width: auto;
}

.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;      /* side padding comes from .wrap */
  padding-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding: 0.75rem 0; /* 48px touch target with the line height */
}

.site-footer .wordmark {
  padding: 0;
}

.site-footer .wordmark img {
  height: 36px;
}

.site-footer .foot-note {
  flex-basis: 100%;
  margin: 0;
}

/* Text */

main {
  padding-top: 2rem;
}

main.wrap {
  padding-top: 2rem; /* .wrap sets padding too; keep the gap under the header */
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 2.25rem 0 0.75rem;
}

h1 {
  font-size: 2.125rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.1875rem;
}

p,
ul,
ol,
table {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.375rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.meta {
  color: var(--ink-soft);
}

/* Draft notice and unfilled placeholders */

.draft-notice {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  font-weight: 600;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--surface);
}

.reviewer-notes {
  padding: 1rem;
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.9375rem;
}

.reviewer-notes h2 {
  margin-top: 0;
  font-size: 1.1875rem;
}

/* Tables scroll inside themselves on narrow screens instead of the page */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

th,
td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
}

/* Home */

.home {
  padding-top: 4rem;
}

.home h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.home .tagline {
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}
