:root {
  --bg: #f7f7f5;
  --ink: #17181c;
  --ink-soft: #55585f;
  --line: #dcdcd7;
  --accent: #437cdf;
  --accent-soft: #e4f2f0;
  --danger: #b83b2f;
  --danger-soft: #fdf2f1;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

header {
  margin-bottom: 56px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

header p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
  max-width: 46ch;
}

.apps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.app:hover,
.app:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.10);
}

.app:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-main {
  min-width: 0;
}

.app-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.app-desc {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
}

.app-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.arrow {
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 16px;
  transition: transform 0.15s ease;
}

.app:hover .arrow {
  transform: translateX(2px);
  color: var(--accent);
}

footer {
  margin-top: 64px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .wrap { padding: 76px 18px 72px; }
  h1 { font-size: 28px; }
  .app { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- site nav: hamburger + drawer ---------- */

.nav-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 60;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(23, 24, 28, 0.08);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(23, 24, 28, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 58;
  width: 272px;
  max-width: 82vw;
  padding: 76px 18px 24px;
  background: #fff;
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 14px;
  padding-left: 12px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-nav a:hover,
.drawer-nav a:focus-visible {
  background: var(--bg);
  color: var(--accent);
}

.drawer-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.drawer-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  background: var(--bg);
}

.drawer-foot {
  margin-top: 22px;
  padding: 16px 12px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .nav-overlay,
  .nav-toggle span { transition: none; }
}

/* ---------- content pages ---------- */

.prose {
  max-width: 62ch;
}

.prose h2 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
}

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

.prose p,
.prose li {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.prose li {
  margin-bottom: 8px;
}

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

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(67, 124, 223, 0.35);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.note {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 12px;
}

.note p:last-child {
  margin-bottom: 0;
}

.updated {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

.contact-btn {
  font: inherit;
  font-size: 15px;
  color: var(--accent);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(67, 124, 223, 0.35);
  padding: 0;
  cursor: pointer;
}

.contact-btn:hover {
  border-bottom-color: var(--accent);
}

/* ---------- forms / account deletion ---------- */

.card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 420px;
}

.card h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
}

.card > p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 550;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.field input:disabled {
  opacity: 0.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 550;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

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

.btn-primary:hover:not(:disabled) {
  background: #3568c2;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #9d3227;
}

.btn-danger:focus-visible {
  outline-color: var(--danger);
}

.btn-ghost {
  background: none;
  color: var(--ink-soft);
  border-color: var(--line);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.link-btn {
  font: inherit;
  font-size: 13.5px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

.msg {
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 8px;
  margin: 0 0 16px;
}

.msg:empty {
  display: none;
}

.msg-error {
  background: var(--danger-soft);
  border: 1px solid #f0d3cf;
  color: #8f2e24;
}

.msg-info {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.msg-ok {
  background: var(--accent-soft);
  border: 1px solid #c9e4e0;
  color: #1f5f58;
}

.account-line {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.danger-list {
  padding-left: 20px;
  margin: 0 0 18px;
}

.danger-list li {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.card-danger {
  border-color: #e8c4bf;
}

.card-danger h2 {
  color: var(--danger);
}

.busy {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-family: var(--mono);
}

.btn-gap {
  display: inline-block;
  width: 28px;
}

@media (max-width: 520px) {
  .btn-gap { width: 0; }
}

.choice {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.choice h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 5px;
}

.choice p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

#step-choose .btn-row {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.msg strong {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  white-space: nowrap;
  padding: 1px 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}

#confirm-phrase {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
