/* Leadership as a Second Language
   Paper, ink, and a teacher's red pencil. */

:root {
  --paper: #F6F7F4;
  --ink: #1D2940;
  --muted: #5E6677;
  --rule: #D8DCE2;
  --pencil: #B3261E;
  --wash: #ECEFF2;

  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --measure: 36rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141A26;
    --ink: #E6E8EC;
    --muted: #9AA3B2;
    --rule: #2C3445;
    --pencil: #F08A7E;
    --wash: #1B2332;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--pencil); }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; }

main, .masthead, .colophon {
  width: min(100% - 2.5rem, var(--measure));
  margin-inline: auto;
}

/* Masthead */
.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-block: 2rem 0;
  font-size: 1rem;
}
.wordmark { font-weight: 600; text-decoration: none; letter-spacing: -0.005em; }
.masthead nav { display: flex; gap: 1.25rem; }
.masthead nav a { text-decoration: none; color: var(--muted); }
.masthead nav a:hover { color: var(--pencil); }

/* The phrase: the one bold moment on the site */
.phrase { padding-block: clamp(4rem, 12vw, 7rem) 2.5rem; }
.phrase p { margin: 0; }

.said {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.said del {
  text-decoration: none;
  background-image: linear-gradient(var(--pencil), var(--pencil));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 100% 0.07em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.meant {
  margin-top: 1rem !important;
  color: var(--pencil);
  font-style: italic;
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  line-height: 1.3;
  display: flex;
  gap: 0.4em;
}

.gloss {
  margin-top: 2rem !important;
  font-size: 0.95rem;
  color: var(--muted);
}
.another {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.35rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.another:hover { color: var(--pencil); }

/* Strike draws across, then the correction appears. Plays once per phrase. */
@media (prefers-reduced-motion: no-preference) {
  .phrase.play .said del { animation: strike 0.7s 0.35s cubic-bezier(.6,0,.3,1) both; }
  .phrase.play .meant { animation: write 0.6s 1.05s ease-out both; }
}
@keyframes strike { from { background-size: 0 0.07em; } to { background-size: 100% 0.07em; } }
@keyframes write { from { opacity: 0; transform: translateY(0.2em); } to { opacity: 1; transform: none; } }

/* Intro */
.intro {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
.intro p { margin: 0 0 1rem; }
.byline { color: var(--muted); font-size: 1rem; }

/* Writing list */
.writing { padding-block: 3rem 0; }
.writing h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--muted);
}
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { border-top: 1px solid var(--rule); }
.entries li:last-child { border-bottom: 1px solid var(--rule); }
.entries a {
  display: grid;
  gap: 0.2rem;
  padding-block: 1.4rem;
  text-decoration: none;
}
.entry-kind { font-style: italic; color: var(--pencil); font-size: 0.95rem; }
.entry-title { font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.entries a:hover .entry-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.entry-summary { color: var(--muted); }
.entries time { font-size: 0.9rem; color: var(--muted); }

/* Posts */
.post { padding-block: clamp(3rem, 9vw, 5rem) 1rem; }
.post-head { margin-bottom: 2.5rem; }
.post-head .kind { margin: 0 0 0.5rem; font-style: italic; color: var(--pencil); }
.post-head h1 {
  font-size: clamp(2.1rem, 6.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.post-head time { color: var(--muted); font-size: 0.95rem; }

.prose > * + * { margin-top: 1.15em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 600;
  margin: 2.4em 0 0;
}
.prose h2 + * { margin-top: 0.6em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--pencil); }

/* "Try this week": a workbook exercise */
.prose blockquote {
  margin: 2.5em 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--wash);
  border-left: 3px solid var(--pencil);
}
.prose blockquote p { margin: 0; }
.prose blockquote strong { color: var(--pencil); font-weight: 500; font-style: italic; }

/* Footer + subscribe */
.colophon {
  margin-top: 3.5rem;
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--rule);
}
.subscribe h2 { font-size: 1.3rem; font-weight: 600; margin: 0; }
.subscribe p { margin: 0.25rem 0 1rem; color: var(--muted); font-size: 1rem; }
.subscribe label { position: absolute; left: -999px; }
.field { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.field input {
  flex: 1 1 14rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.field input:focus { border-color: var(--ink); outline: none; }
.field button {
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 1.1rem;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.field button:hover { background: var(--pencil); }
.muted { color: var(--muted); }
.fine { margin: 2.5rem 0 0; font-size: 0.9rem; color: var(--muted); }
