/* ==========================================================================
   Purview Assistant — shared design system
   Lockbase design language, aligned with sentinelcalculator.lockbasecyber.com:
   dark gray-900 canvas, gray-800 panels, blue accent system, soft 12px cards
   with a blue glow on hover, system sans type.
   Every page links this file first, then adds only its own rules inline.
   ========================================================================== */

:root {
  /* surfaces — Tailwind gray scale, same values as the Sentinel calculator */
  --bg: #111827;           /* gray-900 page canvas */
  --card: #1f2937;         /* gray-800 panels */
  --rail: #374151;         /* gray-700 inputs, code rails, tag fills */
  --border: #374151;       /* gray-700 */
  --border-firm: #4b5563;  /* gray-600 */

  /* ink */
  --text: #f3f4f6;         /* gray-100 */
  --muted: #9ca3af;        /* gray-400 */

  /* accent — Lockbase blue. Text/links/borders use the light tier,
     solid fills use the strong tier (btn-primary in the calculator). */
  --accent: #60a5fa;             /* blue-400 — text, borders, focus */
  --accent-strong: #2563eb;      /* blue-600 — button/pill fills */
  --accent-hover: #1d4ed8;       /* blue-700 */
  --accent-soft: rgba(59, 130, 246, .12);
  --accent-line: rgba(96, 165, 250, .35);
  --on-accent: #ffffff;

  /* semantic scale — Tailwind 400-tier on 10% tints */
  --ok: #34d399;      --ok-soft: rgba(52, 211, 153, .12);    --ok-line: rgba(52, 211, 153, .35);
  --warn: #fbbf24;    --warn-soft: rgba(251, 191, 36, .12);  --warn-line: rgba(251, 191, 36, .35);
  --fail: #f87171;    --fail-soft: rgba(248, 113, 113, .12); --fail-line: rgba(248, 113, 113, .35);
  --info: #22d3ee;    --info-soft: rgba(34, 211, 238, .12);  --info-line: rgba(34, 211, 238, .35);

  /* type — the calculator ships the system sans stack for everything */
  --display: ui-sans-serif, system-ui, "Segoe UI Variable Display", "Segoe UI",
             -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --body: ui-sans-serif, system-ui, "Segoe UI Variable Text", "Segoe UI",
          -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas,
          SFMono-Regular, "SF Mono", Menlo, monospace;

  /* geometry & depth */
  --radius: 8px;           /* buttons, inputs, small blocks (rounded-lg) */
  --radius-lg: 12px;       /* cards and large panels (rounded-xl) */
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 25px -5px rgba(59, 130, 246, .2);  /* the hover glow */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(59, 130, 246, .35); color: var(--text); }

a { color: var(--accent); text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* main is focused programmatically by the skip link; it should not draw a ring */
main:focus { outline: none; }

/* Skip link: off-screen until keyboard-focused, then it docks top-left */
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--on-accent);
  background: var(--accent-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  transition: top .15s ease;
}
.skip:focus { top: 8px; }

/* --------------------------------------------------------------------------
   Header: sticky translucent identity bar + page masthead
   -------------------------------------------------------------------------- */

header {
  background: var(--bg);
  border-bottom: 1px solid var(--card);
  padding: 0;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Two registers: the wordmark row, then the tab rail. */
.bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card);
}

/* Brand row: the Lockbase logo, a hairline divider, then the tool name —
   the same lockup the calculator's header leads with */
.brandrow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand { display: flex; align-items: center; }
.brand img {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity .15s ease;
}
.brand:hover img { opacity: .8; }
.branddiv { width: 1px; height: 32px; background: var(--border-firm); flex: none; }

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  color: #ffffff;
  white-space: nowrap;
}
.wordmark:hover { color: var(--accent); }

/* Tabs: the calculator's segmented buttons — translucent gray at rest,
   solid blue with a blue glow when active */
nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  align-self: stretch;
}
nav.tabs a {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  background: rgba(31, 41, 55, .5);
  border: 1px solid rgba(55, 65, 81, .5);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
nav.tabs a:hover { color: #ffffff; background: var(--card); }
nav.tabs a.active {
  color: #ffffff;
  background: var(--accent-strong);
  border-color: transparent;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, .25);
}

.masthead { padding-top: 28px; padding-bottom: 26px; }

.eyebrow {
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.eyebrow .div { color: var(--border-firm); margin: 0 6px; }

h1 {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.15;
  margin: 0;
}

.sub {
  margin: 12px 0 0;
  max-width: 68ch;
  font-size: 14px;
  color: var(--muted);
}
.sub b { color: var(--text); font-weight: 600; }

/* Datasheet metadata line */
.updated {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 10px;
  border-left: 2px solid #3b82f6;
}
.updated b { color: var(--text); font-weight: 500; }
.updated:empty { display: none; }

.back {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 18px;
}
.back:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

input[type="search"],
select,
textarea {
  font-family: var(--body);
  font-size: 13px;
  color: var(--text);
  background: var(--rail);
  border: 1px solid var(--border-firm);
  border-radius: var(--radius);
  padding: 9px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="search"] { flex: 1 1 260px; min-width: 200px; }
input[type="search"]::placeholder, textarea::placeholder { color: var(--muted); }
input[type="search"]:hover, select:hover, textarea:hover { border-color: #6b7280; }
input[type="search"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
select {
  font-size: 12.5px;
  cursor: pointer;
  padding-right: 9px;
  /* a <select> sizes to its widest option; cap it so filter rows stay even */
  max-width: 210px;
}
textarea { width: 100%; font-family: var(--mono); resize: vertical; }

button, .btn {
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: var(--rail);
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover { background: var(--border-firm); }
button.primary, .btn:not(.secondary) {
  background: var(--accent-strong);
  color: var(--on-accent);
}
button.primary:hover, .btn:not(.secondary):hover {
  background: var(--accent-hover);
}
.btn.secondary { background: var(--rail); color: var(--text); }
.btn { text-decoration: none; display: inline-block; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:disabled:hover { background: var(--rail); color: var(--text); }
button.primary:disabled:hover { background: var(--accent-strong); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

main {
  /* width:100% is load-bearing — pages that make <body> a column flex container
     would otherwise shrink-wrap main, because auto cross-axis margins cancel stretch. */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 24px 72px;
}

.count {
  max-width: 1100px;
  margin: 22px auto 0;
  padding: 0 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty, .missing, .none {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  padding: 64px 20px;
  border: 1px dashed var(--border-firm);
  border-radius: var(--radius-lg);
}

footer {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  padding: 26px 24px 8px;
}

/* Privacy footnote */
.privacy-note, .privacy-foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 24px 32px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}
.privacy-note b, .privacy-foot b {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: #3b82f6; box-shadow: var(--shadow-lg); }
.card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.005em;
}
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); text-decoration: underline; }

/* --------------------------------------------------------------------------
   The identifier rail — the site's payload, kept machine-faced
   -------------------------------------------------------------------------- */

.idrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius);
  padding: 7px 10px;
  margin-bottom: 12px;
}
.idrow code {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .01em;
  word-break: break-all;
  color: #bfdbfe;
}

.copy {
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-firm);
  border-radius: 6px;
  padding: 4px 9px;
  white-space: nowrap;
}
.copy:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.copy.done { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }

/* --------------------------------------------------------------------------
   Definition lists
   -------------------------------------------------------------------------- */

dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 13px; }
dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
dd { margin: 0; min-width: 0; }

/* --------------------------------------------------------------------------
   Tags: rounded pills on 10% tints — the calculator's badge family
   -------------------------------------------------------------------------- */

.chip, .b, .pill, .badge-dep, .tag, .enf, .modechip {
  display: inline-block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  border-radius: 9999px;
  padding: 2px 9px;
  white-space: nowrap;
  background: rgba(55, 65, 81, .5);
  color: #d1d5db;
  border: 1px solid var(--border);
}

.chips, .badges, .meta, .legend { display: flex; flex-wrap: wrap; gap: 5px; }

/* semantic states, shared by every tag family */
.chip.high, .b.ok, .pill.on, .chip.enh, .tag.doc, .enf-4 {
  background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line);
}
.chip.medium, .b.warn, .chip.adv, .enf-2 {
  background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line);
}
.b.no, .pill.off, .badge-dep, .enf-3 {
  background: var(--fail-soft); color: var(--fail); border-color: var(--fail-line);
}
.b.enc, .pill.mode, .enf-1, .chip.std, .tag.guid {
  background: var(--info-soft); color: var(--info); border-color: var(--info-line);
}
.chip.low, .chip.plain, .chip.cat, .b.plain, .b.neutral, .pill.idle, .enf-0 {
  background: rgba(55, 65, 81, .5); color: #d1d5db; border-color: var(--border);
}
/* the one tag family that is a link, so it may wear the accent */
.chip.feat { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

/* --------------------------------------------------------------------------
   Confidence scale — Purview's real 65 / 75 / 85 bands, drawn
   -------------------------------------------------------------------------- */

.meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.meter .segs { display: inline-flex; gap: 2px; }
.meter i {
  display: block;
  width: 13px;
  height: 5px;
  border-radius: 2px;
  background: var(--rail);
}
.meter em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.meter[data-level] em { color: var(--text); }
.meter[data-level="low"] i.on { background: #9ca3af; }
.meter[data-level="medium"] i.on { background: var(--warn); }
.meter[data-level="high"] i.on { background: var(--ok); }

/* --------------------------------------------------------------------------
   Callouts — tinted left rule on a panel
   -------------------------------------------------------------------------- */

.disclaimer, .intro, .privacy, .note, .baseline-note, .noscript {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.disclaimer b:first-child, .intro b:first-child,
.privacy b:first-child, .baseline-note b:first-child, .noscript b:first-child {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 5px;
}
.disclaimer b, .intro b, .privacy b, .note b, .baseline-note b, .noscript b { color: var(--text); }
.disclaimer { border-left-color: var(--warn); }
/* every page paints its data with JS, so say so rather than showing a blank column */
.noscript { border-left-color: var(--warn); }
.intro, .baseline-note { border-left-color: #3b82f6; }
.privacy { border-left-color: var(--info); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
thead th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(17, 24, 39, .5);
}
tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Inline code
   -------------------------------------------------------------------------- */

code { font-family: var(--mono); font-size: .92em; }

/* --------------------------------------------------------------------------
   "Talk to an Expert" — the calculator's floating consultation CTA
   -------------------------------------------------------------------------- */

.expert-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(to right, #2563eb, #9333ea);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, .25);
  transition: box-shadow .15s ease, transform .15s ease;
}
.expert-cta:hover {
  background: linear-gradient(to right, #1d4ed8, #7e22ce);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, .4);
  transform: scale(1.05);
}
.expert-cta .icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.expert-cta .icon svg { width: 24px; height: 24px; }
.expert-cta .txt b { display: block; font-size: 14px; font-weight: 600; }
.expert-cta .txt small { display: block; font-size: 12px; color: #dbeafe; }

@media print { .expert-cta { display: none; } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
  /* At full width the CTA is 78% of a phone screen and sits on top of the
     content links it floats over, so drop the label and keep just the icon. */
  .expert-cta { padding: 0; border-radius: 9999px; }
  .expert-cta .icon { width: 52px; height: 52px; border-radius: 9999px; background: none; }
  .expert-cta .txt { display: none; }

  .wrap { padding: 0 16px; }
  main { padding: 20px 16px 56px; }
  .count { padding: 0 16px; }
  .bar { min-height: 0; padding: 12px 0; align-items: flex-start; }
  nav.tabs { gap: 6px; }
  nav.tabs a { padding: 6px 12px; font-size: 13px; }
  .brand img { height: 28px; }
  .branddiv { height: 28px; }
  .wordmark { font-size: 16px; }
  .masthead { padding-top: 20px; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
