:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #16181d; --muted: #646b78; --border: #e3e6eb;
  --primary: #2b59ff; --primary-text: #ffffff; --good: #0f8a4b; --good-bg: #e6f6ee;
  --bad: #c62828; --bad-bg: #fdecec; --warn: #a15c00; --warn-bg: #fff3e0; --pill: #eef0f4;
  --code: #f0f2f5; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #171a21; --text: #e7e9ee; --muted: #9aa1ad; --border: #2a2f3a;
    --primary: #5b7cff; --good: #4cc38a; --good-bg: #12301f; --bad: #ff6b6b; --bad-bg: #3a1717;
    --warn: #f0a24a; --warn-bg: #3a2a12; --pill: #232834; --code: #222733; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code); padding: .1rem .35rem; border-radius: 5px; }
code.copy { user-select: all; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.wrapcell { overflow-wrap: anywhere; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 20px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: #fff; font-weight: 700; }
.logo.big { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; margin-bottom: .75rem; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.nav a:hover { background: var(--pill); text-decoration: none; color: var(--text); }
.nav a.on { color: var(--text); background: var(--pill); font-weight: 600; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me form { margin: 0; }
.email { color: var(--muted); font-size: .9rem; }
.badge { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: var(--primary); color: #fff; border-radius: 999px; padding: 1px 8px; }

main { padding: 28px 16px 40px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head p { margin: 0; }
.foot { color: var(--muted); font-size: .8rem; padding-bottom: 28px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.center { text-align: center; }
.narrow { max-width: 420px; margin: 8vh auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card.app { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; margin: 0; color: var(--text); transition: border-color .15s, transform .15s; }
.card.app:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.card.app.soon { opacity: .7; }
.card.app h2 { margin: 0; }
.card.app p { margin: 2px 0 0; }
.app-top { display: flex; gap: 14px; align-items: center; }
.app-foot { display: flex; justify-content: space-between; align-items: center; }
.mono { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  color: #fff; font-weight: 700; font-size: 1.15rem; background: #667085; }
.mono.lg { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 14px; }
.c-wordpress { background: #3858e9; }
.c-brevo { background: #0b996e; }
.c-apollo { background: #d48a00; }

/* pills / flash */
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--pill); color: var(--muted); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.bad-text { color: var(--bad); }
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; border: 1px solid; overflow-wrap: anywhere; }
.flash.ok { background: var(--good-bg); color: var(--good); border-color: transparent; }
.flash.err { background: var(--bad-bg); color: var(--bad); border-color: transparent; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: .82rem; border-radius: 7px; }
.btn.wide { width: 100%; padding: 11px; margin: 10px 0 6px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); background: transparent; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border); }
td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr.sub td { padding-top: 0; border-top: 0; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.actions form { margin: 0; }
details.confirm summary { list-style: none; }
details.confirm summary::-webkit-details-marker { display: none; }
details.confirm[open] summary { display: none; }

/* forms */
.form { display: grid; gap: 14px; max-width: 560px; margin-top: 8px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
.form input { font: inherit; font-weight: 400; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.form input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.form input[readonly] { opacity: .7; }
.help { font-weight: 400; color: var(--muted); font-size: .8rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.steps { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.steps li { margin: .25rem 0; }

/* tools list */
.tools { list-style: none; padding: 0; margin: 0; }
.tools li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.tools li:last-child { border-bottom: 0; }
.tools .muted { margin-top: 2px; }

@media (max-width: 640px) {
  .email { display: none; }
  .bar { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .me { margin-left: 0; }
  h1 { font-size: 1.35rem; }
}
