/* digitaledge.uk one-page site. Colours and type come from tokens.css (Digital Edge design system). */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--de-surface);
  color: var(--de-ink);
  font-family: var(--de-font-text);
  font-size: var(--de-text-body-size);
  line-height: var(--de-text-body-line);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.measure { max-width: var(--de-size-measure); }

a { color: var(--de-accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--de-accent-hover); }
:focus-visible { outline: 3px solid var(--de-focus); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--de-surface-raised); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--de-line); background: var(--de-surface); position: sticky; top: 0; z-index: var(--de-z-sticky); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--de-ink-muted); text-decoration: none; font-size: var(--de-text-body-sm-size); font-weight: 500; border-radius: var(--de-radius-sm);
}
.nav a:hover { color: var(--de-ink); background: var(--de-surface-sunken); }

/* Sections: anchor targets clear the sticky header */
section { scroll-margin-top: 72px; }
.hero { padding-top: 72px; padding-bottom: 56px; }
.section { padding-top: 48px; padding-bottom: 48px; border-top: 1px solid var(--de-line); }

h1, h2, h3 { font-family: var(--de-font-display); margin: 0; }
h1 { font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.015em; max-width: 22ch; }
h2 { font-size: 22px; line-height: 30px; font-weight: 600; margin-bottom: 20px; }
h3 { font-size: 17px; line-height: 24px; font-weight: 600; margin-bottom: 4px; }
p { margin: 0 0 16px; }
.lede { font-size: var(--de-text-body-lg-size); line-height: var(--de-text-body-lg-line); color: var(--de-ink-muted); max-width: 60ch; margin-top: 16px; margin-bottom: 28px; }
.small { font-size: var(--de-text-body-sm-size); line-height: var(--de-text-body-sm-line); color: var(--de-ink-muted); }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.items p { color: var(--de-ink-muted); margin: 0; max-width: 64ch; }
@media (min-width: 720px) { .items { grid-template-columns: 1fr 1fr; gap: 32px 40px; } }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  background: var(--de-accent); color: var(--de-on-accent); border: 0; border-radius: var(--de-radius-md);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--de-accent-hover); color: var(--de-on-accent); }
.btn:disabled { opacity: .7; cursor: progress; }

/* Form */
.form { max-width: 520px; margin-top: 8px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: var(--de-text-body-sm-size); margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--de-ink-muted); }
input, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--de-ink);
  background: var(--de-surface-raised); border: 1px solid var(--de-line-strong); border-radius: var(--de-radius-sm);
}
textarea { resize: vertical; min-height: 140px; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--de-focus); outline-offset: 1px; border-color: var(--de-focus); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 12px 14px; border-radius: var(--de-radius-sm); margin-top: 8px; }
.status.success { background: var(--de-success-soft); color: var(--de-ink); border-left: 4px solid var(--de-success); }
.status.error { background: var(--de-danger-soft); color: var(--de-ink); border-left: 4px solid var(--de-danger); }

/* Footer */
.site-footer { border-top: 1px solid var(--de-line); padding: 28px 0 40px; font-size: var(--de-text-body-sm-size); line-height: var(--de-text-body-sm-line); color: var(--de-ink-muted); }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--de-ink-muted); }
.site-footer a:hover { color: var(--de-ink); }
.site-footer a, .prose a { display: inline-block; min-height: 24px; }
.site-footer .legal { font-size: 11px; line-height: 1.375; opacity: 0.7; margin: 4px 0 0; }
.site-footer .legal a { display: inline; min-height: 0; }

/* Privacy page */
.prose { padding-top: 48px; padding-bottom: 48px; }
.prose h2 { font-size: 19px; line-height: 26px; margin: 32px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose p, .prose li { max-width: var(--de-size-measure); }

@media (max-width: 480px) {
  .site-header { position: static; }
  section { scroll-margin-top: 16px; }
  .header-inner { justify-content: center; }
  .nav a { padding: 0 8px; }
  .hero { padding-top: 48px; padding-bottom: 40px; }
  h1 { font-size: 26px; line-height: 33px; }
}

.brand { color: var(--de-ink); }
.logo { display: block; width: 153px; height: auto; }

/* Long-form guide pages (e.g. /how-to-build-a-great-mcp-server/) */
.article { padding-top: 48px; padding-bottom: 56px; }
.article h1 { max-width: 28ch; }
.article h2 { margin: 48px 0 12px; scroll-margin-top: 72px; }
.article h3 { margin: 24px 0 6px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 16px; }
.article li { margin-bottom: 6px; }
.article p, .article li { max-width: var(--de-size-measure); }
.eyebrow { font-size: var(--de-text-body-sm-size); color: var(--de-ink-muted); font-weight: 500; margin-bottom: 8px; }
.article code { font-family: var(--de-font-mono); font-size: 0.88em; background: var(--de-surface-sunken); padding: 1px 5px; border-radius: 4px; }
.article pre { background: var(--de-surface-sunken); border: 1px solid var(--de-line); border-radius: var(--de-radius-md); padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; }
.article pre code { background: none; padding: 0; font-size: inherit; }
.callout { background: var(--de-accent-soft); border-left: 4px solid var(--de-accent); border-radius: var(--de-radius-sm); padding: 16px 18px; margin: 8px 0 24px; }
.callout p { margin: 0; }
.callout.end { margin-top: 40px; }
.toc { border: 1px solid var(--de-line); border-radius: var(--de-radius-md); padding: 16px 20px 6px; margin: 32px 0 8px; background: var(--de-surface-raised); }
.toc-title { font-weight: 600; margin-bottom: 8px; }
.toc ol { columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 40px; } }
.toc li { break-inside: avoid; font-size: var(--de-text-body-sm-size); }
.compare { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 720px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare pre { margin: 0; height: 100%; }
.compare > div { min-width: 0; }
.label { font-size: var(--de-text-body-sm-size); font-weight: 600; margin: 0 0 6px; }
.label.bad { color: var(--de-danger); }
.label.good { color: var(--de-success); }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: var(--de-text-body-sm-size); }
.article th, .article td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--de-line); vertical-align: top; }
.article th { font-weight: 600; background: var(--de-surface-sunken); }
.checklist li::marker { color: var(--de-accent-ink); font-weight: 600; }
.faq h3 { font-size: 17px; }
.sources li { margin-bottom: 4px; }
