/* Information pages (about, help, guides, policies…): one shared template.
   Breadcrumbs + title + intro, then a readable text column with a
   "Need help?" card beside it (below it on phones). Rendered by js/page.js. */

.page-intro {
  max-width: 70ch;
  margin-top: 8px;
  color: var(--c-muted);
  font-size: 17px;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
  padding-block: 24px 8px;
}

/* ---------- Readable text column ---------- */

.prose {
  max-width: 70ch;
  min-width: 0;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.prose > * + *,
.prose [data-lang] > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: 22px;
  scroll-margin-top: 16px;
}

.prose h3 {
  margin-top: 1.5em;
  font-size: 18px;
}

.prose [data-lang] > h2:first-child,
.prose [data-lang] > h3:first-child {
  margin-top: 0;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.5em;
}

.prose ul {
  list-style: disc;
  padding-left: 1.4em;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.4em;
}

.prose strong {
  font-weight: 600;
}

.prose address {
  font-style: normal;
}

.prose .alert {
  line-height: 1.6;
}

/* "On this page" list on the long policy pages */
.toc {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--c-subtle);
}

.toc-title {
  font-weight: 600;
}

.prose .toc ol {
  margin-top: 6px;
  padding-left: 1.4em;
}

.prose .toc li + li {
  margin-top: 2px;
}

.toc a {
  display: inline-block;
  padding-block: 4px;
}

/* ---------- Tables that become stacked cards on phones ---------- */

.storage-table {
  font-size: 15px;
  line-height: 1.55;
}

.storage-table code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* ---------- Numbered steps (How to pay) ---------- */

.prose ol.steps {
  display: grid;
  gap: 20px;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.prose .steps > li {
  position: relative;
  margin-top: 0;
  padding-left: 52px;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.prose .steps h3 {
  margin-top: 4px;
  font-size: 18px;
}

.prose .steps > li > * + * {
  margin-top: 0.5em;
}

/* ---------- Topic cards (Guides, Blog) ---------- */

.prose .topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  padding-left: 0;
  list-style: none;
}

.prose .topic-grid > li {
  margin-top: 0;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  line-height: 1.6;
}

.prose .topic-card > * + * {
  margin-top: 0;
}

.topic-card h3 {
  margin-top: 0;
  font-size: 17px;
}

.topic-card p {
  color: var(--c-muted);
  font-size: 15px;
}

.topic-card .badge {
  align-self: flex-start;
}

.topic-card a {
  margin-top: auto;
  padding-top: 4px;
  font-weight: 500;
}

/* The text says "Coming soon", so the colour is only a hint. */
.badge-soon {
  background: var(--c-warn-bg);
  color: var(--c-warn);
}

/* ---------- Link lists (category links on About us) ---------- */

.prose .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.prose .link-grid li {
  margin-top: 0;
}

.link-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.link-grid a::after {
  content: "›";
  color: var(--c-muted);
  font-size: 20px;
}

.link-grid a:hover {
  border-color: var(--c-link);
  color: var(--c-link);
}

/* ---------- Call-to-action panel ---------- */

.cta-panel {
  padding: 22px 24px;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}

.prose .cta-panel h2 {
  margin-top: 0;
  font-size: 20px;
}

.cta-panel .cluster {
  margin-top: 16px;
}

/* ---------- FAQ (Help Center) ---------- */

.faq-search {
  display: block;
  margin-bottom: 8px;
}

.faq-search label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.faq-status:empty {
  display: none;
}

.faq-status {
  margin-top: 8px;
  color: var(--c-muted);
  font-size: 14px;
}

.prose .faq-group h2 {
  margin-bottom: 4px;
}

.faq-item {
  border-bottom: 1px solid var(--c-border);
}

.prose .faq-item {
  margin-top: 0;
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 12px 4px;
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Chevron: points down when closed, up when open. */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 6px 4px 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.faq-item[open] summary::after {
  margin-bottom: -4px;
  transform: rotate(-135deg);
}

.faq-item summary:hover {
  color: var(--c-link);
}

.faq-answer {
  padding: 0 4px 18px;
}

.faq-answer [data-lang] > * + * {
  margin-top: 0.75em;
}

/* ---------- "Need help?" card ---------- */

.help-card {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
}

.help-card h2 {
  font-size: 19px;
}

.help-card-text {
  color: var(--c-muted);
  font-size: 15px;
}

.help-line {
  display: grid;
  gap: 4px;
}

.help-list {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}

.help-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-muted);
  font-size: 14px;
}

.help-list dt .icon {
  width: 18px;
  height: 18px;
}

.help-list dd {
  display: grid;
  font-size: 15px;
}

.help-list address {
  font-style: normal;
}

.help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.help-card-footer {
  padding-top: 4px;
  border-top: 1px solid var(--c-border);
}

/* ---------- Tablets & phones ---------- */

@media (max-width: 960px) {
  .info-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .help-card {
    position: static;
    max-width: 70ch;
  }
}

@media (max-width: 600px) {
  .page-intro { font-size: 16px; }
  .prose h2 { font-size: 20px; }
  .cta-panel { padding: 18px; }

  /* Stack each row as a small card so nothing scrolls sideways. */
  .storage-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .storage-table,
  .storage-table tbody,
  .storage-table tr,
  .storage-table td {
    display: block;
    width: 100%;
  }

  .storage-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
  }

  .storage-table td {
    padding: 4px 0;
    border: 0;
  }

  .storage-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--c-muted);
    font-size: 13px;
    font-weight: 500;
  }
}

@media print {
  .info-layout { display: block; }
  .prose { max-width: none; }
  .toc, .faq-search { display: none; }
}
