/* autopilot.css -- the Autopilot screen (autopilot.js): rules, what Autopilot decided, per day. Tokens from core.css. */

.ap-card { width: 1100px; max-width: calc(100vw - 16px); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.ap-head { display: flex; align-items: center; gap: 12px; }
.ap-h { margin: 0; flex: 1; font-size: calc(var(--ui-fs) * 18 / 13); font-weight: 600; color: var(--text-strong); }
.ap-x { background: none; border: 0; color: var(--text-dim); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.ap-x:hover { background: var(--hover); color: var(--text); }
.ap-note, .ap-hint { margin: 0; color: var(--text-muted); font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-none { color: var(--text-muted); margin: 8px 0; }
.ap-body { display: flex; flex-direction: column; gap: 14px; }
.ap-sh { margin: 0 0 2px; font-size: calc(var(--ui-fs) * 14 / 13); color: var(--text-strong); }
.ap-fixed { border-left: 3px solid var(--danger); padding-left: 10px; }

.ap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 6px 8px; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; }
.ap-row.ap-on { border-left-color: var(--focus); }
.ap-row.ap-exc { border-left-color: var(--attn); background: var(--hover); }
.ap-row.ap-back { opacity: .6; }
.ap-main { min-width: 0; }
.ap-name { overflow-wrap: anywhere; }
.ap-sub, .ap-meta { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); overflow-wrap: anywhere; }
.ap-excline { color: var(--attn); font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-act { display: flex; gap: 6px; align-items: center; }
.ap-yes, .ap-no, .ap-toggle, .ap-more { min-width: 64px; min-height: 32px; }
.ap-toggle.ap-is-on { font-weight: 600; }
.ap-tag { color: var(--text-muted); font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-err { color: var(--danger); font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-err:empty { display: none; }
.ap-bar { display: flex; gap: 8px; padding: 8px 0; flex-wrap: wrap; }
.ap-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; padding: 8px; border: 1px solid var(--rule); }
.ap-field { display: flex; flex-direction: column; gap: 2px; }
.ap-fl { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-in { min-height: 32px; box-sizing: border-box; }
.ap-frees { grid-column: 1 / -1; }
.ap-cat { display: inline-flex; align-items: center; margin-right: 12px; }
.ap-days { border-collapse: collapse; width: 100%; max-width: 520px; }
.ap-days th, .ap-days td { text-align: left; padding: 2px 10px 2px 0; font-size: calc(var(--ui-fs) * 12 / 13); }
.ap-hist { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); overflow-wrap: anywhere; padding: 1px 0; }
.ap-x:focus-visible, .ap-yes:focus-visible, .ap-no:focus-visible, .ap-toggle:focus-visible, .ap-more:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }

@media (max-width: 700px) {
  .ap-row { grid-template-columns: 1fr; }
  .ap-act { flex-wrap: wrap; }
  .ap-yes, .ap-no, .ap-toggle { flex: 1; min-height: 40px; }
}
