/* mediashelf.css — matches index/commonplace/bookshelf system */

/* ===== THEME VARIABLES ===== */
:root{
  --bg: #0e0e0e;
  --ink: #e6e6e6;
  --muted: #b8b8b8;
  --rule: #2a2a2a;

  --link: #e6e6e6;
  --link-hover-bg: #e6e6e6;
  --link-hover-ink: #0e0e0e;
}

:root.light{
  --bg: #e7d6b6;
  --ink: #111;
  --muted: #333;
  --rule: #111;

  --link: #111;
  --link-hover-bg: #111;
  --link-hover-ink: #e7d6b6;
}

/* ===== BASE ===== */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  padding: 48px 18px;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
}

/* ===== LEFT COLUMN LAYOUT ===== */
.center{
  max-width: 680px;
  margin-left: 16%;
  margin-right: auto;
  text-align: left;
}

@media (max-width: 780px){
  .center{
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== TOGGLES (MATCHING SYSTEM) ===== */
#toggles{
  display: inline-flex;
  gap: 10px;
  margin-bottom: 16px;
}

#toggles button{
  all: unset;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1.2;
}

#toggles button:hover,
#toggles button:focus-visible{
  background: var(--ink);
  color: var(--bg);
  outline: none;
}

/* ===== HEADINGS ===== */
h2{
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

h3{
  margin: 22px 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

h4{
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* ===== DIVIDERS ===== */
hr{
  border: 0;
  border-top: 1px solid var(--rule);
  width: 100%;
  margin: 14px 0;
}

/* ===== PARAGRAPHS ===== */
p{
  margin: 10px 0 16px;
  max-width: 68ch;
}

p i{ color: var(--muted); }

/* ===== TABLES AS CLEAN LISTS ===== */
table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}

td{
  padding: 2px 0;
  white-space: normal;
}

/* the page mostly has plain text rows (not links), so just make italics softer */
td i{
  color: var(--ink);
}

/* ===== LINK NORMALIZATION (prevents purple visited) ===== */
a,
a:visited{
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible{
  background: var(--link-hover-bg);
  color: var(--link-hover-ink);
  text-decoration: none;
  outline: none;
}

/* ===== BACK BUTTON (Bookshelf standard) ===== */
a.back,
a.back:visited{
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 2px 8px;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

a.back:hover,
a.back:focus-visible{
  background: var(--ink);
  color: var(--bg);
  outline: none;
}
