:root {
  --bg: #ffffff; --bg2: #f5f7fb; --fg: #1d2433; --muted: #5b6577; --line: #dde2ec;
  --accent: #1d4ed8; --accent-fg: #ffffff; --accent-soft: #eaf0ff; --warn: #b42318; --ok: #067647; --code: #f1f4f9;
  --radius: 10px; --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420; --bg2: #151c2b; --fg: #e8ecf5; --muted: #9aa5ba; --line: #2a3347;
    --accent: #6f95ff; --accent-fg: #0b1020; --accent-soft: #1b2745; --warn: #ff8f85; --ok: #52d19c; --code: #1a2233;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.banner { text-align: center; font-size: .85rem; padding: 6px 12px; }
.banner.test { background: #fff4d6; color: #5c4400; }
.banner.closed { background: var(--code); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner.test { background: #3a2f0a; color: #ffe29a; } }
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--accent); }
nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--fg); text-decoration: none; }
nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); padding: 11px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 6px 14px; font-size: .9rem; color: var(--accent-fg); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.danger { background: var(--warn); color: #fff; }
section { padding: 56px 0; }
section.alt { background: var(--bg2); }
.hero { padding: 64px 0 40px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.card.accent { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
ul.tick { list-style: none; padding: 0; margin: 0 0 1em; }
ul.tick li { padding-inline-start: 1.5em; position: relative; margin: .35em 0; }
ul.tick li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
code, pre, kbd { font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--code); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1.2em; }
pre code { background: none; padding: 0; }
.token { word-break: break-all; white-space: pre-wrap; user-select: all; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.tablewrap { overflow-x: auto; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=number], input[type=date], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
textarea { min-height: 110px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.check input { width: auto; }
.check.small { align-items: flex-start; }
.check.small input { margin-top: 4px; flex: none; }
.error { background: color-mix(in srgb, var(--warn) 12%, var(--bg)); border: 1px solid var(--warn); color: var(--warn); padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.ok { color: var(--ok); }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
footer { border-top: 1px solid var(--line); background: var(--bg2); padding: 32px 0; font-size: .92rem; }
.foot { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
.demo { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.demo form { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 12px; }
.demo fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 6px 10px; }
.demo legend { font-size: .85rem; color: var(--muted); padding: 0 4px; }
.demo label { margin: 2px 0; font-weight: 400; }
.demo label.f { font-weight: 600; }
.minitems { margin: 12px 0 0; } .minitems input { width: 4.5rem; }
#results ul { margin: 6px 0 0; padding-inline-start: 1.2em; }
#count { font-weight: 700; }
.ba { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ba .pane { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.ba .pane h3 { margin-bottom: .6em; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.mock { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: .95rem; }
.mock .t { font-weight: 600; margin: 0 0 6px; }
.mock .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.mock .chip { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 12px; font-size: .88rem; }
.mock .chip small { font-size: .8em; opacity: .85; }
.mock .why { margin: 0; color: var(--accent); text-decoration: underline; }
.mock ul { margin: 0; padding-inline-start: 1.1em; }
.stat { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.toc { background: var(--bg2); border-radius: 8px; padding: 12px 18px; margin: 0 0 24px; }
.toc ol { margin: 0; padding-inline-start: 1.2em; }
.doc h2 { margin-top: 2em; padding-top: .5em; border-top: 1px solid var(--line); }
.doc h2:first-of-type { border-top: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-inline-start: 2.6em; margin: 0 0 1.2em; }
.steps > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--accent); color: var(--accent-fg); text-align: center; font-weight: 700; line-height: 1.9em; }
@media (max-width: 600px) {
  section { padding: 38px 0; }
  /* the brand on its own row, the five items on a second row that never wraps, so the header has the same height on every page */
  .bar { row-gap: 0; padding-bottom: 8px; min-height: 0; }
  .brand { padding-top: 8px; }
  nav { gap: 8px; flex-wrap: nowrap; justify-content: space-between; width: 100%; font-size: .93rem; }
  nav a.btn.small { padding: 5px 10px; font-size: .93rem; white-space: nowrap; }
}
.mt-s { margin-top: .8em; } .mt-m { margin-top: 18px; } .mt-l { margin-top: 1.6em; } .pb-s { padding-bottom: 24px; } .pt-0 { padding-top: 0; }
.demo [data-loosen-preview] { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Consent box: a short label and an "i" button that opens the full text below it (<details>, no JavaScript). */
.consent { position: relative; margin: 6px 0; }
.consent .check { margin: 0; padding-inline-end: 40px; }
.consent-info summary { position: absolute; top: -3px; inset-inline-end: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--fg); color: var(--fg); background: var(--bg); display: flex; align-items: center; justify-content: center; font: italic 700 1rem/1 Georgia, serif; cursor: pointer; list-style: none; }
.consent-info summary::-webkit-details-marker { display: none; }
.consent-info summary:hover, .consent-info[open] summary { background: var(--fg); color: var(--bg); }
.consent-info summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent-info p { margin: 8px 0 4px; padding: 10px 12px; font-size: .88rem; border: 1px solid var(--fg); border-radius: 8px; background: var(--bg2); }

/* Language switcher (only on sites that have several languages). A <details> menu: it works without JavaScript. */
.langs { position: relative; font-size: .93rem; }
.langs summary { cursor: pointer; list-style: none; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--fg); user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); min-width: 9.5rem; z-index: 6; }
.langs li a { display: block; padding: 6px 10px; border-radius: 5px; color: var(--fg); text-decoration: none; }
.langs li a:hover, .langs li a:focus-visible { background: rgba(127,127,127,.14); }
.langs li a[aria-current="true"] { font-weight: 600; color: var(--accent); }
@media (max-width: 600px) {
  /* on the brand row, at the end of the line, so the five nav items keep their own row */
  .bar { position: relative; }
  .langs { position: absolute; inset-inline-end: 0; top: 10px; }
  /* translated labels are longer than the English ones (French, Portuguese): the five items stay on one row, a little smaller */
  html:not([lang="en"]) nav { gap: 4px 12px; font-size: .84rem; flex-wrap: wrap; justify-content: flex-start; align-items: center; }
  html:not([lang="en"]) nav a { white-space: nowrap; }
  html:not([lang="en"]) nav a.btn.small { padding: 4px 8px; font-size: .84rem; }
}

/* Right to left (Arabic): code, addresses and keys stay left to right */
html[dir="rtl"] pre, html[dir="rtl"] code, html[dir="rtl"] input[type="email"], html[dir="rtl"] input[name="domain"], html[dir="rtl"] input[name="domains"], html[dir="rtl"] textarea#domains { direction: ltr; unicode-bidi: plaintext; }
html[dir="rtl"] pre { text-align: left; }
@media (max-width: 380px) {
  html:not([lang="en"]) nav { gap: 4px; font-size: .78rem; }
  html:not([lang="en"]) nav a.btn.small { padding: 4px 6px; font-size: .78rem; }
}
