/* Same palette as the shopify-hub Test Hub. */
:root {
  --bg: #f6f8fb; --surface: #ffffff; --surface2: #f1f5f9;
  --border: #d9e1ec; --border2: #bac8d9;
  --text: #172033; --text2: #4d5b70; --text3: #7a889b;
  --accent: #2563eb; --accent2: #1d4ed8;
  --green: #168757; --green-bg: rgba(22, 135, 87, .1);
  --red: #d92d20; --red-bg: rgba(217, 45, 32, .1);
  --orange: #b7791f; --orange-bg: rgba(183, 121, 31, .12);
  --radius: 10px; --radius-sm: 6px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px;
}
a { color: var(--accent2); text-decoration: none; }
h1 { font-size: 24px; letter-spacing: -.5px; margin: 0 0 16px; overflow-wrap: anywhere; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.muted { color: var(--text2); overflow-wrap: anywhere; }
.hint { display: block; color: var(--text3); font-size: 13px; font-weight: 400; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.logo {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 8px; font-size: 15px;
}
.container { max-width: 1040px; margin: 0 auto; padding: 24px 20px 48px; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }

.card, .store {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin: 0 0 16px;
}
.narrow { width: 100%; max-width: 400px; margin: 0; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-top: 24px; }
.store-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--green-bg); color: var(--green); }
.badge-err { background: var(--red-bg); color: var(--red); }
.badge-muted { background: var(--surface2); color: var(--text2); }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; overflow-wrap: anywhere; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { background: var(--green-bg); color: #0f6b44; }
.alert-err { background: var(--red-bg); color: #a8231a; }
.alert-warn { background: var(--orange-bg); color: #8a5a12; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; margin: 0 0 16px; }
.facts-compact { margin: 8px 0 0; }
dt { color: var(--text3); font-size: 12px; font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.actions form { margin: 0; }

.btn {
  display: inline-block; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4;
  color: var(--text); background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); cursor: pointer; text-align: center;
}
.btn:hover { background: var(--surface2); }
.btn:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-quiet { border-color: transparent; color: var(--text2); }
.btn-small { padding: 4px 10px; font-size: 13px; flex: none; }

.stack { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text2); }
input {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-sm);
}

.copy-row { margin-bottom: 14px; }
.copy-label { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.copy-value {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; background: var(--surface2); border-radius: var(--radius-sm); min-width: 0;
}

@media (max-width: 720px) {
  .columns { grid-template-columns: 1fr; }
  .actions .btn, .actions form { flex: 1 1 calc(50% - 8px); }
  .actions form .btn { width: 100%; }
}
