/* Terminal Notes — shared styles */

:root {
  color-scheme: light dark;
  --bg: #faf7ef;
  --fg: #14213d;
  --muted: #5c6478;
  --line: #dcd6c4;
  --accent: #14213d;
  --accent-fg: #f4ecd6;
  --tag-bg: #eee7d2;
  --code-bg: #f1ecdd;
  --max: 38em;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a33;
    --fg: #f2ead4;
    --muted: #a9b0c4;
    --line: #2a3958;
    --accent: #e9dab3;
    --accent-fg: #10203e;
    --tag-bg: #16274a;
    --code-bg: #132a4e;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.25; }

header.site-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

header.site-head .brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

header.site-head .brand a.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.01em;
}
header.site-head .brand a.logo img {
  border-radius: 50%;
  display: block;
}

nav.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

header.site-head p.tagline {
  color: var(--muted);
  margin: 0.75rem 0 0;
  font-size: 1.02rem;
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.25rem 0;
}

section { margin-bottom: 2.25rem; }

.book-cover-placeholder {
  width: 140px;
  aspect-ratio: 5 / 8;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  color: var(--accent-fg);
  padding: 0.5rem;
  float: left;
  margin: 0 1rem 0.75rem 0;
}

.book-cover {
  width: 140px;
  height: 224px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
  float: left;
  margin: 0 1rem 0.75rem 0;
}

.book-block::after { content: ""; display: table; clear: both; }

.channel-banner {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 0 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.65rem 1.15rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover { opacity: 0.9; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.subtitle {
  color: var(--muted);
  font-style: italic;
  margin: 0.15rem 0 0.75rem;
}

.links-inline {
  margin-top: 0.75rem;
  font-size: 0.97rem;
}
.links-inline a { margin-right: 1.25rem; }

.notice {
  background: var(--tag-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.rec-list { margin: 0; padding: 0; list-style: none; }
.rec-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.rec-list li:last-child { border-bottom: none; }
.rec-list h3 { margin: 0 0 0.25rem; font-size: 1.02rem; }
.rec-list p { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.95rem; }

footer.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
footer.site-foot p { margin: 0.35rem 0; }
footer.site-foot a { color: var(--muted); }

.placeholder-note {
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 0.6rem;
}

/* Prompts page */
.prompt-group-title {
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.prompt-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 1.1rem 0;
  background: var(--code-bg);
}
.prompt-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.prompt-card .use-it {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.prompt-card pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.87rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0 0 0.6rem;
}
.prompt-card mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.copy-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 5px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.copy-btn.copied {
  background: var(--accent);
  color: var(--accent-fg);
}

.order-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  font-size: 0.93rem;
  background: var(--tag-bg);
  margin: 1rem 0 0.5rem;
}
.order-box p { margin: 0.4rem 0; }

/* Prices page */
.checked-banner {
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--tag-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

details.quickref {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.75rem;
  background: var(--code-bg);
}
details.quickref summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 1.02rem;
}
details.quickref[open] summary { margin-bottom: 0.6rem; }

.prices-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.prices-page th, .prices-page td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
.prices-page th { color: var(--muted); font-weight: 600; }
.prices-page h3 { margin-top: 2.25rem; }
.prices-page .table-scroll { overflow-x: auto; }

/* Contact form */
form.corrections-form label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 0.3rem;
  font-size: 0.92rem;
}
form.corrections-form input,
form.corrections-form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
}
form.corrections-form textarea { min-height: 7rem; resize: vertical; }
form.corrections-form button { margin-top: 1.25rem; }

.confirm-box {
  border: 1px solid var(--line);
  background: var(--tag-bg);
  border-radius: 6px;
  padding: 1rem;
  display: none;
}
.confirm-box.show { display: block; }
