/* osir.co.uk: shared styles for tool pages */

.t-card { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); min-width: 0; }
.t-card + .t-card, .t-stack > * + * { margin-top: 16px; }
.t-card h2 { font-size: 19px; font-weight: 780; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.t-card h2 .icon { color: var(--brand-1); }
.t-card .t-sub { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.t-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.t-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.t-grid-2 > .t-card + .t-card, .t-grid-3 > .t-card + .t-card { margin-top: 0; }
.t-section { margin-top: 18px; }
.t-muted { color: var(--muted); }
.t-small { font-size: 13.5px; }
.t-mono { font-family: var(--mono); }

/* Big value, e.g. an IP address */
.t-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.t-big-val { font-family: var(--mono); font-size: clamp(28px, 6vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; word-break: break-all; }
.t-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }

/* Key / value lists */
.t-kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin-top: 14px; font-size: 15px; }
.t-kv dt { color: var(--muted); font-weight: 600; font-size: 13.5px; padding-top: 1px; }
.t-kv dd { margin: 0; word-break: break-word; }

/* Verdicts */
.t-verdict { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: 14px; font-size: 15px; border: 1px solid var(--border); background: var(--surface-2); }
.t-verdict::before { content: "i"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: 13px; color: #fff; background: var(--muted); }
.t-verdict.good { background: rgba(34, 197, 94, .09); border-color: rgba(34, 197, 94, .35); }
.t-verdict.good::before { content: "✓"; background: #16a34a; }
.t-verdict.warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); }
.t-verdict.warn::before { content: "!"; background: #d97706; }
.t-verdict.bad { background: rgba(220, 38, 38, .08); border-color: rgba(220, 38, 38, .35); }
.t-verdict.bad::before { content: "✕"; background: #dc2626; }
.t-verdict.busy::before { content: ""; border: 3px solid var(--border-strong); border-top-color: var(--brand-1); background: transparent; animation: tspin .8s linear infinite; width: 18px; height: 18px; margin: 3px; }

/* Badges */
.t-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.t-badge.ok { color: #15803d; background: rgba(34, 197, 94, .14); }
.t-badge.warn { color: #a16207; background: rgba(245, 158, 11, .16); }
.t-badge.bad { color: #b91c1c; background: rgba(220, 38, 38, .12); }
.t-badge.muted { color: var(--text-2); background: var(--surface-2); }
:root[data-theme="dark"] .t-badge.ok { color: #4ade80; }
:root[data-theme="dark"] .t-badge.warn { color: #fbbf24; }
:root[data-theme="dark"] .t-badge.bad { color: #f87171; }

/* Tables */
.t-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.t-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.t-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.t-table tr:last-child td { border-bottom: 0; }
.t-table td.t-wrap { word-break: break-all; font-family: var(--mono); font-size: 13px; }
.t-table .t-sub-row td { color: var(--muted); font-size: 13px; }

/* Forms */
.t-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.t-field { display: grid; gap: 6px; flex: 1 1 200px; min-width: 0; }
.t-field > span { font-size: 13px; font-weight: 650; color: var(--text-2); }
.t-input, .t-select, .t-textarea {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-solid); font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.t-textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; font-family: inherit; line-height: 1.5; }
.t-input:focus, .t-select:focus, .t-textarea:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 18%, transparent); }
.t-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.t-check input { width: 18px; height: 18px; accent-color: var(--brand-1); }

/* Segmented tabs */
.t-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.t-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.t-tab.is-active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }

/* Misc */
@keyframes tspin { to { transform: rotate(360deg); } }
.t-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand-1); animation: tspin .8s linear infinite; vertical-align: -2px; }
.t-code { display: block; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-family: var(--mono); font-size: 13.5px; overflow-x: auto; white-space: pre; }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.t-toast { position: fixed; right: 16px; bottom: 16px; z-index: 90; max-width: 340px; padding: 12px 14px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-left: 4px solid #16a34a; box-shadow: var(--shadow-lg); font-size: 14px; transition: opacity .3s; }
.related { margin-top: 56px; }
.related h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.faq { margin-top: 14px; display: grid; gap: 10px; }
.faq details { padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; color: var(--text-2); }

@media (max-width: 860px) { .t-grid-2, .t-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .t-card { padding: 18px; } .t-kv { grid-template-columns: 1fr; gap: 2px; } .t-kv dd { margin-bottom: 8px; } }

/* Horizontal bar lists (also used on public tool pages) */
.barlist { display: grid; gap: 8px; }
.barlist li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(60px, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bl-track { height: 10px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bl-track i { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--brand-1); }
.bl-val { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; font-size: 13px; color: var(--text-2); }
