/* DLVH v3: long-form text pages (privacy policy, photo credits).
   A calm reading layout on the homepage system: a margin column for the date and contents,
   a text column held to a comfortable measure. Loaded after v3.css. */

.text-page { --measure: 68ch; --side: 15rem; --col-gap: clamp(3rem, 2rem + 4vw, 6.5rem); }

/* Page header: title, one line, the date. No photograph. */
.doc-head { position: relative; isolation: isolate; padding: calc(68px + clamp(4.5rem, 3rem + 6vw, 8.5rem)) 0 clamp(3rem, 2rem + 3vw, 4.75rem); border-bottom: 1px solid var(--line); overflow: hidden; }
.doc-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(60% 120% at 88% -10%, rgba(var(--glow-rgb), .16) 0%, rgba(var(--glow-rgb), 0) 62%),
  radial-gradient(40% 80% at 10% -20%, rgba(var(--acc-rgb), .05) 0%, rgba(var(--acc-rgb), 0) 70%); }
.doc-grid { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: var(--col-gap); }
.doc-head .doc-grid { align-items: end; }
.doc-meta { display: grid; gap: .3rem; align-self: end; padding-bottom: .55rem; font-size: .85rem; color: var(--faint); }
.doc-meta b { font-weight: 400; color: var(--muted); }
.doc-title { font-size: clamp(2.6rem, 1.5rem + 3.6vw, 4.6rem); line-height: 1; letter-spacing: -.045em; max-width: 16ch; }
.doc-head .lede { margin-top: 1.3rem; color: var(--lede); max-width: 52ch; }
.enter .doc-title, .enter .doc-head .lede, .enter .doc-meta { animation: up .9s var(--ease) both; }
.enter .doc-head .lede { animation-delay: .08s; }
.enter .doc-meta { animation-delay: .16s; }

.doc-body { padding: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) 0 var(--sec); }

/* Contents: sticky in the margin on wide screens, a folding box on phones */
.toc { position: sticky; top: 100px; align-self: start; font-size: .9rem; }
.toc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; font-size: .8rem; color: var(--faint); letter-spacing: .02em; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { display: none; width: 16px; height: 16px; transition: transform .3s var(--ease); }
.toc ol { display: grid; border-left: 1px solid var(--line); counter-reset: toc; }
.toc ol a { position: relative; display: grid; grid-template-columns: 1.8rem 1fr; padding: .42rem 0 .42rem 1rem; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .2s; }
.toc ol a::before { content: counter(toc, decimal-leading-zero); counter-increment: toc; color: var(--faint); font-size: .74rem; padding-top: .14rem; font-variant-numeric: tabular-nums; }
.toc ol a::after { content: ""; position: absolute; left: -1px; top: .3rem; bottom: .3rem; width: 1px; background: var(--sun); transform: scaleY(0); transition: transform .35s var(--ease); }
.toc ol a:hover { color: var(--text); }
.toc ol a[aria-current="true"] { color: var(--text); }
.toc ol a[aria-current="true"]::after { transform: scaleY(1); }
.toc-mail { display: inline-flex; margin-top: 1.6rem; padding-left: 1rem; color: var(--faint); font-size: .82rem; text-decoration: none; }
.toc-mail:hover { color: var(--text); }

/* The text column */
.prose { max-width: var(--measure); min-width: 0; color: var(--lede); font-size: 1.06rem; line-height: 1.72; }
.prose p + p, .prose p + ul, .prose ul + p, .prose h3 + p, .prose h3 + ul { margin-top: 1.05em; }
.prose a { color: var(--text); text-decoration-color: var(--line-2); transition: text-decoration-color .2s; overflow-wrap: anywhere; }
.prose a:hover { text-decoration-color: var(--text); }
.prose strong { color: var(--text); font-weight: 500; }
.prose ul { display: grid; gap: .6rem; }
.prose ul li { position: relative; padding-left: 1.5rem; }
.prose ul li::before { content: ""; position: absolute; left: .15rem; top: .72em; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--muted); }
.prose .intro { color: var(--text); font-size: clamp(1.12rem, 1.04rem + .3vw, 1.25rem); line-height: 1.6; letter-spacing: -.01em; }

.part { margin-top: clamp(3rem, 2.4rem + 2vw, 4.25rem); padding-top: clamp(3rem, 2.4rem + 2vw, 4.25rem); border-top: 1px solid var(--line); }
.part:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.part-n { display: block; margin-bottom: .9rem; font-size: .78rem; letter-spacing: .08em; color: var(--faint); font-variant-numeric: tabular-nums; }
.part h2 { margin-bottom: 1.3rem; color: var(--text); font-size: clamp(1.55rem, 1.25rem + .9vw, 2.05rem); line-height: 1.15; letter-spacing: -.03em; }
.part h3 { margin-top: 2.1rem; color: var(--text); font-size: 1.1rem; line-height: 1.35; font-weight: 500; letter-spacing: -.015em; }

/* At a glance: four facts from the policy itself */
.prose .glance { margin-top: 2.4rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.glance-h { padding: 1.05rem 1.4rem; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--faint); letter-spacing: .02em; }
.prose .glance ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.prose .glance li { display: grid; grid-template-columns: 22px 1fr; gap: .85rem; padding: 1.25rem 1.4rem; font-size: .95rem; line-height: 1.5; color: var(--text); }
.prose .glance li::before { content: none; }
.prose .glance li:nth-child(even) { border-left: 1px solid var(--line); }
.prose .glance li:nth-child(n+3) { border-top: 1px solid var(--line); }
.glance svg { width: 18px; height: 18px; margin-top: .12rem; color: var(--sun); }

/* Address card at the end */
.address { display: grid; gap: 1.4rem; margin-top: 1.6rem; padding: 1.6rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.address p { color: var(--text); line-height: 1.6; }
.address p span { color: var(--muted); }
.address .pill { justify-self: start; }
.prose .address a.pill { color: var(--on-acc); text-decoration: none; }

/* Photo credits: sections with their label in the margin */
.credit-sec + .credit-sec { margin-top: clamp(4rem, 3rem + 3vw, 6rem); padding-top: clamp(3rem, 2.4rem + 2vw, 4.25rem); border-top: 1px solid var(--line); }
.sec-label { position: sticky; top: 100px; align-self: start; }
.sec-label h2 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.025em; }
.sec-label p { margin-top: .6rem; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.6rem 1.4rem; }
.credit { margin: 0; display: grid; gap: 1.15rem; align-content: start; }
.credit-img { position: relative; aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.credit-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.2s var(--ease); }
.credit:hover .credit-img img { transform: scale(1.035); }
.credit figcaption { display: grid; gap: .45rem; }
.credit-used { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .35rem; }
.credit-used a, .credit-used span { display: inline-flex; align-items: center; min-height: 28px; padding: .2rem .7rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .78rem; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.credit-used a:hover { color: var(--text); border-color: rgba(var(--text-rgb), .35); }
.credit h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em; }
.credit p { color: var(--muted); font-size: .95rem; }
.credit p a { color: var(--text); text-decoration-color: var(--line-2); }
.credit p a:hover { text-decoration-color: var(--text); }
.credit .by { display: inline-flex; align-items: center; gap: .35rem; }
.credit .by svg { width: 14px; height: 14px; color: var(--faint); transition: color .2s, transform .25s var(--ease); }
.credit .by:hover svg { color: var(--text); transform: translate(2px, -2px); }

.kit { display: grid; border-top: 1px solid var(--line); }
.kit > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.kit b { font-weight: 500; font-size: 1.05rem; }
.kit small { display: block; margin-top: .2rem; color: var(--faint); font-size: .82rem; }
.kit p { color: var(--muted); font-size: .97rem; line-height: 1.6; }
.kit a { color: var(--text); text-decoration-color: var(--line-2); }
.kit a:hover { text-decoration-color: var(--text); }
.credit-note { margin-top: 1.6rem; color: var(--muted); font-size: .95rem; }
.credit-note a { color: var(--text); text-decoration-color: var(--line-2); }

/* Responsive */
@media (max-width: 1080px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-meta { order: 3; margin-top: 1.6rem; padding-bottom: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
  .toc { position: static; margin-bottom: 2.6rem; max-width: var(--measure); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
  .toc summary { margin: 0; padding: 1rem 1.2rem; min-height: 52px; font-size: .92rem; color: var(--text); cursor: pointer; }
  .toc summary svg { display: block; color: var(--muted); }
  .toc[open] summary svg { transform: rotate(180deg); }
  .toc ol { margin: 0 1.2rem 1rem; }
  .toc ol a { padding-block: .55rem; }
  .toc-mail { display: none; }
  .sec-label { position: static; margin-bottom: 1.8rem; }
}
@media (max-width: 720px) {
  .credits { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
  .kit > div { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
}
@media (max-width: 620px) {
  .prose { font-size: 1.02rem; line-height: 1.7; }
  .prose .glance ul { grid-template-columns: minmax(0, 1fr); }
  .prose .glance li:nth-child(even) { border-left: 0; }
  .prose .glance li + li { border-top: 1px solid var(--line); }
  .prose .glance li { padding: 1.1rem 1.2rem; }
  .address { padding: 1.3rem; }
}
