/* osir.co.uk: Certificate, CSR & Key Tool */

.ct-local { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px; border-radius: 14px;
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .35); }
.ct-local .icon { flex: none; margin-top: 2px; color: #15803d; }
.ct-local p { margin: 0; font-size: 15px; color: var(--text-2); }
:root[data-theme="dark"] .ct-local .icon { color: #4ade80; }

.ct-tabs { margin-bottom: 16px; }
.ct-panel[hidden] { display: none; }
.ct-field { margin-top: 12px; }
.ct-text { height: auto; min-height: 150px; padding: 10px 12px; font-size: 13px; line-height: 1.45; resize: vertical; word-break: break-all; }
.ct-sans { min-height: 96px; }
.ct-check { margin-top: 12px; }
.ct-status { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.ct-status:empty { display: none; }
.ct-keynote { margin-top: 10px; }
.ct-out:empty { display: none; }
.ct-out { margin-top: 16px; display: grid; gap: 14px; }
.ct-out > .t-verdict { margin-top: 0; }
.ct-msg:empty { display: none; }
.ct-errlist { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 4px; font-size: 14.5px; color: var(--text-2); }
.ct-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ct-note p { margin: 0; font-size: 14.5px; }
.ct-h3 { margin-top: 18px; font-size: 17px; }

/* One decoded item */
.ct-item { padding: 0; }
.ct-item > .ct-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.ct-item > .ct-sum::-webkit-details-marker { display: none; }
.ct-item > .ct-sum::before { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.ct-item[open] > .ct-sum::before { transform: rotate(45deg); }
.ct-sum-title { font-weight: 750; font-size: 16.5px; overflow-wrap: anywhere; min-width: 0; }
.ct-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ct-body { padding: 0 18px 18px; }
.ct-finds { display: grid; gap: 8px; }
.ct-finds .t-verdict { margin-top: 0; padding: 11px 14px; font-size: 14.5px; }
.ct-finds:empty { display: none; }
.ct-kv { grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); }
.ct-kv dd { min-width: 0; }
.ct-name { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ct-name li { display: flex; flex-wrap: wrap; gap: 0 8px; }
.ct-k { color: var(--muted); font-size: 13px; min-width: 104px; }
.ct-v { overflow-wrap: anywhere; min-width: 0; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chip { display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.ct-chip.is-alt { border-style: dashed; }
.ct-lines { display: grid; gap: 3px; }
.ct-lines.t-mono { font-size: 13px; word-break: break-all; }
.ct-wrap { overflow-wrap: anywhere; word-break: break-word; }
.ct-copyrow { display: flex; align-items: flex-start; gap: 4px; }
.ct-copyrow .t-mono { flex: 1; min-width: 0; font-size: 13px; word-break: break-all; padding-top: 5px; }
.ct-copyrow .u-copy { flex: none; }
.ct-pem { font-size: 12.5px; max-height: 260px; }

/* Chain */
.ct-chain { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.ct-node { position: relative; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.ct-node + .ct-node { margin-top: 26px; }
.ct-node + .ct-node::before { content: ""; position: absolute; left: 26px; top: -27px; height: 26px; border-left: 2px dashed var(--border-strong); }
.ct-node-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ct-node-n { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--border-strong); font-weight: 800; font-size: 13px; }
.ct-node-name { overflow-wrap: anywhere; min-width: 0; }
.ct-node-meta { margin-top: 6px; }
.ct-checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ct-checks li { display: flex; align-items: flex-start; gap: 8px; }
.ct-checks li .t-badge { flex: none; min-width: 46px; justify-content: center; }
.ct-checks li span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Match */
.ct-table td { overflow-wrap: anywhere; }
.ct-table td.t-wrap { min-width: 180px; }

/* Commands */
.ct-cmds { display: grid; gap: 12px; margin-top: 12px; }
.ct-cmd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.ct-cmd .t-code { margin-top: 4px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }

/* Convert */
.ct-conv { display: grid; gap: 4px; }
.ct-conv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ct-conv-head strong { overflow-wrap: anywhere; min-width: 0; }
.ct-conv .t-actions { margin-top: 8px; }
.ct-out .t-actions .btn { max-width: 100%; white-space: normal; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; overflow-wrap: anywhere; text-align: left; }

#gn-form [aria-invalid="true"] { border-color: #dc2626; }

@media (max-width: 640px) {
  .ct-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .ct-kv dt { margin-top: 10px; }
  .ct-item > .ct-sum { padding: 14px; }
  .ct-body { padding: 0 14px 14px; }
  .ct-tabs { display: flex; }
  .ct-tabs .t-tab { flex: 1 1 auto; justify-content: center; padding: 7px 10px; }
}
