/* MassanApp prototype — mobile-first stylesheet.
   Target viewport is a 360-430 CSS-pixel-wide phone in portrait. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --accent: #0b3d91;
  --accent-ink: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --pad: 16px;
  --chrome-h: 56px;
  --sim-h: 28px;
  --max-w: 560px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sim-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--sim-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fde68a;
  color: #78350f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 20;
}

.chrome {
  position: fixed;
  top: var(--sim-h);
  left: 0;
  right: 0;
  height: var(--chrome-h);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.chrome__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chrome__back,
.chrome__me {
  appearance: none;
  background: none;
  border: none;
  padding: 10px 8px;
  min-height: 44px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.chrome__back {
  justify-self: start;
}

.chrome__me {
  justify-self: end;
}

.view {
  padding-top: calc(var(--sim-h) + var(--chrome-h) + var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-bottom: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.view__body {
  display: block;
}

.filters {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.filters__search input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.filters__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filters__row select {
  width: 100%;
  padding: 10px 8px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 44px;
}

.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.events__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.events__link {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

.events__type {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.events__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.events__dates {
  font-size: 14px;
  color: var(--ink-muted);
}

.events__summary {
  font-size: 14px;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
}

.event-hero__type {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.event-hero__name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.event-hero__dates {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.event-hero__summary {
  margin: 4px 0 0 0;
  font-size: 15px;
}

.event-hero__cta {
  margin-top: 10px;
  appearance: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
}

.event-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.event-nav::-webkit-scrollbar {
  display: none;
}

.event-nav__tab {
  flex: 0 0 auto;
  appearance: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
  white-space: nowrap;
}

.event-nav__tab--active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.event-subview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 160px;
}

.placeholder {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

/* Subview shared: lists spaced inside the event-subview card. */
.news-list,
.articles-list,
.exhibitor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.news-item,
.article {
  display: grid;
  gap: 4px;
}

.news-item + .news-item,
.article + .article {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.news-item__date {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.news-item__title,
.article__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.news-item__body,
.article__body {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

/* Program: day heading + sessions. */
.program-day + .program-day {
  margin-top: 20px;
}

.program-day__heading {
  margin: 0 0 10px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.program-day__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.session {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.session__time {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.session__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.session__meta,
.session__speakers {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.session__description {
  margin: 2px 0 0 0;
  font-size: 14px;
}

/* Exhibitor index cards. */
.exhibitor-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.exhibitor-card__link {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

.exhibitor-card__name {
  font-size: 15px;
  font-weight: 600;
}

.exhibitor-card__booth {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.exhibitor-card__desc {
  font-size: 13px;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Exhibitor detail. */
.back-link {
  appearance: none;
  background: none;
  border: none;
  padding: 8px 0;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.exhibitor-detail {
  display: grid;
  gap: 8px;
}

.exhibitor-detail__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.exhibitor-detail__booth {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.exhibitor-detail__desc {
  margin: 0;
  font-size: 14px;
}

.exhibitor-detail__link {
  word-break: break-all;
  color: var(--accent);
}

/* Practical information sections. */
.practical {
  display: grid;
  gap: 18px;
}

.practical__section h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
}

.practical__section p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.practical__note {
  color: var(--ink-muted);
  font-size: 13px;
}

.practical__section ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  display: grid;
  gap: 6px;
}

.overrides {
  margin: 0;
  display: grid;
  gap: 10px;
}

.overrides__item {
  display: grid;
  gap: 2px;
}

.overrides__item dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.overrides__item dd {
  margin: 0;
  font-size: 14px;
}

.hint {
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

/* Auth view — register and sign-in. */
.auth-card {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px;
}

.auth-tabs__tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}

.auth-tabs__tab--active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form__field {
  display: grid;
  gap: 6px;
}

.auth-form__label {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}

.auth-form__field input {
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 44px;
}

.auth-form__error {
  margin: 0;
  font-size: 13px;
  color: #b91c1c;
}

.auth-form__submit {
  appearance: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.auth-social {
  display: grid;
  gap: 8px;
}

.auth-social__button {
  appearance: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sim-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fde68a;
  color: #78350f;
  padding: 2px 8px;
  border-radius: 999px;
}

/* My Pages. */
.me {
  display: grid;
  gap: 18px;
}

.me--signed-out {
  gap: 12px;
  text-align: center;
}

.me__header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.me__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.me__email {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.me__provider {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.me__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.me__link {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  width: 100%;
  text-align: left;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.me__link-hint {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.me__section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.me__section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.newsletter {
  display: grid;
  gap: 12px;
}

.newsletter-form {
  display: grid;
  gap: 12px;
}

.newsletter-form__intro {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.newsletter-form__topics {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 8px;
  margin: 0;
}

.newsletter-form__topics legend {
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.newsletter-form__topic {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.newsletter-form__topic input {
  width: 18px;
  height: 18px;
}

.newsletter-success {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.newsletter-success__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.newsletter-success__body {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.newsletter-success__edit {
  appearance: none;
  background: none;
  border: none;
  padding: 4px 0;
  text-align: left;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.newsletter-prefs__venue-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.newsletter-prefs__venue-label {
  display: grid;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
}

.newsletter-prefs__venue-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
}

.newsletter-prefs__venue-row input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.newsletter-prefs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.newsletter-prefs__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--bg);
}

.newsletter-prefs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.newsletter-prefs__event {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.newsletter-prefs__unsubscribe {
  appearance: none;
  background: none;
  border: none;
  padding: 4px 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.newsletter-prefs__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.newsletter-prefs__topic label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.newsletter-prefs__topic input {
  width: 18px;
  height: 18px;
}

.me__signout {
  appearance: none;
  background: var(--surface);
  color: #b91c1c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 30;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

@media (min-width: 600px) {
  .events__link {
    padding: 18px 20px;
  }
}
