/* urfaveonlinesloot — document pages (/about).
   Inherits every token and the pill language from styles.css; this file only
   adds the reading layout. */

body.doc {
  display: block;
}

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

.doc-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 26px var(--pad) 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.back:hover {
  color: var(--bubble-text);
}

.doc-header h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 68%;
  font-size: clamp(2.1rem, 11vw, 3rem);
  line-height: 0.98;
  text-transform: uppercase;
  /* Deliberately darker than the lander's wordmark. The same gradient that
     reads as polished metal at 50px reads as washed-out grey at 42px, because
     its top half is near-white sitting on a near-white ground and there is not
     enough letterform left at this size for the bevel to carry it. The
     highlight band is kept; the white ends are not. */
  background-image: linear-gradient(
    174deg,
    #dfe4ec 2%,
    #ffffff 16%,
    #a8b0c0 40%,
    #545b6b 50%,
    #8d95a5 56%,
    #d5dae3 78%,
    #eef1f6 96%
  );
  background-size: 100% 220%;
  background-position: 0 22%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 2px 1px rgba(72, 79, 94, 0.65))
    drop-shadow(0 6px 12px rgba(96, 104, 120, 0.3));
  animation: gloss 7s ease-in-out infinite;
}

.doc-tagline {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

/* --------------------------------------------------------------- body ---- */

.doc-main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 8px var(--pad) 120px;
}

.lede {
  margin: 18px 0 34px;
  font-size: 1.06rem;
  line-height: 1.62;
  color: #322d3a;
}

.section {
  margin: 0 0 38px;
}

.section h2 {
  margin: 0 0 6px;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 82%;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--ink);
}

.section h2::after {
  content: '';
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--chrome-lo), var(--chrome-mid) 40%, #ffffff);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section-blurb {
  margin: 10px 0 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.section p {
  margin: 0 0 14px;
  color: #322d3a;
}

/* ---------------------------------------------------------- fact cards ---- */

.facts-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fact {
  padding: 13px 15px;
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px -10px rgba(72, 78, 92, 0.5);
}

.fact-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

.fact-value {
  display: block;
  font-size: 0.95rem;
  color: #2b2733;
}

@media (min-width: 560px) {
  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ----------------------------------------------------------- accordion ---- */

.accordion {
  display: grid;
  gap: 8px;
}

details {
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px -10px rgba(72, 78, 92, 0.5);
  overflow: hidden;
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 0.97rem;
  color: #241f2c;
}

summary::-webkit-details-marker {
  display: none;
}

/* A chrome plus that becomes a minus. Built from two bars on one element so
   there is nothing to keep in sync. */
.marker {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #dfe4ec 52%, #c3c9d5 100%);
  box-shadow: 0 1px 2px rgba(72, 78, 92, 0.4);
}

.marker::before,
.marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--chrome-deep);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

details[open] .marker::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

.answer {
  padding: 0 16px 16px;
}

.answer p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.62;
  color: #423c4c;
}

.answered-heading {
  margin: 26px 0 12px;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* -------------------------------------------------------- cluster links ---- */

.cluster-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cluster {
  display: block;
  padding: 15px 16px;
  border-radius: var(--r-card);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px -10px rgba(72, 78, 92, 0.5);
  transition: transform 0.14s ease;
}

.cluster:hover {
  transform: translateY(-1px);
}

.cluster-title {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 88%;
  font-size: 1.02rem;
  color: #241f2c;
}

.cluster-meta {
  display: block;
  margin: 3px 0 6px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bubble-text);
}

.cluster-blurb {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ post cards ---- */

.post-card {
  margin: 0 0 10px;
}

.post-card-link {
  display: block;
  padding: 16px;
  border-radius: var(--r-card);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px -10px rgba(72, 78, 92, 0.5);
  transition: transform 0.14s ease;
}

.post-card-link:hover {
  transform: translateY(-1px);
}

.post-card h2 {
  margin: 0 0 5px;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 86%;
  font-size: 1.1rem;
  line-height: 1.24;
  color: #241f2c;
}

.post-card h2::after {
  content: none;
}

.post-meta {
  margin: 0 0 8px;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.post-excerpt {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.post-more {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bubble-text);
}

/* ------------------------------------------------------------- post body ---- */

.post-header h1 {
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  line-height: 1.06;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
}

.tags li {
  padding: 3px 10px;
  border-radius: var(--r);
  background: linear-gradient(180deg, #ffffff, #eceff4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(72, 78, 92, 0.22);
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-body .outro {
  margin-top: 26px;
  font-size: 1.02rem;
  color: #2b2733;
}

.cta-card {
  margin: 32px 0 8px;
  padding: 20px 18px;
  border-radius: var(--r-card);
  text-align: center;
  background: linear-gradient(165deg, #ffffff, #ffeff7);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 8px 22px -14px rgba(72, 78, 92, 0.6);
}

.cta-card p {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: 1.05rem;
  color: #241f2c;
}

.post-nav {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.post-nav a {
  display: block;
  padding: 13px 15px;
  border-radius: var(--r-card);
  text-decoration: none;
  font-size: 0.94rem;
  color: #2b2733;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.post-nav a span {
  display: block;
  margin-bottom: 3px;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.post-nav-next {
  text-align: right;
}

/* ------------------------------------------------- favourites & vitals ---- */

.favs,
.vitals {
  margin: 16px 0 0;
  display: grid;
  gap: 2px;
}

.favs > div,
.vitals > div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--hairline);
}

.favs dt,
.vitals dt {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 3px;
}

.favs dd,
.vitals dd {
  margin: 0;
  font-size: 0.95rem;
  color: #2b2733;
}

/* ----------------------------------------------------------- ask form ---- */

.ask-form {
  margin-top: 16px;
}

.ask-field {
  padding: var(--rim);
  border-radius: 16px;
  background: linear-gradient(170deg, #ffffff, #dfe4ec 50%, #ffffff);
  box-shadow: 0 6px 16px -10px rgba(72, 78, 92, 0.6);
}

.ask-field textarea {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fdfcfe;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

.ask-field textarea:focus {
  outline: 2px solid var(--bubble-text);
  outline-offset: -1px;
}

.ask-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.counter {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.counter.low {
  color: var(--bubble-text);
}

.ask-send {
  flex: 0 1 190px;
}

.ask-send .face {
  min-height: 48px;
  font-size: 0.92rem;
}

.ask-status {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--muted);
}

.ask-status.ok {
  color: var(--bubble-text);
  font-weight: 600;
}

.ask-status.err {
  color: #b3261e;
}

/* The honeypot. Off-screen rather than display:none, because some bots skip
   fields that are not rendered at all. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------- sticky cta ---- */

/* Default — and therefore the no-JavaScript state — is an ordinary block in the
   flow. The bar only becomes a fixed, sliding element once the script has run
   and added `.js` to the root. Written the other way round, a visitor with
   JavaScript blocked gets a CTA parked permanently off-screen, because `.show`
   is only ever added by the script. */
.sticky-cta {
  display: flex;
  justify-content: center;
  padding: 0 var(--pad) 30px;
}

.sticky-cta .btn {
  width: 100%;
  max-width: var(--measure);
}

.js .sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(252, 238, 246, 0), rgba(252, 238, 246, 0.94) 42%);
  transform: translateY(120%);
  transition: transform 0.26s ease;
  pointer-events: none;
}

.js .sticky-cta.show {
  transform: translateY(0);
  pointer-events: auto;
}

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

.doc-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 26px var(--pad) 110px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--hairline);
}

/* --------------------------------------------------- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .doc-header h1 {
    animation: none;
  }

  .js .sticky-cta,
  .marker::before,
  .marker::after {
    transition: none;
  }
}
