/* GovernKit design system — translated from the product designs.
   GovernKit is a product of Zyref, LLC. */

:root {
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: oklch(0.977 0.004 290);
  --bg-sidebar: oklch(0.958 0.007 290);
  --surface: #fff;
  --surface-hover: oklch(0.985 0.003 290);
  --surface-soft: oklch(0.975 0.004 290);

  --text: oklch(0.245 0.022 290);
  --text-body: oklch(0.32 0.02 290);
  --text-mid: oklch(0.42 0.02 290);
  --text-soft: oklch(0.5 0.02 290);
  --text-muted: oklch(0.57 0.018 290);

  --border: oklch(0.908 0.01 290);
  --border-soft: oklch(0.93 0.008 290);
  --border-row: oklch(0.945 0.006 290);
  --border-faint: oklch(0.955 0.005 290);
  --border-input: oklch(0.88 0.012 290);

  --violet: oklch(0.505 0.17 290);
  --violet-hover: oklch(0.455 0.17 290);
  --violet-deep: oklch(0.38 0.15 290);
  --violet-text: oklch(0.41 0.16 290);
  --violet-tint: oklch(0.955 0.025 290);
  --violet-tint-strong: oklch(0.9 0.045 290);
  --violet-pill: oklch(0.94 0.035 290);
  --violet-border: oklch(0.88 0.06 290);
  --navy: oklch(0.3 0.09 290);

  --green: oklch(0.62 0.15 155);
  --green-text: oklch(0.42 0.11 155);
  --green-risk: oklch(0.5 0.13 155);
  --green-tint: oklch(0.94 0.05 155);
  --green-bg: oklch(0.975 0.02 155);
  --green-border: oklch(0.9 0.03 155);

  --amber: oklch(0.72 0.15 85);
  --amber-text: oklch(0.45 0.1 80);
  --amber-risk: oklch(0.52 0.12 80);
  --amber-tint: oklch(0.95 0.06 90);

  --orange: oklch(0.68 0.16 50);
  --orange-text: oklch(0.45 0.12 50);
  --orange-risk: oklch(0.53 0.13 50);
  --orange-tint: oklch(0.94 0.03 55);
  --orange-bg: oklch(0.975 0.025 55);
  --orange-border: oklch(0.89 0.05 55);

  --red: oklch(0.6 0.19 25);
  --red-text: oklch(0.45 0.14 25);
  --red-risk: oklch(0.5 0.16 25);
  --red-tint: oklch(0.94 0.045 25);
  --red-bg: oklch(0.975 0.015 25);
  --red-border: oklch(0.91 0.03 25);

  --gray-tint: oklch(0.945 0.006 290);
  --gray-text: oklch(0.45 0.02 290);

  --shadow-card: 0 1px 2px oklch(0.3 0.03 290 / 0.05);
  --shadow-card-lg: 0 1px 3px oklch(0.3 0.03 290 / 0.06);
  --shadow-pop: 0 10px 28px oklch(0.3 0.04 290 / 0.14);
  --shadow-modal: 0 20px 50px oklch(0.2 0.05 290 / 0.3);
}

* { box-sizing: border-box; }

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

a { color: var(--violet); }

/* Focus policy: no default outline on mouse click; a clean brand ring for
   keyboard navigation (:focus-visible). Text fields draw their own ring. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.gk-input:focus-visible, .gk-select:focus-visible { outline: none; }

/* ---------------------------------------------------------------- layout */

.gk-app { display: flex; min-height: 100vh; }
.gk-main { flex: 1; min-width: 0; }
.gk-container { max-width: 1080px; margin: 0 auto; padding: 30px 36px 48px; }
.gk-container-wide { max-width: 1180px; }
.gk-container-narrow { max-width: 760px; }
.gk-container-detail { padding-top: 26px; }

.gk-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gk-page-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.gk-page-sub { margin: 5px 0 0; font-size: 13.5px; color: var(--text-soft); }
.gk-head-actions { display: flex; gap: 10px; align-items: center; }

.gk-breadcrumb { font-size: 12.5px; color: var(--text-muted); }
.gk-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.gk-breadcrumb a:hover { color: var(--text); }
.gk-breadcrumb .sep { margin: 0 4px; }
.gk-breadcrumb .current { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- sidebar */

.gk-sidebar {
  width: 248px; flex-shrink: 0; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column;
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
}
.gk-sidebar-top { padding: 12px 12px 8px; position: relative; }
.gk-team-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  background: transparent; border: none; border-radius: 9px; cursor: pointer;
  text-align: left; font-family: var(--font);
}
.gk-team-btn:hover { background: oklch(0.935 0.01 290); }
.gk-team-logo {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  background: var(--violet); color: #fff; font-size: 14px; font-weight: 700;
}
.gk-team-btn .meta { flex: 1; min-width: 0; }
.gk-team-btn .name { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-team-btn .role { display: block; font-size: 11.5px; color: var(--text-muted); }
.gk-team-btn .caret { color: var(--text-muted); font-size: 10px; }

.gk-switcher {
  position: absolute; top: calc(100% - 2px); left: 12px; right: 12px; z-index: 70;
  background: #fff; border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-pop); padding: 6px;
}
.gk-switcher[hidden] { display: none; }
.gk-switcher-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.gk-switcher-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; width: 100%; background: transparent; border: none; cursor: pointer; font-family: var(--font); text-align: left; }
.gk-switcher-item:hover { background: oklch(0.965 0.006 290); }
.gk-switcher-item .logo { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.gk-switcher-item .meta { flex: 1; min-width: 0; }
.gk-switcher-item .name { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.gk-switcher-item .role { display: block; font-size: 11.5px; color: var(--text-muted); }
.gk-switcher-item .check { color: var(--violet); font-size: 13px; font-weight: 700; }
.gk-switcher-divider { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.gk-switcher-new { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--violet); }
.gk-switcher-new:hover { background: oklch(0.965 0.006 290); }

.gk-nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.gk-nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--text-mid);
}
.gk-nav a:hover { background: oklch(0.935 0.01 290); color: var(--text); }
.gk-nav a.active { font-weight: 600; color: oklch(0.36 0.14 290); background: oklch(0.925 0.02 290); }
.gk-nav a .label { flex: 1; }
.gk-nav-badge { min-width: 18px; text-align: center; padding: 1px 6px; border-radius: 999px; background: oklch(0.9 0.03 290); color: var(--violet-text); font-size: 11px; font-weight: 700; }
.gk-nav a.active .gk-nav-badge { background: var(--violet); color: #fff; }

.gk-sidebar-bottom { padding: 12px; }
.gk-plan-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.gk-plan-card .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gk-plan-card .plan-name { font-size: 12.5px; font-weight: 600; }
.gk-plan-card .upgrade { font-size: 12px; font-weight: 600; color: var(--violet); text-decoration: none; }
.gk-plan-card .usage { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }

.gk-user-menu { position: relative; }
.gk-user-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: none; border-radius: 9px; background: transparent; cursor: pointer;
  font-family: var(--font); text-align: left; color: inherit;
}
.gk-user-row:hover { background: oklch(0.935 0.01 290); }
.gk-user-row .meta { flex: 1; min-width: 0; }
.gk-user-row .name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-user-row .sub { display: block; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-user-row .caret { color: var(--text-muted); font-size: 10px; transition: transform 0.15s ease; }

.gk-user-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: #fff; border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-pop); padding: 6px;
}
.gk-user-pop-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.gk-user-pop-head .meta { flex: 1; min-width: 0; }
.gk-user-pop-head .name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-user-pop-head .sub { display: block; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-user-pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px;
  border: none; border-radius: 8px; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-mid);
  text-decoration: none; text-align: left;
}
.gk-user-pop-item:hover { background: oklch(0.965 0.006 290); color: var(--text); }
.gk-user-pop-item svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.gk-user-pop-item.danger:hover { background: var(--red-bg); color: var(--red-text); }
.gk-user-pop-item.danger:hover svg { color: var(--red-text); }

/* --------------------------------------------------------------- avatars */

.gk-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.gk-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.gk-avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.gk-avatar.tint-violet, .gk-tile.tint-violet { background: var(--violet-tint-strong); color: var(--violet-text); }
.gk-avatar.tint-green, .gk-tile.tint-green { background: var(--green-tint); color: var(--green-text); }
.gk-avatar.tint-amber, .gk-tile.tint-amber { background: var(--amber-tint); color: var(--amber-text); }
.gk-avatar.tint-red, .gk-tile.tint-red { background: var(--red-tint); color: var(--red-text); }
.gk-avatar.tint-gray, .gk-tile.tint-gray { background: var(--gray-tint); color: var(--gray-text); }

.gk-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; font-size: 12px; font-weight: 700;
}
.gk-tile.lg { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.gk-tile.xl { width: 46px; height: 46px; border-radius: 12px; font-size: 20px; }

/* --------------------------------------------------------------- buttons */

.gk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  font-family: var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.gk-btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.gk-btn-primary:hover { background: var(--violet-hover); border-color: var(--violet-hover); }
.gk-btn-secondary { background: #fff; border-color: var(--border-input); color: oklch(0.3 0.02 290); }
.gk-btn-secondary:hover { background: oklch(0.965 0.006 290); }
.gk-btn-outline { background: #fff; border-color: var(--violet); color: var(--violet); }
.gk-btn-outline:hover { background: oklch(0.965 0.02 290); }
.gk-btn-danger-soft { background: #fff; border-color: oklch(0.9 0.03 25); color: var(--red-risk); }
.gk-btn-danger-soft:hover { background: oklch(0.97 0.015 25); }
.gk-btn-danger { background: var(--red-risk); border-color: var(--red-risk); color: #fff; }
.gk-btn-success { background: var(--green-risk); border-color: var(--green-risk); color: #fff; }
.gk-btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.gk-btn-xs { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.gk-btn-block { display: flex; width: 100%; }
.gk-btn-ghost { background: transparent; border: none; color: var(--text-muted); font-weight: 600; }
.gk-btn-ghost:hover { color: var(--text); }
.gk-btn[disabled] { background: oklch(0.9 0.01 290); border-color: oklch(0.9 0.01 290); color: oklch(0.6 0.015 290); cursor: not-allowed; }
.gk-link { font-size: 12.5px; font-weight: 600; color: var(--violet); text-decoration: none; }
.gk-link:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- forms */

.gk-input, .gk-select {
  box-sizing: border-box; width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-input); border-radius: 8px;
  font-size: 14px; font-family: var(--font); color: var(--text); outline: none; background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gk-input:focus, .gk-select:focus { border-color: var(--violet); }
.gk-input[readonly]:focus { border-color: var(--border-input); }
.gk-input[readonly] { background: var(--surface-soft); color: var(--text-muted); }
textarea.gk-input { resize: vertical; line-height: 1.5; }
.gk-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.gk-label .optional { font-weight: 400; color: var(--text-muted); }
.gk-help { margin: 6px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.gk-field { margin-top: 14px; }
.gk-field-error { margin: 5px 0 0; font-size: 12.5px; color: var(--red-risk); font-weight: 500; }
.gk-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gk-input-code { font-size: 20px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }

.gk-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; }
.gk-checks label, .gk-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.gk-checks input[type="checkbox"], .gk-check input[type="checkbox"] { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--violet); cursor: pointer; flex-shrink: 0; }

/* Card-style variant: each option is a bordered chip that lights up when checked */
.gk-check-cards { gap: 8px 10px; }
.gk-check-cards label {
  align-items: center; padding: 10px 12px; background: #fff;
  border: 1px solid var(--border-input); border-radius: 9px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.gk-check-cards label:hover { border-color: var(--violet); }
.gk-check-cards label:has(input:checked), .gk-check-cards label.on { border-color: var(--violet); background: var(--violet-tint); }
.gk-check-cards input[type="checkbox"] { margin-top: 0; }

.gk-radio-cards { display: flex; flex-direction: column; gap: 8px; }
.gk-radio-card {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px;
  border-radius: 9px; cursor: pointer; background: #fff; border: 1px solid oklch(0.9 0.01 290);
}
.gk-radio-card input { margin-top: 3px; accent-color: var(--violet); }
.gk-radio-card .title { display: block; font-size: 13.5px; font-weight: 600; }
.gk-radio-card .desc { display: block; margin-top: 1px; font-size: 12px; color: var(--text-muted); }
.gk-radio-card:has(input:checked) { border: 1.5px solid var(--violet); background: oklch(0.965 0.02 290); padding: 9.5px 11.5px; }
.gk-radio-card:has(input:checked) .title { color: var(--violet-deep); }

.gk-seg-group { display: flex; gap: 8px; flex-wrap: wrap; }
.gk-seg {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font); border: 1px solid var(--border-input); background: #fff; color: var(--text-mid);
}
.gk-seg:hover { border-color: var(--violet); }
.gk-seg:has(input:checked), .gk-seg.on { border: 1.5px solid var(--violet); background: var(--violet-tint); color: var(--violet-text); padding: 7.5px 15.5px; }
.gk-seg input { display: none; }

/* ----------------------------------------------------------------- cards */

.gk-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card); }
.gk-card-pad { padding: 18px 20px; }
.gk-card-pad-lg { padding: 20px 22px; }
.gk-card-title { font-size: 15px; font-weight: 600; }
.gk-card-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-muted); }

.gk-stat {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow-card);
}
a.gk-stat:hover { border-color: oklch(0.84 0.03 290); }
.gk-stat .label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-soft); }
.gk-stat .value { margin-top: 6px; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.gk-stat .value .denom { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.gk-stat .cta { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--violet); }

/* ----------------------------------------------------------- pills & risk */

.gk-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.gk-pill-green { background: var(--green-tint); color: var(--green-text); }
.gk-pill-violet { background: var(--violet-pill); color: var(--violet-text); }
.gk-pill-amber { background: var(--amber-tint); color: var(--amber-text); }
.gk-pill-red { background: var(--red-tint); color: var(--red-text); }
.gk-pill-gray { background: var(--gray-tint); color: var(--gray-text); }
.gk-pill-orange { background: var(--orange-tint); color: var(--orange-text); }

.gk-risk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.gk-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; display: inline-block; }
.gk-risk-low { color: var(--green-risk); } .gk-risk-low .gk-dot { background: var(--green); }
.gk-risk-medium { color: var(--amber-risk); } .gk-risk-medium .gk-dot { background: var(--amber); }
.gk-risk-high { color: var(--orange-risk); } .gk-risk-high .gk-dot { background: var(--orange); }
.gk-risk-critical { color: var(--red-risk); } .gk-risk-critical .gk-dot { background: var(--red); }

.gk-risk-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.gk-risk-badge .gk-dot { width: 8px; height: 8px; }
.gk-risk-badge.gk-risk-low { background: var(--green-tint); color: var(--green-text); }
.gk-risk-badge.gk-risk-medium { background: var(--amber-tint); color: var(--amber-text); }
.gk-risk-badge.gk-risk-high { background: var(--orange-tint); color: var(--orange-text); }
.gk-risk-badge.gk-risk-critical { background: var(--red-tint); color: var(--red-text); }

/* ----------------------------------------------------------------- chips */

.gk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gk-chip {
  display: inline-block; padding: 7px 13px; border: 1px solid var(--border-input); border-radius: 999px;
  background: #fff; font-size: 12.5px; font-weight: 500; color: var(--text-mid);
  cursor: pointer; font-family: var(--font); text-decoration: none;
}
.gk-chip:hover { border-color: var(--violet); color: var(--violet-text); }
.gk-chip.on { border: 1.5px solid var(--violet); background: var(--violet-tint); font-weight: 600; color: var(--violet-text); padding: 6.5px 12.5px; }

/* ------------------------------------------------------------ table rows */

.gk-table-head {
  display: grid; gap: 12px; padding: 10px 20px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.gk-row { display: grid; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--border-row); text-decoration: none; color: inherit; }
.gk-row:last-child { border-bottom: none; }
.gk-row:hover { background: var(--surface-hover); }
.gk-cell { font-size: 13px; color: var(--text-mid); }
.gk-cell-strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.gk-cell-muted { font-size: 12.5px; color: var(--text-muted); }
.gk-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gk-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-row); }
.gk-list-row:last-child { border-bottom: none; }
.gk-list-row:hover { background: var(--surface-hover); }

/* --------------------------------------------------------------- banners */

.gk-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; font-size: 13px; }
.gk-banner .gk-dot { width: 8px; height: 8px; }
.gk-banner-violet { background: var(--violet-tint); border: 1px solid var(--violet-border); color: oklch(0.38 0.12 290); }
.gk-banner-violet .gk-dot { background: var(--violet); }
.gk-banner-amber { background: var(--orange-bg); border: 1px solid var(--orange-border); color: oklch(0.4 0.07 50); }
.gk-banner-amber .gk-dot { background: var(--orange); }
.gk-banner-red { background: var(--red-bg); border: 1px solid oklch(0.9 0.045 25); color: oklch(0.4 0.1 25); }
.gk-banner-red .gk-dot { background: var(--red); }
.gk-banner-green { background: var(--green-bg); border: 1px solid var(--green-border); color: oklch(0.38 0.06 155); }
.gk-banner-green .gk-dot { background: var(--green); }
.gk-warn-stack { display: flex; flex-direction: column; gap: 8px; }
.gk-warn { display: flex; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.gk-warn .gk-dot { margin-top: 5px; width: 8px; height: 8px; }
.gk-warn-amber { background: var(--orange-bg); border: 1px solid var(--orange-border); color: oklch(0.4 0.07 50); }
.gk-warn-amber .gk-dot { background: var(--orange); }
.gk-warn-red { background: var(--red-bg); border: 1px solid oklch(0.9 0.045 25); color: oklch(0.4 0.1 25); }
.gk-warn-red .gk-dot { background: var(--red); }

/* --------------------------------------------------------------- progress */

.gk-progress { height: 6px; border-radius: 999px; background: oklch(0.94 0.008 290); overflow: hidden; }
.gk-progress.slim { height: 4px; }
.gk-progress.thick { height: 8px; background: var(--border-faint); }
.gk-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--violet); }
.gk-progress > span.green { background: var(--green); }
.gk-progress > span.amber { background: var(--amber); }
.gk-progress > span.orange { background: var(--orange); }
.gk-progress > span.red { background: var(--red); }
.gk-progress > span.gray { background: oklch(0.75 0.01 290); }

/* ----------------------------------------------------------------- modal */

.gk-modal-overlay {
  position: fixed; inset: 0; background: oklch(0.2 0.03 290 / 0.4);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.gk-modal-overlay[hidden] { display: none; }
.gk-modal { width: 460px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: var(--shadow-modal); padding: 24px; max-height: 90vh; overflow-y: auto; }
.gk-modal-head { display: flex; align-items: center; justify-content: space-between; }
.gk-modal-title { font-size: 16px; font-weight: 600; }
.gk-modal-close { border: none; background: transparent; color: var(--text-muted); font-size: 15px; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-family: var(--font); }
.gk-modal-close:hover { background: oklch(0.965 0.006 290); }
.gk-modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.gk-confirm-modal { width: 420px; }
.gk-confirm-message { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-mid); }

/* ---------------------------------------------------------------- switch */

.gk-switch { position: relative; width: 36px; height: 21px; border-radius: 999px; border: none; cursor: pointer; background: var(--border-input); transition: background 0.15s; flex-shrink: 0; padding: 0; }
.gk-switch::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.gk-switch[aria-checked="true"] { background: var(--violet); }
.gk-switch[aria-checked="true"]::after { left: 18px; }

/* -------------------------------------------------------------- timeline */

.gk-timeline { display: flex; flex-direction: column; }
.gk-timeline-item { display: flex; gap: 12px; }
.gk-timeline-rail { display: flex; flex-direction: column; align-items: center; }
.gk-timeline-rail .gk-dot { width: 9px; height: 9px; margin-top: 4px; }
.gk-timeline-rail .line { flex: 1; width: 2px; background: var(--border-soft); margin: 4px 0; }
.gk-timeline-body { padding-bottom: 16px; min-width: 0; }
.gk-timeline-body .title { font-size: 13px; font-weight: 600; }
.gk-timeline-body .meta { margin-top: 2px; font-size: 12.5px; color: var(--text-muted); }
.gk-timeline-body .quote { margin-top: 6px; padding: 8px 10px; background: var(--surface-soft); border-radius: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-mid); }
.gk-dot-green { background: var(--green); } .gk-dot-amber { background: var(--amber); }
.gk-dot-violet { background: var(--violet); } .gk-dot-red { background: var(--red); }
.gk-dot-orange { background: var(--orange); }

/* -------------------------------------------------------------- messages */

[x-cloak] { display: none !important; }

/* The hidden attribute must always win, even over display:flex/grid classes. */
[hidden] { display: none !important; }
.gk-messages { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.gk-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.gk-toast .gk-dot { margin-top: 5px; width: 8px; height: 8px; }
.gk-toast.success .gk-dot { background: var(--green); }
.gk-toast.error .gk-dot { background: var(--red); }
.gk-toast.warning .gk-dot { background: var(--amber); }
.gk-toast.info .gk-dot { background: var(--violet); }
.gk-toast .close { margin-left: auto; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 0 2px; font-family: var(--font); }

/* --------------------------------------------------------------- auth */

.gk-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 20px; background: var(--bg); }
.gk-auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.gk-auth-logo img { height: 42px; width: auto; display: block; }
.gk-auth-logo .mark { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--violet); color: #fff; font-size: 17px; font-weight: 700; }
.gk-auth-logo .word { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.gk-auth-card { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-card-lg); }
.gk-auth-card.wide { width: 480px; }
.gk-auth-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.gk-auth-sub { margin: 5px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.gk-auth-foot { margin: 0; font-size: 13px; color: var(--text-soft); text-align: center; }
.gk-auth-foot a { font-weight: 600; color: var(--violet); text-decoration: none; }
.gk-auth-legal { margin: 0; font-size: 12px; color: var(--text-muted); text-align: center; }

/* split layout (signup) */
.gk-split { display: flex; min-height: 100vh; background: #fff; }
.gk-split-brand { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: var(--navy); color: #fff; }
.gk-split-brand .logo { display: flex; align-items: center; gap: 10px; }
.gk-split-brand .logo .mark { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #fff; color: oklch(0.4 0.16 290); font-size: 16px; font-weight: 700; }
.gk-split-brand .logo .mark-img { width: 32px; height: 32px; display: block; }
.gk-split-brand .logo .word { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.gk-split-brand h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.gk-split-brand .tagline { margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: oklch(0.85 0.03 290); }
.gk-split-points { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.gk-split-point { display: flex; align-items: center; gap: 11px; font-size: 14px; color: oklch(0.92 0.02 290); }
.gk-split-point .check { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: oklch(0.42 0.12 290); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.gk-split-brand .foot { margin: 0; font-size: 12.5px; color: oklch(0.75 0.04 290); }
.gk-split-form { flex: 1.15; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.gk-split-form-inner { width: 380px; max-width: 100%; }

@media (max-width: 900px) {
  .gk-split-brand { display: none; }
  .gk-grid-2, .gk-grid-3, .gk-grid-4, .gk-form-grid, .gk-checks { grid-template-columns: 1fr !important; }
  .gk-container { padding: 20px 16px 40px; }
}

/* --------------------------------------------------------------- misc */

.gk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.gk-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gk-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gk-grid-main-side { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.gk-grid-side-wide { grid-template-columns: 1.35fr 1fr; }
.gk-stack { display: flex; flex-direction: column; gap: 16px; }
.gk-sticky { position: sticky; top: 20px; }
.gk-empty { padding: 36px 20px; text-align: center; }
.gk-empty .title { font-size: 14px; font-weight: 600; }
.gk-empty .sub { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.gk-footnote { margin: 12px 4px 0; font-size: 12.5px; color: var(--text-muted); }
.gk-divider { height: 1px; background: var(--border-soft); border: none; margin: 16px 0; }
.gk-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.gk-or span.line { flex: 1; height: 1px; background: var(--border-soft); }
.gk-or span.word { font-size: 11.5px; color: var(--text-muted); }
.gk-kv-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.gk-kv-label.upper { letter-spacing: 0.04em; text-transform: uppercase; }
.gk-kv-value { margin-top: 3px; font-size: 13.5px; font-weight: 600; }
.gk-prose { font-size: 14px; line-height: 1.7; color: var(--text-body); }
.gk-prose h2 { font-size: 16.5px; font-weight: 600; color: var(--text); margin: 28px 0 8px; }
.gk-prose h2:first-child { margin-top: 0; }
.gk-prose ul { padding-left: 20px; }
.gk-prose li { margin: 4px 0; }
.gk-prose table { border-collapse: collapse; width: 100%; font-size: 13px; }
.gk-prose th, .gk-prose td { border: 1px solid var(--border-soft); padding: 7px 10px; text-align: left; }
.gk-prose th { background: var(--surface-soft); font-size: 12px; }
.gk-prose a { color: var(--violet); font-weight: 600; text-decoration: none; }

/* Decision radio cards (review screen, policy generator) */
.gk-decision-list { display: flex; flex-direction: column; gap: 8px; }
.gk-decision {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  border: 1.5px solid var(--border-soft); border-radius: 10px; cursor: pointer;
  background: #fff; transition: border-color 0.12s, background 0.12s;
}
.gk-decision:hover { border-color: var(--violet); }
.gk-decision:has(input:checked) { border-color: var(--violet); background: var(--violet-tint); }
.gk-decision input[type="radio"] { margin-top: 3px; accent-color: var(--violet); flex-shrink: 0; }
.gk-decision .t { display: block; font-size: 13.5px; font-weight: 600; }
.gk-decision .d { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }

.gk-checks-1col { grid-template-columns: 1fr; }

.gk-editor {
  flex: 1; min-height: 480px; resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.65;
}

.gk-check-item { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.gk-check-item .icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.gk-check-item .icon.yes { background: var(--green-tint); color: oklch(0.45 0.12 155); }
.gk-check-item .icon.no { background: var(--red-tint); color: var(--red-risk); }

.gk-secret {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: 0.08em;
  padding: 12px 16px; background: var(--surface-soft); border: 1px solid var(--border-soft);
  border-radius: 10px; text-align: center; word-break: break-all; user-select: all;
}
.gk-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gk-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; font-weight: 600;
  padding: 9px 12px; background: var(--surface-soft); border: 1px solid var(--border-soft);
  border-radius: 8px; text-align: center; letter-spacing: 0.06em;
}
.gk-qr { display: flex; align-items: center; justify-content: center; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.gk-qr img { width: 190px; height: 190px; display: block; }

/* Segmented one-time-code input (2FA setup) */
.gk-otp { display: flex; gap: 8px; justify-content: center; }
.gk-otp input {
  width: 44px; height: 52px; text-align: center;
  font-family: var(--font); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text); background: #fff; border: 1px solid var(--border-input); border-radius: 10px;
  outline: none; caret-color: var(--violet);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.gk-otp input:focus { border-color: var(--violet); }
.gk-otp.has-error input { border-color: oklch(0.75 0.1 25); }
.gk-otp.busy input { background: var(--surface-soft); color: var(--text-muted); }

.gk-ack-bar {
  position: fixed; bottom: 0; left: 248px; right: 0; background: #fff;
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px oklch(0.3 0.03 290 / 0.07);
  padding: 14px 36px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; z-index: 50;
}
.gk-ack-bar.done { background: oklch(0.965 0.025 155); border-top-color: oklch(0.88 0.05 155); }
.gk-bar-row { display: flex; align-items: center; gap: 10px; }
.gk-bar-row .bar-label { width: 110px; font-size: 12.5px; color: var(--text-mid); flex-shrink: 0; }
.gk-bar-row .bar-label.wide { width: 130px; }
.gk-bar-row .gk-progress { flex: 1; }
.gk-bar-row .bar-count { width: 28px; text-align: right; font-size: 13px; font-weight: 600; }

.gk-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
