/* Conference agenda.
   Tokens measured from the live Adobe MAX catalogue: flat cards with hairline
   borders and no shadows, one hot red accent, heavy pill outlines.
   Light only, because the source is. Mobile first throughout. */

:root {
  --red: #EB1000;          /* format badge */
  --green: #0AA35B;        /* type badge */
  --pink: #FC8096;         /* level badge */
  --ink: #000;
  --ink-2: #444;
  --ink-3: #6b6b6b;
  --rule: #ccc;
  --rule-2: #e6e6e6;
  --bg: #fff;
  --bg-2: #f5f5f5;
  --link: #1570EF;
  --focus: #1570EF;
  --tap: 44px;             /* minimum touch target */
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* A class that sets display outranks the UA rule for [hidden]; without this
   every element toggled with .hidden stays on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Adobe Clean", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;      /* belt and braces against the source's own bug */
  padding-bottom: calc(64px + var(--safe-b));
}

.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;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; padding: .6rem 1rem; border: 2px solid var(--ink);
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------------- header ---------------- */

.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: .6rem .75rem .5rem;
}

.top-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.logo { height: 20px; width: auto; }

.unofficial {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-2);
  border: 1px solid var(--ink-2); border-radius: 4px; padding: 1px 6px;
}

.controls { display: flex; gap: .5rem; margin-top: .5rem; }

.search-wrap { flex: 1; min-width: 0; }
.search-wrap input {
  width: 100%; height: var(--tap);
  /* 16px keeps iOS from zooming the viewport on focus */
  font: inherit; font-size: 16px;
  padding: 0 .8rem;
  border: 1px solid var(--rule); border-radius: 22px;
  background: var(--bg); color: var(--ink);
}

.btn {
  font: inherit; font-size: 15px; cursor: pointer;
  min-height: var(--tap); padding: 0 1rem;
  border-radius: 22px; white-space: nowrap;
}
.btn-ghost { background: var(--bg); color: var(--ink); border: 2px solid var(--ink); }
.btn-solid { background: var(--ink); color: #fff; border: 2px solid var(--ink); }

.pill-n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  margin-left: .4rem; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
}

.statusbar { display: flex; gap: .4rem; margin-top: .5rem; overflow-x: auto; scrollbar-width: none; }
.statusbar::-webkit-scrollbar { display: none; }

.chip-status {
  position: relative;
  display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: 12px; cursor: pointer;
  min-height: 32px; padding: 0 .7rem; white-space: nowrap;
  border: 1px solid var(--rule); border-radius: 16px;
  background: var(--bg); color: var(--ink-2);
}

/* Small controls keep their visual size but get a 44px touch target, rather
   than inflating the layout. The source ships a 24px favourite button. */
.chip-status::after,
.sp-more::after,
.note-btn::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: 50%; height: 44px; transform: translateY(-50%);
}
.chip-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chip-status[data-state="off"] { border-color: var(--red); color: var(--red); }
.chip-status[data-state="off"] .dot { background: var(--red); }
.chip-status[data-state="sync"] .dot { background: #d2a106; }
.chip-status[data-sim="yes"] { border-color: var(--red); color: var(--red); font-weight: 600; }

body.simulated .top { box-shadow: inset 0 -3px 0 var(--red); }

/* ---------------- tabs ---------------- */

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-bottom: var(--safe-b);
}
.tab {
  flex: 1; font: inherit; font-size: 14px; font-weight: 600;
  min-height: 56px; cursor: pointer;
  background: none; border: 0; border-top: 3px solid transparent;
  color: var(--ink-3);
}
.tab.is-on { color: var(--ink); border-top-color: var(--red); }
.tab-n {
  display: inline-block; margin-left: .3rem; padding: 0 6px;
  border-radius: 9px; background: var(--bg-2); font-size: 12px; color: var(--ink-2);
}

/* ---------------- views ---------------- */

.view { display: none; padding: .75rem; }
.view.is-on { display: block; }

.result-line { margin: .25rem 0 .75rem; font-size: 13px; color: var(--ink-3); }

.active-filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.af {
  display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: 12px; cursor: pointer;
  min-height: 32px; padding: 0 .6rem;
  border: 1px solid var(--ink); border-radius: 16px; background: var(--bg);
}

.ses-list { list-style: none; margin: 0; padding: 0; }

.ses {
  /* off-screen sessions cost nothing to render; there are 149 of them */
  content-visibility: auto;
  contain-intrinsic-size: auto 230px;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 12px 20px;
  margin-bottom: 12px;
}

.ses-head { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.bdgs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }

.bdg {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  line-height: 18px; padding: 0 6px; border-radius: 4px;
  border: 1px solid var(--ink-2); color: var(--ink-2);
}
.bdg-format { background: var(--red); border-color: var(--red); color: #fff; }
.bdg-type { background: var(--green); border-color: var(--green); color: #000; }
.bdg-technicallevel { background: var(--pink); border-color: var(--pink); color: #000; }

/* The source ships a 24px star. This one is a real target. */
.star {
  flex: 0 0 auto;
  width: var(--tap); height: var(--tap);
  margin: -10px -6px -10px 0;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; cursor: pointer;
  background: none; border: 0; color: var(--rule);
}
.star[aria-pressed="true"] { color: var(--red); }

.ses h3 { font-size: 16px; font-weight: 400; line-height: 1.4; color: var(--ink-2); margin: 0 0 .3rem; }
.cd { margin: 0 0 .5rem; font-size: 11px; color: var(--ink-3); letter-spacing: .03em; }

.tm { list-style: none; margin: 0 0 .6rem; padding: 0; }
.tm li { font-size: 13px; font-weight: 600; color: var(--ink); }

.ab {
  margin: 0; font-size: 14px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ses.open .ab { -webkit-line-clamp: unset; overflow: visible; }

.ab-more {
  position: relative;
  font: inherit; font-size: 13px; cursor: pointer;
  min-height: 36px; margin-top: .3rem; padding: 0 .7rem 0 0;
  background: none; border: 0; color: var(--link); text-align: left;
}
.ab-more::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: 50%; height: 44px; transform: translateY(-50%);
}

.sps { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.sp { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sp-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg-2); flex: 0 0 auto; }
.sp-ini { display: grid; place-items: center; font-weight: 700; color: var(--ink-3); }
.sp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sp-txt b { font-size: 13px; font-weight: 600; }
.sp-txt i { font-size: 12px; font-style: normal; color: var(--ink-3); }
/* Company is visually distinct from job title, so "Director, Marketing" and
   "NVIDIA" cannot be misread as one string. */
.sp-org { color: var(--ink-2); font-weight: 500; }
.sp-more {
  position: relative;
  font: inherit; font-size: 12px; cursor: pointer;
  min-height: 32px; min-width: 46px; padding: 0 .6rem;
  border: 1px solid var(--rule); border-radius: 16px; background: var(--bg); color: var(--ink-2);
}
.sp-bio-text { flex: 1 0 100%; margin: .3rem 0 0; font-size: 13px; color: var(--ink-2); }

.note-wrap { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--rule-2); }
.note-btn {
  position: relative;
  font: inherit; font-size: 13px; cursor: pointer;
  min-height: 36px; padding: 0 .8rem;
  border: 1px dashed var(--rule); border-radius: 18px; background: var(--bg); color: var(--ink-3);
}
.note-btn.has-note { border-style: solid; border-color: var(--ink); color: var(--ink); }
.note-preview { margin: .4rem 0 0; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }
.note-input {
  width: 100%; margin-top: .5rem; font: inherit; font-size: 16px;
  padding: .5rem; border: 1px solid var(--rule); border-radius: 6px; resize: vertical;
}
.note-save { margin-top: .5rem; }

.empty { text-align: center; color: var(--ink-3); font-size: 14px; padding: 2rem 1rem; }

/* ---------------- agenda ---------------- */

.banner {
  position: sticky; top: 118px; z-index: 20;
  border: 2px solid var(--ink); border-radius: 8px;
  padding: .7rem .8rem; margin-bottom: .8rem; background: var(--bg);
}
.banner.soon { border-color: var(--red); background: #fff5f4; }
.banner-k { margin: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.banner-t { margin: .2rem 0 .1rem; font-size: 16px; font-weight: 600; }
.banner-m { margin: 0; font-size: 12px; color: var(--ink-3); }
.banner-c { margin: .35rem 0 0; font-size: 14px; font-weight: 700; }

.conflicts { border: 2px solid var(--red); border-radius: 8px; padding: .7rem .8rem; margin-bottom: .8rem; }
.conflicts-h { margin: 0 0 .4rem; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }
.conflicts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.conflicts li { font-size: 13px; }
.c-when { display: block; font-size: 12px; color: var(--ink-3); margin-top: .15rem; }

.day { margin-bottom: 1.2rem; }
.day h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 .5rem; }
.day ul { list-style: none; margin: 0; padding: 0; }
.ag-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: .1rem .6rem;
  align-items: start; padding: .6rem 0; border-bottom: 1px solid var(--rule-2);
}
.ag-time { font-size: 12px; font-weight: 700; white-space: nowrap; padding-top: 2px; }
.ag-title { font-size: 14px; }
.ag-note { grid-column: 2; font-size: 12px; color: var(--ink-3); white-space: pre-wrap; }
.ag-item.past { opacity: .45; }
.ag-item.clash .ag-time { color: var(--red); }
.ag-item .star { width: 40px; height: 40px; margin: -6px -6px 0 0; font-size: 18px; }

/* ---------------- bottom sheets ---------------- */

.sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
body.sheet-open { overflow: hidden; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 85vh; display: flex; flex-direction: column;
  background: var(--bg); border-top: 1px solid var(--rule);
  border-radius: 16px 16px 0 0;
  padding-bottom: var(--safe-b);
}
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--rule); margin: .5rem auto .25rem; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .75rem .5rem; }
.sheet-top h2 { margin: 0; font-size: 16px; }
.sheet-body { overflow-y: auto; padding: 0 .75rem 1rem; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: .6rem .75rem; border-top: 1px solid var(--rule-2); }
.sheet-foot .btn { width: 100%; }

.facet { margin-bottom: 1rem; }
.facet h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: 13px; cursor: pointer;
  min-height: var(--tap); padding: 0 .8rem;
  border: 1px solid var(--rule); border-radius: 22px;
  background: var(--bg); color: var(--ink); text-align: left;
}
.chip[aria-pressed="true"] { border-color: var(--ink); border-width: 2px; font-weight: 600; }
/* Adding this value to the current selection would return nothing. Still
   tappable, just visibly a dead end. */
.chip.is-empty { opacity: .4; }
.chip-n { font-size: 11px; color: var(--ink-3); }
.chip[aria-pressed="true"] .chip-n { color: var(--ink-2); }

.preset-primary { border-color: var(--red); border-width: 2px; color: var(--red); font-weight: 600; }

.hint { font-size: 13px; color: var(--ink-3); margin: 0 0 .7rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin: .8rem 0; font-size: 13px; color: var(--ink-3); }
.field input { font: inherit; font-size: 16px; min-height: var(--tap); padding: 0 .6rem; border: 1px solid var(--rule); border-radius: 8px; }

/* ---------------- toasts + footer ---------------- */

.toast-stack {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(72px + var(--safe-b)); z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  width: max-content; max-width: 92vw; pointer-events: none;
}
.toast {
  background: #24262c; color: #fff; font-size: 13px;
  padding: .5rem .9rem; border-radius: 8px; text-align: center;
}

.foot { padding: 1.2rem .75rem 1rem; border-top: 1px solid var(--rule-2); }
.demo-note { margin: 0 0 .3rem; font-size: 10px; line-height: 1.5; color: var(--ink-3); text-align: center; }

/* ---------------- no JS ---------------- */

html:not(.js) .tabs,
html:not(.js) .controls,
html:not(.js) .statusbar,
html:not(.js) .sheet,
html:not(.js) #view-agenda { display: none; }
html:not(.js) .view { display: block; }

html:not(.js) body { padding-bottom: 1rem; }

/* With JS the speaker list is a data store the app reads from. Without it, it
   is the only place speaker names appear at all, since session cards reference
   speakers by id. Using [hidden] here would be dead markup: the
   [hidden]{display:none!important} rule above outranks any :not(.js) override. */
html.js #pl-speakers { display: none; }
#pl-speakers { list-style: none; margin: 0; padding: .75rem; }
#pl-speakers > li { padding: .6rem 0; border-bottom: 1px solid var(--rule-2); }
#pl-speakers b { display: block; font-size: 14px; }
#pl-speakers i { font-style: normal; font-size: 12px; color: var(--ink-3); margin-right: .5rem; }
#pl-speakers p { margin: .3rem 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------------- wider screens ---------------- */

@media (min-width: 700px) {
  .view { max-width: 760px; margin: 0 auto; padding: 1rem; }
  .top { padding: .75rem 1rem; }
  .banner { top: 128px; }
}

@media (min-width: 1000px) {
  .view { max-width: 900px; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
