/* ThinkPivot content pages: contact, thinking, privacy + terms, 404.
   Loaded after styles.css and pages.css on those pages only.
   Tokens only (see DESIGN.md). Each page keeps its responsive rules in its own section. */

/* ============================ shared ============================== */

.page-contact .hero,
.page-thinking .hero,
.page-legal .hero { padding-top: 112px; }

/* ========================= contact.html =========================== */

.contact-hero__title { max-width: 11ch; }
.contact-body { padding-top: 88px; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  align-items: start;
}

.contact-card {
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 44px 44px 40px;
}

.contact-context {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px 0 10px; margin-bottom: 24px;
  border-radius: 999px;
  background: var(--t, var(--paper)); color: var(--d, var(--ink));
  font-size: 14px; font-weight: 400;
}
.contact-context[hidden] { display: none; }
.contact-context b { font-weight: 500; }
.contact-context .dot { background: var(--c, var(--ink)); }
.contact-context--find { --c: var(--find); --t: var(--find-tint); --d: var(--find-deep); }
.contact-context--convert { --c: var(--convert); --t: var(--convert-tint); --d: var(--convert-deep); }
.contact-context--operate { --c: var(--operate); --t: var(--operate-tint); --d: var(--operate-deep); }

.contact-form { display: grid; gap: 22px; }
.contact-form[hidden] { display: none; }
.contact-form__note { margin-bottom: -4px; }

.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; }

.contact-field { display: grid; gap: 8px; min-width: 0; }
.contact-input, .contact-check input { scroll-margin-top: 120px; }
.contact-label { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }

.contact-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 16px;            /* 16px keeps iOS from zooming on focus */
  line-height: 24px;
  letter-spacing: -0.01em;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.contact-input::placeholder { color: var(--muted); opacity: 1; }
.contact-input:hover { border-color: rgba(28, 26, 23, 0.32); }
.contact-input:focus { outline: none; }
.contact-input:focus-visible,
.contact-input:focus {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(224, 88, 42, 0.22);
}
.contact-textarea { min-height: 156px; resize: vertical; }

.contact-field.is-invalid .contact-input { border-color: var(--convert); background: var(--surface); }
.contact-error {
  font-size: 14px; line-height: 20px; color: var(--convert-deep);
  display: flex; align-items: flex-start; gap: 8px;
}
.contact-error:empty { display: none; }
.contact-error::before {
  content: "!"; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--convert-tint); color: var(--convert-deep);
  font-size: 11px; font-weight: 500; line-height: 1;
}

/* Honeypot: off-screen, never focusable, ignored by assistive tech */
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.contact-field--consent { padding-top: 4px; }
.contact-check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.contact-check input {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin: 3px 0 0;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--canvas);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.contact-check input::after {
  content: ""; width: 10px; height: 6px; margin-top: -2px;
  border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform 0.15s ease;
}
.contact-check input:checked { background: var(--ink); border-color: var(--ink); }
.contact-check input:checked::after { transform: rotate(-45deg) scale(1); }
.contact-check input:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.contact-field.is-invalid .contact-check input { border-color: var(--convert); }
.contact-check label { font-size: 15px; line-height: 24px; color: var(--ink-2); cursor: pointer; }
.contact-check label a { color: var(--ink); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.contact-check label a:hover { border-color: var(--ink); }

.contact-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.contact-submit { height: 48px; padding: 0 24px; font-size: 15px; cursor: pointer; border: 0; position: relative; }
.contact-submit:disabled { cursor: progress; }
.contact-submit.is-loading { background: var(--ink-2); }
.contact-submit.is-loading:hover { background: var(--ink-2); }
.contact-submit.is-loading .arrow { display: none; }
.contact-spinner { display: none; width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: contact-spin 0.8s linear infinite; }
.contact-submit.is-loading .contact-spinner { display: inline-block; }
@keyframes contact-spin { to { transform: rotate(360deg); } }
.contact-status { font-size: 14px; line-height: 20px; color: var(--muted); }
.contact-status:empty { display: none; }

.contact-alert {
  border-radius: var(--r-card);
  border: 1px solid var(--convert-tint);
  background: var(--tint-peach);
  padding: 16px 18px;
  font-size: 15px; line-height: 23px; color: var(--ink);
}
.contact-alert[hidden] { display: none; }
.contact-alert__alt { margin-top: 4px; color: var(--ink-2); }
.contact-alert a { color: var(--ink); border-bottom: 1px solid currentColor; font-weight: 500; }

.contact-success { padding: 12px 0 8px; max-width: 34ch; }
.contact-success[hidden] { display: none; }
.contact-success__mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--operate-tint); color: var(--operate-deep);
}
.contact-success .h3 { margin-top: 24px; text-wrap: balance; }
.contact-success .h3:focus { outline: none; }
.contact-success__line { margin-top: 16px; }
.contact-success__line a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.contact-success__line a:hover { border-color: var(--ink); }

/* Side panel: soft lilac, the one tinted block on the page */
.contact-side {
  border-radius: var(--r-panel);
  background: var(--tint-lilac);
  padding: 40px 36px 36px;
  position: sticky; top: 88px;
}
.contact-side__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; line-height: 20px; font-weight: 500; color: var(--lilac-deep);
}
.contact-side__title::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: currentColor; }
.contact-steps { margin-top: 24px; display: grid; }
.contact-steps li {
  display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: baseline;
  padding: 18px 0;
  border-top: 1px dashed rgba(75, 69, 102, 0.22);
}
.contact-steps li:first-child { border-top: 0; padding-top: 4px; }
.contact-steps__n {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: rgba(255, 255, 255, 0.75); color: var(--lilac-deep);
  font-family: var(--mono); font-size: 12px; line-height: 1;
  transform: translateY(-2px);
}
.contact-steps p { font-size: 18px; line-height: 26px; letter-spacing: -0.018em; color: var(--ink); text-wrap: pretty; }

.contact-direct { margin-top: 20px; padding-top: 24px; border-top: 1px solid rgba(75, 69, 102, 0.16); }
.contact-direct__label { font-size: 14px; color: var(--muted); }
.contact-direct__email {
  display: inline-block; margin-top: 6px;
  font-size: 20px; line-height: 28px; letter-spacing: -0.02em; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid rgba(28, 26, 23, 0.2); transition: border-color 0.2s ease;
  overflow-wrap: anywhere;
}
.contact-direct__email:hover { border-color: var(--ink); }
.contact-direct__social { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.contact-direct__social a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.7);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background-color 0.2s ease;
}
.contact-direct__social a:hover { background: #fff; }

@media (max-width: 900px) {
  .page-contact .hero, .page-thinking .hero, .page-legal .hero { padding-top: 72px; }
  .contact-body { padding-top: 56px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { position: static; }
}
@media (max-width: 640px) {
  .page-contact .hero, .page-thinking .hero, .page-legal .hero { padding-top: 48px; }
  .contact-body { padding-top: 40px; }
  .contact-card { padding: 28px 20px 24px; border-radius: 16px; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-submit { width: 100%; }
  .contact-side { padding: 28px 20px 24px; border-radius: 16px; }
  .contact-steps p { font-size: 17px; line-height: 25px; }
}

/* ========================= thinking.html ========================== */

.thinking-hero__title { max-width: 12ch; }

.thinking-banner-wrap { padding-top: 72px; }
.thinking-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 22px 22px 26px;
  border-radius: var(--r-panel);
  background: var(--tint-lilac);
}
.thinking-banner__mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.75); color: var(--lilac-deep);
}
.thinking-banner__text { font-size: 19px; line-height: 27px; letter-spacing: -0.016em; color: var(--ink-2); text-wrap: balance; }
.thinking-banner__text b { font-weight: 500; color: var(--ink); }

.thinking-index-section { padding-top: 112px; }
.thinking-label { color: var(--ink); }
.thinking-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.thinking-card {
  position: relative;
  height: 100%; min-height: 236px;
  display: flex; flex-direction: column;
  padding: 26px 24px 24px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.thinking-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--c); transform: scaleX(0.12); transform-origin: left;
  transition: transform 0.45s ease;
}
.thinking-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(28, 26, 23, 0.06), 0 8px 24px rgba(28, 26, 23, 0.06); }
.thinking-card:hover::before { transform: scaleX(1); }
.thinking-card__meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.thinking-card__title { margin-top: 18px; font-size: 22px; line-height: 29px; letter-spacing: -0.024em; font-weight: 500; color: var(--ink); text-wrap: balance; }
.thinking-card__more { margin-top: auto; padding-top: 28px; display: inline-flex; gap: 6px; font-size: 14px; font-weight: 500; color: var(--c); }
.thinking-card__more .arrow { transition: transform 0.2s ease; }
.thinking-card:hover .thinking-card__more .arrow { transform: translateY(3px); }

/* Essays: one reading column, about 68ch, generous leading */
.thinking-essays { padding-top: 120px; }
.essay {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 20px;
  padding-block: 72px 80px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 64px;
}
.essay:first-child { border-top-color: var(--ink); }
.essay__side { position: sticky; top: 104px; align-self: start; }
.essay__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; line-height: 20px; font-weight: 500; color: var(--c);
}
.essay__kicker::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: currentColor; }
.essay__n { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--muted); }
.essay__by { margin-top: 4px; font-size: 14px; color: var(--muted); }
.essay__date { margin-top: 4px; font-size: 13px; line-height: 19px; color: var(--muted); max-width: 22ch; }

.essay__body { max-width: 68ch; }
.essay__title {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.essay__dek {
  margin-top: 24px;
  font-size: 21px; line-height: 32px; letter-spacing: -0.016em;
  color: var(--ink-2);
  text-wrap: pretty;
  padding-left: 18px;
  border-left: 2px solid var(--c);
}
.essay__text { margin-top: 40px; }
.essay__text p {
  font-size: 18.5px; line-height: 1.72; letter-spacing: -0.008em;
  color: var(--ink-2);
  text-wrap: pretty;
  hanging-punctuation: first;
}
.essay__text p + p { margin-top: 1.15em; }
.essay__foot {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px dashed var(--rule);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.essay__top { font-size: 14px; color: var(--muted); transition: color 0.2s ease; }
.essay__top:hover { color: var(--ink); }

.thinking-latest { padding-top: 40px; }
.thinking-latest[hidden] { display: none; }
.thinking-latest__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.thinking-latest__list { border-top: 1px solid var(--ink); }
.thinking-post {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr) auto; gap: 20px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: color 0.2s ease;
}
.thinking-post__date { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.thinking-post__title { grid-column: 2; font-size: 21px; line-height: 28px; letter-spacing: -0.022em; color: var(--ink); font-weight: 500; text-wrap: balance; }
.thinking-post__go { color: var(--lilac-deep); transition: transform 0.2s ease; }
.thinking-post:hover .thinking-post__title { color: var(--lilac-deep); }
.thinking-post:hover .thinking-post__go { transform: translate(2px, -2px); }

@media (max-width: 900px) {
  .thinking-banner-wrap { padding-top: 48px; }
  .thinking-index-section { padding-top: 80px; }
  .thinking-cards { grid-template-columns: 1fr; gap: 12px; }
  .thinking-card { min-height: 0; }
  .thinking-essays { padding-top: 88px; }
  .essay { grid-template-columns: 1fr; gap: 24px; padding-block: 48px 56px; }
  .essay__side { position: static; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .essay__n, .essay__by, .essay__date { margin-top: 0; }
  .essay__date { max-width: none; }
  .essay__by { display: none; }
}
@media (max-width: 640px) {
  .thinking-banner { grid-template-columns: auto 1fr; padding: 20px; gap: 14px 16px; border-radius: 16px; }
  .thinking-banner__text { font-size: 17px; line-height: 25px; }
  .thinking-banner__btn { grid-column: 1 / -1; width: 100%; }
  .thinking-card { padding: 22px 20px 20px; }
  .thinking-card__title { font-size: 20px; line-height: 27px; }
  .thinking-card__more { padding-top: 20px; }
  .essay__dek { font-size: 19px; line-height: 29px; padding-left: 14px; }
  .essay__text { margin-top: 32px; }
  .essay__text p { font-size: 17px; line-height: 1.7; }
  .thinking-post { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 18px 0; }
  .thinking-post__date { grid-column: 1; }
  .thinking-post__title { grid-column: 1; grid-row: 2; font-size: 18px; line-height: 25px; }
  .thinking-post__go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* ================== privacy.html + terms.html ===================== */

.legal-eyebrow { color: var(--ink); }
.legal-title { max-width: 14ch; }
.legal-body { padding-top: 96px; }
.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 20px;
  border-top: 1px solid var(--ink);
  padding-top: 40px;
}
.legal-toc { position: sticky; top: 104px; align-self: start; font-size: 14px; line-height: 20px; }
.legal-toc__label { color: var(--muted); }
.legal-toc ol { margin-top: 14px; display: grid; gap: 2px; counter-reset: toc; }
.legal-toc li { counter-increment: toc; }
.legal-toc li a {
  display: flex; gap: 10px; padding: 6px 0; color: var(--ink-2);
  transition: color 0.2s ease;
}
.legal-toc li a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 1px; }
.legal-toc li a:hover { color: var(--ink); }
.legal-toc__other { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--rule); color: var(--muted); }
.legal-toc__other a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.legal-toc__other a:hover { border-color: var(--ink); }

.legal-doc { max-width: 68ch; }
.legal-section { padding-bottom: 36px; scroll-margin-top: 88px; }
.legal-section + .legal-section { padding-top: 36px; border-top: 1px solid var(--line); }
.legal-section__h {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 24px; line-height: 30px; letter-spacing: -0.024em; color: var(--ink);
}
.legal-section__n { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.02em; color: var(--muted); }
.legal-section p { margin-top: 14px; font-size: 18px; line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }
.legal-section a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.legal-section a:hover { border-color: var(--ink); }

@media (max-width: 900px) {
  .legal-body { padding-top: 64px; }
  .legal-grid { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; }
  .legal-toc ol { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}
@media (max-width: 640px) {
  .legal-body { padding-top: 48px; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-section__h { font-size: 21px; line-height: 27px; }
  .legal-section p { font-size: 17px; }
}

/* =========================== 404.html ============================= */

.nf-hero { padding-top: 40px; }
.nf-panel {
  border-radius: var(--r-panel);
  padding: 72px 56px 64px;
  min-height: 500px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.05);
  overflow: hidden;
}
.nf-code {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--convert-deep);
}
.nf-title { margin-top: auto; padding-top: 96px; max-width: 10ch; }
.nf-sub { margin-top: 24px; max-width: 34ch; }
.nf-actions { margin-top: 32px; }
.nf-actions .btn--ghost { background: rgba(255, 255, 255, 0.6); }

@media (max-width: 900px) {
  .nf-panel { padding: 48px 32px 40px; min-height: 480px; }
}
@media (max-width: 640px) {
  .nf-hero { padding-top: 20px; }
  .nf-panel { padding: 28px 20px 28px; border-radius: 16px; min-height: 0; }
  .nf-title { padding-top: 180px; }
}
