*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1d1d1f;
  --primary-soft: #424245;
  --accent: #0071e3;
  --accent-hover: #0077ED;
  --green: #34c759;
  --green-bg: #f0faf2;
  --orange: #ff9f0a;
  --red: #ff3b30;
  --red-bg: #fff5f5;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-secondary: #fbfbfd;
  --surface-tertiary: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;
  --separator: rgba(0,0,0,0.06);
  --separator-opaque: #e8e8ed;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.05), 0 8px 32px rgba(0,0,0,0.06);
  --transition: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    'Helvetica Neue', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.022em;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
}

/* ── Top bar — frosted glass ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator-opaque);
  padding: 0 16px;
  display: flex; align-items: center; gap: 8px;
  height: 52px;
}
.topbar h1 {
  font-size: 17px; font-weight: 600; flex: 1;
  color: var(--primary);
  letter-spacing: -0.022em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-btn {
  background: transparent;
  border: none; color: var(--accent);
  width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  font-size: 17px; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.topbar-btn:active { background: rgba(0,113,227,0.1); }
.back-btn { font-size: 22px; font-weight: 300; margin-left: -4px; }

/* ── Login ── */
.login-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 24px; text-align: center;
}
.login-screen h1 {
  font-size: 34px; font-weight: 700; color: var(--primary);
  letter-spacing: -0.032em; margin-bottom: 6px;
}
.login-screen p {
  color: var(--text-secondary); font-size: 17px;
  margin-bottom: 40px; font-weight: 400;
}
.login-screen input {
  width: 100%; max-width: 320px; padding: 16px 18px;
  border: none; border-radius: var(--radius-sm);
  font-size: 17px; text-align: center;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
  font-family: inherit;
  transition: box-shadow var(--transition);
}
.login-screen input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,113,227,0.2), var(--shadow);
}
.login-screen input::placeholder { color: var(--text-tertiary); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 980px; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: inherit; letter-spacing: -0.01em;
  transition: all var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: rgba(0,113,227,0.08); color: var(--accent);
  border: none;
}
.btn-secondary:hover { background: rgba(0,113,227,0.12); }
.btn-danger { background: rgba(255,59,48,0.1); color: var(--red); }
.btn-danger:hover { background: rgba(255,59,48,0.15); }
.btn-small { padding: 8px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── FAB ── */
.fab {
  position: fixed; bottom: 28px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; font-size: 28px; font-weight: 300; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,113,227,0.32);
  display: flex; align-items: center; justify-content: center;
  z-index: 40;
  transition: all var(--transition);
}
.fab:active { transform: scale(0.9); }
.fab:hover { box-shadow: 0 6px 24px rgba(0,113,227,0.4); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:active { transform: scale(0.98); opacity: 0.9; }
.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 6px;
}
.card-name { font-size: 17px; font-weight: 600; letter-spacing: -0.022em; }
.card-location { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.card-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-block; padding: 4px 10px;
  background: var(--surface-tertiary); border-radius: 980px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: -0.01em;
}
.chip-active { background: rgba(0,113,227,0.08); color: var(--accent); }

/* ── Status badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; height: 22px;
  border-radius: 980px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.badge-visited { background: rgba(0,113,227,0.08); color: var(--accent); }
.badge-shortlisted { background: rgba(52,199,89,0.1); color: #248a3d; }
.badge-negotiating { background: rgba(255,159,10,0.1); color: #c77c00; }
.badge-approved { background: rgba(52,199,89,0.12); color: #248a3d; }
.badge-rejected { background: rgba(255,59,48,0.08); color: var(--red); }

/* ── Stars ── */
.stars { display: flex; gap: 2px; }
.star {
  font-size: 18px; color: var(--separator-opaque); cursor: pointer;
  user-select: none; transition: color var(--transition);
}
.star.active { color: var(--orange); }

/* ── Search & Filter ── */
.search-bar {
  padding: 12px 16px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.search-input {
  width: 100%; padding: 10px 14px;
  border: none; border-radius: 10px;
  font-size: 15px; font-family: inherit;
  background: rgba(118,118,128,0.12);
  color: var(--text);
  transition: box-shadow var(--transition);
}
.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
  background: var(--surface);
}
.search-input::placeholder { color: var(--text-tertiary); }
/* ── Category grid ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 12px 8px 4px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--separator-opaque);
}
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 2px 10px;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
}
.cat-tile:active { background: var(--surface-tertiary); }
.cat-tile__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tile-color) 10%, transparent);
  color: var(--tile-color);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cat-tile.active .cat-tile__icon {
  background: var(--tile-color);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--tile-color) 35%, transparent);
}
.cat-tile__label {
  font-size: 10px; font-weight: 600; color: var(--text-tertiary);
  text-align: center; line-height: 1.2;
  letter-spacing: 0.01em;
}
.cat-tile.active .cat-tile__label { color: var(--text); }

/* ── Status bar ── */
.status-bar {
  display: flex; gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: var(--surface);
  border-bottom: 0.5px solid var(--separator-opaque);
  padding: 0 8px;
}
.status-bar::-webkit-scrollbar { display: none; }
.status-tab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: none; border: none; border-bottom: 2px solid transparent;
  font-family: inherit; color: var(--text-tertiary);
  transition: all var(--transition);
  white-space: nowrap;
}
.status-tab:active { opacity: 0.7; }
.status-tab.active {
  color: var(--text); font-weight: 600;
  border-bottom-color: var(--primary);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}

/* Legacy filter support */
.filter-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 7px 14px;
  border-radius: 980px; border: none;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: rgba(118,118,128,0.08); color: var(--text-secondary);
  font-family: inherit; letter-spacing: -0.01em;
  transition: all var(--transition);
}
.filter-chip:active { transform: scale(0.96); }
.filter-chip.active {
  background: var(--primary); color: #fff;
}

/* ── Form ── */
.form-page { padding: 0 0 100px; }
.form-section {
  padding: 20px 16px;
  border-bottom: 1px solid var(--separator);
}
.form-section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--text-secondary); margin-bottom: 16px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  border: none; border-radius: 10px;
  font-size: 17px; font-family: inherit;
  background: rgba(118,118,128,0.08);
  color: var(--text);
  transition: all var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
  background: var(--surface);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-tertiary); }
.field textarea { resize: vertical; min-height: 80px; font-size: 15px; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: rgba(118,118,128,0.08);
  border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer; user-select: none;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.checkbox-item.checked {
  background: var(--accent); color: #fff;
}

.form-sticky-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--separator-opaque);
  display: flex; gap: 10px; justify-content: center;
  z-index: 40;
}
.form-sticky-footer .btn { flex: 1; max-width: 240px; }

/* ── Detail ── */
.detail-page { padding-bottom: 80px; }
.detail-hero {
  background: var(--surface); color: var(--text);
  padding: 24px 16px 20px;
  border-bottom: 1px solid var(--separator);
}
.detail-hero h2 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.032em;
  line-height: 1.14;
}
.detail-hero .location { font-size: 15px; color: var(--text-secondary); margin-top: 4px; }
.detail-section {
  padding: 16px;
  border-bottom: 1px solid var(--separator);
}
.detail-section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--text-secondary); margin-bottom: 12px;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
}
.detail-label { font-size: 15px; color: var(--text-secondary); }
.detail-value { font-size: 15px; font-weight: 500; text-align: right; max-width: 60%; }
/* ── Action strip ── */
.action-strip {
  display: flex;
  margin: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.action-tile {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 16px 4px;
  border: none; background: transparent;
  cursor: pointer; font-family: inherit;
  position: relative;
  transition: background var(--transition);
}
.action-tile:active { background: var(--surface-tertiary); }
.action-tile + .action-tile::before {
  content: '';
  position: absolute; left: 0; top: 20%; height: 60%;
  width: 0.5px; background: var(--separator-opaque);
}
.action-tile__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.action-tile:active .action-tile__icon { transform: scale(0.88); }
.action-tile__label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.01em;
}

/* Tile colors */
.action-tile--briefing .action-tile__icon { background: rgba(0,113,227,0.1); color: var(--accent); }
.action-tile--briefing .action-tile__label { color: var(--accent); }

.action-tile--edit .action-tile__icon { background: rgba(255,159,10,0.1); color: #c77c00; }
.action-tile--edit .action-tile__label { color: #c77c00; }

.action-tile--photos .action-tile__icon { background: rgba(88,86,214,0.1); color: #5856d6; }
.action-tile--photos .action-tile__label { color: #5856d6; }

.action-tile--qa .action-tile__icon { background: rgba(52,199,89,0.1); color: #248a3d; }
.action-tile--qa .action-tile__label { color: #248a3d; }

.action-tile--delete .action-tile__icon { background: rgba(255,59,48,0.06); color: var(--red); }
.action-tile--delete .action-tile__label { color: var(--red); }

/* ── Photos ── */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  padding: 8px 16px;
}
.photo-thumb {
  aspect-ratio: 1; border-radius: var(--radius-xs); overflow: hidden;
  position: relative; cursor: pointer;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; border: 2px dashed var(--separator-opaque); border-radius: var(--radius);
  margin: 16px; cursor: pointer; color: var(--text-tertiary);
  transition: all var(--transition);
}
.photo-upload-area:active { background: var(--surface-tertiary); }
.photo-upload-area span { font-size: 40px; margin-bottom: 8px; }

/* ── Q&A ── */
.qa-category { margin-bottom: 20px; }
.qa-category-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--text-secondary);
  margin-bottom: 10px; padding: 0 16px;
}
.qa-item { padding: 8px 16px; }
.qa-question {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 6px;
}
.qa-item textarea {
  width: 100%; padding: 10px 12px; border: none;
  border-radius: 10px; font-size: 15px; font-family: inherit;
  min-height: 44px; resize: vertical;
  background: rgba(118,118,128,0.08);
  transition: all var(--transition);
}
.qa-item textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
  background: var(--surface);
}

/* ── Compare ── */
.compare-table {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 16px;
}
.compare-table table {
  border-collapse: collapse; width: 100%; min-width: 600px;
}
.compare-table th, .compare-table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 0.5px solid var(--separator-opaque);
  font-size: 13px;
}
.compare-table th {
  font-weight: 600; color: var(--text-secondary);
  background: var(--surface-secondary);
  position: sticky; left: 0;
}
.compare-table td { background: var(--surface); }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px; text-align: center; color: var(--text-tertiary);
}
.empty-state span { font-size: 48px; margin-bottom: 16px; opacity: 0.6; }
.empty-state p { font-size: 17px; line-height: 1.47; }

/* ── Status select ── */
.status-select { display: flex; gap: 6px; flex-wrap: wrap; }
.status-option {
  padding: 7px 14px; border-radius: 980px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer; text-transform: uppercase;
  background: rgba(118,118,128,0.08); font-family: inherit;
  color: var(--text-secondary); letter-spacing: 0.02em;
  transition: all var(--transition);
}
.status-option:active { transform: scale(0.96); }
.status-option.active { border-color: transparent; }
.status-option[data-status="visited"].active { background: rgba(0,113,227,0.08); color: var(--accent); }
.status-option[data-status="shortlisted"].active { background: rgba(52,199,89,0.1); color: #248a3d; }
.status-option[data-status="negotiating"].active { background: rgba(255,159,10,0.1); color: #c77c00; }
.status-option[data-status="approved"].active { background: rgba(52,199,89,0.12); color: #248a3d; }
.status-option[data-status="rejected"].active { background: rgba(255,59,48,0.08); color: var(--red); }

/* ── Photo lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}
.lightbox img {
  max-width: 95%; max-height: 90dvh; object-fit: contain;
  border-radius: var(--radius-sm);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  padding: 12px 24px; border-radius: 980px;
  font-size: 15px; font-weight: 500; z-index: 200;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), toastOut 0.25s ease 2s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.95); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Loading ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--separator-opaque); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Briefing ── */
.briefing-page { padding-bottom: 40px; }

.briefing-progress {
  padding: 20px 16px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--separator);
}
.briefing-progress-bar {
  height: 6px; background: rgba(118,118,128,0.12);
  border-radius: 3px; overflow: hidden;
}
.briefing-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.briefing-progress-text {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  margin-top: 8px;
}

.briefing-section {
  margin-bottom: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--separator);
}
.briefing-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; cursor: pointer;
  background: var(--surface); user-select: none;
  border-left: 3px solid transparent;
  transition: background var(--transition);
}
.briefing-section-header:active { background: var(--surface-tertiary); }
.briefing-section[data-type="info"] .briefing-section-header { border-left-color: var(--accent); }
.briefing-section[data-type="checklist"] .briefing-section-header { border-left-color: var(--green); }
.briefing-section[data-type="redflags"] .briefing-section-header { border-left-color: var(--red); }
.briefing-section[data-type="targets"] .briefing-section-header { border-left-color: var(--orange); }
.briefing-section-icon { font-size: 20px; flex-shrink: 0; }
.briefing-section-info { flex: 1; }
.briefing-section-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
}
.briefing-section-count { font-size: 13px; font-weight: 500; margin-top: 2px; color: var(--text-secondary); }
.briefing-section[data-type="checklist"] .briefing-section-count { color: #248a3d; }
.briefing-section[data-type="redflags"] .briefing-section-count { color: var(--red); }
.briefing-section[data-type="targets"] .briefing-section-count { color: #c77c00; }
.briefing-section-chevron {
  font-size: 20px; color: var(--text-tertiary);
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  font-weight: 300;
}
.briefing-section.collapsed .briefing-section-chevron { transform: rotate(0deg); }
.briefing-section:not(.collapsed) .briefing-section-chevron { transform: rotate(90deg); }
.briefing-section.collapsed .briefing-section-body {
  display: none;
}

.briefing-section-body {
  background: var(--surface-secondary);
}

.briefing-item {
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--separator);
}
.briefing-item:last-child { border-bottom: none; }

/* Info items */
.briefing-item-info {
  padding: 14px 16px;
  background: rgba(0,113,227,0.03);
}
.briefing-item-info .briefing-item-content {
  font-size: 15px; line-height: 1.53; color: var(--text);
}

.briefing-item-hint {
  font-size: 13px; color: var(--accent);
  margin-top: 8px; padding: 8px 12px;
  background: rgba(0,113,227,0.04);
  border-radius: var(--radius-xs);
  line-height: 1.46;
  font-weight: 500;
}

/* Check items */
.briefing-item-check { padding: 12px 16px; }
.briefing-check-label {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
}
.briefing-check-input { display: none; }
.briefing-check-box {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 2px solid var(--separator-opaque); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 1px;
}
.briefing-check-input:checked + .briefing-check-box {
  background: var(--green); border-color: var(--green);
  transform: scale(1);
}
.briefing-check-input:checked + .briefing-check-box::after {
  content: ''; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -2px;
}
.briefing-item-check.completed .briefing-check-text {
  text-decoration: line-through; color: var(--text-tertiary);
}
.briefing-check-text {
  font-size: 15px; line-height: 1.47; padding-top: 1px;
}

/* Red flag items */
.briefing-item-redflag { padding: 12px 16px; transition: background var(--transition); }
.briefing-redflag-row { display: flex; align-items: flex-start; gap: 12px; }
.redflag-toggle {
  background: none; border: none; cursor: pointer; font-size: 18px;
  padding: 0; flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.redflag-toggle:active { transform: scale(1.3); }
.redflag-icon { display: block; }
.briefing-redflag-text {
  font-size: 15px; line-height: 1.47; padding-top: 1px;
  color: var(--text-secondary);
}
.briefing-item-redflag.flagged {
  background: var(--red-bg);
}
.briefing-item-redflag.flagged .briefing-redflag-text {
  color: var(--red); font-weight: 600;
}

/* Question items */
.briefing-item-question { padding: 14px 16px; }
.briefing-question-text {
  font-size: 15px; font-weight: 600; color: var(--text);
  line-height: 1.47; margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.briefing-answer {
  width: 100%; padding: 12px 14px;
  border: none; border-radius: 10px;
  font-size: 15px; font-family: inherit;
  min-height: 48px; resize: vertical;
  background: rgba(118,118,128,0.08);
  color: var(--text);
  transition: all var(--transition);
}
.briefing-answer:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
  background: var(--surface);
}
.briefing-answer:not(:placeholder-shown) {
  background: var(--green-bg);
  border-left: 3px solid var(--green);
}
.briefing-answer::placeholder { color: var(--text-tertiary); }

/* Desktop tweak */
@media (min-width: 520px) {
  #app {
    border-left: 0.5px solid var(--separator-opaque);
    border-right: 0.5px solid var(--separator-opaque);
    box-shadow: 0 0 80px rgba(0,0,0,0.04);
  }
}
