@font-face {
  font-family: Syncoglyph;
  src: url('/assets/Syncoglyph-CondensedLight.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  --bg: #080d0b;
  --surface: #0d1511;
  --surface-strong: #111c16;
  --ink: #f0eee4;
  --muted: #a0b1a8;
  --faint: #82958a;
  --accent: #9fdfbe;
  --rule: #30453b;
  --soft-rule: #22332a;
  --warning: #e2c388;
  --warning-rule: #685437;
  --display: Syncoglyph, 'Arial Narrow', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 76% 6%, #172d214f, transparent 53%); }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: .24em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, a, input, textarea { touch-action: manipulation; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 8; top: 8px; left: 12px; padding: 12px; background: var(--surface); }
.icon { width: 17px; height: 17px; flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, .display, .wordmark strong { font-family: var(--display); font-weight: 300; font-synthesis: none; }
h1 { font-size: clamp(3rem, 5vw, 4.35rem); line-height: .98; letter-spacing: -.025em; }
.display { font-size: 2.15rem; line-height: 1.1; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .75rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.small { font-size: .875rem; }

.topbar { border-bottom: 1px solid var(--soft-rule); background: #0a110e; }
.topbar-inner { max-width: 1680px; margin: auto; padding-inline: clamp(20px, 3.4vw, 56px); height: 73px; display: flex; align-items: stretch; gap: clamp(30px, 5vw, 85px); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark img { width: 36px; height: 36px; border: 1px solid var(--rule); padding: 3px; }
.wordmark strong { display: block; font-size: 1.55rem; letter-spacing: .05em; line-height: .95; text-transform: uppercase; }
.wordmark small { display: block; margin-top: 5px; color: var(--faint); font-size: .65rem; font-weight: 650; letter-spacing: .24em; text-transform: uppercase; }
.navigation { display: flex; gap: 27px; align-items: stretch; }
.navigation a { position: relative; display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 550; }
.navigation a:hover, .navigation a[aria-current] { color: var(--accent); }
.navigation a[aria-current]::after { content: ''; position: absolute; inset: auto 0 0; height: 2px; background: var(--accent); box-shadow: 0 -2px 12px #9fdfbe40; }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.account strong, .account small { display: block; }
.account strong { font-size: .875rem; font-weight: 600; }
.account small { color: var(--faint); font-size: .75rem; margin-top: 2px; }
.account .sign-out { min-height: 30px; padding: 4px 8px; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--person-line); color: var(--person-text); background: var(--person-bg); font-size: .74rem; font-weight: 700; border-radius: 50%; }
.mint { --person-bg: #1b3629; --person-line: #466f58; --person-text: #b4e1c6; }
.violet { --person-bg: #252638; --person-line: #4a4b69; --person-text: #c6c8e5; }
.sand { --person-bg: #312a1c; --person-line: #665336; --person-text: #e5c897; }
.blue { --person-bg: #1a2d33; --person-line: #3c5e68; --person-text: #afd5e1; }
.teal { --person-bg: #1a3430; --person-line: #3d6b62; --person-text: #b8e1d5; }
.rose { --person-bg: #34262d; --person-line: #664b59; --person-text: #e4c4d3; }

.main { max-width: 1680px; margin: auto; padding: 29px clamp(20px, 3.4vw, 56px) 26px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.hero-actions, .actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-actions { padding-bottom: 3px; }
.button { min-height: 39px; border: 1px solid var(--rule); border-radius: 3px; background: #121d17; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .875rem; font-weight: 650; padding: 8px 12px; text-decoration: none; white-space: nowrap; }
.button:hover { background: #1b2b22; border-color: #567964; color: var(--ink); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #0b1c12; }
.button.primary:hover { background: #bcebcf; border-color: #bcebcf; }
.button.quiet { background: transparent; }
.button.danger { color: #f0af9e; }
.button.warn { background: var(--warning); border-color: var(--warning); color: #2b210f; }
.button.warn:hover { background: #f2d7a3; }
.icon-button { min-width: 34px; padding: 6px; }
.icon-button .icon { width: 16px; height: 16px; }
.text-button { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 650; font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--ink); }

.panel { min-width: 0; border: 1px solid var(--rule); border-radius: 5px; background: var(--surface); }
.calendar-panel { overflow: hidden; }
.hero:has(+ .calendar-panel) { margin-bottom: 16px; }
.hero:has(+ .calendar-panel) h1 { font-size: clamp(2.6rem, 4.6vw, 4rem); }
.toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.range-title { font-size: 1rem; font-weight: 650; margin-left: 5px; }
.toolbar .button { min-height: 32px; padding-block: 4px; }
.week-controls { gap: 6px; }
.calendar-controls { gap: 8px; }
.calendar-controls select {
  appearance: none;
  min-height: 32px;
  max-width: 170px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 24px 4px 8px;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 12px center / 4px 4px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 8px center / 4px 4px no-repeat #111b15;
  color: var(--ink);
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
}
.segmented { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; padding: 2px; }
.segmented button { background: transparent; color: var(--muted); border: 0; border-radius: 2px; padding: 4px 9px; font-size: .84rem; font-weight: 600; }
.segmented button:hover, .segmented button[aria-pressed="true"] { color: var(--accent); background: #1d3327; }

.date-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.date-strip button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 4px; border: 0; border-inline-end: 1px solid var(--soft-rule); color: var(--muted); background: #0d1711; font-size: .84rem; }
.date-strip button:last-child { border-inline-end: 0; }
.date-strip button strong { color: var(--ink); font-size: .95rem; }
.date-strip button:hover { background: #16261c; }
.date-strip button[aria-pressed="true"] { color: var(--accent); background: #192e22; box-shadow: inset 0 -2px var(--accent); }
.date-strip button[aria-current="date"] strong { color: var(--accent); }
.date-strip button:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }

.timeline-scroll { overflow-x: auto; scrollbar-color: #425c4c var(--surface); }
.timeline-scroll:focus-visible { outline-offset: -2px; }
.timeline { --label-width: 164px; --lane-height: 35px; min-width: calc(var(--label-width) + var(--hours) * 87px); }
.timeline-row { display: grid; grid-template-columns: var(--label-width) minmax(0, 1fr); border-bottom: 1px solid #263a2e; }
.timeline-row:last-child { border-bottom: 0; }
.row-label { z-index: 3; position: sticky; left: 0; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-right: 1px solid var(--rule); background: #101a14; font-size: .87rem; }
.row-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row-label .avatar { width: 24px; height: 24px; font-size: .65rem; }
.timeline-axis { min-height: 32px; color: var(--muted); background: #111d16; }
.timeline-axis .row-label { font-size: .8rem; font-weight: 650; background: #111d16; }
.time-ticks { position: relative; display: grid; align-items: center; grid-template-columns: repeat(var(--hours), minmax(0, 1fr)); color: var(--muted); font-size: .77rem; font-variant-numeric: tabular-nums; }
.time-ticks span { padding: 0 5px; white-space: nowrap; }
.time-ticks .end-tick { position: absolute; right: 0; }
.timeline-track { position: relative; min-height: calc(var(--lane-height) * var(--lanes)); background: repeating-linear-gradient(to right, #24372c 0 1px, transparent 1px calc(100% / var(--hours))); }
.team-row { min-height: 41px; border-color: #426252; background: #111e17; }
.team-row .row-label { color: var(--accent); background: #17271e; }
.team-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--accent); }
.team-icon .icon { width: 16px; height: 16px; }
.team-row .timeline-track { --lane-height: 40px; }
.meeting-window { position: absolute; inset: 0 auto 0 calc(var(--left) * 100%); width: calc(var(--width) * 100%); background: #7fd0a20a; border-inline: 1px solid #80d0a218; pointer-events: none; }
.timeline-block { position: absolute; inset: calc(var(--lane) * var(--lane-height) + 4px) auto auto calc(var(--left) * 100% + 1px); width: max(1px, calc(var(--width) * 100% - 2px)); height: calc(var(--lane-height) - 8px); overflow: hidden; display: grid; align-items: center; border: 1px solid var(--person-line); border-left-width: 2px; border-radius: 3px; background: var(--person-bg); color: var(--person-text); padding: 0 min(5px, calc(var(--width) * 70px)); text-align: left; }
.timeline-block:hover { filter: brightness(1.28); z-index: 1; }
.timeline-block:focus-visible { z-index: 2; outline-offset: -2px; }
.timeline-block .event-title { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .81rem; line-height: 1.15; font-weight: 650; }
.event-title .icon { width: 12px; height: 12px; margin-right: 4px; color: var(--warning); vertical-align: -.1em; }
.meeting-block { --person-bg: #234434; --person-text: #d5f6e3; --person-line: #5a8c71; }
.timeline-block.issue { border-color: #ae8c56; }
.block-overlap { position: absolute; left: calc(var(--overlap-left) * 100%); bottom: 0; height: 3px; width: calc(var(--overlap-width) * 100%); background: var(--warning); pointer-events: none; }

.overview { --label-width: 154px; min-width: 855px; }
.overview-row { min-height: 43px; }
.overview-row .row-label { padding: 0; }
.today-row .row-label { background: #172b20; }
.today-row .week-day-link { color: var(--accent); }
.week-day-link { width: 100%; height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 7px 10px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.week-day-link:hover { background: #1b3426; }
.week-day-link:focus-visible { outline-offset: -3px; }
.week-day-link .icon { width: 14px; height: 14px; color: var(--muted); }
.free-slots { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); }
.free-slot { display: grid; place-items: center; border-inline-end: 1px solid #0b150f91; font-size: .82rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.free-slot:nth-child(even) { border-inline-end-color: #0b150f; }
.free-slot:hover { box-shadow: inset 0 0 0 1px currentColor; }
.free-0 { background: #2e2620; color: #dbc5a5; }
.free-1 { background: #283328; color: #c3d7c4; }
.free-2 { background: #244432; color: #c9e5d3; }
.free-3 { background: #305b45; color: #d6f0e0; }
.free-4 { background: #44795d; color: #f1fff5; }

.calendar-footer { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 7px 12px; color: var(--muted); border-top: 1px solid var(--rule); font-size: .79rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.legend span, .calendar-footer > span { display: inline-flex; gap: 6px; align-items: center; }
.legend .availability-scale { gap: 2px; }
.availability-scale i { display: block; width: 10px; height: 10px; border-radius: 2px; }
.swatch { width: 9px; height: 9px; border-radius: 2px; background: #416b55; border: 1px solid #83ac95; }
.swatch.busy { background: #454764; border-color: #8286a5; }
.swatch.conflict { background: var(--warning); }

.inspector { padding: 17px; }
.inspector-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 11px; }
.inspector-top .button { min-height: 29px; min-width: 29px; padding: 4px; }
.inspector h2 { overflow-wrap: anywhere; margin-bottom: 12px; font-size: 1.7rem; }
.event-facts { display: grid; gap: 6px; color: var(--muted); font-size: .875rem; }
.event-facts p { display: flex; align-items: center; gap: 8px; }
.event-facts .icon { color: var(--accent); width: 15px; height: 15px; }
.description { margin-top: 12px; color: var(--muted); font-size: .875rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.section-rule { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--soft-rule); }
.inline-facts { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .86rem; }
.avatars { display: flex; align-items: center; padding-left: 4px; }
.avatars .avatar { width: 26px; height: 26px; margin-left: -4px; box-shadow: 0 0 0 2px var(--surface); font-size: .64rem; }
.conflict-box { margin-top: 14px; background: #211d14; border: 1px solid var(--warning-rule); border-radius: 3px; padding: 11px; }
.conflict-heading { display: flex; gap: 7px; align-items: center; color: var(--warning); font-weight: 700; font-size: .85rem; }
.conflict-list { display: grid; gap: 9px; margin-top: 9px; }
.conflict-row { display: flex; align-items: start; gap: 8px; min-width: 0; line-height: 1.42; }
.conflict-row .avatar { width: 28px; height: 28px; font-size: .68rem; margin-top: 2px; }
.conflict-row strong, .conflict-row small { display: block; overflow-wrap: anywhere; }
.conflict-row strong { font-size: .83rem; }
.conflict-row small { color: #d9c6a6; font-size: .75rem; }
.sidebar-actions { display: flex; gap: 8px; margin-top: 13px; }
.sidebar-actions .button { min-height: 32px; font-size: .8rem; padding-block: 4px; }
.empty { padding: 24px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.empty h2 { margin-bottom: 8px; color: var(--ink); }
.footer { padding-top: 12px; color: var(--faint); font-size: .75rem; }

.agenda { min-height: 160px; padding: 8px 10px; }
.agenda-entry { display: grid; grid-template-columns: minmax(165px, .6fr) minmax(0, 1.25fr) minmax(100px, .6fr); align-items: center; gap: 10px; width: 100%; min-height: 38px; border: 0; border-bottom: 1px solid var(--soft-rule); border-left: 3px solid var(--person-line); background: #101a14; padding: 6px 10px; text-align: left; }
.agenda-entry:hover { background: var(--person-bg); }
.agenda-entry strong, .agenda-entry small { overflow-wrap: anywhere; font-size: .86rem; }
.agenda-entry small { color: var(--muted); }
.agenda-entry .event-title { color: var(--person-text); }
.workspace-content { display: grid; gap: 15px; }
.poll-card { padding: clamp(15px, 2.4vw, 28px); }
.poll-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.poll-header .display { margin: 5px 0; overflow-wrap: anywhere; }
.poll-options { display: grid; gap: 9px; }
.poll-option { display: grid; grid-template-columns: minmax(175px, 1fr) minmax(130px, .8fr) auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--soft-rule); border-radius: 3px; background: #101a14; }
.poll-option.chosen { border-color: var(--accent); }
.poll-option .small { display: block; margin-top: 3px; }
.poll-option .warning-text { color: var(--warning); }
.poll-buttons { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.poll-buttons .button { min-height: 33px; padding-block: 5px; }
.poll-buttons .voted { color: #102116; background: var(--accent); border-color: var(--accent); }
.poll-stats { margin: 11px 0 0; }
.poll-option details { grid-column: 1 / -1; font-size: .84rem; color: var(--warning); }
.poll-option details summary { cursor: pointer; }
.poll-option details .conflict-list { margin-top: 8px; }
.poll-option .poll-schedule { grid-column: 1 / -1; justify-self: start; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 13px; }
.member-tile { display: flex; align-items: center; gap: 12px; padding: 15px; min-height: 79px; overflow-wrap: anywhere; }
.member-tile .avatar { width: 39px; height: 39px; }
.member-tile strong { font-size: 1rem; }
.member-tile p { font-size: .86rem; color: var(--muted); }
.member-count { margin-bottom: 12px; color: var(--muted); }

dialog { width: min(520px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #4d6b59; border-radius: 5px; background: #101912; color: var(--ink); box-shadow: 0 20px 90px #000a; }
dialog::backdrop { background: #040805b9; backdrop-filter: blur(3px); }
#details-dialog { inset: 0 0 0 auto; margin: 0; width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid #4d6b59; border-radius: 0; }
#details-dialog .inspector { padding: 21px; }
#details-dialog::backdrop { background: #03070485; backdrop-filter: none; }
#warning-dialog { border-color: var(--warning-rule); }
.dialog-body { padding: 21px; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dialog-header .display { margin-top: 3px; }
.dialog-header .button { min-height: 31px; }
.dialog-footer { display: flex; justify-content: end; flex-wrap: wrap; gap: 7px; padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--soft-rule); }
.form-fields { display: grid; gap: 13px; }
.form-fields label { display: grid; gap: 5px; color: var(--muted); font-size: .88rem; font-weight: 550; }
.form-fields :is(input, textarea, select) { width: 100%; min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); background: #0b130e; font-size: .95rem; }
.form-fields textarea { min-height: 74px; resize: vertical; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.time-option { min-width: 0; border: 1px solid var(--soft-rule); border-radius: 3px; margin: 0; padding: 9px; }
.time-option legend { color: var(--muted); font-size: .84rem; padding-inline: 4px; }
.time-option button { margin-top: 8px; }
.form-error { color: #f5b09e; font-size: .88rem; }
.join-page { max-width: 510px; margin-inline: auto; padding-top: 9vh; }
.join-page .wordmark { margin-bottom: 23px; }
.join-page .wordmark strong, .join-page h1 { font-family: system-ui, sans-serif; font-weight: 650; }
.join-page .panel { padding: 22px; }
.join-page h1 { font-size: 3rem; margin: 5px 0 10px; }
.join-page .form-fields { margin-top: 17px; }
.toast { position: fixed; z-index: 3; bottom: 16px; right: 16px; max-width: min(360px, calc(100vw - 32px)); padding: 10px 14px; border: 1px solid #527965; border-radius: 3px; background: #183025; color: var(--accent); font-size: .875rem; box-shadow: 0 5px 30px #0008; }

@media (max-width: 880px) {
  .timeline { --label-width: 142px; }
  .poll-option { grid-template-columns: 1fr 1fr; }
  .poll-option .poll-buttons { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .topbar-inner { min-height: 100px; height: auto; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
  .wordmark img { width: 32px; height: 32px; }
  .account strong { font-size: .78rem; }
  .navigation { order: 3; width: 100%; gap: 24px; height: 34px; }
  .navigation .icon { width: 14px; height: 14px; }
  .main { padding-top: 22px; }
  .hero { flex-direction: column; align-items: start; margin-bottom: 17px; gap: 13px; }
  .toolbar { padding: 8px; }
  .range-title { margin-left: 1px; font-size: .88rem; }
  .date-strip button { gap: 3px; flex-direction: column; }
  .date-strip button span { font-size: .73rem; }
  .timeline { --label-width: 117px; }
  .row-label { gap: 5px; padding-inline: 5px; font-size: .8rem; }
  .row-label .avatar { width: 21px; height: 21px; font-size: .59rem; }
  .poll-option { grid-template-columns: 1fr; }
  .agenda-entry { grid-template-columns: minmax(0, 1fr) minmax(90px, .6fr); gap: 3px 8px; }
  .agenda-entry small:first-child { grid-column: 1 / -1; font-size: .8rem; }
}
@media (max-width: 375px) {
  .two-fields { grid-template-columns: 1fr; }
}
