/* PeekHook inspector - clean theme */
:root,
[data-theme="clean"] {
  --bg: #fbfbfd;
  --panel: #fff;
  --line: #ececf1;
  --ink: #16161a;
  --mut: #6b6b78;
  --accent: #5b5bd6;
  --accent-soft: #eeeefb;
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;
  --radius-panel: 14px;
  --radius-btn: 9px;
  --radius-badge: 6px;

  /* Method badge colors - clean */
  --badge-post-bg: #e7f6ec;
  --badge-post-fg: #0a9d54;
  --badge-get-bg: #e7eefc;
  --badge-get-fg: #2563eb;
  --badge-put-bg: #fff4e5;
  --badge-put-fg: #b45309;
  --badge-patch-bg: #fff4e5;
  --badge-patch-fg: #b45309;
  --badge-delete-bg: #fdeaea;
  --badge-delete-fg: #dc2626;
  --badge-other-bg: #f1f1f4;
  --badge-other-fg: var(--mut);

  /* Provider badge - clean */
  --provider-bg: #fff5e6;
  --provider-fg: #b45309;
  --provider-border: #fde7c2;

  /* Code block background - clean */
  --code-bg: #fafafe;

  /* JSON syntax colors - clean */
  --json-key: #2563eb;
  --json-str: #0a9d54;
  --json-num: #b45309;
  --json-bool: #9333ea;
  --json-null: #9333ea;

  /* Request row hover - clean */
  --req-hover: #fafaff;

  /* Active row selection highlight - clean */
  --req-active-bg: var(--accent-soft);
  --req-active-border: var(--accent);

  /* Live dot color - clean */
  --live-color: #0a9d54;
}

/* Terminal theme - refined dark (not cliche green-on-black) */
/* Palette from terminal-inspector.html mockup */
[data-theme="terminal"] {
  --bg: #0e1116;
  --panel: #151a21;
  --line: #222a35;
  --ink: #d7dde5;
  --mut: #7d8896;
  --accent: #58a6ff;
  --accent-soft: #15263b;
  --mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
  --radius-panel: 11px;
  --radius-btn: 7px;
  --radius-badge: 5px;

  /* Method badge colors - terminal */
  --badge-post-bg: rgba(63, 185, 80, 0.15);
  --badge-post-fg: #3fb950;
  --badge-get-bg: rgba(88, 166, 255, 0.15);
  --badge-get-fg: #58a6ff;
  --badge-put-bg: rgba(210, 153, 34, 0.15);
  --badge-put-fg: #d29922;
  --badge-patch-bg: rgba(210, 153, 34, 0.15);
  --badge-patch-fg: #d29922;
  --badge-delete-bg: rgba(248, 81, 73, 0.15);
  --badge-delete-fg: #f85149;
  --badge-other-bg: rgba(125, 136, 150, 0.15);
  --badge-other-fg: #7d8896;

  /* Provider badge - terminal */
  --provider-bg: rgba(210, 153, 34, 0.15);
  --provider-fg: #d29922;
  --provider-border: rgba(210, 153, 34, 0.3);

  /* Code block background - terminal */
  --code-bg: #0f141a;

  /* JSON syntax colors - terminal */
  --json-key: #58a6ff;
  --json-str: #3fb950;
  --json-num: #d29922;
  --json-bool: #bc8cff;
  --json-null: #bc8cff;

  /* Request row hover - terminal */
  --req-hover: #1b212a;

  /* Active row selection highlight - terminal */
  --req-active-bg: #15263b;
  --req-active-border: #58a6ff;

  /* Live dot color - terminal */
  --live-color: #3fb950;
}

/* Paper theme - warm light / sepia (easy-on-eyes light alternative) */
[data-theme="paper"] {
  --bg: #f6f1e6;
  --panel: #fffdf8;
  --line: #e7dec9;
  --ink: #3b3328;
  --mut: #8a7d66;
  --accent: #b4540a;
  --accent-soft: #f6e6d2;
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;
  --radius-panel: 14px;
  --radius-btn: 9px;
  --radius-badge: 6px;

  /* Method badge colors - paper */
  --badge-post-bg: #e8efdd;
  --badge-post-fg: #2f7d4f;
  --badge-get-bg: #e3eaf2;
  --badge-get-fg: #2f5fb0;
  --badge-put-bg: #f6ebd5;
  --badge-put-fg: #a8620a;
  --badge-patch-bg: #f6ebd5;
  --badge-patch-fg: #a8620a;
  --badge-delete-bg: #f6e0da;
  --badge-delete-fg: #c0392b;
  --badge-other-bg: #ece4d2;
  --badge-other-fg: var(--mut);

  /* Provider badge - paper */
  --provider-bg: #f6e8cf;
  --provider-fg: #a8620a;
  --provider-border: #ecd9b0;

  /* Code block background - paper */
  --code-bg: #f2ecdd;

  /* JSON syntax colors - paper */
  --json-key: #2f5fb0;
  --json-str: #2f7d4f;
  --json-num: #a8620a;
  --json-bool: #8a4fb0;
  --json-null: #8a4fb0;

  /* Request row hover - paper */
  --req-hover: #f1ead9;

  /* Active row selection highlight - paper */
  --req-active-bg: var(--accent-soft);
  --req-active-border: var(--accent);

  /* Live dot color - paper */
  --live-color: #2f7d4f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

.ph-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  /* App-shell: fill the viewport, page itself never scrolls. */
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ph-wrap {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Fill the .ph-app column; min-height:0 lets the split scroll internally. */
  flex: 1;
  min-height: 0;
}

/* URL bar */
.ph-urlbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  flex-shrink: 0;
}

.ph-brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
  padding-right: 4px;
}

.ph-brand:hover { color: var(--accent); }

.ph-urlbar__label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 4px;
}

.ph-urlbar__url {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}

.ph-urlbar__url .ph-token {
  color: var(--accent);
  font-weight: 700;
}

.ph-urlbar__spacer { flex: 1; }

/* Live dot */
.ph-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--live-color);
  font-size: 12px;
  font-weight: 600;
}

.ph-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live-color);
  animation: ph-pulse 1.6s infinite;
}

@keyframes ph-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(10,157,84,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(10,157,84,0); }
  100% { box-shadow: 0 0 0 0 rgba(10,157,84,0); }
}

/* Buttons */
.ph-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}

.ph-btn:hover { background: var(--accent-soft); }

.ph-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.ph-btn--primary:hover { background: var(--accent); filter: brightness(.9); }

/* Split layout */
.ph-split {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  /* Fill remaining height under the hero; min-height:0 so columns may
     overflow internally instead of stretching the page. */
  flex: 1;
  min-height: 0;
}

/* Panels - each column is a flex column; the inner scroller overflows. */
.ph-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ph-panel__heading {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mut);
  padding: 14px 16px 8px;
  flex-shrink: 0;
}

/* Left column: the request list scrolls inside the panel, heading stays put. */
#requests {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Right column: the detail turbo frame fills the panel and scrolls a large
   payload independently. */
.ph-panel > turbo-frame#detail {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: block;
}

/* Request rows */
.ph-req {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.ph-req:hover { background: var(--req-hover); }

.ph-req--active {
  background: var(--req-active-bg);
  border-left: 3px solid var(--req-active-border);
  padding-left: 13px;
}

.ph-req__meta { flex: 1; min-width: 0; }

.ph-req__path {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-req__sub { font-size: 11px; color: var(--mut); }

/* Method badges */
.ph-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-badge);
  white-space: nowrap;
}

.ph-badge--post  { background: var(--badge-post-bg);   color: var(--badge-post-fg); }
.ph-badge--get   { background: var(--badge-get-bg);    color: var(--badge-get-fg); }
.ph-badge--put   { background: var(--badge-put-bg);    color: var(--badge-put-fg); }
.ph-badge--patch { background: var(--badge-patch-bg);  color: var(--badge-patch-fg); }
.ph-badge--delete { background: var(--badge-delete-bg); color: var(--badge-delete-fg); }
.ph-badge--other { background: var(--badge-other-bg);  color: var(--badge-other-fg); }

/* Provider badge */
.ph-provider {
  font-size: 10px;
  background: var(--provider-bg);
  color: var(--provider-fg);
  border: 1px solid var(--provider-border);
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Empty state */
.ph-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--mut);
  font-size: 13px;
}

/* Detail panel */
.ph-detail__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ph-detail__head-path {
  font-family: var(--mono);
  font-size: 14px;
}

.ph-detail__head-event { color: var(--mut); font-size: 12px; }

/* Tabs */
.ph-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--line);
}

.ph-tab {
  padding: 8px 13px;
  font-size: 13px;
  color: var(--mut);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.ph-tab:hover { color: var(--ink); }
.ph-tab--active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

/* Tab content */
.ph-tab-body { padding: 16px 18px; }

.ph-tab-pane { display: none; }
.ph-tab-pane--active { display: block; }

/* Code blocks */
.ph-pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  overflow: auto;
  max-height: 480px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* JSON syntax highlight classes (applied server-side to escaped tokens) */
.ph-json-key    { color: var(--json-key); }
.ph-json-str    { color: var(--json-str); }
.ph-json-num    { color: var(--json-num); }
.ph-json-bool   { color: var(--json-bool); }
.ph-json-null   { color: var(--json-null); }

/* Headers table */
.ph-headers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-family: var(--mono);
}

.ph-headers-table th,
.ph-headers-table td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  word-break: break-all;
}

.ph-headers-table th {
  color: var(--mut);
  font-weight: 600;
  font-size: 11px;
}

/* No-detail placeholder */
.ph-no-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--mut);
  font-size: 13px;
  padding: 40px;
  text-align: center;
}

/* Theme toggle button */
.ph-theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-btn);
  padding: 6px;
  color: var(--mut);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
  line-height: 0;
}

.ph-theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Dashboard ── */
.ph-dash {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.ph-dash__wrap {
  max-width: 980px;
  margin: 0 auto 48px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ph-dash__spacer { flex: 1; }

.ph-dash__heading {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ph-dash__sub {
  font-size: 13px;
  color: var(--mut);
}

.ph-dash__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Endpoint card */
.ph-dash__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: border-color .12s;
}

.ph-dash__card:hover { border-color: var(--accent-soft); }

.ph-dash__card-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.ph-dash__card-meta { min-width: 0; }

.ph-dash__card-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-dash__card-url {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-dash__provs {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

/* Stat columns */
.ph-dash__stat {
  text-align: center;
  min-width: 64px;
  flex-shrink: 0;
}

.ph-dash__stat-n {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.ph-dash__stat-l {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mut);
}

/* Rename form */
.ph-dash__rename {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.ph-dash__rename-input {
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 6px 10px;
  color: var(--ink);
  width: 130px;
}

.ph-dash__rename-input:focus {
  outline: none;
  border-color: var(--accent);
}

.ph-dash__rename-btn {
  font-size: 12px;
  padding: 6px 10px;
}

/* New webhook dashed card */
.ph-dash__new {
  border: 1.5px dashed var(--line);
  background: var(--bg);
  border-radius: var(--radius-panel);
  padding: 15px 17px;
  text-align: center;
  color: var(--mut);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: border-color .12s, color .12s;
  width: 100%;
}

.ph-dash__new:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Flash messages */
.ph-flash {
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
}

.ph-flash--notice {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.ph-flash--alert {
  background: #fdeaea;
  color: #dc2626;
  border: 1px solid #dc2626;
}

/* Auth page */
.ph-auth {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ph-auth__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}

.ph-auth__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 32px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ph-auth__heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.ph-auth__sub {
  font-size: 13px;
  color: var(--mut);
}

.ph-auth__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-auth__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ph-auth__input {
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  color: var(--ink);
  width: 100%;
}

.ph-auth__input:focus {
  outline: none;
  border-color: var(--accent);
}

.ph-auth__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mut);
  cursor: pointer;
  user-select: none;
}

.ph-auth__remember input {
  accent-color: var(--accent);
}

.ph-auth__submit {
  width: 100%;
  justify-content: center;
  padding: 10px;
  font-size: 14px;
}

/* Footer */
.ph-footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--mut);
}

.ph-footer a {
  color: var(--mut);
  text-decoration: none;
}

.ph-footer a:hover {
  text-decoration: underline;
}

/* AUP / prose pages */
.ph-wrap--narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px;
}

/* Content/article pages - normal document flow so the whole page scrolls
   (unlike the fixed-height .ph-app inspector shell, which scrolls internally). */
.ph-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* Attention callouts inside prose */
.ph-callout {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-btn);
  background: var(--code-bg);
}
.ph-callout__icon { flex: none; font-size: 15px; line-height: 1.6; }
.ph-callout p { margin: 0; }
.ph-callout--warn { border-left-color: var(--badge-delete-fg); background: var(--badge-delete-bg); }
.ph-callout--tip  { border-left-color: var(--accent); background: var(--accent-soft); }
.ph-callout--note { border-left-color: var(--provider-fg); background: var(--provider-bg); }

.ph-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px;
}

.ph-prose {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.ph-prose h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.ph-prose p {
  margin: 0 0 14px;
}

.ph-prose ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.ph-prose li {
  margin-bottom: 6px;
}

/* Forms (abuse report) */
.ph-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ph-form__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ph-form__field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.ph-form__field input,
.ph-form__field textarea {
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 8px 10px;
  color: var(--ink);
}

.ph-form__field input:focus,
.ph-form__field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ph-form__errors {
  background: #fdeaea;
  border: 1px solid #dc2626;
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
}

/* Small button variant */
.ph-btn--sm {
  font-size: 12px;
  padding: 4px 10px;
  margin-top: 10px;
  display: inline-block;
}

/* ---- Landing page ---- */
.ph-landing {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* Single global header bar - identical on every page (rendered in layout). */
.ph-header {
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  box-sizing: border-box;
}

.ph-header__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.ph-header__brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}

.ph-header__brand strong { color: var(--accent); font-weight: 700; }
.ph-header__brand:hover { color: var(--accent); }

.ph-header__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* button_to wraps Sign out in a form - keep it inline in the nav. */
.ph-header__nav form { margin: 0; }

.ph-header__who {
  font-size: 13px;
  color: var(--mut);
}

.ph-header__nav .ph-btn--sm {
  margin-top: 0;
  font-size: 13px;
  padding: 7px 12px;
}

.ph-header__nav .ph-theme-toggle { padding: 9px; }
.ph-header__nav .ph-theme-toggle svg { width: 18px; height: 18px; }

.ph-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 40px;
  text-align: center;
}

.ph-hero__title {
  font-size: 38px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.ph-hero__sub {
  font-size: 17px;
  color: var(--mut);
  max-width: 580px;
  margin: 0 auto 28px;
}

.ph-hero__cta {
  font-size: 15px;
  padding: 12px 22px;
}

.ph-hero__note {
  font-size: 13px;
  color: var(--mut);
  margin-top: 12px;
}

.ph-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px;
  border-top: 1px solid var(--line);
}

.ph-section__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
}

.ph-section__lead {
  color: var(--mut);
  margin: 0 0 18px;
}

.ph-steps {
  list-style: none;
  display: grid;
  gap: 18px;
}

.ph-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ph-steps__n {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-steps strong { display: block; margin-bottom: 2px; }
.ph-steps p { color: var(--mut); margin: 0; }
.ph-steps code {
  font-family: var(--mono);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-badge);
  padding: 1px 5px;
  font-size: 13px;
}

.ph-providers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ph-providers__item {
  background: var(--provider-bg);
  color: var(--provider-fg);
  border: 1px solid var(--provider-border);
  border-radius: var(--radius-badge);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
}

.ph-prose h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 4px;
}

.ph-prose h3:first-child { margin-top: 0; }

.ph-final-cta {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 16px 56px;
  text-align: center;
}

/* Landing live-URL widget (provisioned in the background) */
.ph-hero-widget {
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.ph-hero-widget__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 8px;
}

.ph-hero-widget__url {
  font-family: var(--mono);
  font-size: 15px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  word-break: break-all;
  margin-bottom: 14px;
}

.ph-hero-widget__url .ph-token { color: var(--accent); }

.ph-hero-widget__actions {
  display: flex;
  gap: 10px;
}

.ph-hero-widget__hint {
  font-size: 12px;
  color: var(--mut);
  margin: 12px 0 0;
}

.ph-hero-widget--skeleton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--mut);
  font-size: 13px;
}

.ph-skeleton-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: ph-pulse 1s ease-in-out infinite;
}

@keyframes ph-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

/* Signature verify pane */
.ph-verify { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.ph-verify__row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mut); }
.ph-verify__row select,
.ph-verify__row input {
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 8px 10px;
  color: var(--ink);
}
.ph-verify__row input:focus,
.ph-verify__row select:focus { outline: none; border-color: var(--accent); }
.ph-verify__generic {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-btn);
}
.ph-verify__badge {
  font-size: 13px; padding: 10px 12px; border-radius: var(--radius-btn);
  border: 1px solid var(--line); color: var(--mut); background: var(--code-bg);
}
.ph-verify__badge--green { color: var(--badge-post-fg); background: var(--badge-post-bg); border-color: transparent; font-weight: 600; }
.ph-verify__badge--red { color: var(--badge-delete-fg); background: var(--badge-delete-bg); border-color: transparent; font-weight: 600; }
.ph-verify__badge--amber { color: var(--provider-fg); background: var(--provider-bg); border-color: var(--provider-border); }
.ph-verify__doclink { font-size: 12px; color: var(--mut); text-decoration: none; }
.ph-verify__doclink:hover { color: var(--accent); text-decoration: underline; }

/* Admin (all-endpoints) page */
.ph-admin__badge {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-badge);
  padding: 2px 7px;
  margin-left: 10px;
}
.ph-admin__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.ph-admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.ph-admin__table th,
.ph-admin__table td {
  text-align: left;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
}
.ph-admin__table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mut);
}
.ph-admin__table tbody tr:last-child td { border-bottom: 0; }
.ph-admin__table tbody tr:hover { background: var(--req-hover); }
.ph-admin__table td a {
  font-family: var(--mono);
  color: var(--accent);
  text-decoration: none;
}
.ph-admin__num { text-align: right; font-variant-numeric: tabular-nums; }
.ph-admin__mono { font-family: var(--mono); color: var(--mut); }
