@font-face { font-family: DM; src: url(fonts/dm-sans.ttf) format('truetype'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: Instrument; src: url(fonts/instrument-serif.ttf) format('truetype'); font-weight: 400; font-display: swap; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--toke-paper);
  color: var(--toke-navy);
  font: 16px/1.55 DM, system-ui, sans-serif;
}
header, body > nav, main, body > footer { padding-inline: max(5vw, calc((100vw - 1150px) / 2)); }
header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 88px;
  background: white;
  border-top: 4px solid var(--toke-lilac);
  border-bottom: 1px solid var(--toke-line);
}
header .brand {
  display: inline-flex;
  align-items: center;
  gap: 1.15rem;
  flex: none;
  margin-right: auto;
  text-decoration: none;
}
.team-wordmark { display: block; width: auto; height: 53px; }
.brand span { padding-left: 1.15rem; border-left: 1px solid var(--toke-light-lilac); font-size: .88rem; font-weight: 600; }
.team-user, .team-controls { display: flex; align-items: center; min-width: 0; }
.team-user { gap: clamp(.75rem, 1.5vw, 1.25rem); font-size: .9rem; }
.team-controls { gap: .5rem; }
header form { flex: none; margin: 0; }
.team-user-name { min-width: 0; max-width: 18rem; overflow-wrap: anywhere; text-align: right; font-size: .85rem; line-height: 1.3; color: var(--toke-muted); }
.team-workspace-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
header .workspace-switch { position: relative; border: 0; margin: 0; padding: 0; background: transparent; }
.workspace-switch summary, .team-mobile-menu summary, .team-logout button.quiet {
  display: flex; align-items: center; height: 2.75rem; min-width: 2.75rem;
  padding-inline: .8rem; border-radius: .5rem; font: 600 .9rem/1.2 DM, system-ui, sans-serif;
}
.team-logout button.quiet { justify-content: center; border-color: var(--toke-line); background: white; }
.team-logout button.quiet:hover { border-color: var(--toke-light-lilac); background: var(--toke-wash); }
.workspace-switch summary {
  gap: .75rem; justify-content: space-between; max-width: min(27vw, 16rem);
  border: 1px solid var(--toke-light-lilac); background: var(--toke-wash); color: var(--toke-plum); list-style: none;
}
.workspace-switch summary span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.workspace-switch summary::-webkit-details-marker, .team-mobile-menu summary::-webkit-details-marker { display: none; }
.workspace-switch summary::after {
  content: ''; flex: none; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.11rem) rotate(45deg);
}
.workspace-switch[open] summary, .workspace-switch summary:hover { border-color: var(--toke-plum); }
.workspace-switch[open] summary::after { transform: translateY(.11rem) rotate(225deg); }
.workspace-panel {
  position: absolute; inset: calc(100% + .4rem) 0 auto auto; z-index: 8; width: 20rem;
  overflow: hidden; background: white; border: 1px solid #bea5c0; border-radius: .7rem;
  box-shadow: 0 .45rem 1.3rem #19243529; text-align: left; font-size: .92rem;
}
.workspace-search { display: block; padding: .65rem; border-bottom: 1px solid var(--toke-line); }
.workspace-search input[type=search] { padding: .55rem .65rem; font-size: 1rem; }
.workspace-switch ul { list-style: none; padding: 0; margin: 0; max-height: min(52vh, 22rem); overflow-y: auto; overscroll-behavior: contain; }
.workspace-switch li:not([hidden]) ~ li:not([hidden]) { border-top: 1px solid var(--toke-line); }
.workspace-switch .workspace-choice {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem; width: 100%;
  padding: .65rem .85rem; border: 0; border-radius: 0; background: white; color: var(--toke-navy); text-align: left;
}
.workspace-identity { min-width: 0; overflow-wrap: anywhere; }
.workspace-identity :is(strong,small) { display: block; line-height: 1.4; }
.workspace-identity small { color: var(--toke-muted); font-size: .78rem; }
.workspace-switch .workspace-choice[aria-current] { background: var(--toke-wash); border-bottom: 1px solid var(--toke-line); }
.workspace-current { color: var(--toke-plum); font-weight: 650; font-size: .78rem; }
.workspace-choice[aria-current] .workspace-current::before { content: '✓ '; }
.workspace-switch button.workspace-choice:hover, .workspace-switch button.workspace-choice:focus-visible { background: #f8f3f8; }
.workspace-switch button:focus-visible { outline-offset: -3px; }
.workspace-empty { margin: 0; padding: .9rem; color: var(--toke-muted); }
.workspace-switch [hidden] { display: none; }
.team-mobile-menu { display: none; }

body > nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  padding-block: .3rem 0;
  background: white;
  border-bottom: 1px solid var(--toke-line);
}
nav a { padding: .65rem 0 .6rem; border-bottom: 3px solid transparent; font-weight: 550; font-size: .92rem; white-space: nowrap; text-decoration: none; }
nav a:hover { color: var(--toke-plum); border-bottom-color: var(--toke-light-lilac); }
nav a[aria-current] { border-bottom-color: var(--toke-plum); color: var(--toke-navy); font-weight: 750; }

main { padding-block: 38px 72px; }
body > footer { padding-block: 1rem; border-top: 1px solid var(--toke-line); }
a { color: var(--toke-navy); text-underline-offset: .16em; }
h1, h2 { font-family: Instrument, Georgia, serif; font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(38px, 5vw, 60px); margin: .15em 0 .58em; }
h2 { font-size: 32px; }
input, select, textarea, button, .button { font: inherit; border-radius: 8px; }
label { display: block; font-weight: 550; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-width: 0; padding: .65rem .8rem;
  border: 1px solid #a49eab; background: white; color: inherit;
}
input[type=checkbox], input[type=radio] { accent-color: var(--toke-plum); }
fieldset { min-width: 0; margin: 0; padding: .85rem 1rem; border: 1px solid var(--toke-line); border-radius: 8px; }
legend { font-weight: 650; }
button, .button {
  display: inline-block; padding: .65rem 1.1rem; border: 1px solid var(--toke-navy);
  background: var(--toke-navy); color: white; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: #254862; }
button.quiet { border-color: var(--toke-light-lilac); background: var(--toke-wash); color: var(--toke-navy); }
button.quiet:hover { background: #eaddeb; }
.card, details, .team-integrations > section {
  min-width: 0; padding: 20px; border: 1px solid var(--toke-line);
  border-radius: 12px; margin-bottom: 10px; background: white;
}
.stack { display: grid; gap: 14px; max-width: 580px; }
.access-forms { align-items: start; }
.access-role-guide {
  margin: .6rem 0 0; padding: .7rem .9rem;
  border-radius: 8px; background: var(--toke-wash); font-size: .9rem;
}
.access-role-guide dd { margin: .1rem 0 .55rem; }
.access-role-guide dd:last-child { margin-bottom: 0; }
.access-forms .access-profile-help { margin: .45rem 0 .2rem; color: var(--toke-muted); font-size: .9rem; }
.access-profile-link { font-size: .9rem; }
.filters, .actions, .heading, .booking { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters { align-items: end; margin-bottom: 20px; }
.booking, .heading { justify-content: space-between; }
.card p { margin: .35em 0; }
.actions { margin: 12px 0; }
.columns, .week { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.week .card { padding: 14px; }
.notice, .error, .team-integrations > [role=status] {
  padding: 12px 16px; border-left: 3px solid var(--toke-lilac);
  background: var(--toke-wash); overflow-wrap: anywhere;
}
.error { color: #702d3b; border-left-color: #ad5263; background: #faebee; }
.stack h2, .team-integrations section > h2:first-child { margin: 0; }
summary { cursor: pointer; font-weight: 600; }
dd { margin: 0 0 .75em; }
dt { font-weight: 650; }
:focus-visible { outline: 3px solid var(--toke-plum); outline-offset: 3px; }

.team-signin { background: linear-gradient(158deg, #f3eaf4, var(--toke-paper) 53%); min-height: 100vh; }
.team-signin main { width: min(100% - 2rem, 31rem); margin-inline: auto; padding: clamp(2rem, 7vh, 5rem) 0; }
.team-signin main > h1 { font-size: clamp(38px, 6vw, 52px); }
.team-signin main > form { padding: clamp(1.2rem, 3vw, 2rem); gap: 1.2rem; }
.team-signin label > input { display: block; margin-top: .26rem; }

.team-integrations section, .team-integrations details { overflow-wrap: anywhere; }
.team-integrations form { margin-block: .85rem; }
.team-integrations label { margin-block: .55rem; }
.team-integrations label > :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  display: block; max-width: 36rem; margin-top: .25rem;
}
.team-integrations form button { margin: .25rem .3rem .25rem 0; }
.team-integrations small { display: block; color: var(--toke-muted); }
.team-integrations .scroll { max-width: 100%; overflow-x: auto; }
.team-integrations pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.team-integrations table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.team-integrations th, .team-integrations td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--toke-line); }
.team-integrations th { background: var(--toke-wash); }

.event-embed { flex-basis: 100%; min-width: 0; margin: 0; padding: .55rem 0 0; border: 0; border-top: 1px solid var(--toke-line); border-radius: 0; }
.event-embed summary { color: var(--toke-plum); }
.embed-tools { display: grid; gap: 1rem; padding: .9rem 0 .2rem; max-width: 56rem; }
.embed-tools [hidden] { display: none; }
.embed-tools select { display: block; width: auto; }
.embed-code { display: flex; align-items: end; flex-wrap: wrap; gap: .5rem; }
.embed-code label { flex: 1 1 28rem; min-width: 0; }
.embed-code input, .embed-code textarea { font: 14px/1.5 ui-monospace, monospace; }
.embed-tools [role=status]:empty { display: none; }

[data-event-recipients] [hidden] { display: none; }
[data-recipient-row] { display: grid; gap: .4rem; margin: .7rem 0 1rem; }
[data-remove-recipient] { font-size: .88rem; padding: .35rem .7rem; }
form[enctype="multipart/form-data"] fieldset img { display: block; max-width: 100%; height: auto; margin: .35rem 0 .65rem; border-radius: 6px; }
form[enctype="multipart/form-data"] label > small { display: block; margin-top: .25rem; color: var(--toke-muted); font-weight: 400; }

@media (max-width: 700px) {
  header { min-height: 68px; position: relative; }
  .team-header-account {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
    column-gap: 1rem; row-gap: .55rem; padding-block: .6rem .65rem;
  }
  .team-header-account .team-user { display: contents; }
  .team-user-name { justify-self: end; font-size: .8rem; }
  .team-controls { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .team-controls .team-logout { grid-column: 3; }
  .team-desktop-nav { display: none; }
  header .team-mobile-menu { display: block; grid-column: 2; margin: 0; border: 0; padding: 0; }
  .team-mobile-menu summary {
    gap: .45rem; justify-content: center; list-style: none; color: var(--toke-navy);
    border: 1px solid var(--toke-line); background: white;
  }
  .team-mobile-menu[open] summary { border-color: var(--toke-plum); color: var(--toke-plum); background: var(--toke-wash); }
  .team-menu-icon { position: relative; width: .9rem; height: .7rem; border-block: 1.5px solid currentColor; }
  .team-menu-icon::after { content: ''; position: absolute; top: 50%; inset-inline: 0; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
  .team-mobile-menu nav {
    position: absolute; z-index: 8; inset: calc(100% + 1px) 5vw auto auto;
    width: min(22rem, 90vw); max-height: calc(100dvh - 8.5rem);
    overflow-y: auto; overscroll-behavior: contain; padding: .3rem;
    background: white; border: 1px solid #bea5c0; border-radius: .7rem; box-shadow: 0 .45rem 1.3rem #19243529;
  }
  .team-mobile-menu nav a {
    display: flex; align-items: center; min-height: 44px; padding: .55rem .8rem;
    border: 0; border-radius: .35rem; font-size: .94rem; white-space: normal;
  }
  .team-mobile-menu nav a[aria-current] { background: var(--toke-wash); color: var(--toke-plum); }
  .team-mobile-menu nav a:focus-visible { outline-offset: -3px; }
  header .workspace-switch { position: static; }
  .workspace-switch summary { width: 100%; max-width: none; }
  .workspace-panel {
    inset: calc(100% + 1px) auto auto 5vw; width: min(24rem, 90vw);
    display: flex; flex-direction: column; max-height: calc(100dvh - 8.5rem);
  }
  .workspace-panel > form { display: flex; flex: 0 1 auto; min-height: 0; flex-direction: column; }
  .workspace-panel > :not(form) { flex-shrink: 0; }
  header .brand { gap: .6rem; }
  .team-wordmark { height: 40px; }
  .brand span { padding-left: .6rem; font-size: .8rem; }
  main { padding-block: 24px 46px; }
  .filters label { width: 100%; }
  .columns { grid-template-columns: 1fr; }
  .heading { align-items: start; }
  .booking { display: block; }
}
@media (max-width: 400px) {
  header .brand { gap: .45rem; }
  .team-header-account { column-gap: .6rem; }
  .brand span { padding-left: .45rem; }
}
