:root {
  --tide: #0f6e6a;
  --harbor: #0a4f4c;
  --ink: #121417;
  --paper: #f5f7f8;
  --quiet: #5c6570;
  --rule: #d8dee3;
  --snow: #ffffff;
  --font-sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --focus: #0f6e6a;
  --focus-ring: 0 0 0 3px rgba(15, 110, 106, 0.35);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 110, 106, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(91, 124, 138, 0.08), transparent 55%),
    var(--paper);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(15, 110, 106, 0.15);
}

a { color: var(--tide); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--harbor); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--snow);
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--snow);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Vanish bars — brand motif (ink → Tide → fade) */
.vanish-bars {
  --vb-h: 4px;
  --vb-gap: 4px;
  display: flex;
  align-items: center;
  gap: var(--vb-gap);
  width: 100%;
  max-width: 12rem;
}
.vanish-bars > span {
  display: block;
  height: var(--vb-h);
  border-radius: 999px;
  background: var(--tide);
  flex: 1 1 0;
  min-width: 0;
}
.vanish-bars > span:nth-child(1) { flex: 2.4; background: var(--ink); }
.vanish-bars > span:nth-child(2) { flex: 1.8; opacity: 1; }
.vanish-bars > span:nth-child(3) { flex: 1.2; opacity: 0.55; }
.vanish-bars > span:nth-child(4) { flex: 0.8; opacity: 0.32; }
.vanish-bars > span:nth-child(5) { flex: 0.45; opacity: 0.14; }

.vanish-bars--brand {
  max-width: 5.6rem;
  --vb-h: 3px;
  --vb-gap: 3px;
}
.vanish-bars--title {
  max-width: min(22rem, 100%);
  --vb-h: 5px;
  --vb-gap: 5px;
  margin: 0.15rem 0 0.25rem;
}
.vanish-bars--panel {
  --ttl: 1;
  max-width: 100%;
  width: 100%;
  --vb-h: 4px;
  --vb-gap: 5px;
  margin: 0 0 1rem;
  transform: scaleX(var(--ttl));
  transform-origin: left center;
  opacity: 1;
  transition:
    transform 0.35s linear,
    opacity 0.7s ease;
}
.vanish-bars--panel > span {
  transition: opacity 0.35s linear;
}
.vanish-bars--panel.is-expired {
  opacity: 0;
  transform: scaleX(0);
  pointer-events: none;
}
.vanish-bars--footer {
  max-width: 16rem;
  --vb-h: 3px;
  margin: 0 0 1rem;
}

.nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; }
.nav a {
  color: var(--quiet);
  text-decoration: none;
  border-radius: 6px;
  padding: 0.15rem 0.1rem;
}
.nav a:hover { color: var(--ink); }

.hero {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  gap: 0.85rem;
  max-width: 40rem;
}
.hero h1,
.section h1,
.section h2 {
  text-wrap: balance;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  scroll-margin-top: 1rem;
}
.tagline {
  margin: 0;
  color: var(--tide);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  text-transform: none;
}
.lede { margin: 0; color: var(--quiet); font-size: 1.05rem; max-width: 36rem; text-wrap: pretty; }

.panel {
  margin: 0.5rem 0 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  background: var(--snow);
  border-radius: 14px;
}
.panel:focus-within {
  border-color: color-mix(in srgb, var(--tide) 45%, var(--rule));
}
.inbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.turnstile-row {
  margin-top: 0.85rem;
  max-width: 32rem;
}
.turnstile-row[hidden] {
  display: none;
}
.terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--quiet);
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
  touch-action: manipulation;
}
.terms-agree input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--tide);
  width: 1.05rem;
  height: 1.05rem;
}
.terms-agree a {
  font-weight: 600;
}
.terms-agree:focus-within {
  border-color: color-mix(in srgb, var(--tide) 45%, var(--rule));
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

/* Signup test profile */
.profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.profile-toolbar label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.profile-toolbar select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  min-width: 12rem;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.profile-mount { margin-top: 0.25rem; }
.profile-card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.profile-head {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  background: var(--snow);
}
.profile-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-wrap: balance;
}
.profile-badge {
  margin: 0.35rem 0 0;
  color: var(--quiet);
  font-size: 0.85rem;
}
.profile-fields { display: grid; }
.profile-row {
  display: grid;
  grid-template-columns: minmax(7rem, 9.5rem) 1fr auto;
  gap: 0.55rem 0.75rem;
  align-items: center;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.profile-row:last-of-type { border-bottom: 0; }
.profile-label {
  color: var(--quiet);
  font-size: 0.82rem;
  font-weight: 600;
}
.profile-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  min-width: 0;
  color: var(--ink);
}
.profile-copy {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--snow);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.profile-copy:hover { border-color: var(--quiet); }
.profile-note {
  margin: 0;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--quiet);
  font-size: 0.85rem;
  background: var(--snow);
}
.profile-kit {
  margin-top: 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--snow);
}
.profile-kit > p {
  margin: 0 0 0.75rem;
  color: var(--quiet);
  font-size: 0.92rem;
}
.profile-kit .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 640px) {
  .profile-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label copy"
      "value value";
  }
  .profile-label { grid-area: label; }
  .profile-value { grid-area: value; }
  .profile-copy { grid-area: copy; }
}
.address {
  flex: 1 1 240px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  word-break: break-all;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--tide);
  color: white;
  font: inherit;
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.btn:hover { background: var(--harbor); color: white; }
.btn:active { background: var(--harbor); filter: brightness(0.92); }
a.btn { color: white; text-decoration: none; }
a.btn:hover { color: white; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn.secondary:hover {
  border-color: var(--quiet);
  color: var(--ink);
  background: var(--paper);
}
.btn.secondary:active {
  background: var(--rule);
}
a.btn.secondary { color: var(--ink); }
a.btn.secondary:hover { color: var(--ink); }

.meta-line {
  margin: 0.9rem 0 0;
  color: var(--quiet);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.meta-line label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.meta-line input[type="number"] {
  width: 4rem;
  font: inherit;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--snow);
  color: var(--ink);
}

/* Password generator settings */
.pw-settings {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}
.pw-length {
  display: grid;
  gap: 0.45rem;
}
.pw-length-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.pw-length-row label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}
.pw-length-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 12rem;
  min-width: 0;
}
.pw-length-controls input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--tide);
  touch-action: manipulation;
}
.pw-length-controls input[type="number"] {
  width: 4rem;
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.pw-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}
.pw-classes label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--quiet);
  font-size: 0.92rem;
  touch-action: manipulation;
}
.pw-classes input {
  accent-color: var(--tide);
}
.pw-hint {
  margin: 0;
  color: var(--quiet);
  font-size: 0.85rem;
}
.pw-hint[data-tone="warn"] { color: #8a4b08; }
.messages { margin-top: 1.25rem; display: grid; gap: 0.75rem; }
.msg {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.msg h3 { margin: 0 0 0.25rem; font-size: 1rem; text-wrap: balance; }
.msg .from { color: var(--quiet); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.msg pre {
  margin: 0.7rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 0.92rem;
}
.empty { color: var(--quiet); margin: 1rem 0 0; }

.section { padding: 1rem 0 3rem; max-width: 42rem; }
.section.prose { max-width: 40rem; }
.section h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  scroll-margin-top: 1rem;
  color: var(--ink);
}
.section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin: 1.75rem 0 0.35rem;
  scroll-margin-top: 1rem;
  color: var(--ink);
}
.section h2:first-of-type { margin-top: 0; }
.section h3 {
  font-size: 1.15rem;
  margin: 1.35rem 0 0.4rem;
  font-weight: 600;
  scroll-margin-top: 1rem;
}
.section .vanish-bars--title { margin-bottom: 1rem; }
.section p { color: var(--quiet); margin: 0 0 1rem; }
.section ul, .section ol {
  color: var(--quiet);
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.section li { margin: 0.35rem 0; }

/* CTA: text + action share the row; stacks cleanly on narrow screens */
.section .cta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--snow);
}
.section .cta-box > p {
  margin: 0;
  flex: 1 1 14rem;
  min-width: 0;
  color: var(--quiet);
}
.section .cta-box > .btn,
.section .cta-box > .cta-actions {
  flex: 0 0 auto;
}
.section .cta-box .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.faq details {
  border-top: 1px solid var(--rule);
  padding: 0.85rem 0;
}
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  border-radius: 4px;
}
.faq details p { margin: 0.6rem 0 0; }
.msg-actions { margin-top: 0.55rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.msg-actions button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--snow);
  cursor: pointer;
  color: var(--ink);
  touch-action: manipulation;
}
.msg-actions button:hover { border-color: var(--quiet); }
.msg-actions button:active { background: var(--paper); }
.msg-actions button[aria-pressed="true"] {
  border-color: var(--tide);
  color: var(--harbor);
}
.msg-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.msg-frame {
  margin-top: 0.7rem;
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}
.related {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}
.related a {
  color: var(--tide);
  overflow-wrap: anywhere;
}
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}
.tool-link {
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--snow);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tool-link:hover {
  border-color: var(--tide);
  background: var(--paper);
  color: inherit;
}
.tool-link:active {
  background: color-mix(in srgb, var(--tide) 8%, var(--paper));
}
.tool-link h3 { margin: 0 0 0.45rem; font-size: 1.05rem; text-wrap: balance; }
.tool-link .vanish-bars {
  max-width: 5rem;
  --vb-h: 3px;
  --vb-gap: 3px;
  margin: 0 0 0.55rem;
}
.tool-link p { margin: 0; color: var(--quiet); font-size: 0.9rem; }

.site-footer {
  border-top: none;
  padding: 1.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  color: var(--quiet);
  font-size: 0.88rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 0.75rem; }
.site-footer a {
  color: var(--quiet);
  text-decoration: none;
  border-radius: 4px;
}
.site-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .hero { padding-top: 2rem; }
  .site-header { flex-wrap: wrap; }
  .section .cta-box {
    flex-direction: column;
    align-items: stretch;
  }
  .section .cta-box > .btn,
  .section .cta-box > .cta-actions {
    width: 100%;
  }
  .section .cta-box > .btn,
  .section .cta-box .cta-actions .btn {
    width: 100%;
  }
}
