@font-face {
  font-family: 'Poppins';
  src: url('./fonts/Poppins-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('./fonts/Poppins-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --primary: #074fb6;
  --primary-action: #0b57d0;
  --primary-soft: #e0edff;
  --primary-selected: #eaf2ff;
  --primary-pressed: #f2f7ff;
  --text: #1d1b20;
  --text-strong: #322f35;
  --text-secondary: #48464c;
  --text-muted: #79767d;
  --border: #d9e5f6;
  --surface: #ffffff;
  --background: #f8faff;
  --danger-soft: #ffedea;
  --danger-text: #b91c1c;
  --action-red: #f02a22;
  --action-red-hover: #d9251e;
  --success-soft: #e9f8ef;
  --success-text: #176b3a;
  --modal-backdrop: rgba(29, 27, 32, 0.56);
  --field-error: #ef4444;
  --control-border: #aea9b1;
  --control-divider: #eaeaea;

  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;

  --font-size-caption: 12px;
  --font-size-input: 15px;
  --font-size-body: 16px;
  --font-size-label: 18px;
  --font-size-modal-title: 22px;
  --font-size-policy-body: 14px;
  --font-size-policy-title: 20px;
  --font-size-screen-title: 29px;
  --font-weight-medium: 500;

  --line-height-caption: 18px;
  --line-height-body: 23px;
  --line-height-modal-title: 30px;
  --line-height-policy-body: 28px;
  --line-height-policy-subtitle: 20px;
  --line-height-policy-title: 30px;
  --line-height-screen-title: 32px;

  --radius-field: 4px;
  --border-width-field: 1px;
  --focus-ring-width: 2px;
  --field-min-height: 56px;
  --feedback-min-height: 88px;
  --dropdown-max-height: 240px;
  --dropdown-offset: 4px;
  --dropdown-radius: 8px;
  --dropdown-item-font-size: 14px;
  --dropdown-item-padding-block: 13px;
  --dropdown-item-padding-inline: 14px;
  --dropdown-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  --card-radius: 12px;
  --modal-radius: 24px;
  --modal-max-width: 420px;
  --modal-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  --bullet-indent: 22px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(215deg, #cde1fe 0%, #f2f7ff 15%, #ffffff 30%, #f8faff 72%, #ffffff 100%);
  background-attachment: fixed;
  font-family: Poppins, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--primary-action);
}

a:hover {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(11, 87, 208, 0.25);
  outline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.native-app .site-header {
  display: none;
}

.nav {
  width: min(800px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary);
}

.page-shell {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.native-app .page-shell {
  width: 100%;
  padding: var(--space-16) var(--space-16) var(--space-48);
  background: transparent;
}

.native-app {
  background: transparent;
  line-height: normal;
}

.native-app .site-footer {
  display: none !important;
}

.hero,
.document-header {
  margin: 0 0 32px;
}

.hero {
  padding: 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
}

h1 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 500;
}

.hero-copy {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.updated {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-action);
  color: #ffffff;
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button.secondary {
  background: var(--surface);
  color: var(--primary);
}

.bridge-status {
  margin: 12px 0 0;
  color: var(--danger-text);
  font-size: 0.875rem;
}

.native-deletion-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.deletion-step[hidden] {
  display: none;
}

#deletion-reason-step:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.deletion-step-actions {
  padding: 0 var(--space-4);
}

.deletion-step-back {
  width: fit-content;
  padding: var(--space-4) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  border: 0;
  background: transparent;
  color: var(--primary);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: var(--font-size-policy-body);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-policy-subtitle);
  cursor: pointer;
}

.deletion-step-back:hover {
  text-decoration: underline;
}

.account-deletion-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.account-deletion-header {
  padding: 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.account-deletion-header h1,
.account-deletion-section h2 {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-policy-title);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-policy-title);
}

.account-deletion-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-policy-body);
  line-height: var(--line-height-policy-subtitle);
}

.account-deletion-policy {
  padding: 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.account-deletion-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.account-deletion-section p,
.account-deletion-list li {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-policy-body);
  font-weight: 400;
  line-height: var(--line-height-policy-body);
}

.account-deletion-section strong {
  font-weight: var(--font-weight-medium);
}

.account-deletion-list {
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  list-style: none;
}

.account-deletion-list li {
  position: relative;
  padding-left: var(--bullet-indent);
}

.account-deletion-list li::before {
  content: '\2022';
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 700;
}

.deletion-form-header {
  margin-bottom: var(--space-20);
}

.deletion-form-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-size-screen-title);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-screen-title);
}

.deletion-form-header p {
  margin: var(--space-8) 0 0;
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

#native-deletion-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field label {
  color: var(--text);
  font-size: var(--font-size-label);
  line-height: normal;
}

.dropdown-field {
  position: relative;
}

.field-control,
.form-field textarea {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: var(--border-width-field) solid var(--control-border);
  border-radius: var(--radius-field);
  background: var(--surface);
  color: var(--text);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: var(--font-size-input);
  font-weight: 400;
  line-height: normal;
}

.dropdown-trigger {
  min-height: var(--field-min-height);
  padding: var(--space-8) var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  cursor: pointer;
  text-align: left;
}

.dropdown-trigger.is-placeholder {
  color: var(--text-muted);
}

.dropdown-indicator {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  border-top: 9px solid var(--text-secondary);
  transition: transform 120ms ease;
}

.dropdown-trigger[aria-expanded='true'] .dropdown-indicator {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--dropdown-offset));
  right: 0;
  left: 0;
  max-height: var(--dropdown-max-height);
  overflow-y: auto;
  border: var(--border-width-field) solid var(--control-border);
  border-radius: var(--dropdown-radius);
  background: var(--surface);
  box-shadow: var(--dropdown-shadow);
}

.dropdown-menu [role='option'] {
  width: 100%;
  padding: var(--dropdown-item-padding-block) var(--dropdown-item-padding-inline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--control-divider);
  background: var(--surface);
  color: var(--text-strong);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: var(--dropdown-item-font-size);
  font-weight: 400;
  line-height: normal;
  text-align: left;
}

.dropdown-menu [role='option']:last-child {
  border-bottom: 0;
}

.dropdown-menu [role='option'][aria-selected='true'] {
  background: var(--primary-selected);
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.dropdown-menu [role='option'][aria-selected='true']::after {
  content: '\2713';
  margin-left: var(--space-8);
  color: var(--primary);
  font-size: 18px;
}

.dropdown-menu [role='option']:active {
  background: var(--primary-pressed);
}

.form-field textarea {
  min-height: var(--feedback-min-height);
  padding: var(--space-12);
  resize: vertical;
}

.native-app .field-control:focus,
.native-app .form-field textarea:focus,
.native-app .dropdown-menu [role='option']:focus {
  outline: none;
}

.native-app .field-control:focus-visible,
.native-app .form-field textarea:focus-visible,
.native-app .dropdown-menu [role='option']:focus-visible {
  outline: var(--focus-ring-width) solid var(--primary);
  outline-offset: 0;
}

.field-control[aria-invalid='true'] {
  border-color: var(--field-error);
}

.field-error {
  margin: var(--space-2) 0 0;
  color: var(--field-error);
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
}

.submit-button {
  width: 100%;
  margin-top: var(--space-10);
}

.native-app .submit-button {
  min-height: 48px;
  padding: var(--space-10) var(--space-16);
  border: 0;
  border-radius: var(--dropdown-radius);
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  color: var(--surface);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: normal;
}

.native-app .submit-button:hover {
  background: var(--primary);
}

.native-app .submit-button.danger,
.native-app .submit-button.danger:hover {
  border-color: var(--action-red);
  background: var(--action-red);
}

.native-app .submit-button:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.web-deletion-public .native-deletion-content {
  margin: var(--space-32) 0;
}

.web-deletion-public .account-deletion-content,
.web-deletion-public .deletion-form {
  padding: 0 var(--space-4);
}

.web-deletion-public .deletion-form {
  padding-top: var(--space-32);
  border-top: 1px solid var(--border);
}

.web-authentication {
  padding: var(--space-20);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.web-authentication h2,
.web-deletion-success h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-size-policy-title);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-policy-title);
}

.web-authentication > p,
.web-deletion-success p {
  margin: var(--space-6) 0 0;
  color: var(--text-secondary);
  font-size: var(--font-size-policy-body);
  line-height: var(--line-height-policy-subtitle);
}

.web-auth-loading,
#web-sign-in-panel,
.web-signed-in-panel {
  margin-top: var(--space-20);
}

.web-google-button {
  width: 100%;
}

.web-divider {
  margin: var(--space-16) 0;
  display: flex;
  align-items: center;
  gap: var(--space-12);
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.web-divider span {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.web-email-sign-in {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.web-input {
  min-height: var(--field-min-height);
  padding: var(--space-8) var(--space-12);
}

.web-signed-in-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.web-signed-in-panel p {
  margin: 0;
  overflow-wrap: anywhere;
}

.web-signed-in-panel .button {
  width: auto;
  flex: 0 0 auto;
}

.web-status {
  margin: var(--space-16) 0 0;
  padding: var(--space-12);
  border-radius: var(--dropdown-radius);
  background: var(--primary-soft);
  color: var(--text-secondary);
  font-size: var(--font-size-policy-body);
  line-height: var(--line-height-policy-subtitle);
}

.web-status.error {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.web-status.success {
  background: var(--success-soft);
  color: var(--success-text);
}

.button.danger {
  border-color: var(--action-red);
  background: var(--action-red);
}

.button.danger:hover {
  border-color: var(--action-red-hover);
  background: var(--action-red-hover);
}

.web-deletion-success {
  padding: var(--space-20);
  border: 1px solid var(--success-text);
  border-radius: var(--card-radius);
  background: var(--success-soft);
}

.web-deletion-success h2,
.web-deletion-success p {
  color: var(--success-text);
}

.email-deletion-fallback {
  margin-top: var(--space-32);
  padding-top: var(--space-32);
  border-top: 1px solid var(--border);
}

.modal-open {
  overflow: hidden;
}

.web-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: var(--space-16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.web-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: var(--modal-backdrop);
  cursor: pointer;
}

.web-modal-card {
  position: relative;
  width: min(var(--modal-max-width), 100%);
  padding: var(--space-24);
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: var(--modal-shadow);
}

.web-modal-card h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-size-modal-title);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-modal-title);
  text-align: center;
}

.web-modal-card p {
  margin: var(--space-8) 0 0;
  color: var(--text-secondary);
  font-size: var(--font-size-policy-body);
  line-height: var(--line-height-policy-subtitle);
  text-align: center;
}

.web-modal-actions {
  margin-top: var(--space-24);
  display: flex;
  gap: var(--space-16);
}

.web-modal-actions .button {
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
}

.card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.card:hover {
  border-color: #a4c9ff;
  color: inherit;
  background: #f8faff;
}

.card h2 {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 500;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.legal-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 500;
}

.legal-section p,
.legal-section ul,
.legal-section ol,
.notice p {
  color: var(--text-secondary);
}

.legal-section p,
.notice p {
  margin-top: 0;
}

.legal-section p:last-child,
.legal-section ul:last-child,
.legal-section ol:last-child,
.notice p:last-child {
  margin-bottom: 0;
}

.legal-section li + li {
  margin-top: 8px;
}

.steps {
  padding-left: 1.4rem;
}

.notice {
  margin: 16px 0 24px;
  padding: 16px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger-text);
}

.notice strong {
  font-weight: 500;
}

.notice p {
  color: var(--danger-text);
}

.site-footer {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 640px) {
  .nav {
    min-height: auto;
    padding: 14px 0 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .page-shell {
    padding-top: 32px;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .web-signed-in-panel,
  .web-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .web-signed-in-panel .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
