/* ClearMyPI public face — Filed nothing. Original Google. PI only. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Bold.ttf") format("truetype");
}
:root {
  --page: #F7F7F5;
  --ink: #161616;
  --mute: #5A5A5A;
  --rule: #D0D0CC;
  --oxide: #A33B22;
  --wipe: #3E151A;
  --bg: var(--page);
  --text: var(--ink);
  --muted: var(--mute);
  --border: var(--rule);
  --card-bg: #fff;
  --header-height: 60px;
  --danger: var(--wipe);
  --danger-border: var(--wipe);
}

* { box-sizing: border-box; }
html { height: 100%; }
html, body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
a { color: var(--ink); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Wordmark — not a sticky app bar */
header {
  background: var(--page);
}
.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.25rem 5vw 0;
}
.logo img { height: 2.5rem; width: auto; }
.wordmark {
  display: inline-block;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .pi { font-weight: 700; color: var(--oxide); }
.wordmark .frank {
  display: block;
  width: 6.85rem;
  height: 0;
  border-bottom: 2px solid var(--oxide);
  margin-top: 0.28rem;
}

main {
  flex: 1;
  padding-bottom: 2rem;
}

/* Landing — one claim, two buttons, tiny line */
.hero, #hero-section {
  display: block;
  padding: 18vh 5vw 6rem;
  text-align: center;
  background: var(--page);
}
.hero h1, #hero-section h1 {
  font-size: clamp(1.7rem, 4.6vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.7rem;
  color: var(--ink);
}
.hero h1::after, #hero-section h1::after { content: none; }
.hero p, #hero-section p {
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 0 auto 1.6rem;
  color: var(--ink);
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.nav-home { margin: 1.25rem 0; }
.policy .nav-home { text-align: left; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 3px;
  cursor: pointer;
  transition: filter 0.12s ease;
  min-height: 48px;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--page); }
.btn-secondary {
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-danger {
  background: transparent;
  color: var(--wipe);
  border: 1px solid var(--wipe);
  min-height: 48px;
  padding: 0.7rem 1.15rem;
}
.btn-ghost {
  background: none;
  border: 1px solid var(--rule);
  color: var(--mute);
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  min-height: 40px;
}
.btn:hover { filter: brightness(0.96); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
.tiny-line { font-size: 0.85rem; color: var(--mute); }

.privacy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 0.75rem 0 0;
}
.privacy-badge {
  font-size: 0.75rem;
  background: var(--page);
  color: var(--mute);
  padding: 0.25rem 0.6rem;
  border-radius: 0;
  border: 1px solid var(--rule);
}

/* One job per screen */
.email-form, .otp-screen, .name-id-form, .success-screen,
.report-screen, .qc-screen,
.subscribe-form, .subscribe-otp-screen, .deleted-screen {
  padding: 2.5rem 5vw 3rem;
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
}
.email-form h2, .otp-screen h2, .name-id-form h2, .success-screen h2,
.report-screen h2, .qc-screen h2, .subscribe-form h2,
.subscribe-otp-screen h2, .deleted-screen h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.email-form input[type="email"],
.subscribe-form input[type="email"],
.subscribe-form input[type="text"],
.name-id-form input[type="text"],
.name-id-form input[type="tel"],
.otp-screen input[type="text"],
.subscribe-otp-screen input[type="text"] {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  background: #fff;
  min-height: 48px;
  font-family: inherit;
}
input.parked:disabled,
input:disabled.parked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #ecece8;
  color: var(--mute);
}
label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  flex: none;
}
.letter-preview {
  text-align: left;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 1.25rem 1.35rem;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto 1rem;
}
.report-screen .letter-preview { white-space: normal; }
.qc-screen { max-width: 36rem; }
.otp-input {
  width: 100%;
  max-width: 14rem;
  padding: 0.75rem;
  font-size: 1.45rem;
  letter-spacing: 0.28rem;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin: 0 auto 1rem;
  display: block;
}
label {
  font-size: 0.88rem;
  color: var(--mute);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto 1rem;
  cursor: pointer;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: break-word;
}
label > span { flex: 1; min-width: 0; }
label a { white-space: normal; }
.optional-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  justify-content: flex-start;
  width: 100%;
  max-width: 22rem;
  margin: 0.25rem auto 1rem;
  font-size: 0.88rem;
  color: var(--mute);
  text-align: left;
}
.optional-toggle input { margin-top: 0.15rem; }
.field-block.hidden { display: none !important; }
.form-hint {
  font-size: 0.85rem;
  color: var(--mute);
  margin: 0 0 0.75rem;
}

/* Records — a list, not an app */
#dashboard-screen {
  display: none;
  padding: 2rem 5vw 3rem;
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
}
#dashboard-screen .dash-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
#dashboard-screen .dash-sub {
  text-align: center;
  color: var(--mute);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}
.card {
  background: transparent;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: 1rem 0;
  margin-bottom: 0;
  text-align: left;
}
.card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.card-danger {
  text-align: left;
  border-color: var(--wipe);
}
.card-danger h3 {
  color: var(--wipe);
  margin-bottom: 0.35rem;
}
.card-danger p {
  font-size: 0.85rem;
  color: var(--mute);
  margin: 0 0 0.75rem;
}
#dash-summary { font-size: 0.95rem; }
#dash-requests { font-size: 0.9rem; min-height: 1.5rem; }
#dash-quota { font-size: 0.75rem; color: var(--mute); margin-bottom: 0.35rem; }
#dash-chat {
  height: 110px;
  overflow: auto;
  border: 1px solid var(--rule);
  padding: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  background: #fff;
}
.assistant-row {
  display: flex;
  gap: 0.4rem;
}
.assistant-row input {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 0.85rem;
  min-height: 48px;
}
.dash-actions {
  text-align: center;
  margin-top: 1.25rem;
}

/* Kept so old JS that toggles .explanation does not crash */
.explanation { display: none; }
.explanation-sub { display: none; }

footer {
  padding: 2.5rem 5vw 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--mute);
  background: var(--page);
}
footer .build-stamp { display: none; }

.tiny { font-size: 0.8rem; color: var(--mute); }
.hidden { display: none !important; }

.policy {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 5vw 4rem;
}
.policy h1 { font-size: 1.5rem; font-weight: 600; }
.policy h2 { font-size: 1.05rem; margin-top: 1.75rem; }
.policy h3 { font-size: 0.95rem; }

@media (min-width: 640px) {
  .email-form input[type="email"],
  .subscribe-form input[type="email"],
  .subscribe-form input[type="text"],
  .name-id-form input[type="text"],
  .name-id-form input[type="tel"] { max-width: 22rem; }
}

@media (max-width: 480px) {
  .hero, #hero-section { padding: 10vh 4vw 2rem; }
  .hero h1, #hero-section h1 { font-size: 1.6rem; }
  .buttons { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .header-content { padding: 1.5rem 4vw 0; }
  .email-form, .otp-screen, .name-id-form, .success-screen,
  .report-screen, .qc-screen,
  .subscribe-form, .subscribe-otp-screen, .deleted-screen, #dashboard-screen {
    padding-left: 4vw;
    padding-right: 4vw;
    max-width: 100%;
  }
  .otp-input {
    max-width: 100%;
    letter-spacing: 0.18rem;
    font-size: 1.25rem;
  }
  input, select, textarea, label, .card, .btn {
    max-width: 100%;
  }
}

@media (max-width: 375px) {
  .hero h1, #hero-section h1 { font-size: 1.45rem; }
  .btn { min-height: 48px; }
  .wordmark { font-size: 1.2rem; }
  .wordmark .frank { width: 6.1rem; }
}
