/* me.css: the member pages (U1, My profile; owner: MEMBER). Served at
   /me/assets/me.<hash>.css after public.css, whose tokens and components
   it reuses. Every class the member pages emit that public.css does not
   style has a rule here. Colours are tokens only. */

/* The profile tabs: thirteen of them wrap in rows (the public Motortown row
   holds five). */
.me-tabs .pub-subnav-list { row-gap: 0; }
@media (max-width: 640px) {
  .me-tabs .pub-subnav-list { grid-template-columns: 1fr 1fr 1fr; }
  .me-tabs .pub-subnav-list > li:last-child:nth-child(odd) { grid-column: auto; }
  .me-tabs .pub-subnav-link { padding: 0 10px; font-size: 12px; }
}

/* Notes, empty states, the answer time */
.me-note {
  max-width: 46em;
  margin-top: 16px;
  color: var(--text-subtle);
  font-size: 14px;
}
.me-empty { margin-top: 20px; }
.me-asof {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.me-more {
  margin-left: 12px;
  font-size: 13px;
  font-weight: 500;
}
.me-nav { flex-wrap: wrap; margin-top: 24px; }
.me-table { min-width: 560px; }

/* The sessions calendar: a month per table, a shade per day */
.me-heat-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 24px;
}
.me-heat { border-collapse: separate; border-spacing: 4px; }
.me-heat th {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.me-heat abbr { text-decoration: none; }
.me-heat td {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.me-heat td:empty { background: none; }
.me-heat-0 { background: var(--surface); border: 1px solid var(--line); }
.me-heat-1 { background: var(--info-bg); border: 1px solid var(--info-line); }
.me-heat-2 { background: var(--info-line); border: 1px solid var(--info-line); color: var(--text); }
.me-heat-3 { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); }
td.me-heat-2, td.me-heat-3 { font-weight: 700; }
.me-heat-key {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-subtle);
  font-size: 12px;
}
.me-heat-key span { display: inline-block; width: 14px; height: 14px; }

/* Chat */
.me-chat {
  max-width: 60em;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.me-chat-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--row-line);
}
.me-chat-line .pub-time { flex: 0 0 auto; color: var(--text-subtle); font-size: 13px; }
.me-chat-text { flex: 1 1 280px; min-width: 0; color: var(--text); overflow-wrap: anywhere; }

/* The drives map */
.me-map-wrap { margin-top: 24px; }
.me-map {
  width: 100%;
  height: 560px;
  max-height: 70vh;
  background: var(--surface-deep);
  border: 1px solid var(--line);
}
.me-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
}
.me-map-controls label { color: var(--text-nav); font-size: 14px; font-weight: 600; }
.me-map-controls input[type="range"] { flex: 1 1 260px; min-width: 0; accent-color: var(--accent); }
.me-map-time { color: var(--text); font-family: var(--font-mono); font-size: 13px; }

/* MotorPedia edits (owner 2026-11-22; INTERFACES 31.14): the result box,
   the section list, plain server-built forms, builds and votes. */
.me-result {
  max-width: 46em;
  margin-bottom: 24px;
  padding: 20px 24px;
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
}
.me-result[data-me-state="ok"] { border-color: var(--ok-line); background: var(--ok-bg); }
.me-result[data-me-state="info"] { border-color: var(--info-line); background: var(--info-bg); }
.me-result-title { color: var(--text); font-size: 17px; font-weight: 700; }
.me-result-text { margin-top: 6px; color: var(--text-muted); overflow-wrap: anywhere; }
.me-result-more { margin-top: 10px; font-size: 14px; }
.me-lead-note { max-width: 46em; color: var(--text-muted); }
.me-cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.me-cat-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-control);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.me-cat-link:hover { border-color: var(--accent); }
.me-cat-link[aria-current="page"] { border-color: var(--accent); background: var(--row-selected); }
.me-cat-label { font-weight: 700; }
.me-cat-text { color: var(--text-subtle); font-size: 13px; }
.me-form { max-width: 46em; margin-top: 24px; }
.me-form-inline { display: block; margin-top: 12px; }
.me-field { margin: 0 0 20px; padding: 0; border: 0; }
.me-label { display: block; margin-bottom: 6px; color: var(--text-nav); font-size: 14px; font-weight: 600; }
.me-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--field);
  color: var(--text);
  font: inherit;
}
.me-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.me-input[aria-invalid="true"] { border-color: var(--danger-line); }
.me-textarea { min-height: 120px; resize: vertical; }
.me-hint { margin-top: 6px; color: var(--text-subtle); font-size: 13px; overflow-wrap: anywhere; }
.me-field-error { margin-top: 6px; color: var(--danger-text); font-size: 14px; font-weight: 600; }
.me-form-actions { flex-wrap: wrap; margin-top: 8px; }
.me-form button, .me-form-inline button { cursor: pointer; }
.me-tag-list { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.me-tag-list li { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.me-check { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.me-dealer { max-width: 46em; margin-top: 16px; }
.me-builds { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.me-build { max-width: 60em; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.me-build-code { color: var(--text); font-family: var(--font-mono); font-size: 18px; font-weight: 700; }
.me-build-tags { margin-top: 10px; }
.me-build-text { margin-top: 10px; color: var(--text-muted); overflow-wrap: anywhere; }
.me-build-link { margin-top: 8px; color: var(--text-subtle); font-size: 13px; overflow-wrap: anywhere; }
.me-details { margin-top: 14px; }
.me-details > summary { color: var(--link); font-weight: 600; cursor: pointer; }
.me-btn-small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.me-vote-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.me-vote { min-width: 44px; min-height: 44px; padding: 0 12px; }
.me-vote[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.me-changes { margin: 0; padding: 0; list-style: none; }
.me-change-label { color: var(--text-subtle); }

@media (max-width: 640px) {
  .me-map { height: 420px; }
  .me-heat td { width: 30px; height: 30px; }
}

@media (forced-colors: active) {
  .me-heat-1, .me-heat-2, .me-heat-3 { forced-color-adjust: none; }
}
