/* Discovery's faceted workspace: the chosen design study, using real controls. */
html.workspace-page { background: #f7f5f0; background-image: none; --workspace-ink: #252d3c; --workspace-muted: #697183; --workspace-line: #e4e2e9; --workspace-rust: #a42310; --workspace-purple: #7138db; }
html.workspace-page::before, html.workspace-page::after { display: none; }
.workspace-page body.discovery-shell { width: calc(100% - 72px); max-width: 1440px; color: var(--workspace-ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.workspace-page body > .bg-white { background: transparent; overflow: visible; border-radius: 0; }
.discovery-workspace { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; padding: 30px; background: #f8f8fb; border: 1px solid var(--workspace-line); border-radius: 22px; }
.workspace-filters { min-width: 0; border-right: 1px solid var(--workspace-line); padding-right: 25px; }
.workspace-results { min-width: 0; }
.workspace-eyebrow { margin: 0 0 12px; color: var(--workspace-muted); font-size: 11px; line-height: 1.5; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.workspace-introduction h1 { margin: 0 0 22px; color: var(--workspace-ink); font: 750 30px/1.16 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.discovery-workspace #discovery-panel { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
.discovery-workspace #discovery-panel > summary { font-size: 23px; font-weight: 750; letter-spacing: -.025em; color: var(--workspace-ink); margin-bottom: 18px; }
.discovery-workspace #discovery-panel > summary::marker { font-size: 13px; }
.discovery-workspace #search-input { min-height: 47px; height: 47px; border: 1px solid #d8d5df; border-radius: 9px; box-shadow: none; padding: 10px 42px 10px 12px; font-size: 14px; background: white; }
.discovery-workspace #search-button { width: 40px; height: 44px; padding: 10px; }
.discovery-workspace #search-button svg { width: 20px; height: 20px; }
.discovery-workspace #discovery-toolbar { margin: 5px 0 18px; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.discovery-workspace #discovery-toolbar > details { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid var(--workspace-line); border-radius: 0; padding: 10px 0; background: transparent; }
.discovery-workspace #discovery-toolbar summary { font-size: 13px; font-weight: 650; line-height: 1.5; padding: 9px 0; }
.discovery-workspace #discovery-toolbar p { font-size: 12px; line-height: 1.5; }
.discovery-workspace #discovery-toolbar input:not([type=checkbox]):not([type=hidden]), .discovery-workspace #discovery-toolbar select { width: 100%; min-width: 0; max-width: 100%; font-size: 13px; border-radius: 8px; }
.discovery-workspace #discovery-toolbar label { max-width: 100%; font-size: 13px; }
.discovery-workspace #discovery-toolbar button, .discovery-workspace #date-filter nav a { font-size: 12px; padding: 7px 10px; border-radius: 8px; }
.discovery-workspace .style-options { position: static; width: 100%; min-width: 0; padding: 4px 0; border: 0; box-shadow: none; background: transparent; }
.discovery-workspace .style-option { font-size: 13px; }
.discovery-workspace input[type=checkbox] { accent-color: var(--workspace-purple); }
.discovery-workspace .workspace-intent { margin: 0 0 16px; }
.discovery-workspace .workspace-intent > div { padding: 3px; gap: 3px; box-shadow: none; border: 0; background: #edeaf0; border-radius: 10px; }
.discovery-workspace .workspace-intent a { font-size: 12px; padding: 7px 3px; border-radius: 8px; box-shadow: none; }
.discovery-workspace .workspace-intent a[aria-current] { background: var(--workspace-rust); color: white; }
.discovery-workspace #personal-discovery-filter { margin: 18px 0; }
.discovery-workspace #personal-discovery-filter label { font-size: 13px; }
.quick-searches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.quick-search { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 9px; background: #eee7fc; border: 1px solid #dfcff7; border-radius: 8px; color: #5f29bd; font-size: 12px; line-height: 1.4; text-decoration: none; }
.quick-search:hover { background: #e4d7fa; }
.saved-searches { border-top: 1px solid var(--workspace-line); padding-top: 16px; font-size: 13px; }
.save-search-control > summary, .save-search-login { display: block; padding: 10px 12px; color: var(--workspace-purple); border: 1px solid #cbb4ee; border-radius: 9px; background: white; font-weight: 650; cursor: pointer; text-align: center; }
.save-search-control > summary::marker { content: ''; }
.save-search-form { display: grid; gap: 8px; padding-top: 14px; }
.save-search-form input { border: 1px solid #d8d5df; border-radius: 8px; min-height: 42px; padding: 8px 10px; width: 100%; }
.save-search-form button { background: var(--workspace-purple); color: white; padding: 9px; border-radius: 8px; }
.saved-search-help { font-size: 11px; line-height: 1.5; color: var(--workspace-muted); }
.saved-search-list { list-style: none; margin: 14px 0 0; padding: 0; }
.saved-search-choice { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--workspace-line); }
.saved-search-choice > form:first-child { flex: 1; min-width: 0; }
.saved-search-run { width: 100%; text-align: left; overflow-wrap: anywhere; color: #5f29bd; padding: 7px 0; }
.saved-search-delete { font-size: 11px; color: var(--workspace-muted); padding: 7px 3px; }
.discovery-map-panel { position: relative; overflow: hidden; border: 1px solid var(--workspace-line); border-radius: 14px; margin: 0 0 24px; background: white; }
#discovery-map-panel #map { height: auto !important; aspect-ratio: 4 / 3; min-height: 0 !important; }
#discovery-map-results p { margin: 0; font-size: 11px; padding: 8px 14px; background: white; }
.workspace-page .discovery-shell #search-results { max-width: none; margin: 0; }
.workspace-event-list #search-results > div { padding: 0; }
.workspace-event-list .event-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 14px; }
.workspace-event-list .event-timeline > :not(.workspace-event-card) { grid-column: 1 / -1; }
.workspace-event-list #search-results h2 { font: 700 26px/1.2 Caveat, cursive; margin: 8px 0 0; }
.workspace-event-list #search-results h3 { font: 650 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card { margin: 0; padding: 0; min-width: 0; }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card > div { height: 100%; border: 1px solid var(--workspace-line, #e4e2e9); border-radius: 14px; padding: 16px; background: white; box-shadow: none; opacity: 1; }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card > div > div:first-child { flex-wrap: wrap; font-size: 11px; color: var(--workspace-rust, #9F2210); }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card [data-event-link] { font-family: system-ui, sans-serif; font-size: 16px; line-height: 1.4; font-style: normal; color: var(--workspace-ink, #252d3c); font-weight: 700; margin: 8px 0 12px; overflow-wrap: anywhere; }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card > div > div:last-child { font-size: 11px; gap: 5px; }
:is(.discovery-workspace, .entity-event-list) .workspace-event-card svg { max-width: 20px; max-height: 20px; }
.entity-event-list .workspace-event-card { margin-bottom: 12px; font-family: system-ui, sans-serif; }
.event-card-highlight { outline: 3px solid #8e58e5; outline-offset: 3px; border-radius: 14px; scroll-margin-top: 24px; }
.event-marker-highlight { filter: drop-shadow(0 0 8px #7138db); outline: 3px solid #7138db; border-radius: 50%; }
#event-detail-dialog { width: min(900px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #e4e2e9; border-radius: 18px; color: #252d3c; background: #f8f8fb; box-shadow: 0 20px 90px #252d3c40; }
#event-detail-dialog::backdrop { background: #252d3c70; backdrop-filter: blur(3px); }
.event-dialog-toolbar { display: flex; justify-content: flex-end; align-items: center; position: sticky; top: 0; z-index: 5; padding: 12px 20px; background: white; border-bottom: 1px solid #e4e2e9; font-size: 13px; }
.event-dialog-toolbar button { padding: 8px 15px; border-radius: 8px; border: 1px solid #d8d5df; }
.event-dialog-toolbar .event-dialog-grab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; width: 96px; height: 44px; padding: 0; border: 0; background: transparent; touch-action: none; cursor: grab; user-select: none; }
.event-dialog-grab span { width: 44px; height: 5px; border-radius: 5px; background: #b4b0bc; }
.event-dialog-grab:active { cursor: grabbing; }
#event-dialog-status { padding: 0 20px; font-size: 14px; }
#event-dialog-status:empty { display: none; }
#event-dialog-content .event-detail-viewport { min-height: 0; width: 100%; max-width: none; padding: 18px; }
#event-dialog-content h1 { font-size: 30px; line-height: 1.2; }
.workspace-page footer { background: transparent; }
@media (max-width: 1000px) {
  .workspace-page body.discovery-shell { width: calc(100% - 32px); }
  .discovery-workspace { grid-template-columns: 255px minmax(0, 1fr); padding: 22px; gap: 22px; }
  .workspace-filters { padding-right: 20px; }
  .workspace-event-list .event-timeline { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .workspace-page body.discovery-shell { width: calc(100% - 24px); }
  .discovery-workspace { display: block; padding: 18px; border-radius: 16px; }
  .workspace-filters { border-right: 0; border-bottom: 1px solid var(--workspace-line); padding: 0 0 18px; margin-bottom: 22px; }
  .workspace-introduction h1 { font-size: 26px; }
  .discovery-workspace #discovery-panel > summary { font-size: 21px; margin-bottom: 10px; }
  #discovery-map-panel #map { height: auto !important; aspect-ratio: 4 / 3; }
  #event-detail-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  #event-dialog-content h1 { font-size: 24px; }
}

/* Map-led discovery: progressive search, geography, chronological matches. */
.workspace-page body.discovery-shell { width: calc(100% - 32px); max-width: 1800px; overflow: visible; }
.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; padding: 18px; }
.workspace-discovery-column { min-width: 0; }
.map-workspace .workspace-event-list { min-width: 0; padding-top: 16px; }
.map-workspace .workspace-event-list .event-timeline { grid-template-columns: minmax(0, 1fr); }
.map-workspace > section:last-child:not(.workspace-event-list) { grid-column: 1; }
.map-workspace .workspace-filters { border: 0; padding: 0; margin-bottom: 8px; }
.workspace-page .site-header { min-height: 82px; padding-block: 16px; }
.map-workspace #discovery-map-panel #map { max-height: 62dvh; }
#map-chat-filters { display: none; }
.map-workspace #search-input { height: 48px; min-height: 48px; padding: 10px 40px 10px 12px; line-height: 1.5; }
.map-workspace #discovery-panel > summary { display: none; }
.map-clear-search { display: inline-block; padding: 12px 0; font-size: 12px; color: var(--workspace-purple); text-decoration: underline; }
.workspace-chat-reply { margin-top: 20px; background: white; border: 1px solid var(--workspace-line); border-radius: 12px; padding: 14px; font-size: 13px; overflow-wrap: anywhere; }
.map-workspace #ai-chat-bubble { margin: 16px 0; }
.map-workspace #ai-chat-bubble > div { box-shadow: none !important; }
.map-workspace #ai-chat-bubble .prose { font-size: 13px; }
.map-workspace .discovery-map-panel { margin: 0 -18px 8px; border-radius: 16px; border-inline: 0; }
.map-filters-disclosure > summary { display: list-item; cursor: pointer; min-height: 48px; padding: 12px 0; font-size: 14px; font-weight: 650; color: var(--workspace-ink); }
.map-filters-disclosure > summary::marker { color: var(--workspace-rust); }
#map-filter-summary { font-weight: 400; font-size: 12px; color: var(--workspace-purple); overflow-wrap: anywhere; }
.filter-summary-pill { display: inline-block; border-radius: 12px; background: #eee7fc; color: #5f29bd; padding: 2px 8px; margin: 2px 3px; line-height: 1.5; }
.map-filters-disclosure .filters-hide-label, .map-filters-disclosure[open] .filters-show-label { display: none; }
.map-filters-disclosure[open] .filters-hide-label { display: inline; }
.map-filters-content { padding: 2px 0 12px; }
#map-style-expand { min-height: 44px; padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--workspace-purple); text-decoration: underline; text-underline-offset: 3px; }
#map-style-expand[hidden] { display: none; }
.map-discovery-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; }
.map-discovery-options label { display: flex; align-items: center; gap: 6px; min-height: 40px; }
.map-event-types { position: relative; }
.map-event-types summary { cursor: pointer; min-height: 40px; padding: 9px 12px; border: 1px solid var(--workspace-line); border-radius: 9px; background: white; }
.map-event-type-options { position: absolute; z-index: 1001; top: 100%; left: 0; width: max-content; max-width: calc(100vw - 70px); padding: 10px 14px; background: white; border: 1px solid var(--workspace-line); border-radius: 10px; box-shadow: 0 8px 24px #252d3c20; }
.map-style-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.map-style-actions input { width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--workspace-line); border-radius: 9px; background: white; font-size: 13px; }
.map-style-actions button { min-height: 40px; padding: 5px 10px; color: var(--workspace-purple); background: white; border: 1px solid var(--workspace-line); border-radius: 8px; font-size: 12px; }
#map-style-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0; padding: 3px; }
#map-style-pills button { display: inline-flex; align-items: center; min-height: 38px; border: 1px solid #bda0ed; border-radius: 24px; padding: 6px 12px; color: #5f29bd; background: #eee7fc; font-size: 12px; }
#map-style-pills button[aria-pressed=false] { background: transparent; border-color: #d4d2d9; color: #747787; text-decoration: line-through; }
#map-style-pills button:focus-visible { outline: 3px solid #7138db; outline-offset: 2px; }
#map-result-status { color: var(--workspace-ink); font-size: 13px; font-weight: 650; min-height: 20px; margin: 10px 0 0; }
.map-preference-note { font-size: 11px; color: var(--workspace-muted); margin: 4px 0 16px; }
.map-workspace .workspace-event-card { margin-bottom: 12px; }
.map-workspace .workspace-event-list #search-results h3 { margin: 20px 0 10px; padding: 9px 0; border-top: 2px solid #e1dae9; }
.map-empty-results { padding: 28px 14px; background: white; border-radius: 12px; text-align: center; font-size: 14px; }
.workspace-recommendations { min-width: 0; }
.workspace-recommendations > div > div { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.workspace-recommendations > div > div > div:first-child { background: transparent; border: 0; padding: 10px 0; }
.workspace-recommendations > div > div > div:last-child { padding: 0; }
.workspace-recommendations .workspace-event-card > div { box-shadow: 0 5px 20px #342a1710; }
.workspace-recommendations:empty { display: none; }
.workspace-recommendations h2 { font: 650 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.workspace-recommendations .workspace-event-card > div { padding: 11px; }
.workspace-recommendations .workspace-event-card [data-event-link] { font-size: 13px; }
.workspace-recommendations .workspace-event-card > div > div { flex-wrap: wrap; }
.map-workspace #search-results[aria-busy=true] { opacity: .5; pointer-events: none; }
.map-results-handle { display: none; }
.desktop-save-hint { display: flex; align-items: center; gap: 16px; padding: 10px 0; margin-top: 10px; border-top: 1px solid var(--workspace-line); color: var(--workspace-muted); font-size: 12px; }
.desktop-save-hint p { margin: 0; flex: 1; }
.desktop-save-hint button { min-width: 44px; min-height: 44px; font-size: 22px; color: var(--workspace-rust); }
.desktop-save-hint[hidden] { display: none; }
@media (min-width: 851px) {
  .map-workspace .site-account-menu { right: calc(50% + 14px); }
  .map-workspace .workspace-event-list { position: sticky; top: 16px; height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
  .map-workspace #map-results-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 0 8px 16px 4px; }
}
@media (max-width: 850px) {
  .map-workspace { display: block; padding: 16px 16px 0; border-bottom: 0; border-radius: 22px 22px 0 0; }
  .workspace-page body.discovery-shell { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .map-workspace .site-masthead { margin-top: -16px; }
  .desktop-save-hint { display: none; }
  .map-workspace #discovery-map-panel #map { max-height: none; }
  .map-workspace .discovery-map-panel { width: 100vw; margin-inline: calc((100% - 100vw) / 2); margin-bottom: 0; }
  .map-workspace .workspace-filters { border: 0; padding: 0; margin-bottom: 8px; }
  .map-workspace #search-input { min-height: 48px; }
  .map-workspace .workspace-recommendations { margin-top: 24px; }
  .map-workspace #map-result-status { display: none; }
  .map-workspace .workspace-event-list { position: fixed; z-index: 1200; bottom: 0; left: 0; right: 0; height: 86dvh; max-height: none; display: flex; flex-direction: column; padding: 0; background: #f8f8fb; border: 1px solid var(--workspace-line); border-radius: 22px 22px 0 0; box-shadow: 0 -5px 25px #252d3c20; transform: translateY(calc(100% - 72px - env(safe-area-inset-bottom))); transition: transform 220ms ease; overflow: hidden; }
  .map-workspace .workspace-event-list.is-open { transform: translateY(0); }
  .map-results-handle { position: relative; display: flex; flex: 0 0 72px; width: 100%; padding: 10px 44px 14px; align-items: center; justify-content: center; flex-direction: column; gap: 9px; color: var(--workspace-ink); font-size: 14px; font-weight: 650; cursor: pointer; touch-action: none; }
  .map-results-chevron { position: absolute; top: 24px; width: 24px; height: 24px; color: var(--workspace-muted); pointer-events: none; animation: sheet-chevron-bob 2.4s ease-in-out infinite; }
  .map-results-chevron-left { left: 15px; }
  .map-results-chevron-right { right: 15px; }
  .map-results-chevron svg { display: block; width: 24px; height: 24px; }
  .map-results-handle[aria-expanded=true] .map-results-chevron svg { transform: rotate(180deg); }
  .map-results-grip { display: block; width: 42px; height: 5px; border-radius: 10px; background: #b9b1c5; }
  #map-results-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(18px + env(safe-area-inset-bottom)); }
  html.map-results-open, html.map-results-open body { overflow-y: hidden; }
}
@keyframes sheet-chevron-bob { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -2px; } }
@media (prefers-reduced-motion: reduce) { .map-workspace .workspace-event-list { transition: none; } .map-results-chevron { animation: none; } }
