/* The terms of service page (terms/, one page for every app): the home page palette, nav and footer, the page head, the contents list and the clauses.
   This is the site's own file, not part of the tasteskill kit. */
/* the home page's palette (Default.aspx): white page, near-black ink, NT yellow fills, the lit ground in NT's pale yellow */
:root {
  --p-bg: #ffffff; --p-surface: #f7f6f2; --p-ink: #1c1c1e; --p-muted: #5c5b57;
  --p-accent: #ffcc00; --p-accent-ink: #1c1c1e; --p-action: #ffcc00; --p-action-ink: #1c1c1e;
  --p-inv-bg: #ffcc00; --p-inv-surface: #f5c200; --p-inv-ink: #1c1c1e; --p-inv-muted: #4a4020;
  --p-inv-accent: #1c1c1e; --p-inv-accent-ink: #ffcc00; --p-inv-action: #1c1c1e; --p-inv-action-ink: #ffcc00;
  --ground-bg: #f9e08a; --ground-surface: #fcefc0; --ground-ink: #2a2412; --ground-muted: #574b26; --ground-accent: #b8860b;
  --font-display: "Host Grotesk", "Anuphan", system-ui, sans-serif;
  --font-text: "Host Grotesk", "Anuphan", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.035em;
}
:lang(th) :is(h1, h2, h3) { line-height: 1.3; letter-spacing: -0.01em; }
:lang(th) h1 { line-height: 1.2; }

/* the nav, as on the home page: NT's logo on the left, the words after it, the one button at the right line */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; padding: var(--s-2) var(--s-3); background: var(--bg); color: var(--ink); z-index: 20; }
.nav__logo img { height: 40px; width: auto; }
@media (max-width: 639px) {
  .nav__logo { font-size: 18px; }
  .nav__logo img { height: 34px; }
  .nav__actions > .btn { display: none; }
}
/* NT yellow is a fill, too pale for a line or a word on white: the focus ring and hovered links take the ink */
:focus-visible { outline-color: var(--ink); }
.footer ul a:hover, .footer__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* the page head (as privacy-policy/): the title on NT's pale-yellow ground, the logo's bars and dots drawn large at its right */
.pp-hero {
  position: relative; overflow: hidden; padding: calc(var(--nav) + var(--s-9)) 0 var(--s-9);
  background: radial-gradient(70% 140% at 88% 0%, #fdeeb0 0%, var(--ground-bg) 55%, #f6d877 100%);
  color: var(--ground-ink); --ink: var(--ground-ink); --muted: var(--ground-muted);
  --line: color-mix(in oklab, var(--ground-ink) 16%, transparent);
}
.pp-hero .wrap { position: relative; z-index: 1; }
.pp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); color: var(--muted); }
.pp-crumb a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pp-crumb a:hover { text-decoration-color: currentColor; }
.pp-hero h1 { margin-top: var(--s-5); max-width: 16ch; }
.pp-lead { margin-top: var(--s-5); max-width: 52ch; color: var(--muted); }
.pp-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.pp-meta span { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s-4); border-radius: 99px; background: rgb(255 255 255 / .6); font-size: var(--t-small); font-weight: 500; }
.pp-art { position: absolute; z-index: 0; right: max(var(--gut), 50vw - 640px); top: 50%; width: 300px; height: auto; transform: translateY(-38%); fill: #ffcc00; }
@media (max-width: 1023px) { .pp-art { display: none; } }
@media (max-width: 639px) { .pp-hero { padding: calc(var(--nav) + var(--s-7)) 0 var(--s-7); } }

/* the body: a contents list held beside the text on a desktop, above it on a tablet and a phone */
.pp-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--s-9) var(--s-10); }
.pp-toc { grid-column: 1 / span 3; position: sticky; top: calc(var(--nav) + var(--s-6)); align-self: start; max-height: calc(100svh - var(--nav) - var(--s-8)); overflow-y: auto; }
.pp-doc { grid-column: 5 / span 8; max-width: 720px; }
.pp-toc ol { display: grid; margin-top: var(--s-3); border-left: 2px solid var(--line); }
.pp-toc a { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s-2); margin-left: -2px; padding: 6px var(--s-3); border-left: 2px solid transparent;
            border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); font-size: var(--t-small); line-height: 1.5; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.pp-toc a span { font-variant-numeric: tabular-nums; }
.pp-toc a:hover { color: var(--ink); }
.pp-toc a[aria-current="true"] { color: var(--ink); font-weight: 500; border-left-color: #e0ad00; background: color-mix(in oklab, var(--accent) 18%, transparent); }
@media (max-width: 1023px) {
  .pp-body { display: block; padding-block: var(--s-7) var(--s-9); }
  .pp-toc { position: static; max-height: none; margin-bottom: var(--s-7); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .pp-doc { max-width: none; }
}

/* the opening words, then each clause: its number on a yellow tile, the heading, then the words at a reading measure */
.pp-intro { display: grid; gap: var(--s-4); padding: var(--s-6); margin-bottom: var(--s-8); border-radius: var(--r-lg); background: var(--p-surface); }
.pp-intro p { font-size: 17px; line-height: 1.8; }
.pp-intro dl { display: grid; gap: var(--s-3); margin: var(--s-2) 0 0; }
.pp-intro dt { font-weight: 500; }
.pp-intro dd { margin: 2px 0 0; line-height: 1.7; }   /* body text: the ink, for 7:1 on the surface tile */
.pp-sec { padding-block: var(--s-7); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav) + var(--s-4)); }
.pp-sec:first-of-type { padding-top: 0; border-top: 0; }
.pp-sec h2 { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; font-size: clamp(22px, .76vw + 19px, 30px); }
.pp-sec h2 > span:last-child { padding-top: 2px; }
.pp-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink);
          font: 500 18px/1 var(--font-display); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pp-sec > p { margin-top: var(--s-4); max-width: 68ch; font-size: 17px; line-height: 1.8; }
.pp-sec a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.pp-sec a:hover { text-decoration-color: currentColor; }
.pp-list { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.pp-list li { position: relative; padding-left: var(--s-6); font-size: 17px; line-height: 1.7; }
.pp-list li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.pp-items { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.pp-items > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); background: var(--p-surface); font-size: 16px; line-height: 1.75; }
.pp-sub { padding-top: 1px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .pp-items > li { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); padding: var(--s-4); } .pp-intro { padding: var(--s-5); } }

/* the way to ask */
.pp-help { display: grid; gap: var(--s-5); margin-top: var(--s-4); padding: var(--s-7); border-radius: var(--r-lg); background: var(--p-surface); }
.pp-help h2 { font-size: clamp(22px, .76vw + 19px, 30px); }
.pp-help p { margin-top: var(--s-3); max-width: 56ch; color: var(--muted); }
.pp-help .btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 639px) { .pp-help { padding: var(--s-5); } .pp-help .btn { width: 100%; } }

/* the footer, as the home page's, without its closing call */
.pp-foot { padding-top: var(--s-9); }
.pp-foot .footer__lede { font-size: var(--t-lead); max-width: 30ch; }

/* the language switch in the page head: two links, the current one filled */
.pp-lang { display: inline-flex; gap: 4px; margin-top: var(--s-6); padding: 4px; border-radius: 99px; background: rgb(255 255 255 / .6); }
.pp-lang a { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--s-4); border-radius: 99px; font-size: var(--t-small); font-weight: 500; color: var(--ink);
             transition: background-color var(--dur) var(--ease); }
.pp-lang a:hover { background: rgb(255 255 255 / .8); }
.pp-lang a[aria-current="page"] { background: var(--ink); color: #fff; }


/* the trader's details (Controls/TraderInfo.ascx): label and value rows on the surface tile */
.pp-facts { display: grid; gap: 0; margin: 0 0 var(--s-6); padding: var(--s-2) var(--s-6); border-radius: var(--r-lg); background: var(--p-surface); }
.pp-facts > div { display: grid; grid-template-columns: minmax(0, 15ch) minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4); border-top: 1px solid var(--line); }
.pp-facts > div:first-child { border-top: 0; }
.pp-facts dt { font-weight: 500; color: var(--muted); }   /* the label in grey, the value in the ink */
.pp-facts dd { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.pp-facts a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.pp-facts a:hover { text-decoration-color: currentColor; }
.pp-sec .pp-facts { margin: var(--s-5) 0 0; }
@media (max-width: 639px) {
  .pp-facts { padding: var(--s-1) var(--s-5); }
  .pp-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pp-facts a { display: inline-flex; align-items: center; min-height: 44px; }   /* a thumb-sized target on a phone */
}
