.nwd-events-app {
  --nwd-ink: #132238;
  --nwd-muted: #667085;
  --nwd-line: #e5e9ef;
  --nwd-soft: #f4f7fa;
  --nwd-white: #ffffff;
  --nwd-navy: #0b263e;
  --nwd-teal: #0f766e;
  --nwd-teal-dark: #0b5d57;
  --nwd-gold: #f4b740;
  --nwd-danger: #b42318;
  --nwd-radius: 18px;
  color: var(--nwd-ink);
  font-family: inherit;
  margin: clamp(24px, 5vw, 64px) auto;
  max-width: 1440px;
  width: 100%;
}

.nwd-events-app *,
.nwd-events-app *::before,
.nwd-events-app *::after {
  box-sizing: border-box;
}

.nwd-calendar-hero {
  align-items: center;
  background:
    radial-gradient(circle at 92% 15%, rgba(244, 183, 64, 0.25), transparent 22%),
    linear-gradient(120deg, #071d30 0%, #0b314d 58%, #0f5d5b 100%);
  border-radius: 26px 26px 0 0;
  color: var(--nwd-white);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  padding: clamp(30px, 5vw, 60px);
  position: relative;
}

.nwd-calendar-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  height: 280px;
  pointer-events: none;
  position: absolute;
  right: -80px;
  top: -150px;
  width: 280px;
}

.nwd-calendar-hero > * {
  position: relative;
  z-index: 1;
}

.nwd-calendar-hero h2 {
  color: inherit;
  font-size: clamp(2rem, 5vw, 3.75rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 4px 0 16px;
}

.nwd-calendar-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin: 0;
  max-width: 620px;
}

.nwd-calendar-hero .nwd-eyebrow {
  color: var(--nwd-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nwd-button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  gap: 7px;
  justify-content: center;
  line-height: 1;
  min-height: 46px;
  padding: 13px 20px;
  text-decoration: none !important;
  transition: box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.nwd-button:hover {
  transform: translateY(-1px);
}

.nwd-button:focus-visible,
.nwd-month-nav:focus-visible,
.nwd-today-link:focus-visible,
.nwd-event-chip:focus-visible,
.nwd-dialog-close:focus-visible {
  outline: 3px solid rgba(244, 183, 64, 0.7);
  outline-offset: 3px;
}

.nwd-button-light {
  background: var(--nwd-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  color: var(--nwd-navy) !important;
  flex: 0 0 auto;
}

.nwd-button-primary {
  background: var(--nwd-teal);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.22);
  color: var(--nwd-white) !important;
}

.nwd-button-primary:hover {
  background: var(--nwd-teal-dark);
}

.nwd-button-secondary {
  background: #e7f6f4;
  color: var(--nwd-teal-dark) !important;
}

.nwd-calendar-toolbar {
  align-items: center;
  background: var(--nwd-white);
  border-left: 1px solid var(--nwd-line);
  border-right: 1px solid var(--nwd-line);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 96px;
  padding: 18px clamp(18px, 4vw, 42px);
  position: relative;
}

.nwd-current-month {
  align-items: baseline;
  display: flex;
  gap: 9px;
  justify-content: center;
  min-width: 240px;
}

.nwd-current-month strong {
  color: var(--nwd-ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.nwd-current-month span {
  color: var(--nwd-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nwd-month-nav {
  align-items: center;
  background: var(--nwd-soft);
  border-radius: 50%;
  color: var(--nwd-ink) !important;
  display: inline-flex;
  font-size: 1.25rem;
  height: 43px;
  justify-content: center;
  text-decoration: none !important;
  transition: background 160ms ease;
  width: 43px;
}

.nwd-month-nav:hover {
  background: #e6ecef;
}

.nwd-today-link {
  border: 1px solid var(--nwd-line);
  border-radius: 999px;
  color: var(--nwd-teal-dark) !important;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 13px;
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  text-decoration: none !important;
}

.nwd-calendar-scroll {
  border: 1px solid var(--nwd-line);
  border-radius: 0 0 22px 22px;
  overflow-x: auto;
}

.nwd-calendar-grid {
  background: var(--nwd-line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 840px;
}

.nwd-weekday {
  background: #f8fafc;
  color: #697586;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 13px 8px;
  text-align: center;
  text-transform: uppercase;
}

.nwd-weekday-short {
  display: none;
}

.nwd-calendar-day {
  background: var(--nwd-white);
  min-height: clamp(128px, 13vw, 178px);
  padding: 11px 9px;
  position: relative;
}

.nwd-calendar-day.is-outside {
  background: #f8fafb;
  color: #aeb7c2;
}

.nwd-day-number {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 3px 10px;
}

.nwd-day-number > span {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 750;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.nwd-day-number em {
  color: var(--nwd-teal);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.nwd-calendar-day.is-today .nwd-day-number > span {
  background: var(--nwd-teal);
  color: var(--nwd-white);
}

.nwd-day-events {
  display: grid;
  gap: 6px;
}

.nwd-event-chip {
  align-items: flex-start;
  background: #eaf6f5;
  border: 0;
  border-left: 3px solid var(--nwd-teal);
  border-radius: 6px 9px 9px 6px;
  color: #164e4a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 1px;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
  transition: background 150ms ease, transform 150ms ease;
  width: 100%;
}

.nwd-event-chip:hover {
  background: #d9efed;
  transform: translateY(-1px);
}

.nwd-event-chip time {
  font-size: 0.62rem;
  font-weight: 800;
  opacity: 0.75;
  text-transform: uppercase;
}

.nwd-event-chip > span:not(.nwd-star) {
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.nwd-event-chip.is-featured {
  background: #fff6df;
  border-left-color: var(--nwd-gold);
  color: #76500d;
  padding-left: 24px;
  position: relative;
}

.nwd-star {
  color: #dc930b;
  font-size: 0.7rem;
  left: 8px;
  position: absolute;
  top: 8px;
}

.nwd-event-chip.is-muted {
  background: #f2f4f7;
  border-left-color: #98a2b3;
  color: #667085;
  text-decoration: line-through;
}

.nwd-event-dialog {
  background: transparent;
  border: 0;
  max-height: 92vh;
  max-width: 760px;
  padding: 18px;
  width: calc(100% - 24px);
}

.nwd-event-dialog::backdrop {
  backdrop-filter: blur(7px);
  background: rgba(5, 18, 30, 0.72);
}

.nwd-dialog-card {
  background: var(--nwd-white);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(3, 17, 28, 0.32);
  max-height: calc(92vh - 36px);
  overflow-y: auto;
  position: relative;
}

.nwd-dialog-image {
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  width: 100%;
}

.nwd-dialog-close {
  align-items: center;
  background: rgba(11, 38, 62, 0.92);
  border: 0;
  border-radius: 50%;
  color: var(--nwd-white);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 1.5rem;
  height: 40px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 15px;
  top: 15px;
  width: 40px;
  z-index: 2;
}

.nwd-dialog-content {
  padding: clamp(24px, 5vw, 46px);
}

.nwd-dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.nwd-category-tag,
.nwd-status-tag {
  background: #e7f6f4;
  border-radius: 999px;
  color: var(--nwd-teal-dark);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.nwd-status-tag.is-cancelled {
  background: #fee4e2;
  color: var(--nwd-danger);
}

.nwd-status-tag.is-postponed {
  background: #fff2cc;
  color: #7a4d00;
}

.nwd-dialog-content h3 {
  color: var(--nwd-ink);
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 12px;
}

.nwd-dialog-summary {
  color: var(--nwd-muted);
  font-size: 1.05rem;
  margin: 0 0 26px;
}

.nwd-event-facts {
  background: var(--nwd-soft);
  border-radius: 16px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 26px;
  overflow: hidden;
}

.nwd-event-facts div {
  background: var(--nwd-white);
  padding: 13px 15px;
}

.nwd-event-facts dt {
  color: var(--nwd-muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.nwd-event-facts dd {
  color: var(--nwd-ink);
  font-size: 0.9rem;
  font-weight: 650;
  margin: 0;
}

.nwd-dialog-description {
  color: #435068;
  line-height: 1.75;
}

.nwd-dialog-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.nwd-text-link {
  color: var(--nwd-teal-dark) !important;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 9px 5px;
}

.nwd-dialog-admin {
  align-items: center;
  border-top: 1px solid var(--nwd-line);
  display: flex;
  gap: 18px;
  margin-top: 28px;
  padding-top: 18px;
}

.nwd-dialog-admin a,
.nwd-dialog-admin button {
  background: none;
  border: 0;
  color: var(--nwd-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.nwd-dialog-admin button {
  color: var(--nwd-danger);
}

.nwd-event-manager {
  background: var(--nwd-white);
  border: 1px solid var(--nwd-line);
  border-radius: 22px;
  box-shadow: 0 16px 55px rgba(11, 38, 62, 0.08);
  margin-top: clamp(24px, 4vw, 44px);
  overflow: hidden;
}

.nwd-event-manager > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 22px clamp(20px, 4vw, 36px);
}

.nwd-event-manager > summary::-webkit-details-marker {
  display: none;
}

.nwd-event-manager > summary span:first-child {
  display: grid;
  gap: 2px;
}

.nwd-event-manager > summary strong {
  color: var(--nwd-ink);
  font-size: 1rem;
}

.nwd-event-manager > summary small {
  color: var(--nwd-muted);
  font-size: 0.75rem;
}

.nwd-summary-icon {
  align-items: center;
  background: var(--nwd-soft);
  border-radius: 50%;
  color: var(--nwd-teal);
  display: inline-flex;
  font-size: 1.2rem;
  height: 38px;
  justify-content: center;
  transition: transform 180ms ease;
  width: 38px;
}

.nwd-event-manager[open] .nwd-summary-icon {
  transform: rotate(45deg);
}

.nwd-event-form {
  border-top: 1px solid var(--nwd-line);
  padding: clamp(24px, 5vw, 48px);
}

.nwd-form-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.nwd-form-heading span {
  color: var(--nwd-teal);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nwd-form-heading h3 {
  color: var(--nwd-ink);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
  margin: 3px 0 0;
}

.nwd-form-heading a {
  color: var(--nwd-muted);
  font-size: 0.78rem;
}

.nwd-event-form fieldset {
  border: 0;
  border-top: 1px solid var(--nwd-line);
  margin: 34px 0 0;
  padding: 30px 0 0;
}

.nwd-event-form legend {
  color: var(--nwd-ink);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  padding: 0 12px 0 0;
}

.nwd-form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nwd-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nwd-form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nwd-span-2 {
  grid-column: span 2;
}

.nwd-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.nwd-field > span {
  color: #344054;
  font-size: 0.78rem;
  font-weight: 750;
}

.nwd-field > span b {
  color: var(--nwd-danger);
}

.nwd-field input,
.nwd-field select,
.nwd-field textarea {
  appearance: none;
  background-color: var(--nwd-white);
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  color: var(--nwd-ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  margin: 0;
  min-height: 46px;
  padding: 10px 12px;
  transition: border 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.nwd-field select {
  background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 34px;
}

.nwd-field textarea {
  min-height: 130px;
  resize: vertical;
}

.nwd-field input:focus,
.nwd-field select:focus,
.nwd-field textarea:focus {
  border-color: var(--nwd-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: 0;
}

.nwd-field input:disabled {
  background: #f2f4f7;
  color: #98a2b3;
}

.nwd-field input[type="file"] {
  font-size: 0.78rem;
  padding: 7px;
}

.nwd-field input[type="file"]::file-selector-button {
  background: var(--nwd-soft);
  border: 0;
  border-radius: 7px;
  color: var(--nwd-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-right: 10px;
  padding: 7px 10px;
}

.nwd-field small {
  color: var(--nwd-muted);
  font-size: 0.7rem;
}

.nwd-check {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.nwd-check input {
  accent-color: var(--nwd-teal);
  height: 18px;
  margin: 0;
  width: 18px;
}

.nwd-check span {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 650;
}

.nwd-recurrence-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.nwd-segmented {
  display: inline-flex;
  margin-bottom: 20px;
}

.nwd-segmented label {
  cursor: pointer;
}

.nwd-segmented input {
  opacity: 0;
  position: absolute;
}

.nwd-segmented span {
  background: var(--nwd-soft);
  border: 1px solid var(--nwd-line);
  color: var(--nwd-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 750;
  margin-left: -1px;
  padding: 9px 15px;
}

.nwd-segmented label:first-child span {
  border-radius: 9px 0 0 9px;
  margin-left: 0;
}

.nwd-segmented label:last-child span {
  border-radius: 0 9px 9px 0;
}

.nwd-segmented input:checked + span {
  background: var(--nwd-teal);
  border-color: var(--nwd-teal);
  color: var(--nwd-white);
  position: relative;
}

.nwd-segmented input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.nwd-feature-check {
  align-self: end;
  background: #fff9e9;
  border: 1px solid #f6dfaa;
  border-radius: 11px;
  margin: 0;
  min-height: 46px;
  padding: 8px 12px;
}

.nwd-feature-check span {
  display: grid;
}

.nwd-feature-check small {
  color: #7b6530;
  font-size: 0.66rem;
  font-weight: 500;
}

.nwd-form-actions {
  align-items: center;
  border-top: 1px solid var(--nwd-line);
  display: flex;
  gap: 16px;
  margin-top: 34px;
  padding-top: 26px;
}

.nwd-form-actions > span {
  color: var(--nwd-muted);
  font-size: 0.72rem;
}

.nwd-notice {
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 14px 17px;
}

.nwd-notice.is-success {
  background: #e7f6f0;
  border: 1px solid #a6e1cc;
  color: #116149;
}

.nwd-notice.is-error {
  background: #fff0ee;
  border: 1px solid #f4b8b1;
  color: var(--nwd-danger);
}

.nwd-is-hidden {
  display: none !important;
}

body.nwd-dialog-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .nwd-form-grid-3,
  .nwd-form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nwd-today-link {
    position: static;
  }

  .nwd-calendar-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .nwd-events-app {
    margin: 24px auto;
  }

  .nwd-calendar-hero {
    align-items: flex-start;
    border-radius: 18px 18px 0 0;
    flex-direction: column;
    min-height: auto;
    padding: 30px 22px;
  }

  .nwd-calendar-hero h2 {
    font-size: 2.25rem;
  }

  .nwd-current-month {
    min-width: 160px;
  }

  .nwd-weekday-full {
    display: none;
  }

  .nwd-weekday-short {
    display: inline;
  }

  .nwd-form-grid,
  .nwd-form-grid-3,
  .nwd-form-grid-4,
  .nwd-recurrence-row {
    grid-template-columns: 1fr;
  }

  .nwd-span-2 {
    grid-column: span 1;
  }

  .nwd-event-facts {
    grid-template-columns: 1fr;
  }

  .nwd-event-form {
    padding: 24px 18px;
  }

  .nwd-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nwd-form-actions .nwd-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nwd-events-app *,
  .nwd-events-app *::before,
  .nwd-events-app *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
