/* Out of Office — blog. Read mode inside the switch's world:
   paper, white surfaces, ink, circles and pills. Green stays the out state only. */

.nav-links a[aria-current] { color: var(--text); }

/* ---------- listing ---------- */

.blog-head,
.blog-list,
.post-head,
.post-body,
.post-more {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.blog-head { padding-block: clamp(56px, 8vw, 120px) clamp(40px, 5vw, 64px); }
.blog-head .display { font-size: clamp(3rem, 7.2vw, 6rem); }
.blog-head .lead { max-width: 46ch; }

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: var(--section-y);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 30px 30px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card:focus-within { outline: 3px solid var(--ink); outline-offset: 4px; }
.card h2, .card h3 {
  font-size: 1.5rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.card h2 a, .card h3 a { text-decoration: none; }
.card h2 a:focus-visible, .card h3 a:focus-visible { outline: none; }
/* the whole card is the link */
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { color: var(--text-2); text-wrap: pretty; }
.card .go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  font-weight: 600;
}
.card .go svg { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform 320ms var(--ease); }
.card:hover .go svg { transform: rotate(-90deg) translateY(3px); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.meta > * + *::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 14px;
  vertical-align: middle;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}

/* the pillar guide gets the full width and the display pair */
.card--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: end;
  padding: clamp(36px, 4.5vw, 56px);
}
.card--lead h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.card--lead h2 .thin { display: block; font-weight: 200; letter-spacing: -0.035em; }
.card--lead .card-copy { display: flex; flex-direction: column; gap: 14px; }
.card--lead p { font-size: 1.125rem; }

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

.post-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  max-width: 880px;
  padding-block: clamp(40px, 6vw, 88px) clamp(32px, 4vw, 48px);
}
.crumbs { display: flex; gap: 10px; font-size: .9375rem; font-weight: 500; color: var(--text-2); }
.crumbs a { text-decoration: none; border-radius: 6px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs li + li::before { content: "›"; margin-right: 10px; }
.post-head h1 {
  margin-top: 28px;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.post-head h1 .thin { display: block; font-weight: 200; letter-spacing: -0.035em; }
.post-head .lead { max-width: 58ch; margin-top: 28px; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); color: var(--text); }
.post-head .meta { margin-top: 24px; }
.meta > .by { flex-basis: 100%; color: var(--text); }
.meta > .by + *::before { content: none; }

.post-body {
  max-width: 880px;
  padding-bottom: clamp(72px, 9vw, 128px);
  font-size: 1.125rem;
  line-height: 1.65;
}
.post-body > * { max-width: 68ch; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
  margin-top: 2.6em;
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.post-body h3 {
  margin-top: 2em;
  font-size: 1.3125rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.post-body h2 + *, .post-body h3 + * { margin-top: .6em; }
.post-body p, .post-body li { text-wrap: pretty; }
.post-body a:not(.store) { text-decoration-color: rgb(var(--shade) / .35); }
.post-body a:not(.store):hover { text-decoration-color: currentColor; }
.post-body strong { font-weight: 650; }
.post-body ul { display: grid; gap: .5em; padding-left: 1.3em; list-style: disc; }
.post-body ul li::marker { color: var(--text-2); }

/* the short answer, up front, for skimmers and search */
.answer {
  padding: 28px 30px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.answer h2 { margin-top: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.answer p { margin-top: 8px; }

/* on this page */
.toc { padding: 24px 30px; border-radius: 28px; background: var(--track); }
.toc h2 { margin-top: 0; font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: #585855; }
.toc ol { display: grid; gap: 6px; margin-top: 10px; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 12px; font-size: 1.0625rem; }
.toc li::before { content: counter(toc); min-width: 1ch; color: #585855; font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* signature: iOS menu paths set as a trail of pills, the way you tap through them */
.path { display: inline; }
.path span {
  position: relative;
  display: inline-block;
  line-height: 1.2;
  vertical-align: .08em;
  margin-block: 2px;
  padding: 3px 11px 4px;
  border-radius: 999px;
  background: var(--track);
  font-size: .875em;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.path span + span { margin-left: 16px; }
.path span + span::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 5px;
  height: 5px;
  border: solid var(--text-2);
  border-width: 1.75px 1.75px 0 0;
  transform: translateY(-50%) rotate(45deg);
}

/* steps are a real sequence, so they're numbered */
.steps-list { display: grid; gap: 14px; padding: 0; list-style: none; counter-reset: step; }
.steps-list > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  min-height: 32px;
}
.steps-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .08em;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: .9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* honest limits */
.limit {
  padding: 24px 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.limit > b {
  display: block;
  margin-bottom: 6px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* comparison table */
.table-wrap {
  max-width: none !important;
  margin-inline: calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1rem;
  line-height: 1.45;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
}
/* corners on the cells, so the caption isn't clipped by the table */
.compare thead th:first-child { border-top-left-radius: 28px; }
.compare thead th:last-child { border-top-right-radius: 28px; }
.compare tbody tr:last-child > :first-child { border-bottom-left-radius: 28px; }
.compare tbody tr:last-child > :last-child { border-bottom-right-radius: 28px; }
.compare caption { padding-bottom: 12px; text-align: left; font-size: .9375rem; color: var(--text-2); }
.compare th, .compare td { padding: 16px 20px; text-align: left; vertical-align: top; }
.compare thead th { font-size: .875rem; font-weight: 600; color: var(--text-2); }
.compare tbody th { font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.compare tbody tr:nth-child(odd) { background: var(--paper); }
.compare tbody tr:last-child { background: var(--ink); color: var(--paper); }
.compare .yes, .compare .no, .compare .part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.compare .yes::before, .compare .no::before, .compare .part::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.compare .yes::before { background: currentColor; }
.compare .part::before { box-shadow: inset 0 0 0 2.5px currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.compare .no::before { box-shadow: inset 0 0 0 2.5px currentColor; }
.compare td small { display: block; margin-top: 2px; font-size: .875rem; font-weight: 400; opacity: .72; }

/* the product, when it's the answer */
.pitch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 24px;
  align-items: center;
  padding: 28px 30px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pitch img { align-self: start; width: 72px; height: 72px; border-radius: 17px; }
.pitch p { margin: 0; }
.pitch p b { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.pitch .pitch-go { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* sources */
.sources { font-size: 1rem; color: var(--text-2); }
.sources ul { margin-top: 8px; }

/* FAQ reuses the home page's details, stacked */
.post-body .faq {
  display: block;
  width: auto;
  padding: 0;
}
.post-body .faq-list { margin-top: 18px; }
.post-body .faq summary { font-size: 1.125rem; }
.post-body .faq details p { font-size: 1.0625rem; }

/* keep reading */
.post-more { padding-block: 0 var(--section-y); }
.post-more > h2 {
  margin-bottom: 24px;
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.post-more .blog-list { width: auto; padding: 0; }

/* the close on posts: no switch here, just the line and the button */
.close--post .display--close { margin-top: 36px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .card--lead { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 760px) {
  .blog-list { grid-template-columns: 1fr; }
  .card { padding: 28px 24px 26px; border-radius: 28px; }
  .card--lead { padding: 32px 24px; }
  .post-body { font-size: 1.0625rem; }
  .answer, .limit, .pitch { padding: 22px; }
  .toc { padding: 22px; }
  .steps-list > li { padding-left: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card .go svg { transition: none; }
  .card:hover { transform: none; }
}

/* Legal pages: long contents list in two columns */
.legal .toc li::before { min-width: 2ch; text-align: right; }
@media (min-width: 761px) {
  .legal .toc ol { display: block; columns: 2; column-gap: 32px; }
  .legal .toc li { break-inside: avoid; margin-bottom: 6px; }
}
