/* From Chairside to AI™ — Course design system
   Workspace hybrid: cream base + Coursera-warm chrome. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:               #F5EFE6;
  --bg-warm:          #EBE0D2;
  --bg-deep:          #E3D4C7;
  --surface:          #FAF6EF;
  --surface-up:       #FFFFFF;
  --rose-gold:        #B76E79;
  --rose-gold-light:  #D4A574;
  --rose-gold-mid:    #C99070;
  --rose-gold-soft:   rgba(183, 110, 121, 0.10);
  --soft-black:       #2C2C2C;
  --soft-black-mid:   #4A4544;
  --soft-black-faint: #8A8280;
  --blush:            #E5C4B0;
  --line:             rgba(183, 110, 121, 0.18);
  --line-strong:      rgba(183, 110, 121, 0.40);

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --sidebar-w: 304px;
  --header-h:  62px;
  --content-max: 720px;
  --rail-w: 232px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--soft-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'kern', 'liga', 'pnum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--rose-gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
a:hover { color: var(--soft-black); text-decoration-color: var(--rose-gold); }
a:focus-visible { outline: 2px solid var(--rose-gold); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--rose-gold); color: white; }

button, input, textarea, select { font-family: inherit; color: inherit; }

/* ============ LAYOUT ============ */

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  background: var(--bg-warm);
  border-right: 1px solid var(--line);
  padding: 26px 22px 100px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.sidebar-brand { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.sidebar-brand-mark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.005em;
  line-height: 1.15;
  color: var(--soft-black);
  text-decoration: none;
}
.sidebar-brand-mark:hover { text-decoration: none; color: var(--soft-black); }
.sidebar-brand-mark .ai {
  font-style: italic;
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--rose-gold-mid) 60%, var(--rose-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-brand-mark sup { font-size: 0.4em; vertical-align: super; color: var(--rose-gold); }
.sidebar-brand-sub {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rose-gold);
}
.sidebar-progress { margin-bottom: 22px; }
.sidebar-progress-label {
  display: flex; justify-content: space-between;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--soft-black-mid); margin-bottom: 8px;
}
.sidebar-progress-label .num { color: var(--rose-gold); }
.sidebar-progress-bar { height: 4px; background: rgba(183, 110, 121, 0.14); border-radius: 4px; overflow: hidden; }
.sidebar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose-gold), var(--rose-gold-light));
  border-radius: 4px;
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-group { margin-bottom: 18px; }
.sidebar-group-title {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--rose-gold);
  margin: 0 0 8px 8px;
}
.sidebar-items { list-style: none; padding: 0; margin: 0; }
.sidebar-items li { margin: 1px 0; }
.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--soft-black-mid);
  font-size: 13.5px;
  line-height: 1.35;
  transition: background-color 0.18s, color 0.18s;
  position: relative;
}
.sidebar-item:hover { background: rgba(183, 110, 121, 0.06); color: var(--soft-black); text-decoration: none; }
.sidebar-item.is-current {
  background: rgba(183, 110, 121, 0.10);
  color: var(--soft-black);
  font-weight: 500;
}
.sidebar-item.is-current::before {
  content: ''; position: absolute;
  left: -22px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  background: var(--rose-gold);
  border-radius: 0 2px 2px 0;
}
.sidebar-dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--rose-gold);
  background: transparent;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.sidebar-dot.is-done { background: var(--rose-gold); box-shadow: 0 0 0 2px rgba(183, 110, 121, 0.18); }
.sidebar-dot.is-partial { background: linear-gradient(90deg, var(--rose-gold) 50%, transparent 50%); }
.sidebar-item-title { flex: 1; min-width: 0; }

/* ============ TOPBAR ============ */
.main { min-width: 0; display: grid; grid-template-rows: var(--header-h) 1fr; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(245, 239, 230, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 32px;
}
.topbar-burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--soft-black);
}
.topbar-burger svg { width: 18px; height: 18px; }
.topbar-trail {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--soft-black-faint);
  font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-trail .crumb-section { color: var(--rose-gold); }
.topbar-trail .crumb-sep { color: var(--soft-black-faint); }
.topbar-trail .crumb-page { color: var(--soft-black); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--soft-black);
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 3px; cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.topbar-btn:hover { border-color: var(--rose-gold); color: var(--rose-gold); background: white; text-decoration: none; }
.topbar-btn svg { width: 13px; height: 13px; flex: none; }

/* ============ LAYOUT BODY ============ */
.layout {
  display: grid;
  grid-template-columns: 1fr var(--rail-w);
  gap: 56px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 56px 120px;
  width: 100%;
}
.content { max-width: var(--content-max); min-width: 0; }
.rail {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  align-self: start;
  height: fit-content;
  padding-top: 8px;
}

/* ============ CONTENT TYPOGRAPHY ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 22px;
}
.eyebrow::before { content: ''; display: block; width: 32px; height: 1px; background: var(--rose-gold); }
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(38px, 5.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--soft-black);
  margin: 0 0 18px;
  text-wrap: balance;
}
.section-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--rose-gold), var(--rose-gold-mid), var(--rose-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-deck {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--soft-black-mid);
  margin: 0 0 28px;
  max-width: 600px;
  text-wrap: pretty;
}
.section-rule {
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0;
  max-width: 360px;
}
.section-rule .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.section-rule .line.r { background: linear-gradient(-90deg, var(--line-strong), transparent); }
.section-rule .spark { flex: none; color: var(--rose-gold); }

h2.heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--soft-black);
  margin: 56px 0 14px;
  text-wrap: balance;
}
h3.heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.25;
  color: var(--soft-black);
  margin: 36px 0 10px;
}
h4.heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin: 28px 0 8px;
}

.body p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--soft-black-mid);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.body p strong { color: var(--soft-black); font-weight: 600; }
.body p em { color: var(--soft-black); font-style: italic; }
.body p:first-of-type { font-size: 17px; color: var(--soft-black); }

.lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 22px);
  line-height: 1.5;
  color: var(--soft-black);
  margin-bottom: 32px;
  text-wrap: pretty;
}

.callout {
  background: var(--surface);
  border-left: 3px solid var(--rose-gold);
  padding: 24px 28px;
  margin: 28px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--soft-black);
}
.callout cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--rose-gold);
  font-weight: 600;
}

.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35;
  color: var(--soft-black);
  margin: 40px 0;
  padding: 8px 0 8px 28px;
  border-left: 2px solid var(--rose-gold);
  text-wrap: pretty;
}

/* tables */
.table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
table.compare th, table.compare td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
table.compare th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-gold);
  background: rgba(183, 110, 121, 0.05);
}
table.compare td { color: var(--soft-black-mid); }
table.compare td strong { color: var(--soft-black); font-weight: 600; }
table.compare tr:last-child td { border-bottom: none; }
table.compare tr:hover td { background: rgba(183, 110, 121, 0.03); }

/* lists */
ul.body-list, ol.body-list {
  margin: 18px 0 24px;
  padding-left: 0;
  list-style: none;
}
ul.body-list li, ol.body-list li {
  position: relative;
  padding: 8px 0 8px 32px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--soft-black-mid);
  border-bottom: 1px dotted var(--line);
}
ul.body-list li:last-child, ol.body-list li:last-child { border-bottom: none; }
ul.body-list li::before {
  content: ''; position: absolute;
  left: 8px; top: 19px;
  width: 6px; height: 6px;
  background: var(--rose-gold);
  border-radius: 50%;
}
ol.body-list { counter-reset: blist; }
ol.body-list li { padding-left: 38px; }
ol.body-list li::before {
  counter-increment: blist;
  content: counter(blist);
  position: absolute;
  left: 0; top: 6px;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  color: var(--rose-gold);
  width: 26px;
  text-align: center;
}

/* commitments */
.cmt-list {
  display: grid; gap: 12px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
  counter-reset: cmt;
}
.cmt-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  align-items: center;
  color: var(--soft-black);
  font-size: 15.5px;
  line-height: 1.45;
}
.cmt-list li::before {
  counter-increment: cmt;
  content: counter(cmt);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px; font-weight: 400;
  color: var(--rose-gold);
  line-height: 1;
}

/* reflection */
.reflection {
  margin: 48px 0 28px;
  padding: 32px 32px 26px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
}
.reflection-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 16px;
}
.reflection-label::before { content: ''; width: 22px; height: 1px; background: var(--rose-gold); }
.reflection h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.35;
  color: var(--soft-black);
  margin: 0 0 18px;
}
.reflection .q { margin-bottom: 18px; }
.reflection .q:last-of-type { margin-bottom: 14px; }
.reflection .q-label {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--soft-black);
  margin-bottom: 6px;
}
.reflection textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--soft-black);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  min-height: 76px;
  resize: vertical;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.reflection textarea:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.14); }
.reflection-save {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--soft-black-faint);
  font-weight: 500;
  margin-top: 6px;
}
.reflection-save .dot {
  width: 6px; height: 6px;
  background: var(--soft-black-faint);
  border-radius: 50%;
  transition: background-color 0.4s, box-shadow 0.4s;
}
.reflection-save.is-saved { color: var(--rose-gold); }
.reflection-save.is-saved .dot { background: var(--rose-gold); box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.18); }

/* checklist */
.checklist {
  margin: 48px 0 28px;
  padding: 30px 32px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.checklist-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--soft-black);
  margin: 0 0 4px;
}
.checklist-sub {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-gold);
  font-weight: 600;
  margin-bottom: 18px;
}
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--line);
  align-items: start;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft-black-mid);
  transition: color 0.18s;
  user-select: none;
}
.checklist li:last-child { border-bottom: none; }
.checklist li:hover { color: var(--soft-black); }
.checklist .box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--rose-gold);
  border-radius: 3px;
  background: var(--surface-up);
  margin-top: 3px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  transition: background-color 0.22s, border-color 0.22s;
}
.checklist .box svg {
  width: 12px; height: 12px;
  color: white;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.22s, transform 0.22s;
}
.checklist li.is-checked { color: var(--soft-black-faint); }
.checklist li.is-checked .box { background: var(--rose-gold); border-color: var(--rose-gold); }
.checklist li.is-checked .box svg { opacity: 1; transform: scale(1); }
.checklist li.is-checked .label { text-decoration: line-through; text-decoration-color: var(--rose-gold); text-decoration-thickness: 1.5px; }

/* pager */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 80px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.3s, background-color 0.2s;
}
.pager a:hover { border-color: var(--rose-gold); transform: translateY(-2px); background: var(--surface-up); text-decoration: none; }
.pager .label {
  display: block;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--rose-gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.pager .pager-title {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--soft-black);
  line-height: 1.3;
}
.pager .next { text-align: right; }
.pager .next .label::after { content: '  →'; }
.pager .prev .label::before { content: '←  '; }

/* glossary popup */
.gt {
  border-bottom: 1px dotted var(--rose-gold);
  cursor: help;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
  padding: 0 1px;
}
.gt:hover { background: rgba(183, 110, 121, 0.10); color: var(--soft-black); text-decoration: none; }
.gloss-pop {
  position: absolute;
  z-index: 80;
  max-width: 320px;
  background: var(--surface-up);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(44, 44, 44, 0.10), 0 2px 6px rgba(44, 44, 44, 0.04);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--soft-black-mid);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.gloss-pop.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.gloss-pop .term {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--soft-black);
  margin: 0 0 4px;
  display: block;
}
.gloss-pop .why {
  font-size: 12px;
  color: var(--soft-black-faint);
  margin-top: 8px;
  font-style: italic;
}
.gloss-pop a {
  display: inline-block;
  margin-top: 10px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600;
}

/* right rail */
.rail-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--rose-gold);
  margin: 0 0 12px;
}
.rail-toc { list-style: none; margin: 0 0 32px; padding: 0; border-left: 1px solid var(--line); }
.rail-toc li { padding: 0; }
.rail-toc a {
  display: block;
  padding: 5px 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--soft-black-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.rail-toc a:hover { color: var(--soft-black); text-decoration: none; }
.rail-toc a.is-active { color: var(--rose-gold); border-left-color: var(--rose-gold); font-weight: 500; }
.rail-meta {
  font-size: 11.5px;
  color: var(--soft-black-faint);
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  line-height: 1.55;
}
.rail-meta b { color: var(--soft-black); font-weight: 600; }
.rail-meta-item { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; }

/* mobile */
@media (max-width: 1100px) {
  :root { --rail-w: 0px; }
  .rail { display: none; }
  .layout { grid-template-columns: 1fr; padding: 48px 40px 100px; }
}
@media (max-width: 760px) {
  :root { --sidebar-w: 0px; --header-h: 56px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 86%; max-width: 320px;
    z-index: 100;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(44, 44, 44, 0.15);
  }
  .sidebar.is-open { transform: translateX(0); }
  .topbar { padding: 0 18px; }
  .topbar-burger { display: inline-flex; }
  .topbar-trail .crumb-section, .topbar-trail .crumb-sep { display: none; }
  .topbar-actions .topbar-btn span:not(.icon) { display: none; }
  .topbar-actions .topbar-btn { padding: 7px 10px; }
  .layout { padding: 36px 22px 80px; }
  .reflection, .checklist { padding: 22px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 44, 0.40);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
}
.skip-link:focus {
  left: 16px; top: 16px;
  padding: 10px 16px;
  background: var(--soft-black);
  color: white;
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
}

/* utility */
.muted { color: var(--soft-black-faint); }
.center { text-align: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  background: transparent;
  border: 1.5px solid var(--rose-gold);
  color: var(--rose-gold);
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.25s;
}
.btn:hover { background: var(--rose-gold); color: white; text-decoration: none; }
.btn.is-solid { background: var(--rose-gold); color: white; }
.btn.is-solid:hover { background: var(--soft-black); border-color: var(--soft-black); }

/* glossary search modal */
.gs-modal {
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 44, 0.45);
  z-index: 200;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 14vh 20px 20px;
}
.gs-modal.is-open { display: flex; }
.gs-card {
  width: 100%; max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(44, 44, 44, 0.25);
  display: flex; flex-direction: column;
  max-height: 70vh;
  overflow: hidden;
}
.gs-search {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-up);
}
.gs-search svg { width: 18px; height: 18px; color: var(--rose-gold); flex: none; }
.gs-search input {
  flex: 1;
  border: none; outline: none;
  font-size: 17px;
  background: transparent;
  font-family: var(--font-body);
  color: var(--soft-black);
}
.gs-search input::placeholder { color: var(--soft-black-faint); }
.gs-search kbd {
  font-family: var(--font-body);
  font-size: 10px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--soft-black-faint);
  background: var(--surface);
}
.gs-results { overflow-y: auto; padding: 8px 0; flex: 1; }
.gs-empty { padding: 32px; text-align: center; color: var(--soft-black-faint); font-size: 14px; }
.gs-item {
  padding: 12px 20px;
  border-bottom: 1px dotted var(--line);
  cursor: pointer;
  transition: background-color 0.15s;
}
.gs-item:hover, .gs-item.is-focus { background: rgba(183, 110, 121, 0.08); }
.gs-item-term { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--soft-black); margin-bottom: 2px; }
.gs-item-def { font-size: 13px; color: var(--soft-black-mid); line-height: 1.45; }
.gs-item mark { background: rgba(183, 110, 121, 0.22); color: inherit; padding: 1px 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
