/* Focus: quiet, narrow, server-rendered. Tokens from docs/06-ui-specification.md. */
:root {
  --text: #22262b;
  --secondary: #68717a;
  --muted: #6e7680;
  --line: #e7e9ec;
  --field: #cad0d6;
  --hover: #f7f8fa;
  --amber: #996115;
  --amber-edge: #b68436;
  --amber-detail: #786d5f;
  --warm: #fffbf3;
  --green: #5e8672;
  --gray: #a4abb2;
  --focus: #365f89;
  --outline: #89939d;
  --danger: #994d45;
  /* Type scale in rem (16 px browser default), so browser and OS font settings apply. */
  --text-main: 1.0625rem;
  --text-secondary: .9375rem;
  --text-small: .875rem;
  --text-label: .8125rem;
  --text-input: 1rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: var(--text-main)/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.panel { max-width: 32.5rem; margin: 20px auto 48px; padding: 0 24px; }

.date-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.date-row form { margin: 0; }
.date { margin: 0; font-size: var(--text-label); font-weight: 600; letter-spacing: .06em; color: var(--secondary); }
.sign-out { min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: var(--text-small); color: var(--muted); }

.connection { margin: -8px 0 20px; font-size: var(--text-small); color: var(--secondary); }
.connection button, .connection a {
  min-height: 44px; padding: 0 8px; border: 0; background: none;
  font-size: var(--text-small); color: var(--text); text-decoration: underline;
}

section { margin: 0 0 26px; }
h2 { margin: 0 0 9px; font-size: var(--text-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--secondary); }
h2:focus { outline: none; }
h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.count { margin-left: 8px; letter-spacing: 0; font-weight: 400; color: var(--muted); }
ul { list-style: none; margin: 0; padding: 0; }
.empty { margin: 0; padding: 5px 0 7px; font-size: var(--text-secondary); color: var(--secondary); }
.divider { margin: 0 0 23px; border: 0; border-top: 1px solid var(--line); }

/* Tasks */
.task { position: relative; display: flex; align-items: center; min-height: 44px; border-radius: 5px; }
.task:hover, .task:focus-within { background: var(--hover); }
.task form { margin: 0; }
.complete { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; background: transparent; }
.circle { width: 18px; height: 18px; border: 1.5px solid var(--outline); border-radius: 50%; }
.complete:hover .circle { border-color: var(--secondary); }
.task-title { flex: 1; min-width: 0; padding: 9px 0; overflow-wrap: anywhere; }
.task-menu { position: relative; align-self: flex-start; }
.task-menu > summary {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 5px;
  list-style: none; color: var(--secondary); font-size: 22px; letter-spacing: 2px; line-height: 1;
  cursor: pointer; opacity: 0;
}
.task-menu > summary::-webkit-details-marker { display: none; }
.task:hover .task-menu > summary, .task:focus-within .task-menu > summary, .task-menu[open] > summary { opacity: 1; }
.menu {
  position: absolute; top: 42px; right: 4px; z-index: 3; width: 168px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 5px 14px #0000000d;
}
.menu form { margin: 0; }
.menu button {
  display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 3px;
  background: none; text-align: left; font-size: var(--text-secondary);
}
.menu button:hover:not(:disabled), .menu button:focus-visible { background: var(--hover); }
.menu button:disabled { color: var(--muted); cursor: default; }
.menu .delete { color: var(--danger); }
.drag { position: absolute; left: -17px; width: 16px; font-size: 14px; color: var(--outline); cursor: grab; opacity: 0; }
.task:hover .drag { opacity: 1; }
.task.dragging { opacity: .5; }

.add { min-height: 44px; margin-left: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: var(--text-input); text-align: left; }
.editor { margin: 5px 0 8px 44px; }
.editor input {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--field); border-radius: 5px;
  background: #fff; font-size: var(--text-input);
}
.field-error { margin: 6px 0 0 44px; font-size: var(--text-secondary); color: var(--danger); }
.notice { margin: 6px 0 0 44px; font-size: var(--text-secondary); color: var(--amber); }

/* Sessions */
.agent { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 9px; min-height: 56px; padding: 9px 0; }
.dot { width: 7px; height: 7px; margin-top: 9px; justify-self: center; border-radius: 50%; background: var(--green); }
.dot.stale, .is-offline .dot { background: var(--gray); }
.name { font-size: var(--text-main); font-weight: 500; overflow-wrap: anywhere; }
.detail { margin-top: 2px; font-size: var(--text-secondary); color: var(--secondary); overflow-wrap: anywhere; }
.attention {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 9px; min-height: 64px;
  margin: 0 0 7px; padding: 10px 10px 10px 8px; background: var(--warm); border-left: 2px solid var(--amber-edge);
}
.attention form { margin: 0; align-self: center; }
.attention-icon { justify-self: center; margin-top: 1px; font-weight: 600; color: var(--amber); }
.attention .detail { color: var(--amber-detail); }
.seen { min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: var(--text-secondary); color: var(--amber); }
.stale-note { display: block; margin-top: 3px; font-size: var(--text-small); color: var(--secondary); }
.row-notice { grid-column: 2 / -1; margin: 4px 0 0; font-size: var(--text-small); color: var(--amber); }

/* Sign in and error pages */
.sign-in-title { margin: 0 0 18px; font-size: var(--text-label); font-weight: 600; letter-spacing: .06em; color: var(--secondary); text-transform: uppercase; }
.sign-in form { display: grid; gap: 6px; }
.sign-in label { margin-top: 8px; font-size: var(--text-secondary); color: var(--secondary); }
.sign-in input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--field); border-radius: 5px; background: #fff; }
.sign-in button[type="submit"] {
  justify-self: start; min-height: 44px; margin-top: 12px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--hover);
}
.form-error { margin: 4px 0; font-size: var(--text-secondary); color: var(--danger); }
.error-page { margin: 40px 0 8px; }

@media (hover: none) {
  .task-menu > summary { opacity: 1; }
  .drag { display: none; }
}
@media (max-width: 379px) {
  .panel { margin-top: 14px; padding: 0 16px; }
  .drag { left: -12px; width: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
