/* Universal Resolver of OwnYourData - same design tokens as DID Linter */
:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d2327;
  --muted: #5b6770;
  --line: #e2e5e8;
  --accent: #0b6e4f;
  --accent-soft: #e3f2ec;
  --wip: #8a5a00;
  --wip-soft: #fbf0d9;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 12px;
}
/* dark: follows the system unless the visitor picked a theme (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121517;
    --surface: #1b1f22;
    --text: #e8ebed;
    --muted: #9aa5ad;
    --line: #2c3236;
    --accent: #4cc293;
    --accent-soft: #173229;
    --wip: #e6b85c;
    --wip-soft: #33291a;
    --bad: #f28b82;
    --bad-soft: #3a1f1d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121517;
  --surface: #1b1f22;
  --text: #e8ebed;
  --muted: #9aa5ad;
  --line: #2c3236;
  --accent: #4cc293;
  --accent-soft: #173229;
  --wip: #e6b85c;
  --wip-soft: #33291a;
  --bad: #f28b82;
  --bad-soft: #3a1f1d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
header { padding: 20px 0; border-bottom: 1px solid var(--line); }
header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; color: var(--text); text-decoration: none; }
.brand img { width: 15px; height: auto; display: block; }
.brand span { color: var(--muted); font-weight: 400; margin-left: -5px; }
header nav { display: flex; align-items: center; }
header nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
header nav a:hover { color: var(--text); }
.theme-toggle {
  background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  width: 34px; height: 34px; padding: 0; margin-left: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[data-mode="dark"] .icon-sun { display: block; }
.theme-toggle[data-mode="dark"] .icon-moon { display: none; }
.intro { padding: 24px 0 18px; }
.lead { font-size: 17px; color: var(--muted); max-width: 760px; margin: 0; }
h2 { font-size: 20px; margin: 44px 0 16px; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel p { margin: 0 0 8px; color: var(--muted); }
.panel p:last-child { margin-bottom: 0; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; border: 1px solid var(--accent);
}
.btn.primary { background: var(--accent); color: var(--surface); }
.btn.secondary { color: var(--accent); background: transparent; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.check { display: flex; flex-direction: column; gap: 12px; }
.check label { font-weight: 600; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.hint a { display: inline-block; white-space: nowrap; }
.hint a + a { margin-left: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row input { flex: 1 1 320px; min-width: 0; }
input[type=text] {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input[type=text]:focus, .btn:focus-visible, .theme-toggle:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.results { margin-top: 18px; scroll-margin-top: 72px; }
.result { border-radius: var(--radius); padding: 14px 18px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); overflow-wrap: anywhere; }
.result.success { border-left-color: var(--accent); background: var(--accent-soft); }
.result.success strong { color: var(--accent); }
.result.danger { border-left-color: var(--bad); background: var(--bad-soft); }
.result.warning { border-left-color: var(--wip); background: var(--wip-soft); }
.result .detail { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tab { font: inherit; font-size: 14px; padding: 6px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.tab + .tab { border-left: 1px solid var(--line); }
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 15px; }
pre { margin: 10px 0 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 560px; overflow: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }
pre code { font-size: inherit; }
ul.methods { list-style: none; margin: 0; padding: 0; }
ul.methods > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
ul.methods > li:first-child { border-top: 0; padding-top: 0; }
ul.methods .method { font-weight: 600; }
ul.methods .dids a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.methods .dids code { overflow-wrap: normal; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px; color: var(--accent); background: var(--accent-soft); }
.note { color: var(--muted); font-size: 13px; max-width: 760px; }
.panel p.note { margin: 16px 2px 0; }
table.api { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0 0; }
table.api td { padding: 6px 12px 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.api td:first-child { white-space: nowrap; }
footer { margin-top: 56px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer .legal a { margin-right: 16px; }
footer .legal a:last-child { margin-right: 0; }
@media (max-width: 560px) {
  header nav a { margin: 0 14px 0 0; }
  .theme-toggle { margin-left: 0; }
  .intro { padding-top: 18px; }
  ul.methods > li { grid-template-columns: minmax(0, 1fr); }
  table.api td { display: block; padding: 0 0 6px; border-top: 0; }
  table.api td:first-child { padding-top: 8px; border-top: 1px solid var(--line); }
}
