/* Known — marketing and article styles.
 *
 * Direction A ("warm editorial"), locked August 1, 2026. See
 * Known_Website_Revamp_Brief_2026-08-01.md for the full spec and the
 * contrast-review history behind the two accent values below.
 *
 * This stylesheet is used ONLY by the pre-rendered static pages
 * (homepage, resources index, article pages, about). The chat app has
 * its own style.css and is deliberately not touched by this file —
 * they share a palette, not a stylesheet.
 */

:root {
  --paper: #f7f3ec;
  --ink: #241e18;
  --secondary: #6b5e4e;

  /* Two accent values on purpose, not a mistake.
   * --clay-decorative is the original picked colour and is only ever used
   * for large, non-text decoration (rules, oversized display glyphs).
   * --clay is the darkened variant required for anything a person has to
   * read: it clears 4.5:1 as label text on a card (5.08:1) and carries
   * white button text at 5.16:1. The original failed both at 4.27 and
   * 3.84. Same class of failure the July 31 accessibility audit caught on
   * the live beta banner, so it is fixed here at the token level rather
   * than left for a later patch. */
  --clay: #a35b1a;
  --clay-decorative: #b5651d;
  --on-clay: #ffffff;

  --card: #fffdfa;
  /* Darkened from the originally-picked #e4dbca, which measured 1.35:1
   * against the card surface. WCAG 1.4.11 wants 3:1 for the boundary of a
   * UI component; this measures 3.70:1. */
  --card-border: #898379;
  --hairline: #d9cfbd;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 68ch;
  --shell: 1080px;
}

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

/* The `hidden` attribute only works via a user-agent `display: none`, which
 * any author `display` rule outranks. `.card` sets `display: flex`, so
 * hiding a filtered-out card silently did nothing and search results looked
 * broken while claiming zero matches. Needs to win over every layout rule
 * here, hence the !important. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Skip link. The July 31 audit found no landmarks and no way past the
 * header; both are fixed here. Visible the moment it receives focus. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  border-bottom: 1px solid var(--hairline);
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 15px;
  /* 44px min tap target — the audit flagged 14.5px-tall targets on the
   * current live site. Padding does the work so the visual text stays
   * small. */
  padding: 12px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
}
.site-nav a:hover {
  color: var(--ink);
  background: rgba(36, 30, 24, 0.05);
}

/* -- hero -------------------------------------------------------------- */

.hero {
  padding: 76px 0 60px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.hero-sub {
  font-size: 19px;
  color: var(--secondary);
  max-width: 54ch;
  margin: 0 0 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 26px;
  background: var(--clay);
  color: var(--on-clay);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}
.cta:hover {
  background: #8d4e16;
}
.cta-note {
  font-size: 14px;
  color: var(--secondary);
  margin: 12px 0 0;
}

/* -- resource cards ---------------------------------------------------- */

.section {
  padding: 8px 0 72px;
}
/* Also used on <h2>, so the font-weight reset matters — otherwise the
   browser's bold heading default fights the small-caps label look. */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 18px;
}
.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section-intro {
  font-size: 15px;
  color: var(--secondary);
  margin: -8px 0 20px;
}

/* -- search ------------------------------------------------------------ */

/* Hidden in the HTML and revealed by search.js. If the script never runs,
 * the full article list is still on the page and nothing looks broken. */
.search {
  margin: 0 0 12px;
  max-width: 520px;
}
.search input[type='search'] {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 16px; /* 16px stops iOS Safari zooming in on focus */
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.search input[type='search']::placeholder {
  color: var(--secondary);
}
.search-status {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 16px;
  min-height: 1.4em;
}
.search-empty {
  font-size: 16px;
  color: var(--secondary);
  margin: 24px 0 0;
}
.search-empty a {
  color: var(--clay);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-topic {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0;
}
.card h2,
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}
.card h2 a,
.card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.card h2 a:hover,
.card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card p {
  margin: 0;
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.6;
}

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

.article {
  padding: 56px 0 72px;
}
.article-inner {
  max-width: var(--measure);
}
/* The pillar page carries a 10-card grid, not just prose, so it gets more
   horizontal room than a normal article while keeping the same intro and
   CTA treatment as everything else. */
.article-inner--wide {
  max-width: 1080px;
}

/* Ten-outcome grid on the "why you keep getting overlooked" pillar page.
   Plain semantic list markup underneath the card styling, real <h2> per
   card, real <a> links, nothing rendered by or hidden behind JS, so a
   crawler or AI-answer engine reads exactly what a person sees. */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 32px 0;
}
.outcome-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}
.outcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--clay-decorative);
}
.outcome-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--clay);
  margin: 4px 0 10px;
}
.outcome-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 8px;
}
.outcome-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--secondary);
  margin: 0 0 16px;
}
.outcome-links {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.outcome-links a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}
.outcome-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--clay);
}

.article h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.article-meta {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}
.article-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.25;
  margin: 44px 0 14px;
}
.article-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  margin: 32px 0 10px;
}
.article-body p {
  margin: 0 0 20px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--clay-decorative);
  color: var(--secondary);
  font-style: italic;
}
.article-body a {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-cta {
  margin-top: 56px;
  margin-bottom: 32px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}
.article-cta-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 10px;
}
.article-cta p {
  margin: 0 0 18px;
  color: var(--secondary);
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--secondary);
}
.site-footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--secondary);
  padding: 8px 0;
  display: inline-block;
}

/* -- shared ------------------------------------------------------------ */

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .site-header .shell {
    min-height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* -- podcast -------------------------------------------------------------
 * Added for the Overlooked podcast pages (/podcast/, /podcast/<slug>/).
 * Reuses existing tokens and the .card/.cta/.article-cta language rather
 * than inventing a new visual system for one section.
 */

.podcast-hero-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-top: 8px;
}

.podcast-hero-col {
  flex: 1 1 340px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

/* Descriptions run different lengths in EN vs TC (and will keep drifting
 * as copy changes) -- .podcast-hero-row already stretches both columns to
 * equal height, so pinning the button row to the bottom of its column
 * keeps both rows landing on the same line above the embed/episode list,
 * regardless of how many lines either description wraps to. */
.podcast-hero-col .listen-row {
  margin-top: auto;
}

.podcast-hero-col + .podcast-hero-col {
  border-left: 1px solid var(--hairline);
  padding-left: 32px;
}

@media (max-width: 640px) {
  .podcast-hero-col + .podcast-hero-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--hairline);
    padding-top: 24px;
  }
}

.podcast-hero-col h2 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0 0 8px;
}

.podcast-hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.podcast-cover {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
  object-fit: cover;
}

.listen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.listen-row a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 13px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14px;
}

.listen-row a:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.podcast-embed {
  margin: 20px 0 28px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.podcast-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.episode-card-index {
  font-family: var(--mono);
  color: var(--secondary);
  font-size: 13px;
}

.transcript-heading {
  margin-top: 32px;
}


.podcast-season {
  margin-top: 40px;
}

.podcast-season-title {
  margin-bottom: 4px;
}

.podcast-season-desc {
  color: var(--secondary);
  margin-top: 0;
  margin-bottom: 16px;
}
