  :root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface2: #1c1c1c;
    --border: #2a2a2a;
    --text: #f0f0f0;
    --text-dim: #666;
    --text-mid: #999;
    --accent: #e8ff47;
    --accent-dim: rgba(232,255,71,0.12);
    --critical: #ff4444;
    --high: #ff8c42;
    --medium: #4a9eff;
    --low: #888;
    --pending: #b88fff;
    --success: #47ff8c;
    --radius: 10px;
    --mono: 'DM Mono', monospace;
    --sans: 'Syne', sans-serif;
    --text-shadow: none;
    --text-transform: none;
    --bg-header: rgba(10,10,10,0.92);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    text-shadow: var(--text-shadow);
  }

  /* ── CONFIG SCREEN ── */
  #config-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 2rem;
    gap: 2rem;
    position: relative;
    z-index: 1;
  }

  .config-logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--accent);
  }

  .config-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .config-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
  }

  .config-card p {
    font-size: 0.8rem;
    color: var(--text-mid);
    font-family: var(--mono);
    line-height: 1.6;
  }

  .config-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .config-field label {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .config-field input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
  }

  .config-field input:focus { border-color: var(--accent); }

  .btn-primary {
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
  }

  .btn-primary:hover { opacity: 0.9; }
  .btn-primary:active { transform: scale(0.98); }

  .theme-swatch.active {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent-dim);
  }

  /* ── MAIN APP ── */
  #app { display: none; flex-direction: column; min-height: 100dvh; position: relative; z-index: 1; }

  /* Header */
  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    z-index: 100;
  }

  .app-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.03em;
    text-transform: var(--text-transform);
  }

  .header-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
  }

  .header-badge.has-pending {
    color: var(--pending);
    border-color: var(--pending);
    background: rgba(184,143,255,0.08);
  }

  /* Nav */
  .app-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 57px;
    z-index: 99;
  }

  .nav-tab {
    flex: 1;
    padding: 0.875rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: var(--text-transform);
  }

  .nav-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .nav-tab .tab-count {
    font-family: var(--mono);
    font-size: 0.65rem;
    background: var(--surface2);
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
  }

  .nav-tab.active .tab-count {
    background: var(--accent-dim);
    color: var(--accent);
  }

  /* Views */
  .view { display: none; flex-direction: column; flex: 1; }
  .view.active { display: flex; }

  /* ── CAPTURE VIEW ── */
  #view-capture {
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
  }

  .capture-prompt {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .capture-textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    resize: none;
    outline: none;
    min-height: 120px;
    max-height: 50vh;
    overflow-y: auto;
    transition: border-color 0.2s, height 0.1s ease;
    width: 100%;
  }

  .capture-textarea::placeholder { color: var(--text-dim); font-weight: 400; }
  .capture-textarea:focus { border-color: var(--accent); }

  .capture-examples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .capture-examples-label {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .example-chip {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-mid);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .example-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .capture-btn {
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
  }

  .capture-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .capture-btn:not(:disabled):active { transform: scale(0.98); }

  .processing-indicator {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .processing-indicator.visible { display: flex; }

  .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .processing-text {
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--text-mid);
  }

  .capture-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .capture-history-label {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .history-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .history-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
  }

  .history-item-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .history-item-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .history-priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .history-meta-text {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
  }

  /* used while waiting for Claude — raw note as dim mono text */
  .history-item-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: var(--mono);
    line-height: 1.5;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .history-item-status {
    font-size: 0.65rem;
    font-family: var(--mono);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .status-sent    { color: var(--success);  background: rgba(71,255,140,0.1); }
  .status-auto    { color: var(--success);  background: rgba(71,255,140,0.12); }
  .status-queued  { color: var(--accent);   background: rgba(232,255,71,0.1); }
  .status-vague   { color: var(--high);     background: rgba(255,140,66,0.1); }
  .status-error   { color: var(--critical); background: rgba(255,68,68,0.1); }
  .status-processing { color: var(--text-dim); background: var(--surface2); display: flex; align-items: center; gap: 0.35rem; }

  .history-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--border);
    border-top-color: var(--text-dim);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
  }

  /* ── REVIEW VIEW ── */
  #view-review {
    padding: 1.25rem;
    gap: 1rem;
  }

  .review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .review-title {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .btn-approve-all {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--success);
    background: rgba(71,255,140,0.08);
    border: 1px solid rgba(71,255,140,0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-approve-all:hover { background: rgba(71,255,140,0.15); }

  .btn-delete-all {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--critical);
    background: rgba(255,68,68,0.08);
    border: 1px solid rgba(255,68,68,0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-delete-all:hover { background: rgba(255,68,68,0.15); }
  .btn-delete-all.stage-1 {
    background: var(--critical);
    color: #fff;
    border-color: var(--critical);
  }
  .btn-delete-all.stage-2 {
    background: var(--critical);
    color: #fff;
    border-color: var(--critical);
    animation: pulse-red 0.6s ease-in-out infinite;
  }
  @keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
  }

  .review-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 0.75rem;
    text-align: center;
  }

  .review-empty-icon { font-size: 2.5rem; }

  .review-empty-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: var(--mono);
  }

  .review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideIn 0.3s ease;
  }

  .review-card.has-error {
    border-color: rgba(255,68,68,0.35);
  }

  .review-card-header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  .review-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    color: var(--text);
  }

  .review-card-title-input {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--sans);
    background: var(--surface2);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: var(--text);
    outline: none;
    width: 100%;
  }

  .review-card-body {
    padding: 0.875rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .review-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .review-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .review-field-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .review-field select, .review-field input[type="date"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.78rem;
    outline: none;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s;
  }

  .review-field select:focus, .review-field input[type="date"]:focus {
    border-color: var(--accent);
  }

  .review-field select option { background: var(--surface2); }

  .review-raw-note {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    background: var(--bg);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    line-height: 1.5;
    border-left: 2px solid var(--border);
  }

  .incomplete-flag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--high);
    background: rgba(255,140,66,0.08);
    border: 1px solid rgba(255,140,66,0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
  }

  .save-error-flag {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--critical);
    background: rgba(255,68,68,0.07);
    border: 1px solid rgba(255,68,68,0.25);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
  }

  .review-card-actions {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
  }

  .btn-approve {
    flex: 1;
    background: rgba(71,255,140,0.1);
    border: 1px solid rgba(71,255,140,0.3);
    color: var(--success);
    border-radius: 7px;
    padding: 0.625rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-approve:hover { background: rgba(71,255,140,0.18); }

  .btn-discard {
    background: rgba(255,68,68,0.08);
    border: 1px solid rgba(255,68,68,0.2);
    color: var(--critical);
    border-radius: 7px;
    padding: 0.625rem 0.875rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-discard:hover { background: rgba(255,68,68,0.15); }

  /* ── DASHBOARD VIEW ── */
  #view-dashboard {
    padding: 1.25rem;
    gap: 1.25rem;
    overflow-y: auto;
  }

  .dashboard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .dashboard-date {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
  }

  .btn-refresh {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .btn-refresh:hover { border-color: var(--accent); color: var(--accent); }

  .dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
  }

  .dashboard-loading-text {
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--text-dim);
  }

  .area-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    animation: fadeIn 0.4s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.25rem;
  }

  .area-name {
    font-size: 0.7rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
  }

  .area-count {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    background: var(--surface);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
  }

  .task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
    overflow: hidden;
  }

  .task-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
  }

  .task-card.priority-Critical::before { background: var(--critical); }
  .task-card.priority-High::before { background: var(--high); }
  .task-card.priority-Medium::before { background: var(--medium); }
  .task-card.priority-Low::before { background: var(--low); }

  .task-card:hover { border-color: #3a3a3a; }

  .task-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .task-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    color: var(--text);
  }

  .priority-badge {
    font-size: 0.6rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    font-weight: 500;
  }

  .badge-Critical { background: rgba(255,68,68,0.12); color: var(--critical); }
  .badge-High { background: rgba(255,140,66,0.12); color: var(--high); }
  .badge-Medium { background: rgba(74,158,255,0.12); color: var(--medium); }
  .badge-Low { background: rgba(136,136,136,0.12); color: var(--low); }

  .task-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .task-meta-item {
    font-size: 0.68rem;
    font-family: var(--mono);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .task-meta-item.overdue { color: var(--critical); }

  .status-pill {
    font-size: 0.65rem;
    font-family: var(--mono);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text-dim);
  }

  .status-pill.In-Progress { background: rgba(74,158,255,0.12); color: var(--medium); }
  .status-pill.Blocked { background: rgba(255,68,68,0.1); color: var(--critical); }
  .status-pill.Up-Next { background: rgba(232,255,71,0.1); color: var(--accent); }

  /* â"€â"€ DASHBOARD FILTERS â"€â"€ */
  .dashboard-filters {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .filter-search {
    position: relative;
  }

  .filter-search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.625rem 1rem 0.625rem 2.25rem;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
  }

  .filter-search-input:focus { border-color: var(--accent); }
  .filter-search-input::placeholder { color: var(--text-dim); }

  .filter-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
    pointer-events: none;
  }

  .filter-row {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .filter-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    margin-right: 0.125rem;
  }

  .filter-pill {
    font-size: 0.7rem;
    font-family: var(--mono);
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    user-select: none;
  }

  .filter-pill:hover { border-color: #444; color: var(--text-mid); }

  .filter-pill.active { background: var(--surface2); color: var(--text); border-color: #555; }
  .filter-pill.active.p-critical { border-color: var(--critical); color: var(--critical); background: rgba(255,68,68,0.08); }
  .filter-pill.active.p-high { border-color: var(--high); color: var(--high); background: rgba(255,140,66,0.08); }
  .filter-pill.active.p-medium { border-color: var(--medium); color: var(--medium); background: rgba(74,158,255,0.08); }
  .filter-pill.active.p-low { border-color: var(--low); color: var(--low); background: rgba(136,136,136,0.1); }
  .filter-pill[data-filter="overdue"].active { border-color: var(--critical); color: var(--critical); background: rgba(255,68,68,0.08); }

  .filter-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
  }

  .dashboard-stats {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    padding: 0 0.25rem;
  }

  .dashboard-stats span { color: var(--text-mid); }

  .task-card.is-overdue {
    border-color: rgba(255,68,68,0.3);
  }

  .task-card.is-overdue .task-name {
    color: #f5c0c0;
  }

  .overdue-badge {
    font-size: 0.6rem;
    font-family: var(--mono);
    background: rgba(255,68,68,0.12);
    color: var(--critical);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 0.5rem;
    text-align: center;
  }

  .no-results-icon { font-size: 2rem; }
  .no-results-text { font-size: 0.8rem; font-family: var(--mono); color: var(--text-dim); }

  /* Toast */
  .toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--text);
    z-index: 999;
    transition: transform 0.3s ease;
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
  }

  .toast.show { transform: translateX(-50%) translateY(0); }
  .toast.success { border-color: rgba(71,255,140,0.4); color: var(--success); }
  .toast.error { border-color: rgba(255,68,68,0.4); color: var(--critical); }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

  /* Settings button */
  .btn-settings {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
  }
  .btn-settings:hover { border-color: var(--accent); color: var(--accent); }

  /* Settings modal */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1.5rem;
  }
  .modal-overlay.visible { display: flex; }
  .modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .modal-title {
    font-size: 1rem;
    font-weight: 700;
  }
  .modal-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
  }
  .modal-close-btn:hover { color: var(--text); }

  /* Help modal */
  .help-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .help-section:last-of-type { border-bottom: none; padding-bottom: 0; }
  .help-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--sans);
    letter-spacing: 0.01em;
  }

  /* Plan modal */
  .plan-col-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }
  .plan-col-date {
    font-size: 0.6rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-dim);
    opacity: 0.7;
  }
  .plan-weekend-col .plan-drop-zone {
    border-color: rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.01);
  }
  .plan-weekend-col .plan-col-label { opacity: 0.65; }
  .plan-day-col {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
  }
  .plan-drop-zone {
    min-height: 80px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: border-color 0.15s, background 0.15s;
  }
  .plan-drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  .plan-task-chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--text);
    cursor: grab;
    line-height: 1.4;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    user-select: none;
  }
  .plan-task-chip:active { cursor: grabbing; }
  .plan-task-chip .plan-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.3rem;
  }
  .plan-task-chip .plan-chip-text { flex: 1; }
  .plan-task-chip .plan-chip-remove {
    font-size: 0.7rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    padding: 0 0.1rem;
  }
  .plan-task-chip .plan-chip-remove:hover { color: var(--critical); }
  .plan-chip-date {
    display: block;
    font-size: 0.6rem;
    color: var(--medium);
    margin-top: 0.15rem;
    font-family: var(--mono);
  }
  .plan-upcoming-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.3rem 0.4rem;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.72rem;
    outline: none;
    margin-top: 0.4rem;
    cursor: pointer;
  }
  .plan-upcoming-input:focus { border-color: var(--accent); }
  .status-popup {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem;
    z-index: 300;
    flex-direction: column;
    gap: 0.75rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }
  .status-popup.visible {
    display: flex;
    transform: translateY(0);
  }
  .status-popup-title {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .status-popup-task {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
  }
  .status-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .status-option {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
  }
  .status-option:hover { border-color: var(--accent); color: var(--accent); }
  .status-option.current { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
  .status-option.Done { border-color: rgba(71,255,140,0.4); color: var(--success); }
  .status-option.Done:hover { background: rgba(71,255,140,0.08); }
  /* Priority options in popup */
  .status-option.p-Critical.current { border-color: var(--critical); color: var(--critical); background: rgba(255,68,68,0.1); }
  .status-option.p-High.current    { border-color: var(--high);     color: var(--high);     background: rgba(255,140,66,0.1); }
  .status-option.p-Medium.current  { border-color: var(--medium);   color: var(--medium);   background: rgba(74,158,255,0.1); }
  .status-option.p-Low.current     { border-color: var(--low);      color: var(--low);      background: rgba(136,136,136,0.1); }
  .status-popup-cancel {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
  }
  .status-popup-cancel:hover { color: var(--text); }

  /* Email digest section */
  .digest-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .digest-label {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .digest-info {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-mid);
    line-height: 1.6;
  }
  .digest-info a { color: var(--accent); text-decoration: none; }

  /* ── OVERDUE SUMMARIES (capture tab) ── */
  .overdue-summary-card {
    background: var(--surface);
    border: 1px solid rgba(255,68,68,0.25);
    border-left: 3px solid var(--critical);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    animation: slideIn 0.3s ease;
  }
  .overdue-summary-card:hover { background: var(--surface2); border-color: rgba(255,68,68,0.5); }
  .overdue-summary-area {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
  }
  .overdue-summary-meta {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--text-dim);
    margin-top: 0.2rem;
  }
  .overdue-summary-count {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--critical);
    background: rgba(255,68,68,0.1);
    border: 1px solid rgba(255,68,68,0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
  }

  .btn-weekly-review {
    background: none;
    border: none;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
  }
  .btn-weekly-review:hover { color: var(--accent); }

  /* ── TASK CARD EDIT BUTTON ── */
  .task-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .btn-edit-task {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 5px;
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
  }
  .btn-edit-task:hover { border-color: var(--accent); color: var(--accent); }

  /* ── REVIEW — AI REFINEMENT ── */
  .refinement-suggestion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(232,255,71,0.04);
    border: 1px solid rgba(232,255,71,0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
  }
  .refinement-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .refinement-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
  }
  .refinement-actions {
    display: flex;
    gap: 0.5rem;
  }
  .btn-refinement-accept {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(232,255,71,0.3);
    border-radius: 5px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .btn-refinement-accept:hover { background: rgba(232,255,71,0.15); }
  .btn-refinement-dismiss {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .btn-refinement-dismiss:hover { color: var(--text); }

  /* ── REVIEW — BREAKDOWN BUTTON ── */
  .btn-breakdown {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--pending);
    background: rgba(184,143,255,0.08);
    border: 1px solid rgba(184,143,255,0.25);
    border-radius: 5px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .btn-breakdown:hover { background: rgba(184,143,255,0.15); }
  .btn-breakdown:disabled { opacity: 0.5; cursor: not-allowed; }

  .auto-approved-banner {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--success);
    background: rgba(71,255,140,0.06);
    border: 1px solid rgba(71,255,140,0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  /* ── COMPILE SIMILAR TASKS ── */
  .merge-proposal {
    background: var(--surface);
    border: 1px solid rgba(184,143,255,0.25);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .merge-proposal-header {
    padding: 0.875rem 1rem 0.625rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .merge-proposal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
  }
  .merge-reason {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--pending);
    background: rgba(184,143,255,0.08);
    border: 1px solid rgba(184,143,255,0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
  }
  .merge-tasks-list {
    padding: 0.625rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .merge-task-item {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
  }
  .merge-task-item:last-child { border-bottom: none; }
  .merge-task-item .priority-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  }
  .merge-proposal-actions {
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
  }

  /* ── SUBTASK LIST in edit modal ── */
  .subtask-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    transition: border-color 0.15s;
    text-decoration: none;
  }
  .subtask-item:hover { border-color: var(--accent); }
  .subtask-item-title {
    font-size: 0.8rem;
    color: var(--text-mid);
    flex: 1;
    font-family: var(--mono);
  }
  .subtask-item-status {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    flex-shrink: 0;
  }
  .subtask-item-priority {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* ── SELECTION MODE ── */
  .task-card.selected {
    border-color: var(--accent);
    background: rgba(232,255,71,0.04);
  }
  .task-select-checkbox {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--accent);
    transition: all 0.15s;
    z-index: 5;
    flex-shrink: 0;
  }
  .selection-active .task-select-checkbox { display: flex; }
  .task-card.selected .task-select-checkbox { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
  .selection-active .task-card { cursor: default; }
  .selection-active .btn-edit-task { display: none; }

  .selection-bar {
    display: none;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .selection-bar.visible { display: flex; }
  .selection-count {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--accent);
    flex: 1;
    min-width: 80px;
  }
  .bulk-action-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem 0.2rem 0.6rem;
  }
  .bulk-action-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .bulk-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.72rem;
    outline: none;
    cursor: pointer;
    padding: 0.1rem 0;
    max-width: 90px;
  }
  .bulk-select option { background: var(--surface2); }
  .btn-select-action {
    font-size: 0.72rem;
    font-family: var(--mono);
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid;
  }
  .btn-select-action.flesh-out {
    color: var(--accent); border-color: rgba(232,255,71,0.35); background: rgba(232,255,71,0.06);
  }
  .btn-select-action.compile {
    color: var(--pending); border-color: rgba(184,143,255,0.35); background: rgba(184,143,255,0.06);
  }
  .btn-select-action:hover { opacity: 0.8; }
  .btn-select-toggle {
    font-size: 0.72rem;
    font-family: var(--mono);
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
  }
  .btn-select-toggle.active { color: var(--accent); border-color: rgba(232,255,71,0.4); }

  /* ── RECURRING BADGE ── */
  .recurring-badge {
    font-size: 0.6rem;
    font-family: var(--mono);
    color: var(--medium);
    background: rgba(74,158,255,0.1);
    border: 1px solid rgba(74,158,255,0.2);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
  }

  /* ── DEEP DIVE BUTTON ── */
  .btn-deep-dive {
    background: none;
    border: 1px solid rgba(184,143,255,0.3);
    color: var(--pending);
    border-radius: 5px;
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    font-family: var(--mono);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
  }
  .btn-deep-dive:hover { background: rgba(184,143,255,0.08); border-color: var(--pending); }

  /* ── FLESH OUT DEEP DIVE CHAT MODAL ── */
  .deep-dive-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    z-index: 400;
    align-items: flex-end;
    justify-content: center;
  }
  .deep-dive-modal.visible { display: flex; }
  .deep-dive-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .deep-dive-header {
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  .deep-dive-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  .deep-dive-label {
    font-size: 0.65rem;
    font-family: var(--mono);
    color: var(--pending);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .deep-dive-task-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
  }
  .deep-dive-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
  }
  .dd-msg {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: fadeIn 0.3s ease;
  }
  .dd-msg-label {
    font-size: 0.62rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .dd-msg.claude .dd-msg-label { color: var(--pending); }
  .dd-msg.user .dd-msg-label { color: var(--text-dim); }
  .dd-msg-text {
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0.75rem 0.875rem;
    border-radius: 8px;
  }
  .dd-msg.claude .dd-msg-text { background: rgba(184,143,255,0.06); border: 1px solid rgba(184,143,255,0.15); color: var(--text); }
  .dd-msg.user .dd-msg-text { background: var(--surface2); border: 1px solid var(--border); color: var(--text-mid); }
  .dd-msg.result .dd-msg-text { background: rgba(71,255,140,0.05); border: 1px solid rgba(71,255,140,0.2); color: var(--text); }
  .deep-dive-input-row {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
  }
  .dd-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    min-height: 40px;
    max-height: 100px;
  }
  .dd-input:focus { border-color: var(--pending); }
  .dd-send-btn {
    background: var(--pending);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    flex-shrink: 0;
  }
  .dd-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .dd-apply-btn {
    background: var(--success);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    width: 100%;
    display: none;
  }
  .dd-apply-btn.visible { display: block; }

  /* ── DIAGNOSTICS ── */
  .diag-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
  }
  .diag-label {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .diag-desc {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--text-mid);
    line-height: 1.6;
  }
  .btn-diag {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-mid);
    border-radius: 7px;
    padding: 0.6rem 1rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }
  .btn-diag:hover { border-color: var(--accent); color: var(--accent); }
  .diag-results {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.875rem;
  }
  .diag-results.visible { display: flex; }
  .diag-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-family: var(--mono);
    line-height: 1.5;
  }
  .diag-icon { flex-shrink: 0; width: 14px; text-align: center; }
  .diag-row-label { color: var(--text-mid); flex: 1; }
  .diag-row-detail { color: var(--text-dim); font-size: 0.65rem; display: block; margin-top: 0.1rem; }
  .diag-ok .diag-row-label { color: var(--success); }
  .diag-ok .diag-icon { color: var(--success); }
  .diag-fail .diag-row-label { color: var(--critical); }
  .diag-fail .diag-icon { color: var(--critical); }
  .diag-warn .diag-row-label { color: var(--high); }
  .diag-warn .diag-icon { color: var(--high); }
  .diag-running .diag-icon { color: var(--accent); }
  .diag-separator {
    height: 1px;
    background: var(--border);
    margin: 0.2rem 0;
  }
  .diag-verdict {
    font-size: 0.72rem;
    font-family: var(--mono);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    line-height: 1.6;
    margin-top: 0.25rem;
  }
  .diag-verdict.ok { background: rgba(71,255,140,0.08); color: var(--success); border: 1px solid rgba(71,255,140,0.2); }
  .diag-verdict.fail { background: rgba(255,68,68,0.08); color: var(--critical); border: 1px solid rgba(255,68,68,0.2); }
  .diag-verdict.warn { background: rgba(255,140,66,0.08); color: var(--high); border: 1px solid rgba(255,140,66,0.2); }

  /* ── MULTI-TASK CAPTURE BOXES ── */
  #capture-boxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .capture-box-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .capture-box-wrapper .capture-textarea {
    flex: 1;
  }

  .capture-box-remove {
    position: absolute;
    right: -0.25rem;
    top: -0.25rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-dim);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 2;
    line-height: 1;
  }

  .capture-box-remove:hover {
    border-color: var(--critical);
    color: var(--critical);
    background: rgba(255,68,68,0.1);
  }

  .capture-actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
  }

  .capture-add-btn {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .capture-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .capture-actions .capture-btn {
    flex: 1;
  }

  /* ── CLICKABLE HISTORY STATUS ── */
  .history-item-status.clickable {
    cursor: pointer;
    transition: opacity 0.15s;
  }

  .history-item-status.clickable:hover {
    opacity: 0.7;
  }

  /* ── REVIEW CARD HIGHLIGHT FLASH ── */
  .review-card.highlight-flash {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
    transition: border-color 0.3s, box-shadow 0.3s;
  }

  /* ── EMPTY FIELD HIGHLIGHTING ── */
  .review-field select.field-empty,
  .review-field input[type="date"].field-empty {
    border: 1px dashed var(--accent);
  }

  /* ── SUB-TASK CAPTURE ── */
  .subtask-section-label {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .subtask-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
  }

  .subtask-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .subtask-box-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    animation: slideIn 0.3s ease;
  }

  .subtask-indent {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }

  .subtask-textarea {
    min-height: 42px;
    font-size: 0.9rem;
    flex: 1;
  }

  .subtask-remove-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    align-self: flex-start;
    margin-top: 0.5rem;
    transition: color 0.15s;
  }
  .subtask-remove-btn:hover { color: var(--critical); }

  .subtask-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
  }

  .subtask-generate-btn {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
  }

  .subtask-cancel-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.15s;
  }
  .subtask-cancel-btn:hover { color: var(--text); }

  .ai-refine-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    cursor: pointer;
  }

  .toggle-switch {
    width: 32px;
    height: 18px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 9px;
    position: relative;
    transition: all 0.2s;
  }
  .toggle-switch.on {
    background: var(--accent-dim);
    border-color: var(--accent);
  }
  .toggle-switch::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-dim);
    top: 2px;
    left: 2px;
    transition: all 0.2s;
  }
  .toggle-switch.on::after {
    left: 16px;
    background: var(--accent);
  }

  .subtask-banner {
    font-size: 0.72rem;
    font-family: var(--mono);
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(232, 255, 71, 0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
  }

  /* Responsive */
  @media (min-width: 640px) {
    .app-header { padding: 1rem 2rem; }
    .app-nav .nav-tab { font-size: 0.85rem; }
    #view-capture, #view-review, #view-dashboard { padding: 2rem; max-width: 720px; margin: 0 auto; width: 100%; }
    .review-fields { grid-template-columns: 1fr 1fr 1fr; }
    .status-popup { max-width: 480px; left: 50%; transform: translateX(-50%) translateY(100%); border-radius: 16px; bottom: 2rem; border: 1px solid var(--border); }
    .status-popup.visible { transform: translateX(-50%) translateY(0); }
  }
