/* Public acquisition pages (guides, domain clusters). Standalone: these pages
   never load the app stylesheet. Tokens mirror styles.css :root so the public
   site and the homepage read as one brand. Light presentation only, like the
   rest of the public site. */

:root {
  --bg: #f5f1e8;
  --paper: #fbf8f1;
  --surface: #fffdf8;
  --surface-muted: #ebe2d2;
  --ink: #23251f;
  --body: #34362f;
  --muted: #62645b;
  --line: #d8cfbe;
  --line-soft: rgba(216, 207, 190, 0.7);
  --green: #2f4a39;
  --green-deep: #263d30;
  --green-soft: #dfe7da;
  --terracotta: #a96148;
  --amber: #bf9140;
  --sage: #8d9a7d;
  --accent: var(--green);
  --accent-soft: var(--green-soft);
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --arabic: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, "Arabic Typesetting", serif;
  --content: 1120px;
  --measure: 690px;
  --gutter: clamp(16px, 4vw, 48px);
  --shadow: 0 24px 60px rgba(52, 48, 39, 0.09);
  --soft-shadow: 0 12px 30px rgba(52, 48, 39, 0.06);
}

body[data-domain="guitar"] { --accent: var(--terracotta); --accent-soft: #f1e2d9; }
body[data-domain="arabic"] { --accent: #8a6a2c; --accent-soft: #f2e8d2; }
body[data-domain="running"] { --accent: #56663f; --accent-soft: #e4e9d9; }
body[data-domain="language"],
body[data-domain="coding"],
body[data-domain="fitness"],
body[data-domain="guides"] { --accent: var(--green); --accent-soft: var(--green-soft); }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background:
    linear-gradient(90deg, rgba(35, 37, 31, 0.022) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper) 0%, var(--bg) 60%, #f0eadf 100%);
  background-size: 44px 44px, 100% 100%;
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, figure { margin-top: 0; }

:focus-visible { outline: 3px solid rgba(47, 74, 57, 0.45); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: 14px auto 0;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(221, 212, 196, 0.85);
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 0 12px 36px rgba(52, 48, 39, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}
.brand-icon { width: 38px; height: 38px; flex: 0 0 auto; }

.main-nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 0.95rem; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: var(--green); }
.main-nav a[aria-current="page"],
.main-nav a[aria-current="true"] { color: var(--ink); font-weight: 650; }

.nav-cta,
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 720;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, background 220ms ease;
}
.nav-cta { min-height: 42px; padding: 0 18px; background: var(--ink); color: #fffaf0; font-size: 0.93rem; }
.button { padding: 0 24px; font-size: 1rem; }
.button:hover, .nav-cta:hover { transform: translateY(-1px); }
.button-primary {
  background: var(--green);
  color: #fffaf0;
  box-shadow: 0 16px 34px rgba(48, 76, 59, 0.24), inset 0 1px 0 rgba(255, 253, 248, 0.18);
}
.button-primary:hover { background: var(--green-deep); }
/* Older pages still mark secondary actions as buttons; they render as quiet
   text links so a page never shows three equal-weight buttons. */
.button-secondary {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--green);
  font-weight: 650;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: rgba(47, 74, 57, 0.3);
  text-underline-offset: 0.24em;
}
.button-secondary:hover { transform: none; text-decoration-color: currentColor; }

/* --- Page frame --------------------------------------------------------- */

.guide-shell {
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 0 0;
}

.guide-article { max-width: none; }

.crumbs { margin: 0 0 clamp(22px, 4vw, 36px); color: var(--muted); font-size: 0.88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: rgba(98, 100, 91, 0.55); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 0.2em; }
.crumbs [aria-current="page"] { color: var(--ink); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

.guide-article h1 {
  max-width: 17ch;
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.guide-lede {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--body);
  font-size: clamp(1.14rem, 1.9vw, 1.3rem);
  line-height: 1.6;
}

.page-hero { display: grid; gap: clamp(28px, 5vw, 56px); align-items: end; margin-bottom: clamp(36px, 6vw, 64px); }
.page-hero.has-aside { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.9fr); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; }
.hero-facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--accent); }

/* Prose column. Sections keep a readable measure; wide components break out. */
.guide-article > section,
.guide-article > .prose {
  max-width: var(--measure);
  margin: 0 0 clamp(34px, 5vw, 52px);
}
.guide-article h2 { margin: 0 0 14px; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.12; }
.guide-article h3 { margin: 26px 0 8px; font-size: 1.28rem; line-height: 1.25; }
.guide-article p { margin-bottom: 1em; }
.guide-article ul, .guide-article ol { margin: 0 0 1em; padding-left: 1.25em; }
.guide-article li { margin-bottom: 0.45em; }
/* Component lists own their layout; only prose lists are indented. */
.guide-article .crumbs ol,
.guide-article .domain-chips,
.guide-article .hero-facts,
.guide-article .record-steps,
.guide-article .rule-list,
.guide-article .related-grid { padding-left: 0; }
.guide-article .crumbs li,
.guide-article .domain-chips li,
.guide-article .hero-facts li { margin-bottom: 0; }
.guide-article li::marker { color: var(--accent); }
.guide-article strong { color: var(--ink); font-weight: 680; }
.guide-article section a:not(.button):not(.card-link),
.guide-article .prose a:not(.button):not(.card-link) {
  color: var(--green);
  text-decoration-color: rgba(47, 74, 57, 0.35);
  text-underline-offset: 0.2em;
}

/* Arabic samples: always marked lang="ar" dir="rtl" in the markup. */
[lang="ar"] { font-family: var(--arabic); font-size: 1.14em; line-height: 1.5; letter-spacing: 0; }
.translit { color: var(--muted); font-style: italic; }

/* --- Domain chips ------------------------------------------------------- */

.domain-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(26px, 4vw, 40px); padding: 0; list-style: none; }
.domain-chips a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.domain-chips a:hover { border-color: var(--green); color: var(--green); }
.domain-chips a[aria-current="page"],
.domain-chips a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* --- Progression record (the worked example) ---------------------------- */

.record-card {
  position: relative;
  max-width: 760px;
  margin: 0 0 clamp(36px, 5vw, 56px);
  padding: clamp(20px, 3.4vw, 32px);
  border: 1px solid rgba(216, 207, 190, 0.95);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.page-hero .record-card { margin: 0; }
.record-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 22px 0 0 22px;
  background: var(--accent);
  opacity: 0.8;
}
.record-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.record-goal { margin: 0 0 6px; color: var(--muted); font-size: 0.92rem; }
.record-goal strong { color: var(--ink); font-weight: 680; }
.record-prompt { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.record-prompt .translit { display: block; margin-top: 2px; font-size: 0.9rem; font-weight: 400; }
.record-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.record-steps li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.record-steps li::marker { content: none; }
.record-when { color: var(--muted); font-size: 0.84rem; font-weight: 650; line-height: 1.5; }
.record-result { color: var(--ink); font-weight: 680; line-height: 1.4; }
.record-result small { color: var(--muted); font-weight: 500; }
.record-decision { grid-column: 2; color: var(--body); font-size: 0.95rem; line-height: 1.5; }
.record-steps li.is-held .record-result { color: var(--green); }
.record-next {
  display: grid;
  gap: 2px;
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-deep);
}
.record-next span { font-size: 0.76rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.record-next strong { font-size: 1.04rem; font-weight: 700; line-height: 1.4; }
.record-note { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

/* --- Decision table (a rule, stated as rows) ---------------------------- */

.rule-list { display: grid; gap: 10px; margin: 0 0 1em; padding: 0; list-style: none; }
.rule-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 4px 18px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
}
.rule-list li::marker { content: none; }
.rule-if { color: var(--ink); font-weight: 650; }
.rule-then { color: var(--body); }

/* --- Choice cards (hub pages) ------------------------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: none; margin: 18px 0 0; }
.guide-article > section.wide { max-width: none; }
.choice-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}
.choice-card h3 { margin: 0; font-size: 1.32rem; }
.choice-card p { margin: 0; color: var(--body); font-size: 0.97rem; line-height: 1.6; }
.choice-card .sample { color: var(--ink); }
.choice-card .card-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; padding-top: 10px; }
.card-link { color: var(--green); font-weight: 680; text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.card-kicker { color: var(--accent); font-size: 0.74rem; font-weight: 780; letter-spacing: 0.11em; text-transform: uppercase; }

/* Older hub markup. */
.guide-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 18px 0 0; }
.guide-card-link {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--soft-shadow);
  transition: border-color 200ms ease, transform 200ms ease;
}
.guide-card-link:hover { border-color: var(--green); transform: translateY(-1px); }
.guide-card-link span { color: var(--accent); font-size: 0.74rem; font-weight: 780; letter-spacing: 0.1em; text-transform: uppercase; }
.guide-card-link strong { color: var(--ink); font-family: var(--serif); font-size: 1.22rem; font-weight: 500; line-height: 1.2; }
.guide-card-link p { margin: 0; color: var(--body); font-size: 0.95rem; line-height: 1.55; }

/* --- Calls to action ---------------------------------------------------- */

.inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  max-width: 760px;
  margin: 0 0 clamp(36px, 5vw, 52px);
  padding: 18px 20px 18px 22px;
  border: 1px solid rgba(47, 74, 57, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(223, 231, 218, 0.9), rgba(255, 253, 248, 0.92));
}
.inline-cta p { flex: 1 1 18rem; margin: 0; color: var(--ink); font-size: 1.02rem; line-height: 1.5; }
.inline-cta p strong { display: block; font-family: var(--serif); font-size: 1.28rem; font-weight: 500; }

.guide-cta {
  max-width: none !important;
  margin: clamp(20px, 4vw, 40px) 0 0 !important;
  padding: clamp(26px, 5vw, 48px);
  border-radius: 26px;
  background: var(--ink);
  color: rgba(255, 250, 240, 0.82);
}
.guide-cta h2 { max-width: 20ch; color: #fffaf0; font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.08; }
.guide-cta p { max-width: 38rem; color: rgba(255, 250, 240, 0.82); }
.guide-cta .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 22px; }
.guide-cta .button-primary { background: #fffaf0; color: var(--ink); box-shadow: none; }
.guide-cta .button-primary:hover { background: #fff; }
.guide-cta .button-secondary { color: rgba(255, 250, 240, 0.9); text-decoration-color: rgba(255, 250, 240, 0.35); }

/* --- Related ------------------------------------------------------------ */

.related { max-width: none !important; margin-top: clamp(40px, 6vw, 64px) !important; }
.related h2 { font-size: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.related-grid li { margin: 0; }
.related-grid li::marker { content: none; }
.related-grid a {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.8);
  text-decoration: none;
}
.related-grid a:hover { border-color: var(--green); }
.related-grid span { color: var(--muted); font-size: 0.76rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.related-grid strong { color: var(--ink); font-family: var(--serif); font-size: 1.14rem; font-weight: 500; line-height: 1.25; }

.fine-print { max-width: var(--measure); color: var(--muted); font-size: 0.88rem; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: clamp(56px, 8vw, 96px) auto 24px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(216, 207, 190, 0.88);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(247, 242, 231, 0.9));
  color: var(--muted);
  font-size: 0.94rem;
}
.footer-columns { display: grid; grid-template-columns: minmax(200px, 1.3fr) repeat(3, minmax(140px, 1fr)); gap: 26px; }
.footer-columns p { margin: 10px 0 0; }
.site-footer nav { display: grid; align-content: start; gap: 6px; }
.site-footer nav strong { margin-bottom: 4px; color: var(--ink); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--green); }
.footer-legal { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 0.86rem; }
/* Older single-row footer markup. */
.site-footer > nav { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0; }

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 860px) {
  .main-nav { display: none; }
  .page-hero.has-aside { grid-template-columns: 1fr; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .site-header { margin-top: 10px; }
  .brand { font-size: 1.02rem; }
  .brand-icon { width: 34px; height: 34px; }
  .guide-article h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .record-steps li { grid-template-columns: 1fr; }
  .record-decision { grid-column: 1; }
  .rule-list li { grid-template-columns: 1fr; }
  .inline-cta .button, .guide-cta .button-primary { width: 100%; }
  .footer-columns { grid-template-columns: 1fr; }
}

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