:root {
  color-scheme: light;
  --workspace: #f4f7fb;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #5b6575;
  --line: #d7deea;
  --accent: #2457f5;
  --accent-deep: #1236a3;
  --danger: #9f2d1d;
  font-family: Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--workspace);
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { border-color: var(--accent); color: var(--accent-deep); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover, .button.primary:hover { background: var(--accent-deep); }
button:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input, select, textarea { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-weight: 650; margin-bottom: 6px; }
p { margin: 8px 0 16px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2.4rem; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: 1.45rem; margin: 0 0 6px; }
h3 { font-size: 1.05rem; margin: 0; }
/* Match the homepage header, including its compact mobile navigation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 246, 251, 0.88);
  border-bottom: 1px solid rgba(214, 222, 234, 0.9);
  backdrop-filter: blur(16px);
  line-height: 1.5;
}
.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; min-width: 0; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}
.brand-text { display: grid; gap: 2px; min-width: 0; }
.brand-text strong { color: var(--ink); font-weight: 850; line-height: 1.1; white-space: nowrap; }
.brand-text small { color: #586374; font-size: .94rem; font-weight: 700; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #1535a7;
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { background: #ffffff; border-color: #d6deea; }
.schedule-shell { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
main.schedule-shell { padding-block: 48px 24px; }
.intro { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.name-panel { background: var(--surface); border: 1px solid var(--line); padding: 24px; border-radius: 16px; }
.name-panel select { font-size: 1.1rem; }
.hint { color: var(--muted); font-size: .95rem; }
.name-panel .hint { margin-bottom: 0; }
#status { color: var(--muted); }
.agenda-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 34px; }
.agenda-heading p { margin-bottom: 0; }
.agenda-heading .primary { flex-shrink: 0; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 650; color: var(--accent-deep); }
details p:first-of-type { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; }
.copy-row { display: flex; gap: 8px; }
.filter-row { display: flex; gap: 12px; align-items: center; margin-block: 26px 18px; }
.filter-row label { margin: 0; }
.filter-row select { width: auto; }
.day-group { margin-bottom: 28px; }
.day-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.day-title span { color: var(--muted); font-size: .9rem; }
.session-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 18px; padding: 18px 20px; background: white; border: 1px solid var(--line); border-bottom: 0; }
.session-row:first-of-type { border-radius: 12px 12px 0 0; }
.session-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.session-row:only-of-type { border-radius: 12px; }
.session-time { font-weight: 750; font-variant-numeric: tabular-nums; }
.session-detail p { margin: 0; }
.session-detail .hint { margin-top: 3px; }
.role { align-self: start; font-size: .85rem; padding: 3px 9px; border-radius: 12px; color: var(--accent-deep); background: #eaf0fb; font-weight: 650; }
.role.secondary { background: var(--workspace); color: var(--muted); }
.notice { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.error { color: var(--danger) !important; }
footer.schedule-shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-block: 24px 40px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.skip-link { position: absolute; left: 12px; top: -100px; padding: 12px; background: white; }
.skip-link:focus { top: 10px; z-index: 1000; }
.editor-section { margin-top: 26px; scroll-margin-top: 92px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full-width { grid-column: 1 / -1; }
.edit-list { display: grid; gap: 8px; margin-top: 16px; }
.edit-list button { text-align: left; justify-content: space-between; gap: 12px; }
.edit-list button[aria-pressed="true"] { border-color: var(--accent); background: #eaf0fb; }
.edit-list button span { font-size: .9rem; color: var(--muted); }
.save-bar { position: sticky; bottom: 0; padding: 16px 0; background: var(--workspace); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; z-index: 2; }
.save-bar p { margin: 0; }
.danger-button { color: var(--danger); }
.sign-in-row { display: flex; gap: 10px; }
.admin-state { color: var(--muted); }
@media (max-width: 620px) {
  .header-inner { width: min(100% - 28px, 1180px); flex-wrap: wrap; min-height: 64px; gap: 8px; padding: 10px 0 12px; }
  .brand-text small { display: none; }
  .brand { width: 100%; }
  .site-nav { width: 100%; justify-content: flex-start; }
  .site-nav a { flex: 1 1 0; padding: 0 8px; }
  .editor-section { scroll-margin-top: 148px; }
}
@media (max-width: 600px) {
  main.schedule-shell { padding-top: 30px; }
  h1 { font-size: 1.9rem; }
  .name-panel { padding: 18px; }
  .agenda-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .session-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 16px; }
  .session-time { grid-column: 1; }
  .session-detail { grid-column: 1 / -1; grid-row: 2; }
  .role { grid-column: 2; grid-row: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .edit-list button { flex-direction: column; align-items: flex-start; }
  .save-bar { align-items: stretch; flex-direction: column; gap: 8px; }
}

/* Keep every header destination available on phones and narrow tablets. */
@media (max-width: 960px) {
  .site-header {
    position: static;
  }

  .site-header .header-inner {
    display: flex !important;
    flex-wrap: wrap;
    min-height: 0;
    gap: 8px;
    padding-block: 10px 12px;
  }

  .site-header .brand {
    width: 100%;
    min-width: 0;
  }

  .site-header .site-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)) !important;
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .site-header .site-nav a {
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .site-header .brand strong {
    white-space: normal;
  }
}
