/* NessGate design tokens & shared styles */
:root {
  --bg: #ffffff;
  --fg: #171717;
  --muted: #555555;
  --faint: #8a8a8a;
  --border: #eaeaea;
  --border-strong: #d6d6d6;
  --surface: #fafafa;
  --accent: #0060c9;
  --ok: #0f7b3d;
  --ok-bg: #ecf7f0;
  --ok-border: #cbe7d4;
  --err: #c22a2a;
  --err-bg: #fdf1f1;
  --err-border: #f2cfcf;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 2rem;
  line-height: 1.65;
  font-size: 16px;
}

/* Header / identity */
.site-head { display: flex; align-items: center; margin-bottom: 2.25rem; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  color: var(--fg); text-decoration: none;
}
.brand svg { display: block; }

/* Typography */
h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.03em; margin: 1.5rem 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; margin: 2.4rem 0 .55rem; }
h3 { font-size: .98rem; font-weight: 600; margin: 1.4rem 0 .3rem; }
p { margin: .65rem 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.meta { font-size: .88rem; color: var(--faint); }
.note {
  font-size: .88rem; color: var(--muted);
  border-left: 2px solid var(--border-strong);
  padding-left: .85rem; margin: .9rem 0;
}
ul { padding-left: 1.25rem; }
li { margin: .35rem 0; }

/* Code */
code {
  font-family: var(--mono); font-size: .84em;
  background: var(--surface); border: 1px solid var(--border);
  padding: .12rem .4rem; border-radius: 6px; word-break: break-all;
}
pre {
  background: var(--surface); border: 1px solid var(--border);
  padding: .9rem 1.05rem; border-radius: var(--radius);
  overflow-x: auto; font-size: .86rem; line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: 1em; }

/* Tables (docs) */
table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .8rem 0 1.2rem; }
th {
  font-weight: 600; text-align: left; color: var(--muted);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border-strong);
}
th, td { padding: .55rem .65rem .55rem 0; vertical-align: top; }
td { border-bottom: 1px solid var(--border); }

/* Disclosure */
details {
  margin: .6rem 0; border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem .95rem; background: #fff;
}
details[open] { padding-bottom: .85rem; }
summary { cursor: pointer; font-weight: 500; color: var(--fg); }
details pre { margin-bottom: 0; }

/* Forms */
label { display: block; font-size: .85rem; font-weight: 500; color: #3d3d3d; margin: 0 0 .35rem; }
input {
  width: 100%; height: 44px; font-size: 1rem; color: var(--fg);
  padding: 0 .9rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #a3a3a3; }
input:focus { outline: none; border-color: #8f8f8f; box-shadow: 0 0 0 3px rgba(0,0,0,.07); }
input.mono { font-family: var(--mono); font-size: .95rem; }
button {
  height: 44px; padding: 0 1.3rem; font-size: .95rem; font-weight: 500;
  font-family: var(--sans); color: #fff; background: var(--fg);
  border: 1px solid var(--fg); border-radius: var(--radius); cursor: pointer;
  transition: background .15s ease;
}
button:hover { background: #383838; }
button:disabled { background: #a0a0a0; border-color: #a0a0a0; cursor: wait; }
button.primary { width: 100%; }
.field { margin-bottom: .95rem; }
#deleteForm .field { margin-top: .8rem; }

/* Homepage hero */
.hero { text-align: center; margin: 2.75rem 0 2rem; }
.hero h1 { font-size: 2.35rem; margin: 0 0 .45rem; }
.tag { color: var(--muted); font-size: 1.02rem; max-width: 33rem; margin: 0 auto; }

/* Resolver */
.resolver { display: flex; gap: .55rem; max-width: 34rem; margin: 0 auto; }
.resolver input { flex: 1; height: 48px; font-family: var(--mono); font-size: .97rem; }
.resolver button { height: 48px; flex-shrink: 0; }
section[aria-label="Find official AI data"] { text-align: center; }
section[aria-label="Find official AI data"] .result { max-width: 34rem; margin-left: auto; margin-right: auto; }

/* Cards & results */
.card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 1.6rem 1.6rem 1.4rem; margin-top: 2.9rem; background: #fff;
  text-align: left;
}
.card h2 { margin: 0 0 .3rem; }
.card > .hint:first-of-type { margin-top: 0; }
.result {
  margin-top: 1rem; padding: .95rem 1.1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: .93rem; word-break: break-all;
  text-align: left;
}
.result a { font-family: var(--mono); font-size: .88rem; }
.result.err { background: var(--err-bg); border-color: var(--err-border); color: var(--err); }
.ok { color: var(--ok); font-weight: 600; margin: 0 0 .3rem; }
.ok::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--ok); margin-right: .5rem; vertical-align: 1px;
}
.err { color: var(--err); }

/* Verification steps panel */
.steps {
  margin-top: 1.25rem; padding: 1.2rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: .93rem;
}
.steps p { margin: .6rem 0; }
.steps code { background: #fff; }
.steps button { margin-top: .5rem; }
.hint { font-size: .82rem; color: var(--faint); line-height: 1.6; margin: .55rem 0 0; }

/* Why strip */
.why {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
  margin-top: 3.25rem; padding-top: 2.1rem; border-top: 1px solid var(--border);
}
.why h3 {
  font-size: .76rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); margin: 0 0 .4rem;
}
.why p { font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* Footer */
footer {
  margin-top: 4.25rem; padding-top: 1.4rem; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--faint); text-align: center;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.15rem; }
footer nav a { color: var(--faint); }
footer nav a:hover { color: var(--fg); text-decoration: none; }
footer p { margin: .7rem 0 0; }

/* Mobile */
@media (max-width: 640px) {
  body { padding: 1.6rem 1.15rem 1.5rem; }
  .site-head { margin-bottom: 1.6rem; }
  .hero { margin: 1.9rem 0 1.6rem; }
  .hero h1 { font-size: 1.85rem; }
  .tag { font-size: .95rem; }
  .resolver { flex-direction: column; }
  .resolver button { width: 100%; }
  .card { padding: 1.15rem 1.1rem 1rem; margin-top: 2.2rem; }
  .why { grid-template-columns: 1fr; gap: 1.15rem; margin-top: 2.4rem; padding-top: 1.6rem; }
  h1 { font-size: 1.45rem; }
  pre { font-size: .8rem; }
}
