@font-face {
  font-family: "Rail Alphabet 3";
  src: url("/fonts/RailAlphabet3Web-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rail Alphabet 3";
  src: url("/fonts/RailAlphabet3Web-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --gbr-bright-blue: rgb(16 84 238);
  --gbr-deep-blue: rgb(0 30 97);
  --gbr-red: rgb(230 0 0);
  --gbr-light-blue: rgb(220 230 255);
  --gbr-grey-95: rgb(11 12 14);
  --gbr-grey-60: rgb(92 98 112);
  --gbr-grey-20: rgb(194 199 214);
  --gbr-grey-10: rgb(230 233 244);
  --gbr-grey-5: rgb(247 249 255);
  --gbr-white: rgb(255 255 255);
  --gbr-warning-yellow: rgb(255 237 0);
  --gbr-alert-red: rgb(230 0 0);
  --gbr-alert-red-tint-1: rgb(255 219 219);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--gbr-grey-95);
  background: var(--gbr-grey-5);
  font-family: "Rail Alphabet 3", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.announce-shell {
  min-height: 100vh;
  padding: 18px 14px 28px;
}

.announce-header,
.workspace-intro,
.announce-area {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.announce-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gbr-deep-blue);
  font-weight: 500;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--gbr-white);
  background: var(--gbr-deep-blue);
}

.brand-text {
  font-size: 1.12rem;
}

.mode-tabs {
  display: inline-flex;
  width: 100%;
  border: 2px solid var(--gbr-bright-blue);
  background: var(--gbr-white);
}

.tab-button {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-right: 2px solid var(--gbr-bright-blue);
  color: var(--gbr-deep-blue);
  background: var(--gbr-white);
  font-weight: 500;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button[aria-pressed="true"] {
  color: var(--gbr-white);
  background: var(--gbr-bright-blue);
}

.workspace-intro {
  margin-bottom: 18px;
}

.workspace-intro h1 {
  margin: 0;
  color: var(--gbr-deep-blue);
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
}

.workspace-intro p {
  margin: 8px 0 0;
  color: var(--gbr-grey-60);
  font-size: 1.05rem;
}

.announce-area {
  display: none;
}

.announce-area.is-active {
  display: grid;
  gap: 18px;
}

.control-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: end;
  padding: 18px;
  color: var(--gbr-white);
  background: var(--gbr-deep-blue);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgb(0 30 97 / 8%);
}

.field {
  min-width: 0;
}

.station-field {
  position: relative;
}

label {
  display: block;
  margin-bottom: 7px;
  color: inherit;
  font-weight: 500;
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 10px 0 12px;
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
  border: 2px solid transparent;
}

.input-with-action:focus-within {
  border-color: var(--gbr-warning-yellow);
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
}

input,
select {
  min-height: 48px;
  padding: 0 12px;
}

.input-with-action input {
  min-height: 44px;
  padding: 0;
  background: transparent;
}

textarea {
  min-height: 210px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--gbr-grey-20);
  border-radius: 8px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--gbr-warning-yellow);
  outline-offset: 0;
}

.input-with-action input:focus {
  outline: 0;
}

.clear-field-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: var(--gbr-deep-blue);
  background: var(--gbr-white);
  font-weight: 500;
}

.clear-field-button[hidden] {
  display: none;
}

.station-suggestions {
  position: absolute;
  z-index: 10;
  right: 0;
  left: 0;
  margin-top: 6px;
  overflow: hidden;
  border: 2px solid var(--gbr-bright-blue);
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
  box-shadow: 0 12px 24px rgb(0 30 97 / 18%);
}

.station-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--gbr-grey-10);
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
  text-align: left;
}

.station-option:hover,
.station-option:focus-visible {
  background: var(--gbr-light-blue);
}

.station-option strong {
  color: var(--gbr-deep-blue);
  text-align: right;
}

.primary-button,
.listen-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--gbr-white);
  background: var(--gbr-bright-blue);
  font-weight: 500;
}

.primary-button:disabled,
.primary-button.is-loading {
  color: var(--gbr-grey-60);
  background: var(--gbr-grey-10);
  cursor: wait;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.result-panel,
.preview-panel {
  overflow: hidden;
  border: 1px solid var(--gbr-grey-10);
  border-radius: 8px;
  background: var(--gbr-white);
  box-shadow: 0 10px 24px rgb(0 30 97 / 8%);
}

.preview-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 6px solid var(--gbr-bright-blue);
}

.preview-panel h2,
.preview-panel h3,
.panel-heading h2 {
  margin: 0;
  color: var(--gbr-deep-blue);
  font-size: 1.25rem;
  font-weight: 500;
}

.preview-panel h3 {
  font-size: 1rem;
}

.placeholder-panel {
  display: grid;
  gap: 10px;
}

.placeholder-list {
  display: grid;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--gbr-grey-10);
}

.placeholder-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gbr-grey-10);
  align-items: start;
}

.placeholder-row:last-child {
  border-bottom: 0;
}

.placeholder-row code {
  overflow-wrap: anywhere;
  color: var(--gbr-deep-blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.placeholder-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--gbr-grey-60);
}

.panel-heading {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-bottom: 1px solid var(--gbr-grey-10);
}

.panel-heading p {
  margin: 0;
  color: var(--gbr-grey-60);
}

.announcement-list {
  display: grid;
}

.train-result {
  border-bottom: 1px solid var(--gbr-grey-10);
}

.train-result summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-height: 72px;
  padding: 14px 16px;
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
  cursor: pointer;
}

.train-result summary:hover,
.train-result summary:focus-visible {
  background: var(--gbr-light-blue);
}

.train-result summary span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  min-width: 0;
}

.train-result summary strong {
  color: var(--gbr-deep-blue);
  font-weight: 500;
}

.train-result summary small {
  color: var(--gbr-grey-60);
}

.train-announcement-list {
  display: grid;
  border-top: 1px solid var(--gbr-grey-10);
  background: var(--gbr-grey-5);
}

.train-announcement-list .announcement-item {
  padding-left: 28px;
  background: var(--gbr-grey-5);
}

.train-announcement-list .announcement-item:hover,
.train-announcement-list .announcement-item:focus-visible {
  background: var(--gbr-light-blue);
}

.announcement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  width: 100%;
  min-height: 70px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--gbr-grey-10);
  color: var(--gbr-grey-95);
  background: var(--gbr-white);
  text-align: left;
}

.announcement-item:hover,
.announcement-item:focus-visible {
  background: var(--gbr-light-blue);
}

.announcement-item span,
.announcement-item strong {
  font-weight: 500;
}

.announcement-item strong {
  color: var(--gbr-deep-blue);
}

.announcement-item small {
  grid-column: 1 / -1;
  color: var(--gbr-grey-60);
  line-height: 1.35;
}

.empty-message {
  margin: 0;
  padding: 16px;
  color: var(--gbr-grey-60);
}

.empty-message.is-error {
  color: var(--gbr-alert-red);
  background: var(--gbr-alert-red-tint-1);
}

@media (min-width: 720px) {
  .announce-header {
    grid-template-columns: 1fr auto;
  }

  .mode-tabs {
    width: auto;
    min-width: 280px;
  }

  .control-band {
    grid-template-columns: minmax(220px, 1fr) 140px 140px auto;
  }

  .train-control-band {
    grid-template-columns: minmax(240px, 360px) auto;
    justify-content: start;
  }
}

@media (min-width: 980px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }
}
