/* Straight Talk.
 *
 * The register shift is the design. Every game in here is a dark backlit
 * screen with colour doing binary work; this is a sheet of paper. Wide
 * measure, serif-ish rhythm, no accent colour deciding right from wrong.
 * The only thing allowed to be loud is a phone number.
 */

/* The games hide overflow and lock to one viewport. A document must not. */
body { overflow-y: auto; }

/* Kill the backlit colour pools the tokens put behind every page. This
   surface is meant to read as unlit. */
body::before { display: none; }

.sheet {
  position: relative;
  z-index: 1;
  max-width: 62ch;
  margin: 0 auto;
  padding: max(72px, calc(env(safe-area-inset-top) + 64px)) 20px
           max(56px, calc(env(safe-area-inset-bottom) + 40px));
}

/* ---------- masthead ---------- */

.masthead {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}

.masthead-title {
  margin: 0;
  font-size: clamp(40px, 11vw, 62px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.standfirst {
  margin: 22px 0 0;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--paper);
}

.standfirst-note {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- the numbers ----------
 * Above the essays on purpose. Whole row is the tap target, sized for a
 * thumb, because someone reaching for this may not be steady. */

.lines {
  margin: 34px 0 0;
  padding: 22px 20px 24px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.lines-head {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lines-sub {
  margin: 6px 0 18px;
  font-size: 13.5px;
  color: var(--dim);
}

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

.line {
  display: grid;
  /* Fixed rather than auto so 112 and 14416 share an edge — the list is
     meant to be scanned down, not re-read row by row. */
  grid-template-columns: 5.4ch 1fr;
  grid-template-areas:
    "num who"
    "num what";
  align-items: baseline;
  column-gap: 14px;
  row-gap: 3px;
  min-height: var(--thumb);
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--panel-lift);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.line:hover,
.line:focus-visible { border-color: var(--line); background: #32195a; }

.line-num {
  grid-area: num;
  align-self: center;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: right;
  color: var(--paper);
}

/* Every row is now a single anchor, so the whole row is one thumb-sized
   tap target. The cybercrime website link moved out below the list rather
   than living inside a row and stealing part of its tap area. */
a.line-num {
  color: var(--paper);
  text-decoration: none;
}

a.line-num:hover { color: var(--gold); }

.lines-web {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

.line-who {
  grid-area: who;
  font-size: 15px;
  font-weight: 600;
}

.line-what {
  grid-area: what;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--dim);
}

.inline-link {
  display: inline-block;
  /* Padding, not height: an inline-block in running text cannot be made
     44px tall without wrecking the line, but this widens the strike area
     enough for a thumb without changing where the text sits. */
  padding: 11px 3px;
  margin: -11px 0;
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line);
}

.inline-link:hover { text-decoration-color: var(--paper); }

/* Repeat of the block at the end of the page. Quieter the second time —
   it is a reminder, not the headline. */
.lines-foot { margin-top: 44px; background: transparent; }

/* ---------- contents ---------- */

.jump { margin: 36px 0 0; }

.jump-head {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.jump-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: jump;
  display: grid;
  gap: 2px;
}

.jump-list li { counter-increment: jump; }

.jump-list a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--paper);
  text-decoration: none;
}

.jump-list a::before {
  content: counter(jump) ".";
  display: inline-block;
  width: 1.9em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.jump-list a:hover { color: var(--gold); }

/* ---------- essays ---------- */

.entry {
  margin: 52px 0 0;
  /* The back link is fixed and overlays the page, so a jumped-to heading
     has to clear it completely, not just mostly. */
  scroll-margin-top: 112px;
}

.entry-title {
  margin: 0 0 20px;
  font-size: clamp(25px, 6.4vw, 33px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.entry p {
  margin: 0 0 17px;
  font-size: 16.5px;
  line-height: 1.68;
  color: #ded0f2;
}

.entry .lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--paper);
}

.entry b, .entry strong { color: var(--paper); font-weight: 700; }

.sub {
  margin: 34px 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.plain {
  margin: 0 0 17px;
  padding: 0 0 0 20px;
  list-style: none;
  display: grid;
  gap: 11px;
}

.plain li {
  position: relative;
  font-size: 16.5px;
  line-height: 1.6;
  color: #ded0f2;
}

.plain li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0.62em;
  width: 7px;
  height: 2px;
  background: var(--dim);
}

.steps {
  margin: 0 0 17px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

/* Block, not grid. A step is a <strong> lead-in followed by a bare text
   node, and under `display: grid` that trailing text becomes a grid item
   of its own — squeezed into an implicit column and wrapped one word per
   line. The counter is positioned instead so the prose stays one flow. */
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 43px;
  min-height: 30px;
  font-size: 16.5px;
  line-height: 1.6;
  color: #ded0f2;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel-lift);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

/* The one sentence in a section that carries the mechanism. Set apart
   because it is the bit worth half-remembering. */
.mechanic {
  margin: 0 0 17px;
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 197, 49, 0.07);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--paper);
}

/* A number, inline, where the text has just made the case for calling it. */
.callout {
  margin: 24px 0;
  padding: 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--dim);
}

.callout-num {
  display: inline-flex;
  align-items: center;
  min-height: var(--thumb);
  margin: 0 10px 4px 0;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 197, 49, 0.12);
  border: 1px solid rgba(255, 197, 49, 0.45);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
}

.callout-num:hover { background: rgba(255, 197, 49, 0.2); color: var(--gold); }

/* The callout reads as "big number, then why" rather than a number
   floated into a paragraph. */
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

/* Closing line of a section. Lands the point without a summary heading. */
.callout .inline-link[href^="tel:"] {
  font-weight: 700;
  text-decoration-color: var(--gold);
}

.ground {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.62;
  color: var(--paper);
}

.quiet { color: var(--dim); font-size: 14.5px; line-height: 1.55; }

/* ---------- fold-aways ----------
 * The page has to be scannable in twenty seconds. Every sentence that is not
 * the answer lives under one of these. Native <details>: no JS, keyboard
 * reachable, and it still prints and still finds-in-page when closed in the
 * browsers that support that. The summary is a thumb-sized row, because a
 * twelve-year-old taps with a thumb. */

.more {
  margin: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--thumb);
  padding: 10px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--dim);
  cursor: pointer;
  list-style: none;
}

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

/* The caret is its own box so the label can wrap without the arrow being
   dragged along to a line of its own. */
.more summary::after {
  content: "\25BE";
  flex: none;
  font-size: 12px;
  color: var(--dim);
}

.more[open] summary::after { content: "\25B4"; }

.more summary:hover,
.more summary:focus-visible { color: var(--paper); }

.more-body { padding: 2px 0 16px; }

/* The folded prose keeps the entry's own type, so opening a panel reads as
   more of the same page rather than a different component. */
.more-body > :last-child { margin-bottom: 0; }
.more-body .ground { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- breathing ---------- */

.breath {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 11px;
}

.breath-step {
  margin: 0 !important;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  align-items: baseline;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--paper) !important;
}

.breath-n {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--volt);
  text-align: right;
}

.breath-again {
  margin: 4px 0 0 !important;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 13.5px !important;
  color: var(--dim) !important;
}

/* ---------- foot ---------- */

.foot {
  margin: 50px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.foot p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dim);
}

.foot-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
}

.foot-link:hover { color: var(--gold); }
