/* Guides: one calm reading column, in the home page's type and colours, light by default with a dark option. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #FFFCF5; --surface: #FFFFFF; --text: #09090B; --body: #3F3F46; --muted: #71717A;
  --border: rgba(9,9,11,0.08); --borderStrong: rgba(9,9,11,0.14);
  --c1: #FF5F8A; --c5: #4DA8FF; --c6: #845EC2;
  --card: rgba(255,255,255,0.72); --tip: #FFF6E5; --tipLine: #FFB547;
  --gutter: clamp(20px, 4vw, 56px);
}
[data-theme="dark"] {
  --bg: #0B0B10; --surface: #17171F; --text: #F4F4F5; --body: #C9C9D1; --muted: #8E8E99;
  --border: rgba(255,255,255,0.09); --borderStrong: rgba(255,255,255,0.18);
  --card: rgba(255,255,255,0.04); --tip: rgba(255,181,71,0.09); --tipLine: #E7A23F;
  color-scheme: dark;
}
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* soft colour behind the top of the page, like the home hero */
.glow { position: absolute; inset: 0 0 auto; height: 620px; z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.glow::before, .glow::after { content: ''; position: absolute; width: 560px; height: 420px; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.glow::before { left: -120px; top: -160px; background: var(--g1, #FFB4C8); }
.glow::after { right: -140px; top: -120px; background: var(--g2, #C7B6FF); }
[data-theme="dark"] .glow::before, [data-theme="dark"] .glow::after { opacity: 0.18; }

/* nav: the home page's glass capsule */
nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; width: calc(100% - 32px); max-width: 1180px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px 8px 18px; border-radius: 100px;
  background: rgba(255,252,245,0.7); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.95), 0 0 0 0.5px rgba(9,9,11,0.07), 0 12px 30px -10px rgba(9,9,11,0.16); }
[data-theme="dark"] nav { background: rgba(22,22,30,0.72); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 0.5px rgba(255,255,255,0.1), 0 12px 30px -10px rgba(0,0,0,0.6); }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.nav-brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-brand-name { font-weight: 800; font-size: 1rem; letter-spacing: -0.5px; color: var(--text); }
.nav-brand-name b { background: linear-gradient(135deg, #1E40AF, #4F46E5, #7C3AED); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
[data-theme="dark"] .nav-brand-name b { background-image: linear-gradient(135deg, #93A8FF, #A99BFF, #C9A6FF); }
.nav-right { display: flex; align-items: center; gap: 2px; }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 100px; color: var(--body); text-decoration: none; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); background: rgba(9,9,11,0.05); }
[data-theme="dark"] .nav-links a:hover, [data-theme="dark"] .nav-links a[aria-current] { background: rgba(255,255,255,0.08); }
@media (max-width: 560px) { .nav-links .nl-hide { display: none; } .nav-brand-name { display: none; } }

/* page */
main { padding: 128px var(--gutter) 0; }
.wrap { max-width: 720px; margin: 0 auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.84rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { opacity: 0.6; }
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 900; letter-spacing: -0.045em; line-height: 1.05; margin-top: 18px; text-wrap: balance; }
h1 em, .hub-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--c1), var(--c6)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; padding-right: 0.06em; }
.dek { font-size: 1.2rem; line-height: 1.6; color: var(--body); margin-top: 18px; text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 20px; font-size: 0.84rem; color: var(--muted); }

/* article text */
.prose { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--border); font-size: 1.075rem; line-height: 1.78; color: var(--body); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: var(--text); margin-top: 2.1em; text-wrap: balance; }
.prose h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--text); text-decoration-color: var(--c1); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--muted); }
.prose code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text); overflow-wrap: anywhere; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); font-weight: 650; font-size: 0.86rem; }
.prose ol.steps { list-style: none; padding: 0; counter-reset: s; }
.prose ol.steps > li { counter-increment: s; position: relative; padding-left: 48px; }
.prose ol.steps > li + li { margin-top: 1em; }
.prose ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 700 0.85rem 'Inter', sans-serif; color: var(--text); background: var(--card); box-shadow: 0 0 0 1px var(--borderStrong); }
.tip { background: var(--tip); border-left: 3px solid var(--tipLine); padding: 16px 20px; border-radius: 4px 14px 14px 4px; font-size: 1rem; }
.tip strong:first-child { display: block; margin-bottom: 2px; }

/* "Do it free" card: the home page's dark stage in miniature */
.try { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin: 2.2em 0; padding: 22px 24px; border-radius: 22px; text-decoration: none;
  background: radial-gradient(120% 140% at 0% 0%, rgba(var(--t, 132,94,194),0.35), transparent 60%), #0E0E14; color: #fff;
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.08) inset, 0 24px 50px -22px rgba(var(--t, 132,94,194),0.7); transition: transform 0.2s; }
.prose .try { color: #fff; text-decoration: none; }
.try:hover { transform: translateY(-2px); }
.try img { width: 56px; height: 56px; border-radius: 14px; }
.try-k { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 0.98rem; color: rgba(255,255,255,0.6); display: block; line-height: 1.2; }
.try-t { font-weight: 750; font-size: 1.08rem; letter-spacing: -0.01em; display: block; line-height: 1.35; margin-top: 2px; }
.try-d { font-size: 0.88rem; color: rgba(255,255,255,0.66); display: block; line-height: 1.5; margin-top: 4px; }
.try-go { font-weight: 700; font-size: 0.86rem; padding: 10px 16px; border-radius: 100px; background: #fff; color: #09090B; white-space: nowrap; }
@media (max-width: 600px) { .try { grid-template-columns: auto 1fr; } .try-go { grid-column: 1 / -1; text-align: center; } }

/* app card: the app's icon with its own name and one line */
.app { display: flex; gap: 16px; align-items: center; margin: 2.2em 0; padding: 18px 20px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--border); text-decoration: none; }
.prose .app { text-decoration: none; }
.app img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 18px -8px rgba(9,9,11,0.35); flex: none; }
.app-k { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 0.98rem; color: var(--muted); display: block; line-height: 1.2; }
.app-t { font-weight: 750; color: var(--text); display: block; line-height: 1.35; margin-top: 2px; }
.app-d { font-size: 0.9rem; color: var(--body); display: block; line-height: 1.5; margin-top: 2px; }

.sources { margin-top: 3em; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.86rem; color: var(--muted); }
.sources h2 { font-size: 0.86rem; font-weight: 650; color: var(--text); margin: 0 0 8px; letter-spacing: 0; }
.sources ul { padding-left: 1.1em; }
.sources a { color: var(--muted); }

/* more guides */
.more { max-width: 1180px; margin: 96px auto 0; }
.more-h { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--border); text-decoration: none; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--borderStrong), 0 18px 40px -20px rgba(9,9,11,0.3); }
.card img { width: 40px; height: 40px; border-radius: 11px; }
.card-k { font-family: 'Instrument Serif', serif; font-style: italic; color: var(--muted); font-size: 0.98rem; line-height: 1.2; }
.card-t { font-weight: 750; font-size: 1.05rem; letter-spacing: -0.015em; line-height: 1.3; }
.card-d { font-size: 0.9rem; color: var(--body); line-height: 1.55; }

/* guides hub */
.hub { max-width: 1180px; margin: 0 auto; }
.hub-title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 900; letter-spacing: -0.05em; line-height: 1.02; margin-top: 18px; }
.hub .dek { max-width: 620px; }
.hub-group { margin-top: 64px; }
.hub-group h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.hub-group > p { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }

@media (min-width: 900px) {
  .hub .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hub-pair .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card-ask { justify-content: flex-end; background: transparent; box-shadow: none; border: 1px dashed var(--borderStrong); }
.card-go { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-top: 4px; }
footer { margin-top: 112px; border-top: 1px solid var(--border); padding: 32px var(--gutter) 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--muted); }
.footer-inner p { display: flex; align-items: center; gap: 10px; }
.footer-inner img { width: 22px; height: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--c5); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .card, .try { transition: none; } }
