:root {
  --dfe-navy: #003a63;
  --dfe-blue: #1d70b8;
  --rag-red: #d4351c;
  --rag-amber: #f47738;
  --rag-green: #00703c;
  --rag-met: #0b0c0c;
  --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "GDS Transport", Arial, sans-serif;
  background: #f3f2f1;
  color: #0b0c0c;
}

/* ── Layout ── */
#app { display: flex; min-height: 100vh; }

#sidebar {
  width: var(--sidebar-width);
  background: var(--dfe-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

#main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#topbar {
  background: var(--dfe-navy);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#topbar h1 { margin: 0; font-size: 18px; font-weight: 700; flex: 1; }

#content { padding: 24px; flex: 1; }

/* ── Sidebar ── */
.sidebar-logo {
  padding: 20px 16px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-nav { list-style: none; margin: 0; padding: 8px 0; flex: 1; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.rag-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #888;
}
.rag-dot.red    { background: var(--rag-red); }
.rag-dot.amber  { background: var(--rag-amber); }
.rag-dot.green  { background: var(--rag-green); }
.rag-dot.met    { background: #505a5f; }
.rag-dot.not-set { background: #b1b4b6; }

.core-badge {
  font-size: 9px;
  background: #f47738;
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--dfe-blue); color: #fff; }
.btn-secondary { background: #fff; color: var(--dfe-navy); border: 2px solid var(--dfe-navy); }
.btn-success { background: var(--rag-green); color: #fff; }
.btn-danger  { background: var(--rag-red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 18px; }

/* ── Item block ── */
.standard-item {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 14px;
  overflow: hidden;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f8f8;
  cursor: pointer;
  user-select: none;
}

.item-number {
  font-size: 11px;
  font-weight: 700;
  color: #505a5f;
  width: 22px;
  flex-shrink: 0;
}

.item-title { font-size: 14px; font-weight: 600; flex: 1; }

.rag-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  color: #fff;
  white-space: nowrap;
}
.rag-pill.red    { background: var(--rag-red); }
.rag-pill.amber  { background: var(--rag-amber); }
.rag-pill.green  { background: var(--rag-green); }
.rag-pill.met    { background: #505a5f; }
.rag-pill.not-set { background: #b1b4b6; color: #0b0c0c; }

.chevron { transition: transform 0.2s; font-size: 12px; color: #505a5f; }
.chevron.open { transform: rotate(180deg); }

.item-body { padding: 16px; display: none; }
.item-body.open { display: block; }

.dfe-description {
  font-size: 13px;
  color: #505a5f;
  background: #f3f2f1;
  border-left: 4px solid var(--dfe-blue);
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
  white-space: pre-line;
}

.guidance-link { font-size: 13px; color: var(--dfe-blue); }
.guidance-date { font-size: 13px; color: #505a5f; }

.core-note {
  font-size: 13px;
  background: #fef3e9;
  border-left: 4px solid var(--rag-amber);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #0b0c0c;
}

.form-field textarea,
.form-field input,
.form-field select {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #b1b4b6;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-field textarea:focus,
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--dfe-blue);
}

.form-field textarea { resize: vertical; min-height: 70px; }

.form-field.full-width { grid-column: 1 / -1; }

/* RAG select colours */
select.rag-select option[value="Red"]     { background: #fde8e4; }
select.rag-select option[value="Amber"]   { background: #fef3e9; }
select.rag-select option[value="Green"]   { background: #e3f5ec; }
select.rag-select option[value="Met"]     { background: #eee; }

/* ── Dashboard ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dash-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dash-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,0.15); }

.dash-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-wrap {
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--rag-green);
  transition: width 0.3s;
}

.dash-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  flex-wrap: wrap;
}

.stat-chip {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.stat-chip.red    { background: #fde8e4; color: var(--rag-red); }
.stat-chip.amber  { background: #fef3e9; color: #a85300; }
.stat-chip.green  { background: #e3f5ec; color: var(--rag-green); }
.stat-chip.met    { background: #eee; color: #505a5f; }
.stat-chip.not-set { background: #f3f2f1; color: #505a5f; }

/* ── School info form ── */
.info-form {
  max-width: 600px;
}
.info-form .form-field { margin-bottom: 16px; }

/* School info form grid and lookup row */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.info-grid .form-field { margin-bottom: 0; }
.lookup-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Shown when the home page school differs from the tracker's school */
.profile-notice {
  background: #fef3e9;
  border-left: 4px solid var(--rag-amber);
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid .form-field { grid-column: auto !important; }
  #content { padding: 16px; }
  #menu-toggle { display: block !important; }
}

#menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }

/* ── Save indicator ── */
#save-indicator {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  padding: 4px 8px;
  border-radius: 4px;
  transition: opacity 0.5s;
}

/* Hidden until something is saved, then shown briefly. visibility (not just
   opacity) so screen readers don't read a stale "Saved" either. */
#save-indicator {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s, visibility 0s 0.5s;
}
#save-indicator.saved,
#save-indicator.error {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s;
}
#save-indicator.saved { color: #8fffcc; }
#save-indicator.error { color: #ffdd00; font-weight: 700; }

/* ── Summary table ── */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.summary-table th {
  background: var(--dfe-navy);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.summary-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e8e8e8;
}
.summary-table tr:hover td { background: #f8f8f8; }
.summary-table td:first-child { font-weight: 600; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #0b0c0c;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 9999;
}
#toast.show { opacity: 1; }

/* ── Rating key (DfE tracker) ── */
.rag-key {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.rag-key-row { display: flex; align-items: baseline; gap: 10px; }
.rag-key-row .rag-pill { min-width: 64px; text-align: center; flex-shrink: 0; }

/* ── Target dates ("working towards") ── */
.date-slot:empty { display: none; }
.date-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; white-space: nowrap;
  background: #f3f2f1; color: #0b0c0c; border: 1px solid #b1b4b6;
}
.date-badge.overdue { background: #fde8e4; color: #942514; border-color: var(--rag-red); }
.date-badge.soon { background: #fef3e9; color: #6e3500; border-color: var(--rag-amber); }
.date-badge.done { background: #e3f5ec; color: #005a30; border-color: var(--rag-green); }
.date-state { font-size: 12px; font-weight: 700; white-space: nowrap; }
.date-state.overdue { color: var(--rag-red); }
.date-state.soon { color: #a85300; }
.date-state.ok { color: var(--rag-green); }
.date-state.done { color: #505a5f; }
.date-help { font-size: 12px; color: #505a5f; margin: 0; grid-column: 1 / -1; }
.plan-table td { vertical-align: top; }
.plan-table td:first-child { font-weight: 400; }
.plan-table .nowrap { white-space: nowrap; }
.plan-month th { background: #f3f2f1 !important; color: #0b0c0c !important; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.plan-type { font-size: 11px; color: #505a5f; }
.plan-area { display: block; font-size: 11px; color: #505a5f; text-transform: uppercase; letter-spacing: 0.3px; }
.plan-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.plan-list a, .plan-table a { color: var(--dfe-blue); }
.plan-card { max-width: 900px; margin-top: 4px; }
@media (max-width: 768px) {
  .item-header { flex-wrap: wrap; }
  .date-slot { order: 5; flex-basis: 100%; padding-left: 32px; }
}

/* ── People (owners) ── */
.person-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.person-add .form-field { margin: 0; }
.person-msg { font-size: 13px; color: #0b0c0c; margin: 10px 0 0; min-height: 1em; }
.people-table td { vertical-align: middle; }
.people-table td:first-child { font-weight: 400; }
.people-table input { width: 100%; padding: 6px 8px; border: 2px solid #b1b4b6; border-radius: 4px; font: inherit; font-size: 13px; }
.people-table input:focus { outline: none; border-color: var(--dfe-blue); }
.people-table a { color: var(--dfe-blue); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 768px) {
  .person-add { grid-template-columns: 1fr; }
}

/* ── Start here (tracker home page and how-to guide) ── */
.home-guide { max-width: 900px; }
.home-guide .lead { color: #505a5f; font-size: 14px; line-height: 1.6; }
.home-guide .core-badge { margin-left: 0; font-size: 9px; vertical-align: middle; }
.steps { list-style: none; margin: 0; padding: 4px 18px; }
.step { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e8e8e8; }
.step:last-child { border-bottom: 0; }
.step-mark { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: #f3f2f1; color: #505a5f; border: 2px solid #b1b4b6; }
.step.done .step-mark { background: var(--rag-green); border-color: var(--rag-green); color: #fff; }
.step.next .step-mark { background: var(--dfe-blue); border-color: var(--dfe-blue); color: #fff; }
.step-body h3 { margin: 0 0 2px; font-size: 14px; }
.step-body p { margin: 0; font-size: 13px; color: #505a5f; overflow-wrap: anywhere; }
.step.done .step-body h3 { color: #505a5f; }
.next-tag { font-size: 10px; font-weight: 700; background: var(--dfe-blue); color: #fff; border-radius: 3px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.step-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.step .btn { text-decoration: none; white-space: nowrap; }
.guide-section { margin-top: 18px; }
.guide-section .card-body { font-size: 14px; line-height: 1.6; }
.guide-section .card-body > p:first-child { margin-top: 0; }
.guide-section a, .area-guide a { color: var(--dfe-blue); }
.guide-h { font-size: 16px; margin: 0 0 6px; }
.guide-list { margin: 0 0 10px; padding-left: 22px; }
.guide-list li { margin-bottom: 4px; }
.guide-tip { background: #f3f2f1; border-left: 4px solid var(--dfe-blue); padding: 8px 12px; border-radius: 0 4px 4px 0; font-size: 13px; margin: 10px 0 0; }
.callout { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dfe-navy); color: #fff; font-size: 11px; font-weight: 700; margin-right: 6px; flex-shrink: 0; font-style: normal; }
.example-item { border: 1px solid #e8e8e8; border-radius: 6px; overflow: hidden; margin: 12px 0 16px; font-size: 13px; }
.example-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: #f8f8f8; }
.example-head strong { flex: 1; min-width: 180px; }
.example-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 14px; }
.example-field { border: 2px dashed #b1b4b6; border-radius: 4px; padding: 6px 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.example-field.wide { grid-column: 1 / -1; }
.example-field b { font-size: 12px; margin-right: 8px; }
.example-field i { color: #505a5f; font-style: normal; flex-basis: 100%; padding-left: 26px; }
.field-guide { margin: 0; }
.field-guide dt { font-weight: 700; margin-top: 10px; display: flex; align-items: center; }
.field-guide dd { margin: 4px 0 0 26px; color: #0b0c0c; }
.field-guide .rag-pill { display: inline-block; min-width: 58px; text-align: center; margin: 2px 4px 2px 0; }
.guide-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide-area { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 12px 14px; text-decoration: none; color: inherit; }
.guide-area:hover { box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
.guide-area-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.guide-area-meta { font-size: 12px; color: #505a5f; }
.guide-area-who { font-size: 12px; color: #0b0c0c; }
.area-guide { background: #fff; border: 1px solid #e8e8e8; border-left: 4px solid var(--dfe-blue); border-radius: 0 6px 6px 0; margin: 0 0 16px; font-size: 13px; line-height: 1.55; }
.area-guide summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--dfe-navy); }
.area-guide-body { padding: 0 14px 12px; }
.area-guide-body p { margin: 6px 0; }
.area-guide-body ul { margin: 0 0 6px; padding-left: 20px; }
.area-guide-body h4 { margin: 16px 0 4px; font-size: 14px; }
.all-areas { margin-top: 14px; }
.guide-steps { color: #505a5f; }
@media (max-width: 768px) {
  .step { grid-template-columns: 32px 1fr; }
  .step > .btn, .step-btns { grid-column: 2; justify-self: start; justify-content: flex-start; }
  .example-grid { grid-template-columns: 1fr 1fr; }
}

/* Coming-soon page opened directly (see features.js) */
.preview-tag { display: inline-block; font-size: 11px; font-weight: 700; background: #ffdd00; color: #0b0c0c; border-radius: 3px; padding: 3px 8px; white-space: nowrap; }
/* Sit next to the title rather than in the middle of the bar */
#topbar h1:has(+ .preview-tag) { flex: 0 1 auto; }
#topbar h1 + .preview-tag { margin-right: auto; }

/* ── Quick navigation (back to Start here / Dashboard, next area) ── */
.qnav {
  display: flex; gap: 8px; flex-wrap: wrap;
  /* Stays at the top of the screen while scrolling, on every screen size */
  position: sticky; top: 0; z-index: 5; background: #f6f8f9;
  margin: -24px -24px 16px; padding: 10px 24px; border-bottom: 1px solid #e3e8eb;
}
.qnav-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--dfe-navy);
  background: #fff; border: 1px solid #c9d3d9;
}
.qnav-btn:hover { background: #eef4f6; }
.qnav-home { background: var(--dfe-navy); color: #fff; border-color: var(--dfe-navy); }
.qnav-home:hover { background: var(--dfe-navy); opacity: 0.9; }
.area-pager { max-width: 860px; margin: 24px 0 8px; }
.pager-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pager-btn {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: #fff; border: 1px solid #d8e0e4; color: var(--dfe-navy); min-width: 0;
}
.pager-btn:hover { border-color: var(--dfe-blue); box-shadow: 0 2px 8px rgba(16,42,58,0.1); }
.pager-next { text-align: right; align-items: flex-end; background: var(--dfe-blue); border-color: var(--dfe-blue); color: #fff; }
.pager-next:hover { opacity: 0.92; }
.pager-dir { font-size: 12px; font-weight: 600; opacity: 0.85; }
.pager-name { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.pager-sub { margin: 10px 0 0; font-size: 13px; color: #505a5f; text-align: center; }
.pager-sub a { color: var(--dfe-blue); }
@media (max-width: 768px) {
  .qnav { position: sticky; top: 0; z-index: 5; background: #f6f8f9; margin: -16px -16px 12px; padding: 10px 16px; border-bottom: 1px solid #e3e8eb; }
  .pager-btn { padding: 12px; }
}

/* ── Wide screens: use the space ── */
/* Standard area pages widen with the screen; on wide screens an open standard
   shows the DfE guidance and the form side by side, the form staying in view
   while you read. */
.area-page { max-width: 1500px; }
.item-form textarea { overflow: hidden; }
@media (min-width: 1200px) {
  .item-body.open { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
  /* The guidance box is as tall as the form beside it (height 0 stops it
     setting the row height; min-height 100% then fills the row). Longer
     guidance scrolls inside the box. As the notes boxes grow, so does this. */
  .item-body.open .dfe-description { margin-bottom: 0; height: 0; min-height: 100%; overflow-y: auto; }
}
.area-pager { max-width: 1500px; }

/* ── Editing a school for the trust overview ── */
.trust-banner {
  max-width: 1500px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between;
  background: #e8f3f8; border: 1px solid #b8d7e6; border-left: 5px solid var(--dfe-navy); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px; line-height: 1.45;
}
.trust-banner-text { flex: 1 1 320px; overflow-wrap: anywhere; }
.trust-banner-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-dialog { border: none; border-radius: 12px; padding: 20px 22px; max-width: min(540px, calc(100vw - 32px)); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.tl-dialog::backdrop { background: rgba(11,12,12,0.5); }
.tl-dialog h2 { margin: 0 0 10px; font-size: 18px; color: var(--dfe-navy); }
.tl-dialog p { font-size: 14px; line-height: 1.5; margin: 0 0 10px; overflow-wrap: anywhere; }
.tl-dialog-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.central-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--dfe-navy); background: #e8f3f8; border-radius: 999px; padding: 1px 8px; }

/* ── Several owners per standard ── */
.owners { display: flex; flex-direction: column; gap: 6px; }
.owner-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.owner-chip { display: inline-flex; align-items: center; gap: 4px; background: #e8f3f8; color: var(--dfe-navy); border: 1px solid #b8d7e6; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.owner-chip.unlisted { background: #fef3e9; border-color: #f3c08f; }
.owner-chip em { font-weight: 400; font-size: 11px; }
.owner-remove { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; padding: 0; }
.owner-remove:hover, .owner-remove:focus-visible { background: rgba(11,60,93,0.12); }
.owner-none { font-size: 13px; color: #505a5f; }
.form-field .owner-add { width: 100%; }

/* ── How to meet it panel and evidence checklist ── */
.guide-col { min-width: 0; display: flex; flex-direction: column; }
.gtabs { display: flex; gap: 4px; margin-bottom: -1px; position: relative; z-index: 1; }
.gtab { font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border: 1px solid #d8e0e4; border-bottom: 0; border-radius: 10px 10px 0 0; background: #eef2f4; color: var(--dfe-navy); cursor: pointer; }
.gtab[aria-selected="true"] { background: #fff; box-shadow: inset 0 3px 0 var(--dfe-blue); }
.howto { background: #fff; border: 1px solid #d8e0e4; border-radius: 0 10px 10px 10px; padding: 14px 16px; font-size: 13px; line-height: 1.55; }
.howto[hidden], .guide-col .dfe-description[hidden] { display: none; }
.gtabs ~ .dfe-description { border-radius: 0 10px 10px 10px; margin-bottom: 0; }
.ht-plain { font-size: 14px; font-weight: 600; color: var(--dfe-navy); margin: 0 0 8px; }
.ht-when { margin: 0 0 10px; }
.ht-tag { display: inline-block; font-size: 11px; font-weight: 700; background: #fef3e9; color: #6e3500; border-radius: 999px; padding: 1px 8px; margin-right: 4px; }
.ht-h { margin: 10px 0 6px; font-size: 13px; color: var(--dfe-navy); }
.ht-examples { display: grid; gap: 8px; }
.ht-ex { background: #f4f8f9; border-radius: 8px; padding: 8px 10px; }
.ht-ex-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--dfe-blue); margin-bottom: 2px; }
.ht-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ht-two p { margin: 0; }
.ht-watch { background: #fef3e9; border-radius: 8px; padding: 0 10px 8px; }
.ht-asks { margin-top: 10px; border-top: 1px solid #e3e8eb; padding-top: 8px; }
.ht-asks summary { cursor: pointer; font-weight: 700; color: var(--dfe-navy); }
.ht-asks ul { padding-left: 18px; margin: 6px 0 0; }
.ht-note { margin: 10px 0 0; font-size: 11px; color: #505a5f; }
.ev-list { background: #f4f9f8; border: 1px solid #cfe8e3; border-radius: 10px; padding: 10px 12px; }
.ev-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.ev-count { font-size: 12px; color: #505a5f; }
.ev-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 3px 0; cursor: pointer; }
.form-field .ev-item input, .ev-item input { margin-top: 3px; width: auto; }
.ev-note { margin: 6px 0 0; font-size: 12px; color: #3d4a52; }
.ev-note.auto { color: #005a30; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--dfe-blue); text-decoration: underline; cursor: pointer; font-weight: 600; }
.ev-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; background: #eef2f4; color: #3d4a52; border: 1px solid #c9d3d9; white-space: nowrap; }
.ev-badge.done { background: #e3f5ec; color: #005a30; border-color: var(--rag-green); }
.ev-slot:empty { display: none; }
@media (min-width: 1200px) {
  .item-body.open .guide-col { height: 0; min-height: 100%; }
  .item-body.open .guide-col .howto, .item-body.open .guide-col .dfe-description { flex: 1; min-height: 0; height: auto; overflow-y: auto; }
}
@media (max-width: 768px) {
  .ht-two { grid-template-columns: 1fr; }
  .ev-slot { order: 6; padding-left: 32px; }
}
