/* isipsafe. Hand-rolled, no framework. Keep it that way. */

:root {
  --bg: #f5f2ea;
  --surface: #fffdf8;
  --sunk: #ece8dd;
  --ink: #17191c;
  --ink-2: #3a3e44;
  --muted: #6c7077;
  --line: #ddd7c8;
  --line-2: #cbc4b2;
  --accent: #c8402a;
  --accent-ink: #9c2f1c;
  --accent-wash: #f6dfd6;
  --good: #2f6b40;
  --good-wash: #dcebdc;
  --warn: #a8660f;
  --warn-wash: #f5e6c8;
  --code-bg: #1c1f23;
  --code-ink: #e9e5db;
  --code-dim: #8d939b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1100px;
  --radius: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1a1c1f;
    --sunk: #0d0e10;
    --ink: #ece8df;
    --ink-2: #c9c5bc;
    --muted: #8f939a;
    --line: #2a2d32;
    --line-2: #3a3e44;
    --accent: #e2664d;
    --accent-ink: #f08a74;
    --accent-wash: #3a1f19;
    --good: #6dbb7f;
    --good-wash: #1b2e20;
    --warn: #e0a347;
    --warn-wash: #33270f;
    --code-bg: #0b0c0e;
    color-scheme: dark;
  }
  .brand img { box-shadow: 0 0 0 1px #3a3e44; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 .6rem; }
h2 { font-size: 1.6rem; margin: 2.6rem 0 .8rem; }
h3 { font-size: 1.18rem; margin: 1.8rem 0 .5rem; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .6rem; font-weight: 600; }
p { margin: 0 0 1rem; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.mono, code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--sunk); padding: .08em .35em; border-radius: 3px; overflow-wrap: anywhere; }
.lede { font-size: 1.16rem; color: var(--ink-2); max-width: 44rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: var(--bg); padding: .4rem .8rem; z-index: 10; }

/* --- header -------------------------------------------------------- */
.top { border-bottom: 2px solid var(--ink); background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.03em; }
.brand img { width: 30px; height: 30px; display: block; border-radius: 7px; }
.brand .word span { color: var(--muted); font-weight: 600; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-search { margin-left: auto; }
.nav-search + .nav { margin-left: 0; }
.nav-search input[type=search] { width: 12.5rem; padding: .42rem .7rem; font: .88rem var(--mono); border-width: 1.5px; }
@media (max-width: 1080px) { .nav-search { display: none; } .nav-search + .nav { margin-left: auto; } }
.nav a { color: var(--ink-2); text-decoration: none; padding: .4rem .65rem; border-radius: var(--radius); font-size: .95rem; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { margin-left: .4rem; color: var(--bg); }
.nav .btn:hover { color: var(--bg); background: var(--ink-2); }
.nav .btn.ghost { color: var(--ink); }
.nav .btn.ghost:hover { color: var(--ink); background: var(--sunk); }
@media (max-width: 760px) {
  .top .wrap { flex-wrap: wrap; gap: 0; padding-top: .5rem; }
  .nav { margin: 0 -16px; padding: .3rem 10px .5rem; width: calc(100% + 32px); row-gap: .15rem; }
  .nav a { white-space: nowrap; }
}

/* --- buttons + forms ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
  font: 600 .95rem/1 var(--sans); padding: .72rem 1.1rem; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }
.btn.red { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.red:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sunk); }
.btn.small { padding: .45rem .7rem; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--accent-ink); border-color: var(--accent); }

label { display: block; font-weight: 600; margin: 0 0 .3rem; font-size: .95rem; }
.hint { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; font-weight: 400; }
input[type=text], input[type=email], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: .65rem .75rem;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 7rem; resize: vertical; }
.field { margin-bottom: 1.2rem; }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }

.search { display: flex; gap: .5rem; max-width: 640px; }
.search input { font-family: var(--mono); font-size: 1.1rem; padding: .85rem 1rem; border-width: 2px; border-color: var(--ink); }
.search .btn { padding: 0 1.4rem; font-size: 1rem; }
@media (max-width: 520px) { .search { flex-direction: column; } .search .btn { padding: .85rem; } }

/* --- notices ------------------------------------------------------- */
.note { padding: .8rem 1rem; border-radius: var(--radius); margin: 0 0 1.4rem; border-left: 4px solid; }
.note.ok { background: var(--good-wash); border-color: var(--good); }
.note.err { background: var(--accent-wash); border-color: var(--accent); }
.note.warn { background: var(--warn-wash); border-color: var(--warn); }
.note p:last-child { margin: 0; }

/* --- page scaffolding ---------------------------------------------- */
main { padding: 2.2rem 0 4rem; min-height: 60vh; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); }
.crumbs span + span::before { content: "/"; margin: 0 .45rem; color: var(--line-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.cols.wide-side { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 900px) { .cols, .cols.wide-side { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.prose { max-width: 46rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.legal { font-size: .97rem; }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal ol { counter-reset: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.panel + .panel { margin-top: 1.2rem; }
.panel h3:first-child, .panel h4:first-child { margin-top: 0; }
.side-sticky { position: sticky; top: 1.2rem; }

/* --- home ---------------------------------------------------------- */
.hero { padding: 1.5rem 0 2.2rem; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-bottom: 1.6rem; }
.hero .you { font-size: .88rem; color: var(--muted); margin-top: .7rem; }
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); margin: 1rem 0 2.6rem; }
.ledger div { padding: .9rem 1rem .9rem 0; }
.ledger div + div { border-left: 1px solid var(--line); padding-left: 1rem; }
.ledger b { display: block; font: 700 1.7rem/1.1 var(--serif); }
.ledger span { font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) { .ledger { grid-template-columns: 1fr 1fr; } .ledger div:nth-child(3) { border-left: 0; padding-left: 0; } .ledger div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 700 .85rem var(--mono); color: var(--accent); display: block; margin-bottom: .3rem; }
.steps h3 { margin-top: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; gap: 1rem; } }
/* The band is dark in both themes. */
.band { background: #17191c; color: #f5f2ea; padding: 2.4rem 0; margin-top: 3rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { color: #f5f2ea; margin-top: 0; }
.band p { color: #c9c4b8; max-width: 40rem; }
.band .btn { background: #f5f2ea; color: #17191c; border-color: #f5f2ea; }
.band .btn:hover { background: #fff; color: #17191c; }
.band .btn.ghost { background: transparent; color: #f5f2ea; }
.band .btn.ghost:hover { background: #2a2d32; }

/* --- tables -------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 1.5px solid var(--ink); padding: .5rem .6rem .5rem 0; }
.table td { border-bottom: 1px solid var(--line); padding: .65rem .6rem .65rem 0; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .ip { font-family: var(--mono); white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .when { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) { .table .hide-sm { display: none; } }
@media (max-width: 640px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { display: block; border: 0; padding: 0; }
  .table.stack td.cats, .table.stack td.comment { grid-column: 1 / -1; }
}

.tag { display: inline-block; font-size: .74rem; line-height: 1.2; padding: .2rem .45rem; border-radius: 3px; background: var(--sunk); color: var(--ink-2); margin: 0 .2rem .25rem 0; white-space: nowrap; text-decoration: none; }
a.tag:hover { background: var(--line); color: var(--ink); }
.flag { font-size: 1.05em; margin-right: .25rem; }
.comment { color: var(--ink-2); font-size: .9rem; overflow-wrap: anywhere; white-space: pre-line; }

/* --- score --------------------------------------------------------- */
.pill { display: inline-block; min-width: 2.6rem; text-align: center; font: 700 .82rem/1 var(--mono); padding: .3rem .4rem; border-radius: 3px; }
.pill.high { background: var(--accent); color: #fff; }
.pill.medium { background: var(--warn-wash); color: var(--warn); }
.pill.low { background: var(--good-wash); color: var(--good); }
.pill.none { background: var(--sunk); color: var(--muted); }

.ip-head { display: flex; gap: 2rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.6rem; }
.ip-head h1 { font-family: var(--mono); font-size: clamp(1.6rem, 4.6vw, 2.6rem); letter-spacing: -0.03em; margin: 0; overflow-wrap: anywhere; }
.ip-head .where { color: var(--ink-2); margin-top: .3rem; }
.score-box { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.3rem 1.5rem; background: var(--surface); margin-bottom: 2rem; }
.score-box .big { font: 700 3.6rem/1 var(--serif); letter-spacing: -0.03em; }
.score-box .big small { font-size: 1.4rem; color: var(--muted); }
.score-box.high .big { color: var(--accent); }
.score-box.medium .big { color: var(--warn); }
.score-box.low .big { color: var(--good); }
.meter { height: 10px; background: var(--sunk); border-radius: 5px; overflow: hidden; margin: .5rem 0 .4rem; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 5px; }
.score-box.high .meter i { background: var(--accent); }
.score-box.medium .meter i { background: var(--warn); }
.score-box.low .meter i { background: var(--good); }
@media (max-width: 520px) { .score-box { grid-template-columns: 1fr; gap: .6rem; } }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; font-size: .94rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr 3.5rem; gap: .8rem; align-items: center; padding: .28rem 0; font-size: .92rem; }
.bars .bar { height: 8px; background: var(--sunk); border-radius: 4px; position: relative; overflow: hidden; }
.bars .bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink-2); border-radius: 4px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 520px) { .bars li { grid-template-columns: 1fr 3rem; } .bars .bar { grid-column: 1 / -1; grid-row: 2; } }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1.5px solid var(--ink); padding-top: 1rem; }
.chart div { flex: 1; background: var(--ink-2); min-height: 1px; border-radius: 2px 2px 0 0; position: relative; }
.chart div:hover { background: var(--accent); }
.chart-axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: .3rem; }

.pager { display: flex; gap: 1rem; justify-content: space-between; margin-top: 1rem; font-size: .9rem; }

/* --- report form --------------------------------------------------- */
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
legend { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { position: relative; margin: 0; font-weight: 500; font-size: .9rem; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: .38rem .7rem; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.chip:hover span { border-color: var(--ink); }

/* --- code ---------------------------------------------------------- */
pre {
  background: var(--code-bg); color: var(--code-ink); padding: 1rem 1.1rem; border-radius: var(--radius);
  overflow-x: auto; font-size: .84rem; line-height: 1.55; margin: 0 0 1.2rem; position: relative; tab-size: 4;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
pre .c { color: var(--code-dim); }
.code-wrap { position: relative; }
.copy { position: absolute; top: .45rem; right: .45rem; font: 600 .72rem var(--sans); padding: .3rem .55rem; border-radius: 4px; border: 1px solid #3a3f46; background: #262a2f; color: #d5d1c7; cursor: pointer; opacity: .85; }
.copy:hover, .copy:focus-visible { opacity: 1; }
@media (hover: hover) {
  .copy { opacity: 0; transition: opacity .15s; }
  .code-wrap:hover .copy { opacity: .9; }
}
.code-title { font: 600 .8rem var(--mono); color: var(--muted); margin: 0 0 .35rem; }

.toc { font-size: .92rem; }
.toc ol, .toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: .25rem 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.endpoint { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin: 2.2rem 0 .5rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.endpoint h3 { margin: 0; font-family: var(--mono); font-size: 1.05rem; }
.verb { font: 700 .72rem var(--mono); padding: .22rem .45rem; border-radius: 3px; background: var(--good-wash); color: var(--good); }
.verb.post { background: var(--warn-wash); color: var(--warn); }
.verb.delete { background: var(--accent-wash); color: var(--accent-ink); }
.params { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 1.2rem; }
.params td, .params th { border-bottom: 1px solid var(--line); padding: .5rem .6rem .5rem 0; text-align: left; vertical-align: top; }
.params th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.params td:first-child { font-family: var(--mono); white-space: nowrap; }

/* --- faq ----------------------------------------------------------- */
.faq details { border-bottom: 1px solid var(--line); padding: .85rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .7rem 0 .2rem; color: var(--ink-2); max-width: 44rem; }

/* --- footer -------------------------------------------------------- */
.foot { border-top: 2px solid var(--ink); padding: 2.6rem 0 2rem; font-size: .9rem; background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: .3rem 0; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot .about-blurb { color: var(--muted); max-width: 22rem; }
.foot .legal-line { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; justify-content: space-between; }
.foot .legal-line a { color: var(--muted); text-decoration: underline; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

.key { font: 600 1rem var(--mono); background: var(--sunk); border: 1.5px dashed var(--line-2); padding: .8rem 1rem; border-radius: var(--radius); overflow-wrap: anywhere; user-select: all; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2rem; background: var(--surface); }
.plans > div { padding: 1.3rem 1.3rem 1.5rem; }
.plans > div + div { border-left: 1px solid var(--line); }
.plans h3 { margin-top: 0; }
.plans .price { font: 700 1.6rem var(--serif); margin: .2rem 0 .8rem; }
.plans ul { padding-left: 1.1rem; font-size: .92rem; margin: 0 0 1rem; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } .plans > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.signature { font-family: var(--serif); font-style: italic; color: var(--ink-2); }

/* --- admin ---------------------------------------------------------- */
.tabs { display: flex; gap: .3rem; border-bottom: 1.5px solid var(--line-2); margin-bottom: 1.6rem; }
.tabs a { padding: .55rem .9rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1.5px; font-weight: 600; font-size: .95rem; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.status { display: inline-block; font: 700 .72rem/1 var(--mono); padding: .25rem .45rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .03em; }
.status.ok { background: var(--good-wash); color: var(--good); }
.status.error { background: var(--accent-wash); color: var(--accent-ink); }
.status.running { background: var(--warn-wash); color: var(--warn); }
.status.off { background: var(--sunk); color: var(--muted); }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin-bottom: 2rem; }
.kinds a { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.kinds a:hover { border-color: var(--ink); }
.kinds strong { display: block; margin-bottom: .25rem; }
.kinds span { font-size: .87rem; color: var(--muted); }
.log { max-height: 22rem; font-size: .78rem; white-space: pre-wrap; }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem .4rem; background: var(--surface); margin-bottom: 1.4rem; }
fieldset.box > legend { padding: 0 .4rem; }
.inline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.inline input[type=text], .inline select { width: auto; }
.inline > input { min-width: 0; max-width: 100%; }
.inline > input[type=text] { flex: 1 1 8rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: 1.05rem; height: 1.05rem; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .2rem .8rem; font: .82rem var(--mono); margin: .6rem 0 1rem; }

/* --- integrations --------------------------------------------------- */
.logo-tile { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.logo-tile img { width: 28px; height: 28px; display: block; }
.logo-tile.mono { background: var(--c); border-color: transparent; color: #fff; font: 800 .82rem/1 var(--sans); letter-spacing: -.02em; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; margin: 0 0 2.4rem; }
.int-card { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; transition: border-color .12s, transform .12s; }
.int-card:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.int-card strong { display: block; font-size: 1rem; margin: .1rem 0 .2rem; }
.int-card span.d { display: block; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.int-head { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.4rem; }
.int-head > div { min-width: 0; }
.int-head .logo-tile { width: 72px; height: 72px; border-radius: 14px; }
.int-head .logo-tile img { width: 42px; height: 42px; }
.int-head .logo-tile.mono { font-size: 1.15rem; }
.int-head h1 { margin: 0 0 .2rem; }
.int-head p { margin: 0; }
.steps-list { counter-reset: s; list-style: none; padding: 0; }
.steps-list > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1.4rem; }
.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: .05rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 .85rem/1.8rem var(--sans); text-align: center; }
.related { list-style: none; padding: 0; margin: 0; }
.related li { margin: .45rem 0; }
.related a { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.related a:hover { color: var(--accent); }
.related .logo-tile { width: 30px; height: 30px; border-radius: 7px; }
.related .logo-tile img { width: 18px; height: 18px; }
.related .logo-tile.mono { font-size: .6rem; }
.trademark { font-size: .8rem; color: var(--muted); margin-top: 2rem; }

/* --- profiles ------------------------------------------------------- */
.profile-head { display: flex; gap: 1.4rem; align-items: center; margin-bottom: 1.4rem; }
.profile-head h1 { margin: 0; }
.profile-logo { width: 96px; height: 96px; border-radius: 16px; border: 1px solid var(--line); background: #fff; object-fit: contain; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.profile-logo.mono { background: var(--ink); color: var(--bg); font: 800 2.4rem/1 var(--serif); text-transform: uppercase; border-color: transparent; }
.profile-logo.small { width: 64px; height: 64px; border-radius: 12px; }
.profile-logo.small.mono { font-size: 1.6rem; }
.profile-logo.tiny { width: 32px; height: 32px; border-radius: 7px; }
.profile-logo.tiny.mono { font-size: .95rem; }
.reporter-list { list-style: none; padding: 0; margin: 0; counter-reset: rk; }
.reporter-list li { counter-increment: rk; border-bottom: 1px solid var(--line); }
.reporter-list a { display: grid; grid-template-columns: 1.8rem auto 1fr auto; gap: .7rem; align-items: center; padding: .55rem 0; text-decoration: none; color: var(--ink); }
.reporter-list a::before { content: counter(rk); font: 600 .8rem var(--mono); color: var(--muted); }
.reporter-list a:hover .nm { color: var(--accent); }
.reporter-list .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
@media (max-width: 520px) { .profile-head { flex-direction: column; align-items: flex-start; } }

/* --- API key widget -------------------------------------------------- */
.keybox { display: flex; align-items: center; gap: .3rem; background: var(--sunk); border-radius: var(--radius); padding: .35rem .35rem .35rem .7rem; }
.keyval { flex: 1; min-width: 0; background: none; padding: 0; font-size: .82rem; overflow-wrap: anywhere; user-select: all; }
.iconbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { color: var(--ink); border-color: var(--ink); }
.iconbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.target { overflow-wrap: anywhere; }

/* Brand page */
.brand-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.brand-group { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.brand-group > h2 { margin-top: 0; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.brand-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.brand-card.wide { grid-column: span 2; }
@media (max-width: 560px) { .brand-card.wide { grid-column: auto; } }
.brand-preview { display: flex; align-items: center; justify-content: center; height: 11rem; padding: 1.4rem; background: #f5f2ea; border-bottom: 1px solid var(--line); }
.brand-preview.dark { background: #17191c; }
.brand-preview img { max-height: 100%; max-width: 100%; width: auto; }
.brand-card.wide .brand-preview img { width: 100%; height: auto; max-width: 26rem; }
.brand-body { padding: 1rem 1.1rem 1.1rem; }
.brand-body h3 { margin: 0 0 .3rem; font-size: 1rem; }
.brand-body p { margin: 0 0 .6rem; }
.brand-files { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .88rem; }
.brand-files li { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; border-top: 1px solid var(--line); }
.brand-files li:first-child { border-top: 0; }
.brand-files span { color: var(--muted); font-variant-numeric: tabular-nums; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.swatches div { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.swatches span { height: 4rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: .3rem; }
.swatches code { color: var(--muted); }

/* IP page: reported neighbours */
.nearby { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.nearby li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.nearby li:first-child { border-top: 0; }
.nearby a { overflow-wrap: anywhere; }
