/* Inner pages: checkout, contact, delete account and the legal pages
   (privacy, terms, subscription policy). Loaded after site.css. */

/* ---------- Shared inner-page body ---------- */

.page-body { padding: clamp(36px, 4vw, 56px) 0 clamp(56px, 6vw, 88px); }
.page-hero h1 { letter-spacing: -0.035em; margin-bottom: 12px; }
.page-hero.tinted p { margin-bottom: 0; }
.page-hero.tinted a { color: #fff; text-decoration: underline; }

/* ---------- Legal pages ---------- */

.legal-hero .legal-dates {
  font-size: 15px;
  font-weight: 500;
  color: var(--on-navy);
  font-variant-numeric: tabular-nums;
}

.legal-doc { padding: clamp(36px, 4vw, 56px) 0 clamp(56px, 6vw, 88px); }
.legal-body { font-size: 17px; line-height: 1.65; }
.legal-body p { max-width: none; }
.legal-body > :first-child { margin-top: 0; }
.legal-body h2 { font-size: clamp(22px, 2vw, 26px); letter-spacing: -0.025em; line-height: 1.2; margin: 48px 0 14px; scroll-margin-top: 88px; }
.legal-body h3 { font-size: 19px; margin: 30px 0 10px; }
.legal-body ul { padding-left: 22px; }
.legal-body li { margin: 8px 0; }
.legal-body li::marker { color: var(--blue); }
.legal-body strong { color: var(--navy); font-weight: 600; }
.legal-intro { font-size: 19px; line-height: 1.55; color: var(--navy); padding-bottom: 28px; border-bottom: 1px solid var(--line); }

.legal-body .legal-address { font-size: 16px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 14px 18px; }
.legal-body .legal-meta { margin-top: 48px; }
.legal-body .cookie-table { font-size: 15px; line-height: 1.5; }

/* Reading column plus a sticky table of contents on wide screens. */
.legal-layout { display: grid; grid-template-columns: 1fr; }
.legal-layout .legal-body { max-width: 820px; min-width: 0; width: 100%; margin: 0 auto; }
.legal-toc { display: none; }

@media (min-width: 1100px) {
  .legal-layout { grid-template-columns: 260px minmax(0, 820px); justify-content: center; gap: clamp(48px, 5vw, 88px); align-items: start; }
  .legal-layout .legal-body { margin: 0; }
  .legal-toc {
    display: block;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    font-size: 14.5px;
    line-height: 1.35;
    border-left: 1px solid var(--line);
    padding: 2px 0 2px 0;
  }
  .toc-title { font-weight: 700; color: var(--navy); font-size: 15px; margin: 0 0 10px 18px; }
  .legal-toc ol { list-style: none; margin: 0; padding: 0; }
  .legal-toc a {
    display: flex;
    gap: 10px;
    padding: 7px 12px 7px 18px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--muted);
  }
  .legal-toc a:hover { color: var(--navy); border-left-color: var(--line-strong); text-decoration: none; }
  .legal-toc a.is-active, .legal-toc a[aria-current="true"] { color: var(--navy); border-left-color: var(--blue); font-weight: 600; }
  .toc-n { flex: none; min-width: 1.4em; color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
}

/* ---------- Contact ---------- */

.page-body .form-card .btn[type="submit"] { min-width: 200px; }
.aside-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.aside-card .ico { width: 30px; height: 30px; color: var(--blue); margin-top: 2px; }
.aside-card h2 { font-size: 20px; letter-spacing: -0.015em; margin: 0 0 6px; }
.aside-card p { color: var(--muted); margin: 0; font-size: 16px; }

/* ---------- Checkout ---------- */

.co-body { padding: clamp(28px, 3vw, 40px) 0 clamp(56px, 6vw, 88px); }
.co-pending { margin: 0 0 24px; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 2.4vw, 36px); align-items: start; }

#checkout-form [hidden] { display: none !important; }

/* Step tabs: a segmented track, current step lifted onto white. */
.co-tabs {
  list-style: none;
  margin: 0 0 28px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.co-tabs button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 15px/1.2 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.co-tabs button:hover { color: var(--navy); }
.co-tabs .n {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.co-tabs button.is-current { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-soft); }
.co-tabs button.is-current .n { background: var(--blue); border-color: var(--blue); color: #fff; }
.co-tabs button.is-done { color: var(--navy); }
.co-tabs button.is-done .n { background: var(--blue-soft); border-color: rgba(30, 99, 233, 0.35); color: var(--blue-dark); }

.co-panel h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 16px; }
.co-lead { margin: 0 0 16px; }
.field-hint { margin: 8px 0 0; }

.plan-choice { display: grid; gap: 10px; }
.plan-choice label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.plan-choice label:hover { border-color: rgba(30, 99, 233, 0.5); }
.plan-choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.plan-choice label:has(input:focus-visible) { outline: 3px solid rgba(30, 99, 233, 0.5); outline-offset: 2px; }
.plan-choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.plan-choice .pc-name { font-weight: 700; color: var(--navy); }
.plan-choice .pc-desc { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.plan-choice .pc-price { margin-left: auto; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--navy); white-space: nowrap; }

.card-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.field input:disabled { background: var(--ground); color: var(--muted); cursor: not-allowed; }

/* Consent block: required before registration and payment. */
.consent-box { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 18px 20px; margin: 28px 0 22px; background: var(--ground); }
.consent-box .consent-title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 12px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; margin: 0 0 12px; color: var(--ink); cursor: pointer; }
.consent:last-of-type { margin-bottom: 0; }
.consent input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--blue); cursor: pointer; }
#consent-notice { margin: 14px 0 0; }

.co-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-nav .spacer { flex: 1; }
.co-nav .btn { min-width: 150px; }

/* Summary column: the plan as a cheque. */
.summary { position: sticky; top: 88px; display: grid; gap: 14px; }
.co-cheque .cheque-body { padding: 20px 22px 18px; }
.co-cheque .seal { display: none; }
.co-grid:has(input[name="plan"][value^="web-pro"]:checked) .co-cheque .seal { display: block; }
.sum-head { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.sum-plan { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; color: var(--navy); margin: 0; }
.sum-sub { color: var(--muted); margin: 4px 0 16px; font-size: 15px; }
.sum-line {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}
.sum-line .amt { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--navy); white-space: nowrap; }
.sum-line > span:first-child { color: var(--muted); }
.sum-guarantee { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; background: var(--green-soft); border-radius: var(--radius-xs); color: var(--green-ink); font-size: 14px; line-height: 1.45; }
.sum-guarantee .ico { width: 20px; height: 20px; margin-top: 1px; }
.sum-guarantee strong { font-weight: 700; }
.sum-meta { margin: 0; }
.sum-meta .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sum-meta .row:last-child { border-bottom: 0; padding-bottom: 0; }
.sum-meta .row span:last-child { color: var(--navy); font-weight: 600; text-align: right; }
.sum-foot { margin: 0; line-height: 1.5; }

@media (max-width: 960px) {
  .co-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 620px) {
  .form-card { padding: 22px 18px; }
  .aside-card { padding: 20px 18px; gap: 14px; }
  .card-row { grid-template-columns: 1fr; }
  .co-tabs { margin-bottom: 22px; }
  .co-tabs button { padding: 6px; }
  .co-tabs button:not(.is-current) .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .co-tabs li:has(.is-current) { grid-column: span 1; }
  .co-tabs { grid-template-columns: auto auto auto; justify-content: space-between; }
  .co-tabs button.is-current { padding-right: 14px; }
  .plan-choice label { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 6px; }
  .plan-choice .pc-price { grid-column: 2; margin-left: 0; }
  .co-nav .btn { flex: 1 1 auto; min-width: 0; }
  .co-cheque .seal { width: 68px; top: -12px; right: -8px; }
  .sum-plan { font-size: 26px; }
  .legal-body { font-size: 16.5px; }
  .legal-intro { font-size: 17.5px; }
}

/* site.css stacks the cookie table rows on small screens; the table and
   body must stack too or the table keeps its intrinsic width. */
@media (max-width: 700px) {
  .legal-body .cookie-table, .legal-body .cookie-table tbody { display: block; width: 100%; }
  .legal-body .cookie-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
}
