/* Tools landing page (uses the variables and fonts from /embed/embed.css). */
body.page { padding: 0; background: #fff; font-size: 16px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 28px); } }
.page a { color: var(--ink); text-underline-offset: 3px; }
.page section[id] { scroll-margin-top: 72px; }

.page-top { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(8px); }
.page-top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font: 800 17px/1 var(--heading); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand__tag { font: 600 12px/1 var(--body); color: var(--muted); margin-left: 6px; letter-spacing: .04em; text-transform: uppercase; }
.page-nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; }
.page-nav a { text-decoration: none; color: var(--muted); }
.page-nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .page-nav { display: none; } }

.hero { padding: 64px 0 24px; max-width: 820px; margin-left: max(20px, (100% - 1120px) / 2); }
.eyebrow { margin: 0 0 12px; color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font: 800 clamp(32px, 5vw, 52px)/1.06 var(--heading); letter-spacing: -.03em; margin: 0; }
.lede { font-size: 18px; color: var(--muted); margin: 18px 0 0; max-width: 680px; }

.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; padding: 48px 0; border-bottom: 1px solid var(--line); align-items: start; }
.tool:last-of-type { border-bottom: 0; }
@media (max-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 36px 0; } }
.tool__text { min-width: 0; }
.tool h2, .notes h2, .dev h2 { font: 800 28px/1.15 var(--heading); letter-spacing: -.02em; margin: 0 0 10px; }
.tool h3, .dev h3 { font: 700 15px/1.3 var(--heading); margin: 22px 0 8px; }
.tool__text > p { color: var(--muted); margin: 0; }
.tool__demo { min-width: 0; }
.tool__demo [data-sourcefoshan-tool] { font-size: 13px; color: var(--muted); }

.code { position: relative; }
.page pre {
  margin: 0; padding: 14px 16px; border-radius: 12px; background: #16181b; color: #e9e6e1; overflow-x: auto;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code pre { padding-right: 112px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 480px) { .code pre { padding-top: 48px; padding-right: 16px; } }
.code .copy { position: absolute; top: 10px; right: 10px; background: #fff; color: var(--ink); border-color: #fff; }
.code .copy:hover { background: var(--paper); }
.code .copy.is-copied { background: #dff3e4; border-color: #dff3e4; color: var(--ok); }
.page :not(pre) > code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper); padding: 2px 6px; border-radius: 6px; }
.opt { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

.notes, .dev { padding: 48px 0; border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 28px; }
.notes ul { list-style: none; padding: 0; margin: 16px 0 0; }
.notes li { background: var(--paper); border-radius: 12px; padding: 16px 18px; color: var(--muted); font-size: 15px; }
.notes li strong { color: var(--ink); display: block; margin-bottom: 2px; }
.dev .grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 8px; }
.dev p { color: var(--muted); margin: 0 0 12px; }

.page-foot { background: var(--paper); padding: 28px 0; margin-top: 24px; font-size: 14px; color: var(--muted); }
.page-foot p { margin: 0; max-width: 760px; }
