/* Segl: TLS and certificates. Kode's grammar (kode.css), plus the seal: the platform's hexagon as a verdict. */
.hub.tool:has(.sg:not([hidden])) { max-width: 1120px; }

/* the seal: filled = fine, ring = worth a look, red = broken */
.sg-seal { width: 30px; height: 33px; flex: none; overflow: visible; }
.sg-seal__hex { fill: var(--sky); stroke: var(--sky); stroke-width: 2.5; stroke-linejoin: round; }
.sg-seal__mark { fill: none; stroke: var(--on-sky); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.sg-seal--warn .sg-seal__hex { fill: var(--surface); }
.sg-seal--warn .sg-seal__mark { stroke: var(--sky); }
.sg-seal--bad .sg-seal__hex { fill: var(--danger); stroke: var(--danger); }
.sg-seal--bad .sg-seal__mark { stroke: #fff; }

.sg-head { display: flex; gap: 16px; align-items: flex-start; margin: 26px 0 10px; }
.sg-head .sg-seal { width: 40px; height: 44px; margin-top: 2px; }
.sg-head .kd-say { margin: 0; }

/* paste box */
.sg-pastewrap { display: grid; gap: 8px; }
.sg-paste { min-height: 132px; max-height: 320px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface);
  color: var(--text-2); font: 400 12.5px/1.55 var(--mono); width: 100%; box-sizing: border-box; }
.sg-paste:focus { outline: 0; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }
.sg-paste.is-drop { border-style: dashed; border-color: var(--sky); background: var(--sky-soft); }
.sg-pastebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sg-empty { margin-top: 22px; }

/* issues: one line each, the seal says how bad */
.sg-issues { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.sg-issue { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.sg-issue .sg-seal { width: 20px; height: 22px; }
.sg-issue--bad { background: var(--danger-soft); color: var(--text); }

/* cards' insides */
.sg-kv { margin: 0; display: grid; gap: 8px; }
.sg-kv > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.sg-kv dt { font-size: 13px; color: var(--text-3); }
.sg-kv dd { margin: 0; font-size: 14.5px; color: var(--text); min-width: 0; }
.sg-wrap { font: 400 12.5px/1.5 var(--mono); overflow-wrap: anywhere; color: var(--text-2); }
.sg-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sg-names code { display: inline-block; padding: 4px 9px; border-radius: 7px; background: var(--sky-soft); color: var(--text); font: 500 13.5px var(--mono); }
.sg-names li:first-child code { box-shadow: inset 0 0 0 1px var(--sky); }
.sg-big { margin: 0; font: 500 20px var(--serif); color: var(--text); }
.sg-uses { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.sg-fp { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.sg-fp > span { font-size: 13px; color: var(--text-3); }

/* lifetime: how much is used, and today */
.sg-life { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sg-life__used { position: absolute; inset: 0 auto 0 0; width: var(--used); border-radius: 5px; background: var(--sky); opacity: .55; }
.sg-life__now { position: absolute; top: -4px; bottom: -4px; left: calc(var(--used) - 1px); width: 2px; border-radius: 1px; background: var(--text); }
.sg-life__ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }

/* the chain: seals linked by a line, leaf at the top, the root (or the trust anchor) at the bottom */
.sg-chain { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 0; }
.sg-link { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; }
.sg-link .sg-seal { width: 40px; height: 44px; justify-self: center; position: relative; z-index: 1; }
.sg-link:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 50px; bottom: -12px; width: 2px; border-radius: 1px;
  background: repeating-linear-gradient(var(--line-strong) 0 5px, transparent 5px 9px); }
.sg-link__body p { margin: 0; }
.sg-link__role { font-size: 12.5px; color: var(--text-3); }
.sg-link__name { font: 500 19px var(--serif); color: var(--text); overflow-wrap: anywhere; }
.sg-link__meta { font-size: 13.5px; color: var(--text-2); margin-top: 2px !important; }
.sg-link__open { font-size: 13px; color: var(--text-2); }
.sg-chain--small { margin-top: 0; }
.sg-chain--small .sg-seal { width: 30px; height: 33px; }
.sg-chain--small .sg-link { grid-template-columns: 36px minmax(0, 1fr); padding: 6px 0; }
.sg-chain--small .sg-link:not(:last-child)::after { left: 17px; top: 40px; }
.sg-chain--small .sg-link__name { font-size: 16px; }

/* openssl */
.sg-cmd { margin: 14px 0 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--code-bg); border: 1px solid var(--line); overflow-x: auto; }
.sg-cmd code { font: 400 13.5px/1.6 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

/* server sections */
.sg-locked { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; font-size: 13.5px; color: var(--text-3); }
.sg-locked .ki { width: 16px; height: 16px; color: var(--sky); }
.sg-lockmark { width: 13px !important; height: 13px !important; margin: 0 0 -1px 6px; color: var(--text-3); vertical-align: baseline; }
.sg-proto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sg-proto li { display: grid; gap: 2px; padding: 9px 10px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--text-3); }
.sg-proto li b { font: 600 14px var(--font); color: var(--text-3); }
.sg-proto li.is-on { background: var(--sky-soft); }
.sg-proto li.is-on b { color: var(--text); }
.sg-sample { display: flex; gap: 10px; align-items: baseline; margin: 14px 0 0; font-size: 13.5px; color: var(--text-3); }
.sg-sample span { flex: none; padding: 2px 7px; border-radius: 6px; border: 1px dashed var(--line-strong); font-size: 12px; color: var(--text-2); }

@media (max-width: 760px) {
  .sg-kv > div { grid-template-columns: 1fr; gap: 2px; }
  .sg-proto { grid-template-columns: repeat(2, 1fr); }
  .sg-head .sg-seal { width: 30px; height: 33px; }
}
.sg-pem { max-height: 220px; overflow: auto; }
.sg-pem code { font-size: 12px; white-space: pre; }
.sg-sets { display: grid; gap: 0; }
.sg-matchlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sg-matchlist li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--text-2); }
.sg-matchlist b { font-weight: 500; color: var(--text); min-width: 7.5em; }
.sg .kd-card input[type=file] { font: 14px var(--font); color: var(--text-2); }
.sg-gap { margin-top: 16px; }
.sg-gap-s { margin-top: 12px; }
.sg-paste::placeholder { color: var(--text-3); opacity: .55; }
.sg-example { display: flex; gap: 10px; align-items: baseline; margin: 18px 0 -12px; font-size: 13.5px; color: var(--text-3); }
.sg-example span { flex: none; padding: 2px 7px; border-radius: 6px; border: 1px dashed var(--line-strong); font-size: 12px; color: var(--text-2); }
