.path-medical-abbreviation-expander section > div[class*="container"]:not([class*="space-"]) {
  padding-top: 0;
  padding-bottom: 0;
}

.medical-expander__input-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.medical-expander__input-heading h2 {
  margin: 0 0 0.3rem;
  color: #173a5e;
  font-size: 1.3rem;
  font-weight: 800;
}

.medical-expander__input-heading p {
  margin: 0;
  color: #6b7d8d;
  font-size: 0.92rem;
  line-height: 1.5;
}

.medical-expander__secure-badge {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #e9f8ef;
  color: #176b3a;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.medical-expander__hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border: 1px solid #c6e1f2;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      #eef9ff,
      #e1f3fc
    );
  color: #147db5;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 22px rgb(20 125 181 / 12%);
}

.medical-expander__hero-icon span {
  line-height: 1;
}

.path-medical-abbreviation-expander main {
  padding-top: 0;
}

.path-medical-abbreviation-expander
  .medical-abbreviation-expander-form {
  padding-top: 1rem;
}

/* Hide Drupal breadcrumb only on the Medical Abbreviation Expander page. */
.path-medical-abbreviation-expander .breadcrumb,
.path-medical-abbreviation-expander .region-breadcrumb {
  display: none;
}

.medical-abbreviation-expander-form {
  position: relative;
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: 2rem 1rem 4rem;
}

.medical-expander__intro {
  position: relative;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 1.5rem;
  padding: 2.4rem 2rem;
  overflow: hidden;
  border: 1px solid #dce9f4;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top right,
      rgb(30 159 230 / 14%),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      #f8fcff 0%,
      #ffffff 55%,
      #f3f9fd 100%
    );
  text-align: center;
  box-shadow:
    0 20px 50px rgb(19 58 92 / 7%),
    0 4px 12px rgb(19 58 92 / 4%);
}

.medical-expander__intro::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(
    90deg,
    #173f6b,
    #1e9fe6,
    #d5363a
  );
  content: "";
  transform: translateX(-50%);
}

.medical-expander__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid #bfdaed;
  border-radius: 999px;
  background: #eef8fe;
  color: #145f91;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.medical-expander__eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1e9fe6;
  box-shadow: 0 0 0 4px rgb(30 159 230 / 12%);
}

.medical-expander__intro h1 {
  max-width: 760px;
  margin: 0 auto 1rem;
  color: #173a5e;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.medical-expander__intro h1 span {
  color: #1685c0;
}

.medical-expander__intro p {
  max-width: 690px;
  margin: 0 auto;
  color: #607387;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.75;
}

.medical-expander__card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid #d7e5ef;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 20px 55px rgb(20 56 88 / 9%),
    0 4px 12px rgb(20 56 88 / 4%);
}

.medical-expander__card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    #173f6b,
    #1e9fe6,
    #d5363a
  );
  content: "";
}

.medical-expander__tool-input {
  margin-bottom: 1.5rem;
}

.medical-expander__privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #f1c97a;
  border-radius: 12px;
  background: #fff9e9;
  color: #684f12;
  font-size: 0.9rem;
  line-height: 1.55;
}

.medical-expander__privacy-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.medical-expander__privacy-label > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.medical-expander__privacy-label strong {
  color: #7b3f00;
  font-weight: 800;
}

.medical-expander__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 230px;
  padding: 1.25rem;
  border: 1px solid #c8d7e2;
  border-radius: 14px;
  background: #fbfdff;
  color: #263746;
  font: inherit;
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.medical-expander__input:hover {
  border-color: #9fbcd1;
}

.medical-expander__input:focus {
  border-color: #1976ad;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px rgb(25 118 173 / 12%);
}

.medical-abbreviation-expander-form .description {
  margin-top: 0.6rem;
  color: #6b7d8d;
  font-size: 0.87rem;
  line-height: 1.5;
}

.medical-expander__submit-wrapper {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.medical-abbreviation-expander-form
  .medical-expander__submit-wrapper
  .medical-expander__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 48px;
  margin: 0;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    #123f6d 0%,
    #147db5 100%
  );
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 12px 28px rgb(20 125 181 / 28%);
  transition: all .25s ease;
}

.medical-abbreviation-expander-form
  .medical-expander__submit-wrapper
  .medical-expander__submit:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.medical-expander__submit-wrapper .ajax-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding-top: 0.15rem;
}

.medical-expander__submit-wrapper
  .ajax-progress-throbber
  .throbber {
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 3px solid rgb(20 125 181 / 20%);
  border-top-color: #147db5;
  border-radius: 50%;
  background: transparent;
  animation: medical-expander-spin 0.7s linear infinite;
}

.medical-expander__submit-wrapper .ajax-progress .message {
  padding: 0;
  color: #52697d;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

@keyframes medical-expander-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Result wrapper. */
.medical-expander__result-wrapper {
  margin-top: 1.5rem;
  scroll-margin-top: 120px;
}

.medical-expander__result-wrapper:focus {
  outline: none;
}

.medical-expander-result {
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgb(20 45 70 / 8%);
}

.medical-expander-result__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e3eaf0;
  background: #f7fafc;
}

.medical-expander-result__header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.medical-expander-result__eyebrow {
  margin: 0 0 0.35rem;
  color: #2463a8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.medical-expander-result__status {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #fff3cd;
  color: #664d03;
  font-size: 0.78rem;
  font-weight: 700;
}

.medical-expander-result__warnings {
  margin: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid #f0c36a;
  border-radius: 12px;
  background: #fff8e6;
  color: #5d4500;
}

.medical-expander-result__warnings h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.medical-expander-result__warnings ul {
  margin: 0;
  padding-left: 1.25rem;
}

.medical-expander-result__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.medical-expander-result__panel {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid #dce5ed;
  border-radius: 14px;
  background: #f8fafc;
}

.medical-expander-result__panel--expanded {
  border-color: #b8d6f1;
  background: #f2f8fd;
}

.medical-expander-result__panel h3 {
  margin: 0 0 0.75rem;
  color: #243b53;
  font-size: 1rem;
}

.medical-expander-result__text {
  overflow-wrap: anywhere;
  color: #263746;
  font-size: 1rem;
  line-height: 1.75;
}

.medical-expander-result__matches {
  padding: 0 1.5rem 1.5rem;
}

.medical-expander-result__matches > h3 {
  margin: 0 0 1rem;
}

.medical-expander-result__table-wrapper {
  overflow-x: auto;
  border: 1px solid #dce5ed;
  border-radius: 14px;
}

.medical-expander-result__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.medical-expander-result__table th,
.medical-expander-result__table td {
  padding: 1rem;
  border-bottom: 1px solid #e5ebf0;
  text-align: left;
  vertical-align: top;
}

.medical-expander-result__table th {
  background: #edf3f8;
  color: #334e68;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.medical-expander-result__table tr:last-child td {
  border-bottom: 0;
}

.medical-expander-result__badge {
  display: inline-flex;
  margin: 0.2rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.medical-expander-result__badge--high {
  background: #dff5e5;
  color: #176b32;
}

.medical-expander-result__badge--medium {
  background: #fff3cd;
  color: #725400;
}

.medical-expander-result__badge--low,
.medical-expander-result__badge--ambiguous {
  background: #fde2e2;
  color: #922b2b;
}

.medical-expander-result__alternatives {
  margin: 0;
  padding-left: 1.1rem;
}

.medical-expander-result__none {
  color: #7b8794;
  font-style: italic;
}

.medical-expander-result__empty {
  margin: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f7fafc;
}

.medical-expander-result__disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid #f0c36a;
  border-left: 5px solid #e59b13;
  background: #fff8dc;
  color: #4f4300;
  font-size: 0.95rem;
  line-height: 1.6;
}

.medical-expander-result__disclaimer-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}

.medical-expander-result__disclaimer-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.medical-expander-result__disclaimer-content strong {
  color: #7a3e00;
  font-weight: 800;
}

.medical-expander-result__error {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
}

/* General notice. */
.medical-expander__notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid #efcf8b;
  border-left: 4px solid #df8d00;
  border-radius: 12px;
  background: #fffaf0;
  color: #5d4500;
  font-size: 0.9rem;
  line-height: 1.6;
}

.medical-expander__warning-icon {
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.medical-expander__notice > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.medical-expander__notice > div > strong:first-child {
  color: #7a3e00;
  font-weight: 800;
}

.medical-expander__privacy-warning {
  margin-top: 0.4rem;
  color: #a11f1f;
  font-weight: 800;
}

.medical-expander__error-area {
  margin-bottom: 1rem;
}

.medical-expander__error-area:empty {
  display: none;
}

.medical-expander__validation-error {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border: 1px solid #dc8c8c;
  border-left: 5px solid #b42318;
  border-radius: 12px;
  background: #fff2f1;
  color: #7a271a;
  font-size: 0.95rem;
  line-height: 1.55;
}

.medical-expander__validation-error strong {
  color: #912018;
  font-size: 1rem;
  font-weight: 800;
}

.medical-expander__validation-error span {
  color: #7a271a;
}

/* Final submit button states — override theme button styles. */
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
input.medical-expander__submit,
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
button.medical-expander__submit {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(
    135deg,
    #123f6d 0%,
    #147db5 100%
  ) !important;
  border: 0 !important;
  font-weight: 800;
}

.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
input.medical-expander__submit:hover,
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
input.medical-expander__submit:focus,
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
button.medical-expander__submit:hover,
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
button.medical-expander__submit:focus {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(
    90deg,
    #0b2f59 0%,
    #157fbe 100%
  ) !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(21 127 190 / 25%);
}

.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
input.medical-expander__submit:active,
.path-medical-abbreviation-expander
.medical-abbreviation-expander-form
.medical-expander__submit-wrapper
button.medical-expander__submit:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  transform: translateY(0);
}

@media (max-width: 760px) {

  .medical-expander__intro {
    margin-bottom: 1.5rem;
    padding: 2rem 1.1rem;
    border-radius: 18px;
  }

  .medical-expander__intro h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .medical-expander__intro p {
    font-size: 0.95rem;
  }

  .medical-abbreviation-expander-form {
    padding: 1.25rem 0.75rem 3rem;
  }

  .medical-expander__card {
    padding: 1rem;
    border-radius: 16px;
  }

  .medical-expander__privacy-label {
    font-size: 0.86rem;
  }

  .medical-expander__submit-wrapper {
    align-items: stretch;
    flex-direction: column;
  }

  .medical-expander__submit {
    width: 100%;
    min-width: 0;
  }

  .medical-expander__submit-wrapper .ajax-progress {
    justify-content: center;
  }

  .medical-expander-result__header {
    display: block;
  }

  .medical-expander-result__status {
    margin-top: 0.85rem;
  }

  .medical-expander-result__comparison {
    grid-template-columns: 1fr;
  }

  .medical-expander-result__table-wrapper {
    overflow: visible;
    border: 0;
  }

  .medical-expander-result__table {
    min-width: 0;
  }

  .medical-expander-result__table thead {
    display: none;
  }

  .medical-expander-result__table,
  .medical-expander-result__table tbody,
  .medical-expander-result__table tr,
  .medical-expander-result__table td {
    display: block;
    box-sizing: border-box;
    width: 100%;
  }

  .medical-expander-result__table tr {
    margin-bottom: 1rem;
    border: 1px solid #dce5ed;
    border-radius: 12px;
    background: #fff;
  }

  .medical-expander-result__table td {
    display: grid;
    grid-template-columns: minmax(110px, 35%) 1fr;
    gap: 0.75rem;
    border-bottom: 1px solid #e5ebf0;
  }

  .medical-expander-result__table td::before {
    content: attr(data-label);
    color: #52606d;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .medical-expander-result__table td:last-child {
    border-bottom: 0;
  }
}