/* AceMedEd Passport, audition planner.
   Redesigned 2026-11-05 to feel like a quiet personal tool rather than a product page:
   one plain heading, a sentence instead of stat tiles, an agenda-style to-do list, hairline rules
   instead of boxes, status words instead of colored pills. DM Sans stays (AceMedEd brand); orange is
   kept for small accents (the wordmark, ticked steps, confirmed rotations), not for decoration. */
:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --text: #1C1B19;
  --muted: #5E5A54;
  --faint: #8C877F;
  --line: #E7E3DD;
  --line-strong: #D5D0C8;
  --orange: #FF6B00;
  --blue: #2196F3;
  --link: #1F6FB8;
  --ok: #2F7D4F;
  --warn: #B3261E;
  --ink: #1C1B19;
  --on-ink: #FBFAF8;
  --soft: #F3F1ED;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171615;
    --surface: #1E1D1B;
    --text: #EDEBE7;
    --muted: #B7B2AA;
    --faint: #8A857D;
    --line: #2F2D2A;
    --line-strong: #403D39;
    --link: #7DB7F0;
    --ok: #74C48F;
    --warn: #F08A80;
    --ink: #EDEBE7;
    --on-ink: #171615;
    --soft: #24221F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "DM Sans", Arial, Helvetica, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 820px; margin: 0 auto; padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.wm { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.ace { color: var(--blue); } .med { color: var(--orange); }
.product { font-size: 15px; color: var(--muted); white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sync { font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-link { font-size: 15px; }
@media (max-width: 480px) { .sync { display: none; } }

main, .foot { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* Intro */
.intro { padding: 28px 0 4px; }
h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.lede { margin: 0; max-width: 600px; color: var(--muted); }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.summary { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.summary b { color: var(--text); font-weight: 700; }
.summary .sep { margin: 0 8px; color: var(--line-strong); }

/* Tabs + add */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 0 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 22px; }
.tabs button { border: 0; background: none; padding: 8px 0 10px; margin-bottom: -1px; font-size: 15px; font-weight: 500; color: var(--faint); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.toolbar .btn { margin-bottom: 8px; }

/* Buttons */
.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { opacity: 0.88; border-color: var(--ink); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--warn); border-color: var(--warn); background: transparent; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; font-size: inherit; }
.btn:focus-visible, .tabs button:focus-visible, .linkbtn:focus-visible, input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.panel { padding: 6px 0 28px; }
.empty { padding: 28px 0; color: var(--muted); max-width: 520px; }
.empty p { margin: 0 0 14px; }
.muted { color: var(--faint); font-size: 14px; margin: 6px 0 0; }

/* To do: an agenda, date on the left */
.group-h { margin: 22px 0 4px; font-size: 14px; font-weight: 700; color: var(--text); }
.task { display: grid; grid-template-columns: 76px 20px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 15px; font-weight: 400; color: var(--text); }
.task:first-of-type { border-top: 0; }
.t-date { display: flex; flex-direction: column; line-height: 1.25; }
.t-date b { font-weight: 700; font-size: 15px; }
.t-date small { font-size: 12px; color: var(--faint); }
.task.late .t-date b, .task.late .t-date small { color: var(--warn); }
.task input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--orange); }
.t-main { display: flex; flex-direction: column; min-width: 0; }
.t-title { font-weight: 500; }
.t-sub { font-size: 13px; color: var(--faint); }
@media (max-width: 420px) { .task { grid-template-columns: 60px 20px 1fr; gap: 10px; } }

/* Auditions */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card.archived { opacity: 0.6; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.card .where { font-size: 14px; color: var(--muted); }
.edit { font-size: 14px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.status.ok { color: var(--ok); } .status.ok::before { background: var(--ok); }
.status.warn { color: var(--warn); } .status.warn::before { background: var(--warn); }
.status.plain::before { display: none; }
.progress { display: flex; align-items: center; gap: 10px; }
.ticks { display: inline-flex; gap: 3px; }
.ticks i { width: 14px; height: 6px; border-radius: 2px; background: var(--soft); border: 1px solid var(--line); }
.ticks i.on { background: var(--orange); border-color: var(--orange); }
.progress-label { font-size: 13px; color: var(--faint); }
.checkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.checkgrid label { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; min-width: 0; padding: 2px 0; }
.checkgrid input { width: 16px; height: 16px; accent-color: var(--orange); flex: none; }
.meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 10px; }
.meta b { color: var(--text); font-weight: 600; }
.card .notes { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); max-height: 6.5em; overflow: hidden; }
.archived-h { margin-top: 28px; }

/* Timeline */
.tl { margin-top: 14px; overflow-x: auto; }
.tl-inner { min-width: 620px; position: relative; }
.tl-months, .tl-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; }
.tl-months .scale { position: relative; height: 22px; }
.tl-months .m { position: absolute; top: 0; font-size: 12px; color: var(--faint); padding-left: 4px; border-left: 1px solid var(--line); height: 22px; }
.tl-row { min-height: 38px; border-top: 1px solid var(--line); }
.tl-row .lbl { font-size: 14px; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-row .track { position: relative; height: 38px; }
.tl-row .grid-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tl-bar { position: absolute; top: 12px; height: 14px; border-radius: 4px; border: 1.5px solid var(--faint); background: var(--surface); }
.tl-bar.confirmed { border-color: var(--orange); background: var(--orange); }
.tl-dot { position: absolute; top: 13px; width: 11px; height: 11px; margin-left: -5px; transform: rotate(45deg); border: 1.5px solid var(--text); background: var(--bg); }
.tl-dot.done { background: var(--text); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--warn); z-index: 2; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--faint); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 18px; height: 9px; border-radius: 3px; border: 1.5px solid var(--faint); background: var(--surface); }
.sw.c { border-color: var(--orange); background: var(--orange); }
.sw.d { width: 9px; height: 9px; transform: rotate(45deg); border-color: var(--text); background: var(--bg); border-radius: 0; }
.sw.t { width: 1.5px; height: 13px; border: 0; background: var(--warn); border-radius: 0; }

/* Footer */
.foot { padding-top: 14px; padding-bottom: 44px; border-top: 1px solid var(--line); margin-top: 18px; }
.foot-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 14px; font-size: 14px; }
.fine { font-size: 13px; color: var(--faint); margin: 4px 0; }
.fine a { color: var(--muted); }

/* Dialogs */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(600px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(20, 18, 15, 0.45); }
dialog form, #accountBody { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
dialog h2 { margin: 0 0 2px; font-size: 20px; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid2, .checkgrid { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--text); font-size: 14px; }
label.inline input { width: 16px; height: 16px; accent-color: var(--orange); }
input:not([type="checkbox"]), select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: var(--bg); color: var(--text); font-weight: 400; font-size: 16px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); }
fieldset.checks { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 12px; margin: 0; }
fieldset.checks legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.dlg-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.error { color: var(--warn); font-size: 14px; margin: 0; }
.ok-msg { color: var(--ok); font-size: 14px; margin: 0; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gbtn { background: var(--surface); }
.gbtn svg { width: 18px; height: 18px; }
.row-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; }

/* Phones and touch screens: bigger tap targets, full-width sheets, room for the timeline. */
dialog { overflow: auto; overscroll-behavior: contain; }
@media (pointer: coarse) {
  .btn { min-height: 44px; padding: 10px 16px; }
  .tabs button { min-height: 44px; }
  .top-link, .edit, .foot-actions .linkbtn, .row-links .linkbtn { min-height: 44px; display: inline-flex; align-items: center; }
  .checkgrid label { min-height: 40px; }
  .checkgrid input, .task input, label.inline input { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  .top { padding: 12px 16px 10px; }
  .intro { padding-top: 20px; }
  h1 { font-size: 24px; }
  .toolbar { align-items: center; gap: 4px 12px; }
  .tabs { gap: 18px; }
  .toolbar .btn { margin: 6px 0 8px; }
  .cards { gap: 12px; }
  .card { padding: 14px 14px; }
  dialog { width: calc(100% - 16px); max-height: calc(100% - 16px); border-radius: 12px; }
  dialog form, #accountBody { padding: 16px; }
  .dlg-actions .btn { flex: 1 1 auto; }
  .dlg-actions .grow { display: none; }
  .tl-inner { min-width: 520px; }
  .tl-months, .tl-row { grid-template-columns: 110px 1fr; }
  .tl-row .lbl { font-size: 13px; }
  .legend { gap: 8px 14px; }
}
@media (max-width: 360px) {
  .product { font-size: 14px; }
  .tabs { gap: 14px; }
  .tabs button { font-size: 14px; }
}
@media (max-width: 560px) {
  /* Keep Save and Cancel in reach while scrolling a long form. */
  #editorForm .dlg-actions { position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 12px 16px 16px; background: var(--surface); border-top: 1px solid var(--line); }
}


/* Account page (accounts.acemeded.com), added 2026-11-05: the same quiet Passport look, one column. */
.top { max-width: 560px; }
main.acct { max-width: 560px; padding: 28px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
main.acct h1 { margin: 0; }
main.acct form { display: flex; flex-direction: column; gap: 12px; }
.foot { max-width: 560px; }
.sec { margin: 14px 0 0; font-size: 16px; font-weight: 700; }
.saved { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.saved li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.saved .status { font-size: 14px; color: var(--muted); }
.danger-zone { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.danger-zone p { margin: 6px 0 10px; }
@media (pointer: coarse) { .row-links .linkbtn { min-height: 44px; display: inline-flex; align-items: center; } }
