/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:   #1a5fa8;
  --orange: #d07000;
  --gray:   #666666;
  --purple: #5a3e8a;
  --green:  #1a7a3a;
  --red:    #c0392b;
  --bg:     #f4f6f9;
  --card:   #ffffff;
  --border: #dde1e8;
  --text:   #1a1a2e;
  --sub:    #555;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --header-h: 60px;
  --nav-h: 56px;
}

html { font-size: 16px; }
body {
  font-family: 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ===== HEADER ===== */
#app-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: var(--header-h);
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#app-header .logo-area { display: flex; align-items: center; gap: 10px; }
#app-header .logo-area img { height: 38px; border-radius: 6px; }
#app-header h1 { font-size: 1rem; font-weight: 700; line-height: 1.2; }
#app-header h1 small { font-size: 0.72rem; font-weight: 400; opacity: 0.85; display: block; }
#header-inspection-num { font-size: 0.8rem; background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 20px; }

/* ===== BOTTOM NAV ===== */
#bottom-nav {
  position: fixed;
  bottom: 0; right: 0; left: 0;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.07);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.62rem;
  color: var(--sub);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  padding: 4px 2px;
}
.nav-btn .nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-btn.active { color: var(--blue); }
.nav-btn.active .nav-icon { filter: drop-shadow(0 0 2px rgba(26,95,168,0.4)); }

/* ===== SCREENS ===== */
.screen { display: none; padding: 16px; max-width: 680px; margin: 0 auto; }
.screen.active { display: block; }

/* ===== CARD ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sub);
  margin-bottom: 4px;
}
.form-group label .req { color: var(--red); margin-right: 2px; }
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.9rem;
  font-family: inherit;
  direction: rtl;
  background: #fff;
  transition: border-color 0.15s;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,95,168,0.12);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error { border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 70px; }

/* Time picker */
.time-picker { display: flex; gap: 8px; align-items: center; }
.time-picker select { flex: 1; }
.time-sep { font-size: 1.2rem; font-weight: 700; color: var(--sub); }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row label { font-size: 0.88rem; color: var(--text); cursor: pointer; }
.toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  right: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider::before { transform: translateX(-20px); }

/* ===== STATUS BUTTONS ===== */
.status-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.status-btn {
  padding: 7px 12px;
  border-radius: 20px;
  border: 2px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: #f0f0f0;
  color: var(--sub);
  transition: all 0.15s;
  font-family: inherit;
}
.status-btn:hover { filter: brightness(0.95); }
.status-btn.active-done    { background: var(--blue);   color: #fff; border-color: var(--blue); }
.status-btn.active-no      { background: var(--orange);  color: #fff; border-color: var(--orange); }
.status-btn.active-na      { background: var(--gray);   color: #fff; border-color: var(--gray); }
.status-btn.active-missing { background: var(--purple); color: #fff; border-color: var(--purple); }
.status-btn.active-yes     { background: var(--green);  color: #fff; border-color: var(--green); }
.status-btn.active-fit     { background: var(--green);  color: #fff; border-color: var(--green); }
.status-btn.active-unfit   { background: var(--red);    color: #fff; border-color: var(--red); }

/* ===== SECTION ITEMS (screens 5-8) ===== */
.section-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
  transition: opacity 0.2s;
}
.section-item.dimmed { opacity: 0.45; pointer-events: none; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
}
.section-header-title { font-size: 0.9rem; font-weight: 700; }
.section-body { padding: 0 16px 14px; display: none; }
.section-body.open { display: block; }

/* Sub-checks table */
.sub-checks { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sub-checks td, .sub-checks th {
  padding: 6px 8px;
  font-size: 0.82rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
}
.sub-checks th { font-weight: 600; color: var(--sub); }
.sub-checks .check-label { width: 60%; }
.sub-checks .check-btns { display: flex; gap: 4px; justify-content: flex-end; }
.check-mini-btn {
  padding: 4px 9px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: #f8f8f8;
  color: var(--sub);
  font-family: inherit;
  transition: all 0.12s;
}
.check-mini-btn.sel-yes { background: var(--green); color: #fff; border-color: var(--green); }
.check-mini-btn.sel-no  { background: var(--red);   color: #fff; border-color: var(--red); }
.check-mini-btn.sel-lr  { background: var(--gray);  color: #fff; border-color: var(--gray); }

/* ===== SCENARIOS (screen 9) ===== */
.scenario-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.scenario-item.dimmed { opacity: 0.4; }
.scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 10px;
}
.scenario-title { font-size: 0.88rem; font-weight: 700; flex: 1; }
.scenario-rel-btns { display: flex; gap: 6px; }
.rel-btn {
  padding: 5px 11px;
  border-radius: 16px;
  border: 2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: #f0f0f0;
  color: var(--sub);
  font-family: inherit;
  transition: all 0.15s;
}
.rel-btn.active-rel   { background: var(--blue); color: #fff; border-color: var(--blue); }
.rel-btn.active-norel { background: var(--gray); color: #fff; border-color: var(--gray); }
.scenario-collapse-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--sub); padding: 4px;
}
.scenario-body { padding: 0 16px 14px; display: none; }
.scenario-body.open { display: block; }
.scenario-location { margin-bottom: 10px; }
.scenario-location label { font-size: 0.78rem; font-weight: 600; color: var(--sub); display: block; margin-bottom: 3px; }
.scenario-location input { width: 100%; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; direction: rtl; }

/* Common checks inside scenario */
.common-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
}
.common-check-row:last-child { border-bottom: none; }
.common-check-label { font-size: 0.8rem; color: var(--text); flex: 1; }
.common-check-btns { display: flex; gap: 4px; flex-shrink: 0; }

/* ===== CERTIFICATES (screen 3) ===== */
.cert-item {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.cert-item.dimmed { opacity: 0.4; background: #f8f8f8; }
.cert-name { font-size: 0.88rem; font-weight: 700; margin-bottom: 8px; }
.cert-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cert-fields .form-group { flex: 1; min-width: 140px; margin-bottom: 0; }

/* ===== NOTES (screen 10) ===== */
.auto-note-item {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fffaf5;
}
.auto-note-source { font-size: 0.72rem; color: var(--sub); margin-bottom: 4px; }
.auto-note-text { font-size: 0.85rem; margin-bottom: 8px; }
.auto-note-actions { display: flex; gap: 8px; }
.note-write-btn {
  padding: 5px 12px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
}
.note-write-btn.write { background: var(--blue); color: #fff; }
.note-write-btn.ignore { background: #e0e0e0; color: var(--sub); }
.note-write-btn.active-write { background: var(--green); color: #fff; }
.note-write-btn.active-ignore { background: #999; color: #fff; }
.note-editor { margin-top: 8px; display: none; }
.note-editor.open { display: block; }
.note-editor textarea { width: 100%; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; direction: rtl; resize: vertical; min-height: 55px; }

/* Free notes */
.free-note-row { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
.free-note-row textarea { flex: 1; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; direction: rtl; resize: vertical; min-height: 45px; }
.free-note-row .del-btn { background: none; border: none; cursor: pointer; color: var(--red); font-size: 1.2rem; padding: 4px; }
.add-row-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 2px dashed var(--border);
  border-radius: 8px; padding: 8px 14px;
  color: var(--sub); font-size: 0.85rem;
  cursor: pointer; width: 100%; justify-content: center;
  font-family: inherit; margin-top: 4px;
}

/* Conclusion 3-part table */
.conclusion-table {
  display: flex;
  border: 2px solid #333;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.conc-right, .conc-left {
  flex: 1;
  padding: 12px;
  background: #f8f8f8;
  color: #222;
  font-weight: 600;
}
.conc-center {
  padding: 12px 16px;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid #333;
  border-left: 2px solid #333;
  min-width: 100px;
  text-align: center;
  background: #fff;
}
.conc-center.conc-fit { color: var(--green); background: #eafbe7; }
.conc-center.conc-unfit { color: var(--red); background: #fde8e8; }
.conclusion-toggle { display: flex; gap: 10px; margin-top: 10px; }
.conclusion-toggle .status-btn { flex: 1; text-align: center; padding: 10px; font-size: 0.9rem; }

/* Signature/stamp preview */
.sig-preview { max-height: 60px; margin-top: 6px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; }

/* Essence box */
.essence-box {
  background: #f0f4ff;
  border-right: 4px solid var(--blue);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* Auto-generated field */
.auto-field { background: #f5f5f5 !important; color: var(--sub) !important; }

/* Fixed prefix */
.fixed-prefix {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue);
  white-space: nowrap;
}

/* Signature fields */
.sig-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sig-row .form-group { flex: 1; min-width: 160px; }

/* ===== FIREFIGHTER PANEL CHECKS ===== */
.panel-checks { display: flex; flex-direction: column; gap: 6px; }
.panel-check-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.panel-check-item:last-child { border-bottom: none; }
.panel-check-item input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; accent-color: var(--blue); }
.panel-check-item label { font-size: 0.85rem; cursor: pointer; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(26,95,168,0.3);
}
.btn-primary:hover { background: #154e8e; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0f0f0; color: var(--sub);
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 9px 16px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.btn-danger {
  background: var(--red); color: #fff;
  border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-full { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 2000;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px;
  padding: 24px; width: 100%; max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal h3 { font-size: 1rem; margin-bottom: 14px; color: var(--text); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* ===== SETTINGS ===== */
.settings-section { margin-bottom: 20px; }
.settings-section h3 { font-size: 0.9rem; font-weight: 700; color: var(--blue); margin-bottom: 10px; }
.client-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.client-list-item:last-child { border-bottom: none; }
.client-list-item span { flex: 1; font-size: 0.88rem; }
.client-list-item .badge {
  font-size: 0.68rem; background: var(--orange); color: #fff;
  border-radius: 10px; padding: 2px 7px;
}
.client-del { background: none; border: none; cursor: pointer; color: var(--red); font-size: 1rem; }

/* ===== SCREEN 0 — HOME ===== */
.home-banner {
  background: linear-gradient(135deg, var(--blue) 0%, #2176c7 100%);
  border-radius: 14px;
  padding: 24px;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.home-banner h2 { font-size: 1.15rem; margin-bottom: 6px; }
.home-banner p { font-size: 0.85rem; opacity: 0.85; }
.inspection-num-display {
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 14px;
  margin-top: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* History list */
.history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--card);
  border-radius: 10px; box-shadow: var(--shadow);
  margin-bottom: 8px; cursor: pointer;
  border-right: 4px solid var(--blue);
  transition: transform 0.1s;
}
.history-item:hover { transform: translateX(-2px); }
.history-item .hi-num { font-weight: 700; font-size: 0.9rem; color: var(--blue); }
.history-item .hi-info { font-size: 0.78rem; color: var(--sub); }
.history-item .hi-arrow { color: var(--sub); }

/* ===== DIGITAL TIME PICKER ===== */
.digital-time {
  display: inline-flex; align-items: center; gap: 4px;
  flex-direction: row;
  background: #0e1220; color: #f6d87a;
  border-radius: 8px; padding: 4px 8px;
  font-family: 'Courier New', 'Consolas', monospace;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  direction: ltr !important;
  unicode-bidi: isolate;
}
.digital-time select,
.digital-time .dt-colon {
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: center;
}
.digital-time select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: transparent; border: none; color: inherit;
  font-family: inherit; font-size: 1.1rem; font-weight: 700;
  padding: 6px 2px; cursor: pointer;
  min-width: 38px; letter-spacing: 1px;
}
.digital-time select:focus { outline: 1px solid #f6d87a; outline-offset: 2px; border-radius: 4px; }
.digital-time select option { background: #fff; color: #000; font-family: 'Segoe UI', sans-serif; direction: ltr; }
.digital-time .dt-colon { font-size: 1.1rem; font-weight: 700; animation: dt-blink 1.2s infinite; }
@keyframes dt-blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0.4; } }

/* ===== PDF PREVIEW MODAL ===== */
.pdf-preview-modal {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: #2a2a2a; z-index: 5000;
}
.pdf-preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--blue); color: #fff;
  flex-wrap: wrap; gap: 10px;
}
.pdf-preview-title { font-weight: 700; font-size: 1rem; }
.pdf-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-preview-actions button {
  padding: 8px 16px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border-radius: 6px; border: none;
}
.pdf-preview-actions .btn-primary { background: var(--green); color: #fff; }
.pdf-preview-actions .btn-secondary { background: #fff; color: var(--text); }
.pdf-preview-frame {
  flex: 1; width: 100%; border: none; background: #fff;
}

/* ===== ATTACHMENT INFO ROW ===== */
.attachment-info {
  margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: #eef3fb; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.85rem;
}
.attachment-info span { flex: 1; color: var(--text); word-break: break-all; }

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.ac-wrap { position: relative; flex: 1; min-width: 0; }
.ac-dropdown {
  position: absolute; top: 100%; right: 0; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 0 0 8px 8px; border-top: none;
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1500;
}
.ac-dropdown[hidden] { display: none; }
.ac-item {
  padding: 10px 12px; font-size: 0.9rem;
  cursor: pointer; color: var(--text);
  border-bottom: 1px solid #f2f2f2;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active {
  background: #eef3fb; color: var(--blue);
}

/* ===== MISC ===== */
.reason-field { margin-top: 8px; display: none; }
.reason-field.open { display: block; }
.inline-note {
  background: #f0f4ff; border-right: 4px solid var(--blue);
  padding: 12px 14px; border-radius: 0 8px 8px 0;
  font-size: 0.85rem; line-height: 1.6; margin: 10px 0;
}
.hint { font-size: 0.75rem; color: var(--sub); margin-top: 3px; }
.section-num { color: var(--blue); margin-left: 6px; font-size: 0.8rem; }
hr.divider { border: none; border-top: 2px solid var(--border); margin: 16px 0; }

/* Google auth button */
.google-btn {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 10px 16px;
  cursor: pointer; font-size: 0.88rem; font-weight: 600;
  font-family: inherit; width: 100%; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: box-shadow 0.15s;
}
.google-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.google-btn img { width: 20px; }
.auth-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.auth-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.auth-dot.ok { background: var(--green); }
.auth-dot.no { background: var(--red); }

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222; color: #fff; border-radius: 22px;
  padding: 10px 22px; font-size: 0.85rem;
  opacity: 0; transition: all 0.3s; z-index: 9000;
  white-space: normal; max-width: 90vw; text-align: center; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .card { padding: 12px; }
  .scenario-header { flex-wrap: wrap; }
  .cert-fields { flex-direction: column; }
  .sig-row { flex-direction: column; }
}
