/* The staff and client side of the trust centre.
   ----------------------------------------------------------------------
   Rewritten because the original styled a vocabulary the templates do not
   use. It defined .field>span while all 67 fields use <label>; it defined
   input[type=text] while 41 inputs carry no type attribute at all, so the
   attribute selector could not match them; and it defined nav.tabs a.here
   while every template writes nav.subnav a.on. Seventeen classes the
   markup uses were defined nowhere.

   Nothing was broken in a way that threw an error. The forms simply came
   out as unstyled boxes with their labels alongside them, which is what
   this product looked like to the person using it.

   So: selectors that match the markup as written, and a small set of
   tokens rather than values repeated down the file. */

:root{
  --ink:#15181c; --soft:#525c68; --faint:#8a949e;
  --line:#e4e8ec; --line-soft:#eef1f4;
  --bg:#f6f8fa; --card:#fff; --raise:0 1px 2px rgba(16,24,40,.05);
  --accent:#1d4ed8; --accent-ink:#fff; --accent-soft:#eff4ff;
  --good:#15803d; --good-bg:#e7f8ed;
  --warn:#b45309; --warn-bg:#fef4e2;
  --bad:#b42318;  --bad-bg:#fdeceb;
  --r:10px; --r-sm:7px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ink:#e9edf2; --soft:#a4b0bd; --faint:#7c8894;
    --line:#2b3238; --line-soft:#232a30;
    --bg:#101417; --card:#171c21; --raise:none;
    --accent:#6f9bff; --accent-ink:#0b1020; --accent-soft:#1a2440;
    --good:#5ddb97; --good-bg:#12301f;
    --warn:#f0b254; --warn-bg:#33260f;
    --bad:#ff8a80;  --bad-bg:#3a1714;
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font:15px/1.55 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,
       "Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.shell{max-width:70rem; margin:0 auto; padding:1.25rem 1rem 5rem}

/* ----------------------------------------------------------- type */
h1{font-size:1.625rem; line-height:1.2; letter-spacing:-.022em; font-weight:660; margin:0 0 .3rem}
h2{font-size:1.0625rem; letter-spacing:-.01em; font-weight:650; margin:2rem 0 .7rem}
h3{font-size:.9375rem; font-weight:650; margin:1.25rem 0 .4rem}
p{margin:0 0 .75rem}
.lede{color:var(--soft); margin:0 0 1.25rem}
.small{font-size:.875rem} .tiny{font-size:.75rem}
.muted{color:var(--soft)} .faint{color:var(--faint)}
.mono,.tc-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.8125rem}
.num{font-variant-numeric:tabular-nums; text-align:right}
.right{text-align:right}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:3px}

/* -------------------------------------------------------- layout */
/* `between` is the page header: a title on the left, the one action that
   matters on the right. It wraps rather than squashing on a phone. */
.between{display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start;
  justify-content:space-between; margin:0 0 1.25rem}
.grid{display:grid; gap:1rem; grid-template-columns:1fr}
@media (min-width:48rem){
  .grid{grid-template-columns:1fr 1fr}
  .k3{grid-template-columns:repeat(3,1fr)}
  .k4{grid-template-columns:repeat(4,1fr)}
}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  padding:1.1rem 1.15rem; margin:0 0 1rem; box-shadow:var(--raise)}
.card > :first-child{margin-top:0}
.card > :last-child{margin-bottom:0}

/* The number blocks. They were four bare numbers with their captions
   underneath and nothing joining them. */
.stat{background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  padding:.85rem .95rem; box-shadow:var(--raise)}
.stat b{display:block; font-size:1.5rem; line-height:1.15; font-weight:680;
  letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.stat span{display:block; margin-top:.15rem; font-size:.8125rem; color:var(--soft)}

/* ---------------------------------------------------------- tabs */
/* nav.subnav with a.on — the names the templates actually write. */
nav.subnav{display:flex; flex-wrap:wrap; gap:.15rem; margin:0 0 1.35rem;
  border-bottom:1px solid var(--line)}
nav.subnav a{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.5rem .8rem; margin-bottom:-1px;
  font-size:.9375rem; font-weight:560; color:var(--soft);
  border-bottom:2px solid transparent; border-radius:var(--r-sm) var(--r-sm) 0 0;
}
nav.subnav a:hover{color:var(--ink); background:var(--line-soft); text-decoration:none}
nav.subnav a.on{color:var(--ink); font-weight:650; border-bottom-color:var(--accent)}
nav.subnav a.on:hover{background:transparent}
nav.subnav .pill{font-size:.6875rem; padding:.05rem .35rem}

/* --------------------------------------------------------- forms */
/* <label>, not <span>. This is the line whose absence made every form in
   the product look like a 1997 CGI script. */
.field{display:block; margin:0 0 .85rem}
.field > label,
.field > span{display:block; font-size:.8125rem; font-weight:620;
  color:var(--soft); margin:0 0 .3rem}
.field .hint{display:block; margin:.3rem 0 0; font-size:.8125rem; color:var(--faint)}

/* Matches an input with no type attribute too, which 41 of them are. The
   exclusions are the controls that must keep their native box. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),
select, textarea{
  width:100%; padding:.5rem .65rem; font:inherit; color:var(--ink);
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-sm);
  transition:border-color .12s, box-shadow .12s;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
select:focus, textarea:focus{
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder{color:var(--faint)}
textarea{min-height:6.5rem; resize:vertical; line-height:1.5}
select{appearance:none; padding-right:1.9rem;
  background-image:linear-gradient(45deg,transparent 50%,var(--soft) 50%),
                   linear-gradient(135deg,var(--soft) 50%,transparent 50%);
  background-position:calc(100% - 1.05rem) 55%, calc(100% - .72rem) 55%;
  background-size:5px 5px, 5px 5px; background-repeat:no-repeat}
input[type=file]{font:inherit; font-size:.875rem; color:var(--soft); max-width:100%}
input[type=checkbox],input[type=radio]{accent-color:var(--accent); margin-right:.4rem}
label.check{display:flex; align-items:flex-start; gap:.1rem; font-size:.9375rem;
  margin:0 0 .6rem; color:var(--ink)}

/* ------------------------------------------------------- buttons */
button,.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  font:inherit; font-weight:620; line-height:1.3;
  padding:.5rem .95rem; border-radius:var(--r-sm); cursor:pointer;
  border:1px solid var(--accent); background:var(--accent); color:var(--accent-ink);
  transition:filter .12s, background .12s;
}
button:hover,.btn:hover{filter:brightness(1.08); text-decoration:none}
button:active,.btn:active{filter:brightness(.95)}
button.ghost,.ghost{background:transparent; color:var(--accent); border-color:var(--line)}
button.ghost:hover,.ghost:hover{background:var(--accent-soft); filter:none}
button.danger,.danger{background:transparent; color:var(--bad); border-color:var(--line)}
button.danger:hover{background:var(--bad-bg); filter:none}
button.link{background:none; border:none; color:var(--accent); padding:.2rem;
  font-weight:560}
button.link:hover{text-decoration:underline; filter:none}
button:disabled,.btn:disabled{opacity:.5; cursor:not-allowed; filter:none}
.inline{display:inline-block; margin-right:.4rem}
.btn-row{display:flex; flex-wrap:wrap; gap:.5rem; align-items:center}

/* --------------------------------------------------------- pills */
.pill{display:inline-flex; align-items:center; gap:.25rem;
  padding:.12rem .5rem; border-radius:999px; font-size:.75rem; font-weight:650;
  background:var(--line-soft); color:var(--soft); white-space:nowrap}
.pill.good{background:var(--good-bg); color:var(--good)}
.pill.warn{background:var(--warn-bg); color:var(--warn)}
.pill.bad{background:var(--bad-bg); color:var(--bad)}
.pill.grey{background:var(--line-soft); color:var(--soft)}

/* ----------------------------------------------- notices and flags */
.flash{background:var(--good-bg); color:var(--good); border-radius:var(--r-sm);
  padding:.6rem .8rem; margin:0 0 1rem; font-size:.9375rem; font-weight:560}
/* `flag` is the plan banner. It was unstyled prose running the page width. */
.flag{background:var(--accent-soft); color:var(--ink); border:1px solid transparent;
  border-radius:var(--r-sm); padding:.65rem .85rem; margin:0 0 1.25rem;
  font-size:.875rem; line-height:1.5}
.flag.warn{background:var(--warn-bg); color:var(--warn)}
.flag strong{font-weight:680}
.warn{color:var(--warn)}
.empty{color:var(--faint); padding:1.1rem 0; font-size:.9375rem}

/* -------------------------------------------------------- tables */
table{width:100%; border-collapse:collapse; font-size:.9375rem}
th,td{text-align:left; padding:.6rem .55rem; border-bottom:1px solid var(--line-soft);
  vertical-align:top}
thead th{font-size:.6875rem; text-transform:uppercase; letter-spacing:.06em;
  font-weight:680; color:var(--faint); border-bottom:1px solid var(--line);
  white-space:nowrap}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover{background:var(--line-soft)}
.wrap-x{overflow-x:auto; -webkit-overflow-scrolling:touch}

/* ------------------------------------------------- the adder block */
/* <details> that opens a form under a list. The marker was a raw triangle
   against the page background. */
.adder{border-top:1px solid var(--line); margin-top:1.1rem; padding-top:.9rem}
.adder > summary{
  cursor:pointer; font-size:.9375rem; font-weight:620; color:var(--accent);
  list-style:none; display:inline-flex; align-items:center; gap:.4rem;
  padding:.35rem .6rem; margin-left:-.6rem; border-radius:var(--r-sm);
}
.adder > summary::-webkit-details-marker{display:none}
.adder > summary::before{content:"＋"; font-weight:700; line-height:1}
.adder[open] > summary::before{content:"−"}
.adder > summary:hover{background:var(--accent-soft)}
.adder > div{padding:.9rem 0 .2rem; max-width:44rem}

/* ----------------------------------------------------------- misc */
.show{display:block}
.bound{color:var(--soft); font-size:.8125rem}

/* A framework row leads with the same mark the public page shows, because
   the question being asked on this screen is what the client will see. */
.rowmark{display:flex; gap:.6rem; align-items:flex-start}
.rowmark .mark{flex:none; line-height:0}
.rowmark .mark svg{display:block}

/* The snippet handed to a client for their own footer. Shown next to the
   picture it renders, so nobody has to imagine the result. */
/* Width-capped because this lives inside a table cell: a snippet allowed
   to be as wide as it likes pushes every other column into a column of
   single words. Left-aligned for the same reason the cell is not — a code
   snippet ragged on the left is unreadable. */
.embed{margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line);
       display:grid; gap:.5rem; justify-items:start; text-align:left;
       max-width:22rem}
.embed img{border-radius:10px}
.embed textarea{width:100%; white-space:pre-wrap; word-break:break-all;
                line-height:1.45}
