:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #172033;
  background: #eef2f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(43, 102, 246, 0.10), transparent 34rem),
    #eef2f7;
}

button, input, select { font: inherit; }

button { cursor: pointer; }

.shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 54px 0 36px;
}

.hero { margin-bottom: 26px; }

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #52627a;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.hero-copy {
  max-width: 660px;
  margin: 16px 0 18px;
  color: #52627a;
  font-size: 1.02rem;
  line-height: 1.65;
}

.security-strip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #d5deea;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #42526a;
  font-size: 0.86rem;
  font-weight: 650;
}

.security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20865a;
  box-shadow: 0 0 0 4px rgba(32,134,90,0.12);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  border: 1px solid #d7dfeb;
  border-radius: 14px;
  background: #e4eaf2;
}

.mode-tab {
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: transparent;
  color: #5b687b;
  font-weight: 700;
}

.mode-tab.is-active {
  background: #fff;
  color: #1f3f82;
  box-shadow: 0 1px 3px rgba(30, 49, 78, 0.12);
}

.card {
  border: 1px solid #d9e0ea;
  border-radius: 20px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 16px 45px rgba(28, 45, 72, 0.08);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eaf1ff;
  color: #2b5ca7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge-warn {
  background: #fff4dc;
  color: #8b5a00;
}

.section-copy {
  margin: 0 0 25px;
  color: #5c697b;
  line-height: 1.6;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: #253247;
  font-size: 0.9rem;
  font-weight: 720;
}

input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c9d3e1;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input:focus, select:focus {
  border-color: #3b6fd8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,111,216,0.12);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.ghost-button {
  min-width: 90px;
  border: 1px solid #c9d3e1;
  border-radius: 10px;
  padding: 0 13px;
  background: #fff;
  color: #42526a;
  font-weight: 700;
}

.ghost-button:hover { background: #f5f7fa; }

.primary-button {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  background: #2458ba;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(36,88,186,0.20);
}

.primary-button:hover { background: #1f4fa8; }
.primary-button:disabled { cursor: wait; opacity: 0.66; }

.field-hint {
  margin-top: 7px;
  color: #7a8798;
  font-size: 0.8rem;
  line-height: 1.45;
}

.bootstrap-state {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 22px;
  padding: 14px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #f7f9fc;
}

.bootstrap-state.is-ready {
  border-color: #b7ddcd;
  background: #f0faf6;
}

.bootstrap-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dce6f6;
  color: #274b86;
  font-weight: 850;
}

.bootstrap-state.is-ready .bootstrap-icon {
  background: #d5f0e4;
  color: #176741;
}

.bootstrap-state p {
  margin: 3px 0 0;
  color: #667487;
  font-size: 0.86rem;
}

.status {
  min-height: 0;
  margin-top: 18px;
  border-radius: 11px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status:not(:empty) {
  padding: 12px 14px;
  border: 1px solid #d8e0eb;
  background: #f7f9fc;
}

.status.is-error {
  border-color: #efc8c8;
  background: #fff5f5;
  color: #9a3030;
}

.status.is-success {
  border-color: #b7ddcd;
  background: #f0faf6;
  color: #176741;
}

.result-box {
  margin-top: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #f7f9fc;
  overflow: hidden;
}

.result-label {
  padding: 10px 13px;
  border-bottom: 1px solid #d9e0ea;
  color: #536176;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

pre {
  margin: 0;
  padding: 13px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #27344a;
  font: 0.82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.privacy-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e4e9f0;
  color: #7a8798;
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer {
  padding: 22px 4px 0;
  text-align: center;
  color: #8b96a6;
  font-size: 0.76rem;
}

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 760px);
    padding-top: 26px;
  }

  .card { padding: 20px; border-radius: 16px; }
  .card-head { display: block; }
  .badge { display: inline-block; margin-top: 10px; }
  .mode-tabs { grid-template-columns: 1fr; }
  .password-row { grid-template-columns: 1fr; }
  .ghost-button { min-height: 42px; }
}
