:root {
  color-scheme: light;
  --bg: #f4f8fa;
  --box: #fff;
  --ink: #122e43;
  --mut: #405b69;
  --line: #cbdbe3;
  --accent: #075b86;
  --water: #cde5f1;
  --land: #edf3ed;
  --edge: #779498;
  --active: #5098b8;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    sans-serif;
  margin: 0;
}
body.dark {
  color-scheme: dark;
  --bg: #101d28;
  --box: #192c39;
  --ink: #e8f3fa;
  --mut: #b2c6d5;
  --line: #384e5e;
  --accent: #9bd8ff;
  --water: #193548;
  --land: #3c5861;
  --edge: #83a2aa;
  --active: #56aacf;
}
h1,
h2,
p {
  margin: 0 0 0.7em;
}
h1 {
  font:
    clamp(36px, 6vw, 62px)/1.02 Georgia,
    serif;
  letter-spacing: -0.04em;
}
h2 {
  font:
    clamp(23px, 4vw, 34px)/1.15 Georgia,
    serif;
}
p,
small {
  color: var(--mut);
}
header,
main,
nav {
  max-width: 1050px;
  margin: auto;
}
header {
  display: flex;
  align-items: center;
  padding: 15px 5%;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
header img {
  width: 100px;
  height: auto;
  display: block;
}
header span,
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--accent);
}
header button {
  margin-left: auto;
}
main {
  padding: 28px 5% 120px;
}
.layout,
.actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: start;
}
.panel,
.mapcard,
dialog,
.card {
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.panel,
.mapcard,
dialog {
  padding: 19px;
}
.mapcard {
  background: var(--water);
}
.mapcard svg {
  width: 100%;
  height: clamp(260px, 44vh, 415px);
  display: block;
}
.mapcard path {
  fill: var(--area-fill, var(--land));
  stroke: var(--edge);
  stroke-width: 0.7;
  cursor: pointer;
}
.mapcard path.picked,
.mapcard path:hover,
.mapcard path:focus {
  fill: var(--active);
  stroke: var(--ink);
  stroke-width: 1.4;
}
.row,
.mapfoot,
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.mapfoot,
.hint {
  font-size: 12px;
}
.row button,
button,
a.primary,
input,
select {
  font: inherit;
}
.primary,
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--box);
  cursor: pointer;
  padding: 9px 14px;
  min-height: 44px;
}
.primary {
  display: inline-block;
  background: #155b7d;
  color: white;
  text-decoration: none;
  border: 0;
  font-weight: 650;
}
.filters label {
  flex: 1;
  min-width: 155px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
}
input,
select {
  display: block;
  background: var(--box);
  color: var(--ink);
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 4px 0 12px;
}
nav {
  position: fixed;
  z-index: 4;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  padding: 4px 4px max(5px, env(safe-area-inset-bottom));
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
}
nav button {
  flex: 1;
  border: 0;
  padding: 4px;
  min-width: 0;
  font-size: 12px;
}
nav svg {
  margin: auto;
  display: block;
  width: 20px;
  height: 22px;
}
nav button[aria-current='page'] {
  font-weight: 750;
  color: var(--accent);
  background: var(--bg);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 10px 0 15px;
}
.card {
  overflow: hidden;
}
.tile {
  background: none;
  border: 0;
  padding: 0;
  display: block;
  text-align: left;
  width: 100%;
}
.tile img,
.card > img {
  width: 100%;
  height: 145px;
  object-fit: contain;
  background: var(--bg);
}
.tile strong,
.tile small,
.card > p {
  display: block;
  padding: 3px 12px;
}
.card > button:not(.tile) {
  margin: 4px 10px 10px;
}
.card small {
  font-size: 12px;
}
a {
  color: var(--accent);
}
dialog {
  color: var(--ink);
  width: min(460px, 92vw);
  max-height: 86dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #0a233bbd;
}
dialog #close {
  float: right;
}
.photo {
  width: 100%;
  max-height: 32vh;
  object-fit: contain;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 82px;
  left: 5%;
  right: 5%;
  margin: auto;
  width: fit-content;
  padding: 10px;
  background: #143952;
  color: white;
  border-radius: 8px;
  z-index: 8;
}
#profile,
.actions {
  margin-bottom: 20px;
}
.panel label {
  margin: 6px 0;
}
.panel input[type='checkbox'] {
  width: auto;
  display: inline;
}
.panel button {
  margin: 4px;
}
.panel .eyebrow {
  margin-top: 12px;
}
button:focus-visible,
a:focus-visible,
path:focus-visible {
  outline: 3px solid #eeaa46;
}
#tabs button:disabled {
  opacity: 0.5;
}
@media (max-width: 650px) {
  header {
    gap: 8px;
  }
  header span {
    font-size: 9px;
  }
  header img {
    width: 84px;
  }
  main {
    padding-top: 22px;
  }
  .layout,
  .actions {
    grid-template-columns: 1fr;
  }
  .mapcard,
  .panel {
    padding: 14px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile img,
  .card > img {
    height: 112px;
  }
  .filters {
    gap: 4px;
  }
  .filters label {
    min-width: 120px;
  }
  .filters label:first-child {
    flex-basis: 100%;
  }
  nav button {
    font-size: 10.5px;
  }
  .mapfoot {
    font-size: 10px;
  }
}
:root {
  --bg: #f8f9f5;
  --box: #fff;
  --ink: #102e40;
  --mut: #48606b;
  --accent: #165378;
  --line: #d0dce0;
  --sky: #d9ecf5;
  --nav-active: #d0e8f5;
  --paper: #f1f4ee;
}
body.dark {
  --bg: #142c40;
  --box: #1a384c;
  --ink: #f1f8fa;
  --mut: #c1d3db;
  --line: #3e5c6d;
  --sky: #284c61;
  --nav-active: #315a70;
  --paper: #203d4d;
}
body {
  font-family: Arial, Helvetica, sans-serif;
}
header,
main,
nav {
  max-width: 1160px;
}
header,
main {
  padding-inline: clamp(16px, 4vw, 48px);
}
header {
  height: 66px;
  gap: 16px;
}
header img {
  width: 100px;
}
header .mast-label {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 15px;
  letter-spacing: -0.02em;
  font-size: 14px;
  color: var(--mut);
  font-weight: 600;
}
.mast-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mast-actions button {
  margin: 0;
  font-weight: 650;
  border-radius: 30px;
  min-height: 42px;
}
#theme {
  width: 42px;
  background: transparent;
  font-size: 22px;
  padding: 0;
}
#install {
  font-size: 13px;
}
main {
  padding-block-start: clamp(16px, 2.6vw, 32px);
}
h1,
h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}
h1 {
  letter-spacing: -0.055em;
}
h2 {
  letter-spacing: -0.04em;
}
.field-cover {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
  background: var(--sky);
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
}
.cover-frame {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 310px;
  touch-action: pan-y;
  overflow: hidden;
  background: var(--water);
}
.cover-frame img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 50% 46%;
  user-select: none;
  -webkit-user-drag: none;
}
.cover-copy {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: clamp(24px, 4vw, 50px);
  gap: 12px;
}
.cover-copy h1,
.notebook-cover h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.99;
  margin: 0;
}
.cover-copy h1 {
  font-size: clamp(42px, 5vw, 76px);
  max-width: 13ch;
}
.cover-copy p {
  margin: 0;
  max-width: 40ch;
}
.cover-label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.cover-label::before {
  content: '';
  width: 25px;
  height: 2px;
  background: currentColor;
}
.cover-read {
  margin-top: 2px;
  background: #15394d;
  border-color: #15394d;
  color: white;
  border-radius: 28px;
  font-weight: 650;
  padding: 9px 18px;
}
.credit {
  font-size: 11px;
  color: var(--mut);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.cover-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #102b3ae6;
  border-radius: 30px;
  color: white;
  padding: 2px;
}
.cover-tools button {
  border: 0;
  border-radius: 50%;
  color: white;
  background: transparent;
  padding: 0;
  width: 42px;
  min-height: 42px;
  font-size: 20px;
}
.cover-tools button:hover {
  background: #36586a;
}
.cover-tools span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#quickSearch {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 5px 7px 5px 18px;
  margin: 18px 0 12px;
}
#quickSearch:focus-within {
  outline: 2px solid var(--accent);
}
#quickQuery {
  margin: 0;
  padding: 8px 0;
  background: transparent;
  border: 0;
  outline: 0;
  min-width: 0;
  color: var(--ink);
}
#quickQuery::placeholder {
  color: var(--mut);
}
#quickSearch button {
  border: 0;
  background: var(--sky);
  color: var(--ink);
  font-size: 20px;
  border-radius: 12px;
  min-width: 44px;
}
.lens {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.lens::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -3px;
  height: 2px;
  width: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}
.home-tools,
.notes {
  display: grid;
  gap: 12px;
}
.home-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-tools a {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.home-tools a:hover,
.note-link:hover strong {
  color: var(--accent);
}
.home-tools a:nth-child(2) {
  background: var(--sky);
}
.tool-symbol {
  font: 30px/1 system-ui;
  color: var(--accent);
}
.home-tools strong,
.home-tools small {
  display: block;
}
.home-tools small {
  font-size: 12px;
}
.home-tools i {
  margin-left: auto;
  font: 20px/1 system-ui;
}
.story-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 28px 0 12px;
}
.story-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}
.story-heading a,
#profilePane a:not(.primary) {
  text-underline-offset: 3px;
}
.story-heading a {
  font-size: 13px;
}
.notes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.note-link {
  display: grid;
  text-decoration: none;
  color: var(--ink);
}
.note-link img {
  width: 100%;
  aspect-ratio: 1.95;
  object-fit: cover;
  border-radius: 13px;
}
.note-link small {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 9px 0 3px;
}
.note-link strong {
  font:
    700 clamp(17px, 2.2vw, 25px)/1.12 Arial,
    serif;
}
.notes .credit {
  display: inline-block;
  margin-top: 5px;
}
#tabs {
  width: min(97%, 680px);
  bottom: max(6px, env(safe-area-inset-bottom));
  border-radius: 20px;
  box-shadow: 0 4px 24px #09293b26;
  padding: 4px;
}
#tabs button {
  border-radius: 15px;
  height: 50px;
  line-height: 1.2;
}
#tabs button[aria-current='page'] {
  background: var(--nav-active);
  color: var(--ink);
}
.notebook-cover {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  overflow: hidden;
  background: var(--sky);
  border-radius: 20px;
  margin-bottom: 18px;
}
.notebook-cover > div {
  padding: clamp(20px, 4vw, 42px);
  align-self: center;
}
.notebook-cover h1 {
  font-size: clamp(40px, 6vw, 68px);
}
.notebook-cover p {
  margin: 6px 0 10px;
}
.notebook-cover a {
  font-size: 13px;
  font-weight: 600;
}
.notebook-cover figure {
  margin: 0;
  position: relative;
  min-height: 170px;
}
.notebook-cover img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notebook-cover figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background: #102839d9;
}
.notebook-cover figcaption a {
  font: 10px/1.25 system-ui;
  color: white;
}
#profile {
  display: grid;
  gap: 12px;
}
#profile > .primary {
  justify-self: start;
}
#profile > .panel {
  min-width: 0;
}
#profilePane .cards > p:only-child {
  grid-column: 1/-1;
  padding: 14px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
}
@media (max-width: 650px) {
  header {
    height: 58px;
    gap: 9px;
  }
  header img {
    width: 78px;
  }
  header .mast-label {
    font-size: 12px;
    padding-inline-start: 9px;
  }
  .mast-actions button {
    min-height: 40px;
  }
  #theme {
    width: 40px;
  }
  #install {
    padding: 7px 11px;
    font-size: 12px;
  }
  .field-cover {
    grid-template-columns: 1fr;
    border-radius: 17px;
  }
  .cover-frame {
    grid-area: 1/1;
    min-height: 0;
    height: clamp(170px, 50vw, 270px);
  }
  .cover-copy {
    grid-area: 2/1;
    padding: 16px 18px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 9px;
  }
  .cover-copy h1,
  .cover-copy p {
    grid-column: 1/-1;
  }
  .cover-copy h1 {
    font-size: clamp(33px, 9vw, 54px);
    max-width: none;
  }
  .cover-copy #coverIntro {
    font-size: 14px;
    line-height: 1.4;
  }
  .cover-copy .credit {
    align-self: center;
    justify-self: end;
    text-align: right;
    font-size: 10px;
    max-width: 13ch;
  }
  .cover-read {
    justify-self: start;
    align-self: center;
    font-size: 13px;
  }
  .cover-tools {
    bottom: 8px;
    right: 8px;
  }
  #quickSearch {
    margin-top: 13px;
    gap: 9px;
    padding-left: 12px;
  }
  #quickQuery {
    font-size: 14px;
  }
  .home-tools,
  .notes {
    gap: 9px;
  }
  .home-tools a {
    position: relative;
    display: block;
    padding: 11px;
  }
  .tool-symbol {
    font-size: 23px;
  }
  .home-tools i {
    position: absolute;
    right: 10px;
    top: 12px;
    font-size: 15px;
  }
  .home-tools strong {
    font-size: 14px;
    line-height: 1.2;
    margin: 4px 0;
  }
  .home-tools small {
    font-size: 12px;
  }
  .story-heading {
    margin-top: 20px;
  }
  .notes {
    grid-template-columns: 1fr;
  }
  .notes article {
    position: relative;
    padding: 9px 0;
    border-top: 1px solid var(--line);
  }
  .note-link {
    grid-template-columns: 84px 1fr;
    column-gap: 12px;
    align-content: start;
  }
  .note-link img {
    grid-area: 1/1/4/2;
    aspect-ratio: 1.25;
    border-radius: 8px;
  }
  .note-link small,
  .note-link strong {
    grid-column: 2;
    align-self: start;
  }
  .note-link small {
    margin-top: 0;
  }
  .notes .credit {
    display: block;
    margin: 3px 0 2px 96px;
    font-size: 10px;
  }
  .notebook-cover {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .notebook-cover > div {
    padding: 16px;
  }
  .notebook-cover p {
    font-size: 13px;
  }
  #tabs {
    width: calc(100% - 10px);
  }
  #tabs button {
    font-size: 10px;
    padding-inline: 1px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  main > section:not([hidden]) {
    animation: field-appear 0.22s ease-out;
  }
  @keyframes field-appear {
    from {
      opacity: 0.6;
      transform: translateY(3px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* The editorial covers pair bold Arial headlines with Georgia reading text. */
:root {
  --brand-blue: #23669e;
  --brand-ink: #101925;
  --brand-sky: #b2d8f5;
  --brand-cover: radial-gradient(
    ellipse at 100% 100%,
    #090d13 0%,
    #101925 18%,
    #163956 56%,
    #23669e 100%
  );
}
body.dark {
  background-color: var(--brand-ink);
  background-image:
    radial-gradient(ellipse at 100% 0, #080c12 0, transparent 56%),
    linear-gradient(132deg, #1b425f, #101925 65%);
  background-attachment: fixed;
}
.cover-copy,
.notebook-cover > div {
  background: var(--brand-cover);
  color: #fff;
}
.cover-copy .eyebrow,
.notebook-cover .eyebrow,
.notebook-cover > div a {
  color: var(--brand-sky);
}
.cover-copy #coverIntro,
.notebook-cover #savedCount {
  color: #f2f6fa;
}
.cover-copy #coverIntro {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.42;
}
.cover-copy .credit {
  color: #d7e5f0;
  font-family: Arial, Helvetica, sans-serif;
}
.cover-read {
  color: var(--brand-ink);
  background: #fff;
  border-color: #fff;
}
.cover-read:hover {
  background: var(--brand-sky);
  border-color: var(--brand-sky);
}
.archive {
  margin: clamp(24px, 4vw, 42px) 0;
}
.archive h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 12px;
}
.archive-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 22px);
}
.archive-shelf a {
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: var(--box);
  color: var(--ink);
  border: 1px solid var(--line);
}
.archive-shelf img {
  width: 100%;
  height: auto;
  display: block;
}
.archive-shelf span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 700;
}
.archive-shelf i {
  font-style: normal;
  color: var(--accent);
}
.reading-back {
  font-weight: 700;
  text-decoration: none;
}
.reading article {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr);
  gap: clamp(20px, 5vw, 60px);
  align-items: start;
}
.reading h1 {
  font:
    700 clamp(34px, 4.8vw, 66px)/1 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: -0.045em;
  margin: 10px 0 20px;
}
.reading h2 {
  font-size: 21px;
  margin: 22px 0 8px;
}
.reading-copy p:not(.eyebrow) {
  font:
    400 clamp(17px, 2vw, 20px)/1.55 Georgia,
    serif;
  color: var(--ink);
}
.reading-copy .reading-lead {
  font-style: italic !important;
}
.reading figure {
  margin: 0;
}
.reading figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.reading figcaption {
  color: var(--mut);
  font-size: 12px;
  margin-top: 6px;
}
.reading ul {
  padding-left: 20px;
  margin: 4px 0;
}
.reading li + li {
  margin-top: 6px;
}
@media (max-width: 650px) {
  .cover-copy h1 {
    max-width: 16ch;
    text-wrap: balance;
  }
  .cover-copy .credit {
    max-width: 18ch;
  }
  .archive-shelf {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 2px 1px 8px;
  }
  .archive-shelf a {
    flex: 0 0 min(72%, 255px);
    scroll-snap-align: start;
  }
  .reading article {
    grid-template-columns: 1fr;
  }
  .reading figure {
    max-width: 420px;
  }
}
