/* Pleasure Island. One stylesheet, system fonts only, no external requests. */

:root {
  --ink: #0B2A2E;
  --sand: #F4ECDD;
  --coral: #DD6748;
  --foam: #7FB6A8;
  --char: #2B2622;

  --bg: var(--sand);
  --fg: var(--char);
  --muted: #5F5850;
  --link: #B2412A;
  --rule: #C4B7A2;
  --panel: #EDE3D0;
  --mark: #B2412A;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B2A2E;
    --fg: #F4ECDD;
    --muted: #A9BFB9;
    --link: #EE8A6E;
    --rule: #2F5155;
    --panel: #0E3338;
    --mark: #EE8A6E;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--sand);
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 20;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------- small labels */

.coord, .eyebrow, .nav a, .brand, .foot-nav a, .rail-meta, .legend-num,
.strip-kind, summary, .tag, th, .foot-name {
  font-family: var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.coord {
  color: var(--mark);
  margin: 0 0 0.5rem;
}
.coord.light { color: var(--foam); }

.eyebrow { color: var(--muted); margin: 0 0 0.6rem; }

/* ---------------------------------------------------------------- header */

.site-head {
  background: var(--ink);
  color: var(--sand);
  border-bottom: 1px solid rgba(127, 182, 168, 0.35);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  color: var(--sand);
  text-decoration: none;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand:hover { color: var(--foam); }

.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--coral);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.24rem;
  border-radius: 50%;
  background: var(--foam);
}

.nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0;
  padding: 0;
}
.nav a { color: var(--sand); text-decoration: none; }
.nav a:hover { color: var(--foam); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--foam); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  background: var(--ink);
  background-image: linear-gradient(to bottom, #0E353A 0%, #0B2A2E 100%);
  color: var(--sand);
  overflow: hidden;
  padding: 3rem 0 3.25rem;
}

.contour {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero h1 {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero .lead { color: #DCE9E4; max-width: 34rem; font-size: 1.15rem; }

.hero-compass { margin-top: 2rem; }
.compass { width: 8.5rem; height: 8.5rem; display: block; }

.linkish {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--foam);
  border-bottom: 1px dashed var(--foam);
  text-decoration: none;
  padding-bottom: 0.2rem;
}
.linkish:hover { color: var(--sand); border-bottom-color: var(--sand); }

.hero-links { margin-bottom: 0; }

/* ----------------------------------------------------------- typography */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; }

.reading h1, .plain h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.14;
  margin: 0 0 0.9rem;
}

.reading h2, .home-sec h2 {
  font-size: 1.5rem;
  line-height: 1.24;
  margin: 2.6rem 0 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--rule);
}

.reading h3 { font-size: 1.16rem; margin: 1.8rem 0 0.5rem; }

p { margin: 0 0 1.15rem; }

.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--fg);
  margin-bottom: 1.6rem;
}

.reading ul, .reading ol { padding-left: 1.15rem; margin: 0 0 1.3rem; }
.reading li { margin-bottom: 0.55rem; }

blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px dashed var(--coral);
  font-style: italic;
  color: var(--muted);
}

.reading strong { font-weight: 600; }

/* ------------------------------------------------------------ article */

.article-grid { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.plain { padding-top: 2.5rem; padding-bottom: 3.5rem; max-width: 46rem; }

.reading { max-width: 44rem; }

.art-head { margin-bottom: 1.4rem; }

.art-foot {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.rail { margin-bottom: 2.2rem; }

.rail-meta { color: var(--muted); margin: 0 0 1rem; }

.toc { border-top: 1px dashed var(--rule); padding-top: 0.8rem; }
.toc summary {
  cursor: pointer;
  color: var(--muted);
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: " +"; }
.toc[open] summary::after { content: " -"; }
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0.9rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.45;
}
.toc li { margin-bottom: 0.6rem; counter-increment: toc; }
.toc li a { text-decoration: none; color: var(--fg); }
.toc li a::before {
  content: counter(toc, decimal-leading-zero) " ";
  color: var(--mark);
  font-size: 0.72rem;
}
.toc li a:hover { color: var(--link); text-decoration: underline; }

.rail-back {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--sans);
  font-size: 0.78rem;
}

/* -------------------------------------------------------------- legend */

.home-sec { padding: 3rem 0; }
.home-sec > .wrap > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.sec-head { max-width: 42rem; margin-bottom: 2rem; }
.sec-head h2 { margin-top: 0; border-top: 0; padding-top: 0; font-size: 1.7rem; }

.legend { list-style: none; margin: 0; padding: 0; position: relative; }

.legend > li {
  position: relative;
  padding: 1.6rem 0 1.6rem 3.4rem;
  border-top: 1px dashed var(--rule);
}
.legend > li:last-child { border-bottom: 1px dashed var(--rule); }

.legend > li::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 0;
  bottom: 0;
  border-left: 1px dotted var(--rule);
}
.legend > li:first-child::before { top: 2.5rem; }
.legend > li:last-child::before { bottom: calc(100% - 2.5rem); }

.legend-num {
  position: absolute;
  left: 0;
  top: 2rem;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  background: var(--bg);
  color: var(--mark);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 0.62rem;
  letter-spacing: 0;
}

.legend h3 { margin: 0.2rem 0 0.5rem; font-size: 1.35rem; }
.legend h3 a { text-decoration: none; color: var(--fg); }
.legend h3 a:hover { color: var(--link); text-decoration: underline; }
.legend p { margin-bottom: 0.7rem; max-width: 42rem; }
.legend .legend-links {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.legend .legend-links a { color: var(--link); }

/* --------------------------------------------------------------- strip */

.strip { background: var(--panel); border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); }
.strip-list { list-style: none; margin: 0; padding: 0; }
.strip-list li { padding: 1.2rem 0; border-top: 1px dotted var(--rule); }
.strip-list li:first-child { border-top: 0; }
.strip-kind { color: var(--mark); display: block; margin-bottom: 0.3rem; }
.strip-list h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.strip-list h3 a { text-decoration: none; color: var(--fg); }
.strip-list h3 a:hover { color: var(--link); text-decoration: underline; }
.strip-list p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* --------------------------------------------------------------- care */

.care { padding: 3rem 0 3.5rem; }
.care .inner { max-width: 44rem; }
.care h2 { margin-top: 0; font-size: 1.7rem; }

/* -------------------------------------------------------------- tables */

.tablewrap {
  overflow-x: auto;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  margin: 1.6rem 0;
  padding: 0.2rem 0;
}

table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: 0.95rem; }
caption { text-align: left; color: var(--muted); font-size: 0.9rem; padding-bottom: 0.7rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px dotted var(--rule); }
th { color: var(--mark); font-size: 0.66rem; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }

/* ------------------------------------------------------------ checklist */

.checklist { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.checklist li { margin-bottom: 0.5rem; display: flex; gap: 0.6rem; align-items: flex-start; }
.checklist input { margin-top: 0.42rem; accent-color: var(--coral); }
.checklist label { cursor: pointer; }
.checklist input:checked + label { color: var(--muted); text-decoration: line-through; }

.checkbar {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px dashed var(--rule);
  padding-top: 0.9rem;
  margin-top: 1.4rem;
}
.checkbar button {
  font: inherit;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  color: var(--link);
  border: 1px dashed var(--link);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  margin-left: 0.6rem;
}
.checkbar button:hover { background: var(--panel); }

/* ------------------------------------------------------------- indexes */

.index-group { border-top: 1px dashed var(--rule); padding-top: 1.2rem; margin-top: 2.2rem; }
.index-group h2 { margin: 0 0 0.8rem; border-top: 0; padding-top: 0; font-size: 1.4rem; }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li { padding: 0.8rem 0 0.8rem 1.6rem; border-top: 1px dotted var(--rule); position: relative; }
.index-list li:first-child { border-top: 0; }
.index-list li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 1.5rem;
  width: 0.32rem;
  height: 0.32rem;
  background: var(--mark);
  border-radius: 50%;
}
.index-list a { font-size: 1.08rem; text-decoration: none; color: var(--fg); }
.index-list a:hover { color: var(--link); text-decoration: underline; }
.index-list span { display: block; color: var(--muted); font-size: 0.95rem; }

/* ------------------------------------------------------------- glossary */

.glossary { margin: 0; }
.glossary dt {
  font-weight: 600;
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px dotted var(--rule);
}
.glossary dd { margin: 0.35rem 0 0; color: var(--fg); }

/* ------------------------------------------------------------ callouts */

.note {
  border-top: 1px dashed var(--coral);
  border-bottom: 1px dashed var(--coral);
  padding: 1.2rem 0;
  margin: 1.8rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note .tag { color: var(--mark); display: block; margin-bottom: 0.4rem; }

.faq { margin-top: 1rem; }
.faq h2 { margin-top: 2.6rem; }

/* -------------------------------------------------------------- footer */

.site-foot {
  background: var(--ink);
  color: var(--sand);
  margin-top: 0;
  padding: 2.6rem 0 3rem;
  border-top: 1px solid rgba(127, 182, 168, 0.35);
}
.foot-name { color: var(--foam); margin: 0 0 0.6rem; }
.foot-line { color: #C9DAD5; max-width: 34rem; font-size: 0.98rem; }
.foot-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 1.2rem 0 1.2rem; padding: 1.2rem 0 0; border-top: 1px dashed rgba(244, 236, 221, 0.28); }
.foot-nav a { color: var(--sand); text-decoration: none; }
.foot-nav a:hover { color: var(--foam); text-decoration: underline; }
.foot-mail { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.06em; color: #C9DAD5; margin: 0; }

/* ------------------------------------------------------------- 404 page */

.notfound { padding: 3.5rem 0 4rem; }
.notfound h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.8rem; }

/* ----------------------------------------------------------- wide screen */

@media (min-width: 46em) {
  body { font-size: 1.125rem; }
  .hero { padding: 4.5rem 0 5rem; }
  .hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; }
  .hero-compass { margin-top: 0; flex: 0 0 auto; }
  .compass { width: 11rem; height: 11rem; }
  .strip-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .strip-list li:nth-child(2) { border-top: 0; }
}

@media (min-width: 62em) {
  .article-grid {
    display: grid;
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 0 4rem;
    align-items: start;
  }
  .rail {
    position: sticky;
    top: 2rem;
    margin-bottom: 0;
    border-top: 1px dashed var(--rule);
    padding-top: 1.2rem;
  }
  .toc { border-top: 0; padding-top: 0; }
  .toc summary { display: none; }
  .reading { max-width: 46rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
