/* ============================================================
   CrashPricer — trust, legal & support pages

   A shared reading shell for privacy, terms, support, account
   deletion and company information. The visual language stays
   deliberately calm and close to the app: warm ground, white
   surfaces, dark ink and one green accent.
   ============================================================ */

.doc {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas-2);
}

/* — top bar — */
.doc__bar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(14, 26, 43, .09);
  background: rgba(239, 237, 231, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.doc__bar-inner {
  min-height: 74px;
  padding-block: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.doc__brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.02em;
}
.doc__brand svg { width: 34px; height: 34px; flex: none; }
.doc__brand-name { white-space: nowrap; }
.doc__brand-area {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--text-3);
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.doc__langs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.5);
}
.doc__lang {
  min-width: 38px;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  color: var(--text-3);
  font-size: var(--t-caption);
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.doc__lang:hover { color: var(--ink); }
.doc__lang[aria-current="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--sh-xs);
}

/* — page frame and section navigation — */
.doc__main { flex: 1; padding-block: clamp(34px, 6vw, 84px); }
.doc .wrap--narrow { max-width: 1180px; }
.doc__layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 820px);
  justify-content: space-between;
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.doc__rail {
  position: sticky;
  top: 112px;
}
.doc__rail-label {
  margin: 0 0 13px;
  color: var(--text-5);
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.doc__nav { display: grid; gap: 4px; }
.doc__nav a {
  position: relative;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--text-3);
  font-size: var(--t-body-sm);
  font-weight: 700;
  line-height: 1.45;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.doc__nav a:hover {
  color: var(--ink);
  background: rgba(255,255,255,.56);
  transform: translateX(2px);
}
.doc__nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 10px 30px -22px rgba(14,26,43,.48);
}
.doc__nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--green-bright);
}
.doc__content { min-width: 0; }

/* — page introduction — */
.doc__head {
  position: relative;
  margin-bottom: clamp(30px, 4vw, 44px);
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.doc__head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 64px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--green-bright);
}
.doc__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 6px 11px;
  border: 1px solid var(--green-line);
  border-radius: var(--r-pill);
  background: var(--green-pale);
  color: var(--green-deep);
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}
.doc__title {
  max-width: 16ch;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(2.45rem, 6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .99;
}
.doc__lede {
  max-width: 60ch;
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: clamp(1.06rem, 1.5vw, 1.23rem);
  line-height: 1.65;
}
.doc__stamp {
  margin: 0;
  color: var(--text-4);
  font-size: var(--t-caption);
  font-weight: 600;
}
.doc__subhead { margin-top: clamp(42px, 6vw, 64px); }
.doc__subhead .doc__title {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

/* — content surfaces — */
.doc__card {
  overflow: hidden;
  padding: clamp(24px, 4.5vw, 48px);
  border: 1px solid rgba(14,26,43,.07);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: 0 24px 70px -50px rgba(14,26,43,.52);
}
.doc__sec + .doc__sec {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line-soft);
}
.doc__sec h2 {
  max-width: 28ch;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.22rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.25;
}
.doc__sec p {
  max-width: 68ch;
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: var(--t-body);
  line-height: 1.75;
}
.doc__sec p:last-child { margin-bottom: 0; }
.doc__sec a,
.doc__facts a {
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--green-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.doc__sec a:hover,
.doc__facts a:hover { text-decoration-color: currentColor; }

/* — information callouts — */
.doc__note {
  position: relative;
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  font-size: var(--t-body-sm);
  line-height: 1.65;
}
.doc__note--calm {
  border: 1px solid var(--green-line);
  background: var(--green-pale);
  color: var(--green-deep);
}
.doc__note--warn {
  border: 1px solid #F5CF78;
  background: var(--amber-pale);
  color: var(--amber);
}
.doc__note p { margin: 0; color: inherit; }
.doc__note p + p { margin-top: 8px; }

/* — company facts — */
.doc__facts { margin: 0; }
.doc__facts div {
  display: grid;
  grid-template-columns: minmax(140px, 190px) 1fr;
  gap: 10px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.doc__facts div:first-child { padding-top: 0; }
.doc__facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.doc__facts dt {
  color: var(--ink);
  font-size: var(--t-body-sm);
  font-weight: 800;
}
.doc__facts dd {
  margin: 0;
  color: var(--text-2);
  font-size: var(--t-body-sm);
  line-height: 1.65;
}
.todo {
  display: inline-block;
  padding: 1px 8px;
  border: 1px dashed var(--amber-mid);
  border-radius: 6px;
  background: var(--amber-pale);
  color: var(--amber);
  font-size: .9em;
  font-weight: 700;
}

/* — ordered account-deletion steps — */
.doc__steps {
  margin: 24px 0 28px;
  display: grid;
  gap: 13px;
  counter-reset: deletion-step;
}
.doc__steps li {
  position: relative;
  min-height: 34px;
  padding: 5px 0 5px 46px;
  color: var(--text-2);
  font-size: var(--t-body-sm);
  line-height: 1.6;
  counter-increment: deletion-step;
}
.doc__steps li::before {
  content: counter(deletion-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--green-line);
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-deep);
  font-size: var(--t-caption);
  font-weight: 800;
}

/* — actions and deletion form — */
.doc__cta,
.doc__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 16px;
  font-size: var(--t-body-sm);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  transition: transform .25s var(--e-out), box-shadow .25s var(--e-out),
              background-color .2s ease, border-color .2s ease;
}
.doc__cta {
  margin-top: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff !important;
  box-shadow: 0 14px 28px -18px rgba(14,26,43,.72);
}
.doc__cta:hover {
  transform: translateY(-2px);
  background: var(--ink-soft);
  box-shadow: 0 18px 36px -18px rgba(14,26,43,.82);
}
.doc__form {
  margin: 26px 0 18px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--app-bg);
}
.doc__label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: var(--t-body-sm);
  font-weight: 800;
}
.doc__input {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-firm);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-body);
  box-shadow: inset 0 1px 2px rgba(14,26,43,.03);
}
.doc__input::placeholder { color: var(--text-5); }
.doc__input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
}
.doc__cta[type="submit"],
.doc__cta[type="button"] {
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.doc__cta[disabled] { opacity: .55; cursor: default; transform: none; }
.doc__cta--danger {
  background: #B42318;
  box-shadow: 0 14px 28px -18px rgba(180,35,24,.72);
}
.doc__cta--danger:hover { background: #912018; }

/* Support's first card is an action destination, not another FAQ answer. */
.doc--support .doc__content > .doc__card:first-of-type {
  border-color: var(--green-line);
  background: linear-gradient(135deg, var(--paper), #F2FBF5);
}

/* — account deletion confirmation — */
.doc__confirm { width: min(100%, 760px); }
.doc__confirm .doc__head { max-width: 700px; }
.doc__confirm-card {
  padding: clamp(24px, 4vw, 40px);
  border-top: 4px solid #B42318;
}
/* The red rule reads as a warning, which suits deletion and misreads on a
   routine hand-off like a password reset. */
.doc__confirm-card--calm {
  border-top-color: var(--green-bright);
}
.doc__confirm-prompt {
  max-width: 58ch;
  margin: 0 0 22px;
  color: var(--text-2);
  font-size: var(--t-body-sm);
  line-height: 1.7;
}
.doc__confirm-status {
  margin-top: 22px;
  margin-bottom: 22px;
  font-weight: 700;
}
.doc__back {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.doc__back:hover {
  transform: translateY(-1px);
  border-color: var(--text-4);
  background: var(--mist);
}
.doc__confirm.is-complete .doc__title { max-width: 15ch; }
.doc__confirm.is-complete .doc__confirm-card {
  border-top-color: var(--green-bright);
  border-color: var(--green-line);
  box-shadow: 0 24px 60px -38px rgba(22,163,74,.5);
}

/* — footer — */
.doc__foot {
  padding-block: 34px;
  border-top: 1px solid var(--line);
  color: var(--text-4);
  font-size: var(--t-caption);
}
.doc__foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.doc__foot nav { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.doc__foot a { color: var(--text-3); }
.doc__foot a:hover,
.doc__foot a[aria-current="page"] { color: var(--ink); }
.doc__foot a[aria-current="page"] { font-weight: 800; }
.doc__foot p { margin: 0; }

@media (max-width: 860px) {
  .doc__main { padding-top: 22px; }
  .doc__layout { display: block; }
  .doc__rail {
    position: relative;
    top: auto;
    margin: 0 calc(var(--gutter) * -1) clamp(38px, 7vw, 56px);
    padding: 0 var(--gutter) 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .doc__rail::-webkit-scrollbar { display: none; }
  .doc__rail-label { display: none; }
  .doc__nav {
    display: flex;
    width: max-content;
    min-width: 100%;
    gap: 7px;
  }
  .doc__nav a {
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,.34);
    white-space: nowrap;
  }
  .doc__nav a:hover { transform: none; }
  .doc__nav a[aria-current="page"] { border-color: var(--line-soft); }
  .doc__nav a[aria-current="page"]::before { display: none; }
}

@media (max-width: 620px) {
  .doc__bar-inner { min-height: 66px; }
  .doc__brand svg { width: 31px; height: 31px; }
  .doc__brand-area { display: none; }
  .doc__title { font-size: clamp(2.25rem, 12vw, 3.35rem); }
  .doc__card { border-radius: 22px; }
  .doc__facts div { grid-template-columns: 1fr; gap: 4px; padding: 15px 0; }
  .doc__form { margin-inline: -6px; }
  .doc__form .doc__cta,
  .doc__confirm .doc__cta,
  .doc__confirm .doc__back { width: 100%; }
  .doc__foot-inner { align-items: flex-start; flex-direction: column; }
}
