/* ============================================================
   Sierra Gist — styles.css
   Monochrome, serif + monospace, no shadows, no radii.
   Two-page book layout: text on the left, gist on the right.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html[data-theme="light"] {
  --paper: #FFFFFF;
  --ink:   #000000;
  --link:  #0000EE;
}
html[data-theme="dark"] {
  --paper: #000000;
  --ink:   #FFFFFF;
  --link:  #8CB4FF;
}

html { background: var(--paper); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  background: var(--paper);
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 40px 20px 24px;
}

main {
  width: 100%;
  max-width: 920px;
  flex: 1;
}

.head { text-align: center; margin-bottom: 20px; }

h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: 28px;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

h2 {
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: 17px;
  margin: 0 0 6px;
}
h2 + * { margin-bottom: 14px; }

.tagline { font-size: 12px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- links & link-styled buttons --- */
a, .linklike {
  color: var(--link);
  text-decoration: underline;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
a:visited { color: var(--link); }
a:focus-visible, .linklike:focus-visible,
input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: 2px;
}

/* --- theme toggle --- */
.theme-toggle {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 13px;
}

/* --- book spread --- */
.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.col { padding-top: 16px; }
.col-left { padding-right: 22px; }
.col-right {
  padding-left: 22px;
  border-left: 1px solid var(--ink);
  text-align: left;
}

/* --- input --- */
textarea {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px;
  resize: vertical;
}

/* --- control rows --- */
.bar { margin: 10px 0 0; text-align: center; }
.bar .linklike { margin: 0 8px; }
.options { font-size: 13px; margin-top: 8px; }
.options label { margin-right: 4px; }
.options span { margin-left: 4px; }

input[type="number"] {
  font: inherit;
  width: 52px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 1px 4px;
  text-align: center;
}

/* --- status line --- */
#status {
  font-size: 12px;
  font-style: italic;
  min-height: 1.5em;
  margin-top: 8px;
  text-align: center;
}

/* --- right page --- */
#placeholder {
  font-size: 12px;
  font-style: italic;
}

#summary li {
  list-style: none;
  margin-bottom: 8px;
}
#summary li::before { content: "\2022  "; }

#terms { font-size: 13px; }
#stats { font-size: 12px; }

/* --- collapsible sections --- */
details {
  text-align: left;
  border-top: 1px solid var(--ink);
  padding: 8px 0;
  margin-top: 14px;
}
details + details { margin-top: 0; }
summary {
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
details[open] summary { margin-bottom: 8px; }

.note { font-size: 12px; }
.keys { font-size: 12px; }
kbd {
  font-family: inherit;
  border: 1px solid var(--ink);
  padding: 0 3px;
  font-size: 11px;
}

/* --- footer --- */
footer { width: 100%; text-align: center; margin-top: 28px; }
.credit { font-size: 11px; }

/* --- stacked layout on small screens --- */
@media (max-width: 720px) {
  .book { grid-template-columns: 1fr; }
  .col-left { padding-right: 0; }
  .col-right {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--ink);
    margin-top: 16px;
  }
  .bar .linklike { margin: 0 5px; }
}
