/* =============================================================
   KIANIRO · terms.css
   Terms & conditions (core/terms.html). Loaded after css/style.css (tokens, header,
   footer, buttons, .crumbs); this file adds only this page.
   Minimal by design: one typeface, hairlines, a single accent.

   TABLE OF CONTENTS
     01  Hero
     02  At a glance
     03  Layout and table of contents
     04  Document
     05  Question card
     06  Responsive
     07  Print
   ============================================================= */


/* =============================================================
   01  HERO
   ============================================================= */
.tr-hero { padding: calc(var(--header-h) + clamp(28px, 4vw, 64px)) 0 clamp(28px, 4vw, 52px); }

.crumbs { display: flex; align-items: center; gap: 6px 8px; margin-bottom: clamp(16px, 2vw, 26px); font-size: 13.5px; color: var(--mist); }
.crumbs a { color: var(--slate); transition: color .4s var(--ease-out); }
.crumbs .ico { transform: rotate(90deg); color: var(--hair-2); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
@media (hover: hover) { .crumbs a:hover { color: var(--ember); } }

.tr-hero__title { font-size: clamp(38px, 5.4vw, 76px); font-weight: 200; line-height: 1.22; color: var(--ink); }
.tr-hero__title b { font-weight: 800; }
.tr-hero__lead { max-width: 54ch; margin-top: 20px; font-size: 16.5px; line-height: 2.05; color: var(--slate); }

.tr-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 26px; font-size: 13.5px; color: var(--mist); }
.tr-meta b { color: var(--ink); font-weight: 600; }
.tr-meta span + span { position: relative; }
.tr-meta span + span::before {
  content: ""; position: absolute; inset-inline-start: -15px; top: 50%;
  width: 3px; height: 3px; border-radius: 50%; background: var(--hair-2); transform: translateY(-50%);
}


/* =============================================================
   02  AT A GLANCE · four promises in one hairline row
   ============================================================= */
.tr-glance {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--hair);
}
.tr-glance li { display: grid; gap: 4px; padding: 24px clamp(14px, 2vw, 28px); }
.tr-glance li + li { border-inline-start: 1px solid var(--hair); }
.tr-glance b { font-size: clamp(20px, 2vw, 26px); font-weight: 800; color: var(--ink); }
.tr-glance span { font-size: 13.5px; color: var(--mist); }


/* =============================================================
   03  LAYOUT · sticky contents beside the text
   ============================================================= */
.tr-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 110px);
  padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 120px);
}

.tr-toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.tr-toc__head {
  display: none; width: 100%; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.tr-toc__head .ico { transition: transform .5s var(--ease-out); }
.tr-toc__list { display: grid; gap: 2px; counter-reset: toc; list-style: none; padding: 0; }
.tr-toc__list a {
  display: flex; gap: 12px; align-items: baseline; padding: 7px 0;
  font-size: 14px; line-height: 1.7; color: var(--mist);
  transition: color .4s var(--ease-out);
}
.tr-toc__list a::before {
  counter-increment: toc; content: counter(toc, persian);
  min-width: 16px; font-size: 12px; color: var(--hair-2); transition: color .4s var(--ease-out);
}
.tr-toc__list a.is-active { color: var(--ink); font-weight: 600; }
.tr-toc__list a.is-active::before { color: var(--ember); }
@media (hover: hover) { .tr-toc__list a:hover { color: var(--ink); } }

/* reading progress, a hairline under the list */
.tr-toc__bar { height: 1px; margin-top: 22px; background: var(--hair); overflow: hidden; }
.tr-toc__bar i { display: block; height: 100%; background: var(--ember); transform: scaleX(0); transform-origin: right; }


/* =============================================================
   04  DOCUMENT
   ============================================================= */
.tr-doc { max-width: 70ch; }

.tr-sec { padding-bottom: clamp(36px, 4vw, 52px); margin-bottom: clamp(36px, 4vw, 52px); border-bottom: 1px solid var(--hair); scroll-margin-top: calc(var(--header-h) + 24px); }
.tr-sec__n { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--ember); }
.tr-sec h2 { margin: 8px 0 18px; font-size: clamp(21px, 2vw, 26px); font-weight: 700; line-height: 1.6; }
.tr-sec p, .tr-sec li, .tr-sec dd { font-size: 15.5px; line-height: 2.15; color: var(--slate); }
.tr-sec p + p, .tr-sec p + ul, .tr-sec ul + p, .tr-sec dl + ul { margin-top: 14px; }
.tr-sec b { color: var(--ink); font-weight: 600; }

.tr-sec ul { display: grid; gap: 10px; }
.tr-sec li { position: relative; padding-inline-start: 22px; }
.tr-sec li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .95em;
  width: 8px; height: 1px; background: var(--ember);
}

/* two payment methods: a label column beside its description */
.tr-terms { display: grid; margin-top: 14px; border-top: 1px solid var(--hair); }
.tr-terms > div { display: grid; grid-template-columns: 150px 1fr; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.tr-terms dt { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 2.15; }


/* =============================================================
   05  QUESTION CARD
   ============================================================= */
.tr-ask {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px;
  padding: clamp(22px, 3vw, 32px); border-radius: 24px; background: var(--pearl); border: 1px solid var(--hair);
}
.tr-ask__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.tr-ask__sub { margin-top: 4px; font-size: 14px; color: var(--mist); }


/* =============================================================
   06  RESPONSIVE
   ============================================================= */
@media (max-width: 960px) {
  .tr-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tr-doc { max-width: none; }

  /* the contents fold into one bar above the text */
  .tr-toc { position: static; padding: 16px 20px; border-radius: 18px; background: var(--pearl); border: 1px solid var(--hair); }
  .tr-toc__head { display: flex; }
  .tr-toc__list { display: none; margin-top: 12px; }
  .tr-toc.is-open .tr-toc__list { display: grid; }
  .tr-toc.is-open .tr-toc__head .ico { transform: rotate(180deg); }
  .tr-toc__bar { display: none; }
}

@media (max-width: 720px) {
  .tr-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-glance li:nth-child(3) { border-inline-start: 0; }
  .tr-glance li:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .tr-terms > div { grid-template-columns: 1fr; gap: 2px; }
  .tr-ask .btn { width: 100%; justify-content: space-between; }
}


/* =============================================================
   07  PRINT · the text only
   ============================================================= */
@media print {
  .header, .footer, .tr-toc, .tr-ask, .crumbs { display: none !important; }
  .tr-layout { display: block; padding: 0; }
  .tr-hero { padding-top: 0; }
  .tr-sec { break-inside: avoid; }
}
