/* The public trust centre (templates/trust_public.html, trust_access.html):
   a client's page for outsiders, outside the application's shell. Built on
   the tokens of tokens.css; the text colours are the accessible ones
   (--secondary, --green-text, --violet), never lighter than #686D81. */
.tp { margin: 0; background: #F5F6F8; color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp a { color: var(--violet); text-decoration: none; }
.tp a:hover { color: var(--violet-hover); text-decoration: underline; }
.tp :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tp .mono, .tp-eyebrow, .tp-doc-tag, .tp-update-date, .tp-badge, .tp-mini, .tp-fw-pct, .tp-lang, .tp-hero-eyebrow { font-family: var(--font-mono); }
.tp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tp-skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--violet); color: #fff !important; padding: 8px 12px; border-radius: 4px; font-weight: 600; }
.tp-skip:focus { top: 8px; }
.tp-wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.tp-strong { font-weight: 600; }
.tp-muted { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--secondary); }
.tp-small { font-size: 12px; color: var(--secondary); }
.tp-green { color: var(--green-text) !important; }
.tp-violet, .tp-eyebrow.tp-violet { color: var(--violet); }
.tp-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); white-space: nowrap; flex: none; }
.tp-link { font-size: 13px; font-weight: 500; white-space: nowrap; }

/* ---- top bar */
.tp-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #E4E6EC; }
.tp-top-row { height: 60px; display: flex; align-items: center; gap: 14px; }
.tp-logo { height: 30px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
.tp-mark { width: 30px; height: 30px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.tp-company { font-weight: 600; font-size: 16px; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-rule { width: 1px; height: 18px; background: var(--hairline); flex: none; }
.tp-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.tp-lang { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--body) !important; border: 1px solid var(--hairline); border-radius: 2px; padding: 6px 8px; background: #fff; }
.tp-lang:hover { text-decoration: none !important; border-color: var(--violet); }

/* ---- buttons */
.tp-button { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border: 1px solid var(--hairline); border-radius: 4px; background: #fff; color: var(--ink) !important; font: 600 13.5px var(--font-sans); cursor: pointer; white-space: nowrap; flex: none; }
.tp-button.mono { font: 500 12.5px var(--font-mono); height: 32px; padding: 0 10px; align-self: flex-start; }
.tp-button.primary { background: var(--violet); border-color: var(--violet); color: #fff !important; }
.tp-button:hover { text-decoration: none !important; border-color: var(--violet); }
.tp-button.primary:hover { background: var(--violet-hover); }

/* ---- hero */
.tp-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.tp-hero-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 56px 56px; }
.tp-hero-glow { position: absolute; top: -260px; right: -120px; width: 760px; height: 620px; pointer-events: none; background: radial-gradient(ellipse at center, rgba(115,103,240,.75) 0%, rgba(115,103,240,.25) 45%, transparent 72%); filter: blur(28px); }
.tp-hero-sq { position: absolute; width: 56px; height: 56px; pointer-events: none; }
.tp-hero-sq.one { right: 120px; top: 60px; background: rgba(167,159,250,.18); }
.tp-hero-sq.two { right: 176px; top: 116px; background: rgba(167,159,250,.10); }
.tp-hero-sq.three { right: 64px; top: 172px; background: rgba(167,159,250,.14); }
.tp-hero-body { position: relative; padding-top: 64px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 16px; }
.tp-hero-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #A79FFA; }
.tp-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.025em; font-weight: 600; text-wrap: balance; max-width: 820px; }
.tp-hero-intro { margin: 0; font-size: 16.5px; line-height: 1.6; color: #C3C6D4; max-width: 560px; text-wrap: pretty; }
.tp-hero-links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 4px; }
.tp-hero-links a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.tp-hero-links a.mono { font-size: 13px; }
.tp-hero-links a:hover { color: #fff; }
.tp-hero-links svg { fill: none; stroke: #A79FFA; stroke-width: 1.6; flex: none; }

/* ---- section tabs */
.tp-nav { position: sticky; top: 60px; z-index: 10; background: #fff; border-bottom: 1px solid #E4E6EC; }
.tp-nav-row { display: flex; gap: 28px; font-size: 14px; font-weight: 500; overflow-x: auto; scrollbar-width: none; }
.tp-nav-row::-webkit-scrollbar { display: none; }
.tp-nav a { color: var(--secondary); padding: 14px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.tp-nav a:hover { color: var(--ink); text-decoration: none; }
.tp-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--violet); }

/* ---- the two columns */
.tp-main { padding-top: 40px; padding-bottom: 32px; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.tp-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.tp-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 120px; }
.tp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.tp-head h2, .tp-request h2 { margin: 0; font-size: 17px; font-weight: 600; }
.tp-head-end { margin-left: auto; }
.tp-head .tp-pill { align-self: center; }
.tp-head-start { justify-content: flex-start; align-items: center; }
.tp-card { background: #fff; border: 1px solid #E4E6EC; border-radius: 4px; }
.tp-card-title { margin: 0; font-weight: 600; font-size: 14.5px; }
.tp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--body); background: #F1F2F6; padding: 3px 8px; border-radius: 2px; white-space: nowrap; flex: none; }
.tp-pill.green { color: var(--green-text); background: #E8F5EE; font: 500 11px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; }
.tp-pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-text); }

/* ---- compliance */
.tp-ring { position: relative; width: 48px; height: 48px; display: grid; place-items: center; flex: none; }
.tp-ring.big { width: 56px; height: 56px; }
.tp-ring svg { position: absolute; inset: 0; }
.tp-ring circle { fill: none; stroke-width: 3.5; }
.tp-ring-track { stroke: #EEF0F4; }
.tp-ring-bar { stroke: var(--violet); stroke-linecap: round; }
.tp-ring-bar.done { stroke: var(--green-text); }
.tp-badge { position: relative; width: 34px; height: 34px; border-radius: 50%; background: #F4F3FE; display: grid; place-items: center; font-size: 8px; font-weight: 600; color: var(--violet); text-align: center; line-height: 1.1; }
.tp-ring.big .tp-badge { width: 42px; height: 42px; font-size: 9.5px; }
.tp-badge svg { position: static; fill: none; stroke: var(--green-text); stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.tp-fw-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #EEF0F4; }
.tp-fw-row:last-child { border-bottom: 0; }
.tp-fw-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tp-fw-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.tp-fw-line .tp-strong:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-meter { height: 4px; background: #EEF0F4; border-radius: 2px; overflow: hidden; display: block; }
.tp-meter i { display: block; height: 100%; background: var(--violet); }
.tp-meter i.done { background: var(--green-text); }
.tp-fw-grid { padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tp-fw-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px; border-radius: 2px; min-width: 0; }
.tp-fw-tile:hover { background: #F5F6F8; }
.tp-fw-name { font-size: 11px; font-weight: 500; text-align: center; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-fw-pct { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--violet); }
.tp-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tp-fw-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FAFAFC; border-top: 1px solid #EEF0F4; padding: 11px 16px; font-size: 13px; font-weight: 500; color: var(--violet); }
.tp-fw-more:hover { background: #F4F3FE; text-decoration: none !important; }
.tp-fw-more-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tp-fw-more-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-mini { width: 22px; height: 22px; border-radius: 50%; background: #F4F3FE; border: 1.5px solid #fff; box-shadow: 0 0 0 1px #D9D5FB; display: grid; place-items: center; font-size: 7px; font-weight: 600; color: var(--violet); margin-left: -6px; flex: none; }
.tp-mini:first-child { margin-left: 0; }
.tp-cert { background: #FAFAFC; }

/* ---- documents */
.tp-docs { padding: 6px 0; }
.tp-doc-kind { display: block; font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); padding: 12px 16px 6px; }
.tp-doc-list + .tp-doc-kind { border-top: 1px solid #EEF0F4; margin-top: 6px; padding-top: 14px; }
.tp-doc-list { list-style: none; margin: 0; padding: 0; }
.tp-doc { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: var(--ink) !important; font-size: 13.5px; }
.tp-doc:hover { background: #F5F6F8; text-decoration: none !important; }
.tp-doc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-doc-tag { font-size: 10.5px; font-weight: 500; color: var(--secondary); white-space: nowrap; flex: none; }
.tp-doc-tag.tp-green { text-transform: uppercase; letter-spacing: .04em; }
.tp-doc-icon { fill: none; stroke: var(--secondary); stroke-width: 1.5; flex: none; }
.tp-doc-icon.down { stroke: var(--violet); stroke-width: 1.6; }
.tp-report { padding: 18px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 120px; }
.tp-report .tp-muted { font-size: 13px; line-height: 1.55; }
.tp-report .tp-button { margin-top: 4px; }
/* the full policy the administrator chose (docs/FLOWS.md 7.40): a link under the text */
.tp-report .tp-link { align-self: flex-start; }
.tp-nda-doc { margin: 0; font-size: 13px; }

/* ---- controls */
.tp-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.tp-group { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.tp-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-group-head h3 { margin: 0; font-weight: 600; font-size: 15px; min-width: 0; }
.tp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-checks li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.4; color: var(--body); }
.tp-check { width: 16px; height: 16px; border-radius: 50%; background: var(--green-text); display: grid; place-items: center; flex: none; margin-top: 1px; }
.tp-check svg { fill: none; stroke: #fff; stroke-width: 2.2; }
.tp-more summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--violet); }
.tp-more summary::-webkit-details-marker { display: none; }
.tp-more[open] summary { margin-bottom: 8px; }

/* ---- subprocessors */
.tp-table-wrap { overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tp-table th { text-align: left; padding: 10px 18px; background: #FAFAFC; border-bottom: 1px solid #EEF0F4; font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); white-space: nowrap; }
.tp-table td { padding: 14px 18px; border-bottom: 1px solid #F1F2F6; color: var(--body); vertical-align: middle; }
.tp-table td.tp-strong { color: var(--ink); font-weight: 500; }
.tp-table tr:last-child td { border-bottom: 0; }

/* ---- updates */
.tp-updates { list-style: none; margin: 0; padding: 6px 18px; }
.tp-updates li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F1F2F6; font-size: 13.5px; line-height: 1.5; }
.tp-updates li:last-child { border-bottom: 0; }
.tp-update-date { font-size: 11px; font-weight: 500; color: var(--secondary); white-space: nowrap; margin-top: 2px; min-width: 48px; }

/* ---- questions */
.tp-faq details { border-bottom: 1px solid #F1F2F6; }
.tp-faq details:last-child { border-bottom: 0; }
.tp-faq summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; font-size: 14px; font-weight: 600; }
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-q { flex: 1; min-width: 0; }
.tp-sign::before { content: "+"; font: 500 16px var(--font-mono); color: var(--violet); }
.tp-faq details[open] .tp-sign::before { content: "\2212"; }
.tp-faq p { margin: 0; padding: 0 18px 16px; font-size: 13.5px; line-height: 1.6; color: var(--body); }

/* ---- access request */
.tp-request { padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 28px; scroll-margin-top: 120px; }
.tp-request-text { display: flex; flex-direction: column; gap: 10px; }
.tp-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.tp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tp-fields label { display: block; }
.tp-fields input { width: 100%; height: 38px; border: 1px solid var(--field-rule); border-radius: 4px; padding: 0 12px; font: 13.5px var(--font-sans); color: var(--ink); background: #fff; }
.tp-fields input::placeholder { color: var(--secondary); opacity: 1; }
.tp-fields input:focus-visible { border-color: var(--violet); }
.tp-pick { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-pick legend { padding: 0; margin-bottom: 8px; }
.tp-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--hairline); border-radius: 2px; padding: 5px 9px; font-size: 12.5px; color: var(--body); cursor: pointer; background: #fff; }
.tp-chip input, .tp-accept input { accent-color: var(--violet); margin: 0; width: 15px; height: 15px; flex: none; }
.tp-nda summary { cursor: pointer; font-size: 13px; color: var(--violet); }
.tp-nda p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--body); background: #FAFAFC; border: 1px solid #EEF0F4; border-radius: 4px; padding: 10px 12px; }
.tp-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-accept { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--body); cursor: pointer; }
.tp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.tp-sent { display: flex; flex-direction: column; gap: 6px; justify-content: center; font-size: 15px; }
.tp-error { margin: 0; font-size: 13px; color: var(--red-text); background: var(--red-tint); border-radius: 4px; padding: 8px 12px; }

/* ---- footer */
.tp-footer { padding-top: 24px; padding-bottom: 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid #E4E6EC; font-size: 12.5px; color: var(--secondary); }
.tp-powered { display: inline-flex; align-items: center; gap: 7px; }
.tp-powered .tp-strong { color: var(--body); }
.tp-logo-disc { fill: var(--violet); }

/* ---- the access page (trust_access.html) */
.tp-access { padding-top: 40px; padding-bottom: 32px; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.tp-access .tp-docs { padding: 6px 0; }

@media (max-width: 900px) {
  .tp-main { grid-template-columns: minmax(0, 1fr); }
  .tp-request { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tp-wrap { padding-left: 16px; padding-right: 16px; }
  .tp-rule { display: none; }
  .tp-top-row { gap: 10px; }
  .tp-top-row > .tp-eyebrow { display: none; }
  .tp-hero-sq { display: none; }
  .tp-hero-body { padding-top: 40px; padding-bottom: 36px; }
  .tp-fw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tp * { scroll-behavior: auto !important; transition: none !important; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.tp-access-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }

/* ---- one tab on its own (?tab=): a heading line, one line under it, its content */
.tp-home { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--ink) !important; }
.tp-home:hover { text-decoration: none !important; }
.tp-single { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 14px; }
.tp-single > .tp-head + .tp-muted { margin-top: -4px; }
.tp-single > .tp-card, .tp-single > .tp-fw-cards, .tp-single > .tp-groups { margin-top: 6px; }
.tp-single > .tp-head:not(:first-child) { margin-top: 18px; }
.tp-single .tp-report { max-width: 560px; }
.tp-fw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.tp-fw-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.tp-fw-card-top { display: flex; align-items: center; gap: 14px; }
.tp-fw-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.tp-fw-big { margin-left: auto; font-size: 24px; font-weight: 600; color: var(--violet); flex: none; }
.tp-fw-card .tp-meter { height: 6px; }
.tp-fw-facts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--secondary); }
.tp-fact { font: 600 14px var(--font-mono); color: var(--ink); }
.tp-groups.wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tp-button.small { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.tp-table td .tp-button.small { vertical-align: middle; }
.tp-badge.solo { width: 48px; height: 48px; font-size: 10px; flex: none; }
.tp-badge.solo.big { width: 64px; height: 64px; font-size: 12px; }

/* ---- a requirement's state (core/requirement_status.py): green check, or an empty grey circle */
.tp-check.off { background: transparent; border: 1.5px solid #B9BDCB; }
.tp-checks li.is-off { color: var(--secondary); }
.tp-item-title { flex: 1; min-width: 0; }
.tp-auto { display: table; margin-top: 4px; font: 500 10px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--violet); background: var(--violet-tint); border-radius: 2px; padding: 2px 6px; white-space: nowrap; }

/* A framework's logo from the library in place of its badge (views_trust.trust_framework_logo). */
.tp-fw-logo { width: 48px; height: 48px; object-fit: contain; flex: none; display: block; }
.tp-fw-logo.grid { width: 56px; height: 56px; }
.tp-fw-logo.big { width: 64px; height: 64px; }
.tp-mini-logo { padding: 0; object-fit: contain; background: #fff; }
