/* =========================================================
   Policy / legal pages (template-policy.php)
   Hero from tt-tour-listing.css (.tpl-hero), body uses the .ttk system tokens.
   Content comes from the page editor: H1 = hero title, first paragraph = intro,
   every H2 becomes a numbered card and an item in "On this page".
   ========================================================= */

.ttp-page { overflow-x: clip; }
.ttp-page .tpl-hero { padding-bottom: 36px; }
.ttp-page .tpl-hero__in { grid-template-columns: minmax(0, 1fr); }
.ttp-body { padding-top: 8px; padding-bottom: 64px; }

.ttp-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.ttp-layout > * { min-width: 0; }

/* On this page */
.ttp-toc { position: sticky; top: 110px; padding: 20px; background: #fff; border: 1px solid var(--line, #e5e9f0); border-radius: 20px; }
.ttp-toc__t { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #64748b); }
.ttp-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ttp-toc a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--navy, #1a365d); text-decoration: none; border-radius: 10px; transition: background .15s, color .15s; }
.ttp-toc a:hover { background: #f5f8fc; color: var(--o, #ff5e00); }
.ttp-toc a span { flex: none; width: 20px; font-weight: 800; color: var(--o, #ff5e00); font-variant-numeric: tabular-nums; }

/* Section cards */
.ttp-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.ttp-sec { min-width: 0; padding: 26px 28px; background: #fff; border: 1px solid var(--line, #e5e9f0); border-radius: 20px; scroll-margin-top: 120px; }
.ttp-sec__head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.ttp-sec__n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; font-size: 15px; font-weight: 800; color: var(--o, #ff5e00); background: var(--o-wash, #fff3eb); border-radius: 12px; }
.ttp-sec__h { margin: 0; min-width: 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--navy, #1a365d); overflow-wrap: anywhere; }

/* Copy */
.ttp-prose { min-width: 0; overflow-wrap: anywhere; }
.ttp-prose > :first-child { margin-top: 0; }
.ttp-prose > :last-child { margin-bottom: 0; }
.ttp-prose p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.7; color: var(--body, #475569); }
.ttp-prose ul,
.ttp-prose ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ttp-prose li { position: relative; min-width: 0; padding-left: 24px; font-size: 15.5px; line-height: 1.7; color: var(--body, #475569); }
.ttp-prose ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--o, #ff5e00); border-radius: 50%; }
.ttp-prose ol { counter-reset: ttp; }
.ttp-prose ol li { counter-increment: ttp; }
.ttp-prose ol li::before { content: counter(ttp) "."; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--o, #ff5e00); }
.ttp-prose strong,
.ttp-prose b { font-weight: 700; color: var(--navy, #1a365d); }
.ttp-prose a { color: var(--o, #ff5e00); text-decoration: underline; text-underline-offset: 2px; }

/* Help strip */
.ttp-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 22px 26px; background: #f5f8fc; border-radius: 20px; }
.ttp-help > div { flex: 1 1 240px; min-width: 0; }
.ttp-help h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--navy, #1a365d); }
.ttp-help p { margin: 0; font-size: 14.5px; color: var(--body, #475569); }
.ttp-help .ttk-btn { flex: none; max-width: 100%; }

@media (max-width: 1024px) {
	.ttp-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.ttp-toc { position: static; max-width: 100%; padding: 14px 16px; overflow: hidden; }
	.ttp-toc ol { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
	.ttp-toc ol::-webkit-scrollbar { display: none; }
	.ttp-toc li { flex: none; }
	.ttp-toc a { align-items: center; padding: 8px 14px; white-space: nowrap; background: #f5f8fc; border-radius: 999px; }
}
@media (max-width: 640px) {
	.ttp-sec { padding: 20px 16px; }
	.ttp-sec__head { gap: 12px; margin-bottom: 14px; }
	.ttp-sec__n { width: 34px; height: 34px; }
	.ttp-sec__h { font-size: 18px; }
	.ttp-prose li,
	.ttp-prose p { font-size: 15px; }
	.ttp-help { padding: 18px 16px; }
	.ttp-help > div { flex: 1 1 100%; }
	.ttp-help .ttk-btn { width: 100%; justify-content: center; }
}
