#modal {
  --paper: #f5f4ee;
  --ink: #202222;
  --muted: #5b605d;
  --rule: #c7c9bf;
  --accent: #244acf;
  --highlight: #e9f27d;
  width: min(1100px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #92978f;
  border-radius: 4px;
  box-shadow: 0 16px 45px #14222d38;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#modal::backdrop { background: transparent; backdrop-filter: none; }
#modal button, #modal a { -webkit-tap-highlight-color: transparent; }
#modal :is(button, a):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
#modal .modal-bar { background: var(--paper); color: var(--ink); padding: 18px 30px; border-bottom: 1px solid var(--ink); }
#modal .modal-bar .eyebrow { color: var(--muted); font: 10px/1.5 "Courier New", monospace; letter-spacing: .6px; }
#modal .modal-bar h2 { font: 700 22px/1.1 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 3px 0 0; letter-spacing: -.8px; }
#modal .modal-bar button:not(.traffic) { display: grid; place-items: center; padding: 0; background: transparent; border: 1px solid var(--rule); border-radius: 0; color: var(--ink); width: 36px; height: 36px; }
#panel-tabs { flex-shrink: 0; flex-wrap: nowrap; padding: 0 30px; gap: 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }
#panel-tabs button { position: relative; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 13px 0 10px; font: 700 13px/1.5 Arial, sans-serif; background: transparent; }
#panel-tabs button[aria-current="page"] { color: var(--accent); border-color: var(--accent); background: transparent; }
#modal-body { min-height: 0; padding: 28px 30px 38px; color: var(--ink); font-size: 15px; line-height: 1.55; }
#modal-body h2 { font: 800 clamp(32px, 4.2vw, 56px)/.98 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -2px; color: var(--ink); margin: 7px 0 14px; }
#modal-body h3 { font: 700 21px/1.15 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -.5px; color: var(--ink); margin: 0; }
.section-kicker { font: 11px/1.5 "Courier New", monospace; letter-spacing: .5px; color: var(--muted); margin: 0; text-transform: uppercase; }
.title-dot, .title-accent { color: var(--accent); }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.page-intro > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.project-filters { display: flex; gap: 0; margin-bottom: 28px; width: fit-content; border: 1px solid var(--ink); }
.project-filters button { border: 0; border-right: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); padding: 11px 15px; font: 700 13px Arial, sans-serif; }
.project-filters button:last-child { border-right: 0; }
.project-filters button span { font: 11px "Courier New", monospace; margin-left: 12px; }
.project-filters button[aria-pressed="true"] { color: var(--paper); background: var(--ink); }
.project-group { margin-top: 20px; }
.project-group + .project-group { margin-top: 45px; }
[data-group="personal"] { --accent: #a12f2b; --highlight: #f4c6a1; }
.group-header { display: flex; align-items: baseline; gap: 20px; padding-bottom: 13px; border-bottom: 3px solid var(--ink); }
.group-header > span { color: var(--muted); font-size: 12px; }
.group-header > small { margin-left: auto; white-space: nowrap; font: 11px "Courier New", monospace; }
.work-card { border-bottom: 1px solid var(--rule); padding: 18px 0 22px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 13px; color: var(--muted); font: 11px/1.5 "Courier New", monospace; }
.project-meta > span:last-child { font-weight: 700; color: var(--accent); }
.project-open { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; }
.project-intro { min-width: 0; align-self: center; }
.technical-summary { font: 400 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--ink); margin: 12px 0; }
.technical-summary strong { font-weight: 650; }
.technical-summary mark { color: inherit; background: var(--highlight); padding: 0 .07em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.technical-summary u { text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.technical-summary em { font-family: "Trebuchet MS", sans-serif; }
.project-summary { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 14px; max-width: 58ch; }
.read-project { display: inline-flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--ink); padding: 3px 0; font: 700 12px/1.5 Arial, sans-serif; }
.project-open:hover .read-project { color: var(--accent); border-color: var(--accent); }
.project-cover { aspect-ratio: 16 / 10; padding: 15px; background: #e0e4e2; display: grid; place-items: center; min-width: 0; align-self: center; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.project-graphic { background: var(--highlight); color: var(--ink); align-content: center; gap: 8px; background-image: repeating-linear-gradient(0deg, transparent, transparent 23px, #2022220c 24px); }
.project-graphic > span { font: 600 clamp(36px, 5vw, 60px)/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -1px; }
.project-graphic > small { font: 12px "Courier New", monospace; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; }
.project-tags span { font: 11px/1.5 "Courier New", monospace; color: var(--muted); }
.back-to-work, .text-action { border: 0; border-radius: 0; background: transparent; color: var(--accent); padding: 6px 0; font: 700 13px/1.5 Arial, sans-serif; text-decoration: underline; text-underline-offset: 4px; }
.back-to-work { margin-bottom: 20px; }
.detail-header { max-width: 850px; }
#modal-body .detail-header h2 { font-size: clamp(24px, 3vw, 35px); letter-spacing: -1px; margin: 10px 0 22px; }
.detail-technical { font-size: 20px; line-height: 1.5; max-width: 65ch; margin-bottom: 18px; }
.detail-summary { max-width: 70ch; font-size: 16px; color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 23px 0 28px; }
.project-links a, .project-links button { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--ink); border-radius: 0; padding: 11px 15px; background: transparent; color: var(--ink); font: 700 12px/1.5 Arial, sans-serif; text-decoration: none; }
.project-links .open-live { color: white; background: var(--accent); border-color: var(--accent); }
.project-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--ink); padding: 18px 0; margin: 25px 0; }
.project-facts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; border-left: 1px solid var(--rule); padding: 0 20px; }
.project-facts > div:first-child { border: 0; padding-left: 0; }
.project-facts dd { margin: 0 0 4px; color: var(--accent); font: 700 clamp(24px, 3vw, 38px)/1.1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -1px; }
.project-facts dt { color: var(--muted); font: 12px/1.4 "Courier New", monospace; }
.project-gallery { display: grid; gap: 22px; margin: 30px 0; }
.project-gallery figure { margin: 0; }
.project-gallery a { display: block; padding: 20px; background: #e0e4e2; }
.project-gallery img { width: 100%; max-height: 460px; object-fit: contain; display: block; }
.project-gallery figcaption { font: 11px/1.5 "Courier New", monospace; color: var(--muted); margin-top: 8px; }
.detail-body { padding-top: 15px; }
.build-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.build-notes > section { padding: 22px 0 8px; margin-top: 18px; border-top: 1px solid var(--rule); }
.build-notes h4 { margin: 7px 0 10px; font-size: 18px; line-height: 1.2; }
.build-notes p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.career-item { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 34px; padding: 28px 0; border-top: 2px solid var(--ink); }
.career-date > span { font: 11px "Courier New", monospace; color: var(--muted); }
#modal-body .career-date h3 { margin-top: 14px; }
.career-date p { color: var(--muted); font-size: 13px; margin: 8px 0; }
.career-item ul { padding-left: 18px; color: var(--muted); font-size: 14px; }
.career-item li { padding-left: 5px; margin: 12px 0; }
.education { border-top: 2px solid var(--ink); padding-top: 24px; }
#modal-body .education h3 { margin-top: 12px; }
.education p { color: var(--muted); font-size: 14px; }
.education strong { color: var(--ink); background: var(--highlight); padding: 2px 4px; }
.toolbox { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 22px; }
.about-intro { padding: 10px 0 25px; }
#modal-body .about-intro h2 { line-height: 1.02; margin: 18px 0 22px; }
.about-lead { font-size: 18px; max-width: 62ch; color: var(--muted); }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.about-columns > section { border-top: 2px solid var(--ink); padding-top: 20px; }
#modal-body .about-columns h3 { margin-top: 12px; }
.about-columns p { color: var(--muted); font-size: 14px; }
.contact-page { padding: 12px 0 15px; }
#modal-body .contact-page h2 { font-size: clamp(48px, 7vw, 88px); margin: 24px 0; }
.contact-page h2 em { font-family: "Trebuchet MS", sans-serif; color: var(--accent); text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 10px; }
.contact-lead { color: var(--muted); }
.email-block { border-block: 2px solid var(--ink); padding: 24px 0; margin: 30px 0; }
.email-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 700 clamp(18px, 3.7vw, 38px)/1.4 "Helvetica Neue", Arial, sans-serif; letter-spacing: -1px; color: var(--ink); text-decoration: none; margin: 8px 0 18px; overflow-wrap: anywhere; }
.email-link > span { color: var(--accent); }
.email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.email-actions a, .email-actions button { padding: 7px 0; font: 700 12px Arial, sans-serif; color: var(--accent); border: 0; border-radius: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
#copy-status { font-size: 12px; }
.contact-other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-other a, .contact-other button { color: var(--ink); text-align: left; background: transparent; border: 0; border-radius: 0; padding: 6px 0; font: 700 17px Arial, sans-serif; text-decoration: none; }
.contact-other span { display: block; margin-bottom: 10px; font: 10px "Courier New", monospace; color: var(--muted); }
#modal[data-view="live"] { height: calc(100dvh - 40px); width: min(1280px, calc(100% - 40px)); }
#modal[data-view="live"] #modal-body { display: flex; flex: 1; flex-direction: column; padding: 0; overflow: hidden; }
.live-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.live-toolbar button, .live-toolbar a { color: var(--ink); background: transparent; border: 0; border-radius: 0; padding: 5px 0; font: 700 12px Arial, sans-serif; text-decoration: none; }
.live-toolbar > span { margin: 0 auto; color: var(--muted); font: 11px "Courier New", monospace; }
.live-frame { width: 100%; flex: 1; min-height: 200px; border: 0; background: white; }
.live-note { padding: 8px 20px; margin: 0; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.live-note a { color: inherit; }
@media (max-width: 720px) {
  #modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  #modal .modal-bar { padding: 15px 18px; }
  #panel-tabs { padding: 0 18px; gap: 24px; }
  #modal-body { padding: 23px 18px 30px; }
  .page-intro { display: block; margin-bottom: 20px; }
  .page-intro > p { margin: 14px 0 0; }
  .project-filters { width: 100%; }
  .project-filters button { flex: 1; padding: 11px 6px; font-size: 12px; }
  .project-filters button span { margin-left: 8px; }
  .group-header { flex-wrap: wrap; gap: 7px 12px; }
  .group-header > span { order: 3; flex-basis: 100%; }
  .group-header > small { margin-left: auto; }
  .project-open { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .project-cover { max-height: 220px; width: 100%; }
  .technical-summary { font-size: 15px; }
  .project-summary { font-size: 14px; }
  .detail-technical { font-size: 18px; }
  .project-facts > div { padding: 0 10px; }
  .project-facts dd { font-size: 24px; }
  .project-facts dt { font-size: 10px; }
  .project-gallery a { padding: 10px; }
  .build-notes, .about-columns, .career-item { grid-template-columns: 1fr; gap: 18px; }
  .build-notes { gap: 0; }
  .career-date p { margin-bottom: 3px; }
  .contact-other { grid-template-columns: 1fr; gap: 18px; }
  .contact-other span { margin-bottom: 6px; }
  .email-link { font-size: clamp(17px, 5.4vw, 30px); letter-spacing: -.6px; }
  #modal[data-view="live"] { width: calc(100% - 8px); height: calc(100dvh - 8px); max-height: calc(100dvh - 8px); }
  .live-toolbar { gap: 10px; padding: 10px 14px; justify-content: space-between; }
  .live-toolbar > span { display: none; }
  .live-note { padding: 7px 14px; font-size: 10px; }
}
/* ---------- laptop: the panel as a screen ---------- */

#modal-foot { display: none; }

#modal[data-skin="computer"] {
  background: #1b2026;
  border-color: #0d1014;
  border-radius: 14px;
  padding: 9px;
  box-shadow: 0 18px 60px #0a0f1466, inset 0 0 0 1px #ffffff14;
}
#modal[data-skin="computer"] .modal-bar {
  background: linear-gradient(#f4f5f2, #e6e8e3);
  border-radius: 9px 9px 0 0;
  border-bottom: 1px solid #d3d7d0;
  padding: 12px 16px 11px 78px;
  position: relative;
}
/* The red light is the real close control; amber and green are painted on. */
.traffic { display: none; }

#modal[data-skin="computer"] .traffic {
  display: block;
  position: absolute;
  left: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
  cursor: pointer;
  font: 700 11px/12px ui-monospace, Menlo, monospace;
  color: transparent;
}

#modal[data-skin="computer"] .traffic::after { content: "×"; }
#modal[data-skin="computer"] .traffic:hover,
#modal[data-skin="computer"] .traffic:focus-visible { color: #7d1b16; outline: none; }
#modal[data-skin="computer"] #close-panel { display: none; }
#modal[data-skin="computer"] .modal-bar h2 {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0;
  color: #3d4a44;
}
#modal[data-skin="computer"] .modal-bar .eyebrow { font-size: 8px; color: #97a49c; }
#modal[data-skin="computer"] #panel-tabs {
  background: #eef0ec;
  border-bottom: 1px solid #dce0d9;
  padding: 8px 16px;
  gap: 6px;
}
#modal[data-skin="computer"] #panel-tabs button {
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12px;
  border-bottom: 0;
  color: #5f6d64;
}
#modal[data-skin="computer"] #panel-tabs button[aria-current="page"] {
  background: #fff;
  color: #22382c;
  box-shadow: 0 1px 2px #1c2b2320;
}
#modal[data-skin="computer"] #modal-body { background: #fcfcf8; }
#modal[data-skin="computer"] #modal-foot {
  display: block;
  background: #eef0ec;
  border-top: 1px solid #dce0d9;
  border-radius: 0 0 9px 9px;
  padding: 8px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .3px;
  color: #8b978f;
}

#modal[data-skin="book"] {
  --book-paper: #f6efdc;
  --book-ink: #37332c;
  width: min(1160px, calc(100% - 36px));
  height: min(840px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  /* Cloth cover: a raised spine down the left, boards all round the page block. */
  padding: 10px 20px 16px 30px;
  background:
    linear-gradient(#3a5350, #263a37) padding-box,
    #304543;
  background-image:
    linear-gradient(90deg, #1e302d 0 5px, #3c5551 5px 9px, #2a3e3b 9px 20px, #3a524e 20px 24px, #2f4441 24px),
    repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 3px);
  border: 1px solid #16241f;
  border-radius: 3px 14px 14px 3px;
  box-shadow: 0 20px 55px #13211c66, inset -1px 0 0 #ffffff14, inset 0 0 0 1px #b9aa7726;
}

/* Gilt rule stamped on the spine. */
#modal[data-skin="book"]::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 26px;
  width: 1px;
  background: linear-gradient(transparent, #c6ac6f66 12%, #c6ac6f66 88%, transparent);
  pointer-events: none;
}

/* A ribbon marker hanging out of the head of the block. It sits below the
   header so it never covers the close control. */
#modal[data-skin="book"]::after {
  content: "";
  position: absolute;
  left: 38px;
  top: 74px;
  width: 9px;
  height: 68px;
  background: linear-gradient(#c4604a, #8d3f2e);
  box-shadow: 1px 0 2px #2a1a1355;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  pointer-events: none;
  z-index: 4;
}
#modal[data-skin="book"] .modal-bar { background: transparent; padding: 6px 10px 13px; border: 0; color: #eee4c9; }
#modal[data-skin="book"] .modal-bar h2 { color: #f7edd8; font: 400 21px/1.2 Georgia, serif; letter-spacing: .2px; }
#modal[data-skin="book"] .modal-bar .eyebrow { font: 10px/1.4 "Courier New", monospace; letter-spacing: 1px; color: #cfbf96; }
#modal[data-skin="book"] .modal-bar button { color: #f3e7cd; border-color: #8d967c; background: transparent; }
#modal[data-skin="book"] #panel-tabs, #modal[data-skin="book"] #modal-foot { display: none; }
#modal[data-skin="book"] #modal-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 0; background: transparent; overflow: hidden; }
.book { display: flex; flex: 1; flex-direction: column; min-height: 0; }
/* Both fore edges are a block of leaves, not a single sheet: stacked shadows on
   the left and right, and thinner ones top and bottom. */
.book-stage { display: grid; grid-template-columns: 1fr 1fr; position: relative; flex: 1; min-height: 0; perspective: 1800px; background: var(--book-paper); border-radius: 2px; box-shadow: 2px 0 0 #efe7d0, 4px 0 0 #e4dabe, 6px 0 0 #d8cdac, 8px 0 0 #cabe9c, 10px 0 0 #bcaf8a, 11px 0 0 #a4977414, -2px 0 0 #efe7d0, -4px 0 0 #e4dabe, -6px 0 0 #d8cdac, -8px 0 0 #cabe9c, -10px 0 0 #bcaf8a, 0 4px 0 #e4dabe, 0 -4px 0 #ebe2c8, 0 14px 30px #10201b66; }

/* The gutter: pages fall away into the binding and lift again on the far side. */
.book-stage::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 calc(50% - 26px);
  background: linear-gradient(90deg,
    #ffffff00 0%, #fdf7e740 16%, #9d834a30 44%, #57462a80 50%, #9d834a30 56%, #fdf7e740 84%, #ffffff00 100%);
  pointer-events: none;
}

/* Age at the outer corners, where a book gets handled most. */
.book-stage::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    radial-gradient(120% 90% at 0% 50%, #8a713c26, transparent 42%),
    radial-gradient(120% 90% at 100% 50%, #8a713c26, transparent 42%),
    radial-gradient(90% 120% at 50% 0%, #8a713c1c, transparent 40%),
    radial-gradient(90% 120% at 50% 100%, #8a713c1c, transparent 40%);
  pointer-events: none;
}
.sheet, .flip-face { overflow-y: auto; overscroll-behavior: contain; min-width: 0; padding: 26px 28px 16px; background: var(--book-paper); color: var(--book-ink); font: 14px/1.65 "Courier New", Courier, monospace; }
.sheet-left { border-left: 1px solid #d5c9ac; box-shadow: inset -13px 0 16px -13px #6b573655; }
.sheet-right { box-shadow: inset 13px 0 16px -13px #6b573655; }
.printed-page { position: relative; display: flex; flex-direction: column; min-height: 100%; }
.printed-folio { display: block; text-align: center; margin-top: auto; padding-top: 20px; font: 12px/1.4 Georgia, serif; color: #7a705a; }
.book-running-head { font: 10px/1.5 "Courier New", monospace; letter-spacing: 1px; color: #756d58; border-bottom: 1px solid #c9bea3; margin: 0 0 26px; padding-bottom: 12px; }
.book-title-page { display: flex; flex-direction: column; flex: 1; text-align: center; }
.edition-title { margin: auto 0; padding: 24px 0; }
.edition-volume { font: 18px Georgia, serif; margin: 0 0 20px; color: #766a4c; }
#modal[data-skin="book"] #modal-body .edition-title h2 { font: 400 clamp(32px, 4vw, 49px)/1.1 Georgia, "Times New Roman", serif; color: #383327; letter-spacing: -1px; margin: 0 0 18px; }
.edition-subtitle { font: 16px/1.5 Georgia, serif; font-style: italic; margin: 0; color: #685d46; }
.edition-rule { display: block; width: 60px; height: 1px; background: #a99b79; margin: 26px auto; }
.edition-author { font: 18px Georgia, serif; font-variant: small-caps; letter-spacing: 1px; }
.edition-imprint { margin: 24px 0 0; color: #766a4c; font: 11px/1.8 "Courier New", monospace; letter-spacing: 1px; }
.edition-imprint span { letter-spacing: 0; font: italic 13px Georgia, serif; }
#modal[data-skin="book"] #modal-body .book-heading { font: 400 25px/1.2 Georgia, "Times New Roman", serif; color: #383327; letter-spacing: -.3px; margin: 8px 0 10px; }
.folio-kicker { color: #73674e; font: 11px/1.5 "Courier New", monospace; margin: 0; }
.book-company { margin: 0 0 24px; font: italic 15px/1.4 Georgia, serif; color: #74634b; }
.annotated-page { display: grid; grid-template-columns: minmax(0, 1fr) 152px; gap: 16px; }
.typed-copy p { margin: 0 0 20px; }
.typed-copy mark { background: linear-gradient(transparent 12%, #ead87985 12% 90%, transparent 90%); color: inherit; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.margin-note { align-self: start; margin: 22px 0 0; padding: 10px 0 0 11px; border-left: 1px solid #698aa358; color: #385a76; font: 15px/1.45 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; transform: rotate(-1.5deg); }
.margin-note::before { content: "↖"; display: block; font-size: 22px; margin: -8px 0 4px -5px; }
.sheet-left .margin-note { color: #865044; border-color: #ab695e55; transform: rotate(1deg); }
.book-stack { margin-top: 26px; border-top: 1px solid #c9bea3; padding-top: 14px; }
.book-stack > span { font-size: 10px; letter-spacing: 1px; color: #796d55; }
#modal[data-skin="book"] .project-tags { margin-top: 9px; gap: 5px 12px; }
#modal[data-skin="book"] .project-tags span { background: none; color: #5d5746; font-size: 11px; }
.book-contents { list-style: none; padding: 0; margin: 28px 0 0; }
.book-contents li { border-bottom: 1px dotted #baad8f; }
.book-contents button { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; padding: 15px 0; color: var(--book-ink); border: 0; border-radius: 0; background: transparent; text-align: left; font: inherit; }
.book-contents strong { font: 400 18px Georgia, serif; }
.book-contents small { display: block; color: #7c7057; font: 11px/1.5 "Courier New", monospace; margin-top: 5px; }
.book-contents button:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.contents-note { display: table; margin: 24px 0 12px auto; border: 0; padding: 0; }
.contents-note::before { display: none; }
.book-reading-tip { font: 11px/1.6 "Courier New", monospace; color: #7c7057; margin-top: 25px; }
.book-index > section { margin: 30px 0; }
.book-index h4 { margin: 0 0 12px; font-size: 14px; }
.edition-colophon { font: 11px/1.7 "Courier New", monospace; color: #7d725b; border-top: 1px solid #c9bea3; margin-top: 35px; padding-top: 20px; }
.book-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 8px 12px; flex-shrink: 0; }
.book-controls > div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.book-controls .folio { color: #dfd5b9; font: 11px/1.3 "Courier New", monospace; }
.page-turn { color: #f3e8ce; border: 1px solid #9ca28b; border-radius: 2px; padding: 9px 15px; background: transparent; font: 13px/1.4 "Courier New", monospace; }
.page-turn:hover:not(:disabled) { background: #ffffff12; }
.page-turn:disabled { opacity: .35; cursor: default; }
.book-contents-link { color: #d1c299; font: 11px "Courier New", monospace; text-decoration: underline; text-underline-offset: 3px; border: 0; background: transparent; padding: 3px; }
.flip { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 50%; transform-origin: left center; transform-style: preserve-3d; transition: transform .52s cubic-bezier(.4,.05,.3,1); pointer-events: none; }
.flip.from-left { left: 0; transform-origin: right center; transform: rotateY(180deg); }
.flip.turning { transform: rotateY(-180deg); }
.flip.from-left.turning { transform: rotateY(0deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; }
.flip-back { transform: rotateY(180deg); }
.flip.from-left .flip-front { transform: rotateY(180deg); }
.flip.from-left .flip-back { transform: rotateY(0deg); }
@media (max-width: 1000px) and (min-width: 721px) {
  .sheet, .flip-face { padding: 22px 22px 14px; }
  .annotated-page { grid-template-columns: 1fr; gap: 0; }
  .margin-note { max-width: 230px; margin: 3px 0 14px auto; font-size: 16px; }
}
@media (max-width: 720px) {
  #modal[data-skin="book"] { width: calc(100% - 12px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); padding: 6px 7px 0; }
  .book-stage { grid-template-columns: 1fr; }
  .book-stage::after, .flip { display: none; }
  .sheet { padding: 22px 20px 14px; }
  .annotated-page { grid-template-columns: 1fr; gap: 0; }
  .margin-note { margin: 2px 0 15px auto; max-width: 210px; font-size: 18px; }
  .book-running-head { margin-bottom: 20px; }
  .book-controls { padding-inline: 0; }
  .page-turn { padding: 9px 11px; }
  #modal[data-skin="book"] #modal-body .edition-title h2 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }
#modal[data-skin="computer"] #modal-body { background: var(--paper); }
#modal[data-skin="computer"] #panel-tabs button[aria-current="page"] { color: var(--accent); }
@media (max-width: 720px) {
  #modal[data-skin="computer"] { padding: 5px; }
  #modal[data-skin="computer"] #panel-tabs { gap: 0; padding: 4px 8px; }
  #modal[data-skin="computer"] #panel-tabs button { padding: 10px; }
  #modal[data-skin="book"] { width: calc(100% - 16px); }
}
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }
#modal[data-view="live"] .modal-bar,
#modal[data-view="live"] #panel-tabs,
#modal[data-view="live"] #modal-foot { display: none; }
#modal[data-view="live"] { width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
.live-toolbar [data-close-live] { font-size: 24px; line-height: 1; padding: 2px 8px; margin-left: 4px; }

#modal-body .project-intro h3 { font-size: 23px; line-height: 1.25; margin: 0 0 10px; }
.career-item ul { margin-top: 0; }
