:root {
  --color-brand: #04b46c;
  --color-text: #333;
  --color-muted: #777;
  --color-border: #ddd;
  --color-bg: #eff4f4;
  --color-surface: #fff;
  --container-width: 1080px;
  --container-narrow: 980px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background: var(--color-surface);
}

body.has-drawer {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 32px), var(--container-width));
  margin: 0 auto;
}

.container--narrow {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 0 auto;
}

.site-header {
  padding: 16px 0 0;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo img {
  width: 108px;
}

.site-header__utility {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
}

.site-header__utility a {
  color: var(--color-text);
}

.site-header__utility-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-header__menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-brand);
  border-radius: 12px;
  background: #fff;
  color: var(--color-brand);
}

.site-header__menu-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.site-header__icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: var(--color-brand);
}

.site-header__utility-item--disabled {
  color: var(--color-text);
  opacity: 0.9;
}

.site-tabs {
  margin-top: 16px;
  background: var(--color-bg);
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.site-tabs__inner {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
}

.site-tabs__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-bottom: 5px solid transparent;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.site-tabs__link[aria-current="page"] {
  border-bottom-color: var(--color-brand);
}

.site-drawer {
  display: none;
}

.page-main {
  padding: 24px 0 48px;
}

.page-main--faq {
  padding-top: 0;
}

.faq-heading-wrap {
  padding-top: 16px;
}

.faq-page-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 108px;
  background: var(--color-brand);
  color: #fff;
}

.faq-page-heading__title {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.hero-stack,
.outline-stack {
  display: grid;
  gap: 30px;
}

.section-card {
  background: var(--color-surface);
  width: 100%;
  margin-bottom: 30px;
}

.section-heading {
  margin: 16px 0;
  padding: 8px 0;
  font-size: 22px;
  border-bottom: 2px solid var(--color-brand);
}

.faq-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 48px 0;
  text-align: center;
}

.faq-hero__title {
  margin: 16px 0;
  font-size: 20px;
}

.faq-search {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: min(100%, 600px);
  margin: 0;
}

.faq-search__field {
  position: relative;
  flex: 1;
}

.faq-search__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 16px;
}

.faq-search__input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  font-size: 16px;
}

.faq-search__button {
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--color-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.faq-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.faq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 48%;
  min-height: 80px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
}

.faq-card:hover,
.faq-list__item:hover {
  background: var(--color-bg);
}

.faq-card::after {
  content: "›";
  color: var(--color-brand);
  font-size: 48px;
  line-height: 1;
}

.faq-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-list__label {
  width: 5%;
  color: var(--color-brand);
  font-size: 18px;
  font-weight: 700;
}

.faq-list__text {
  flex: 1;
  font-size: 16px;
}

.faq-list__item::after {
  content: "›";
  color: var(--color-brand);
  font-size: 48px;
  line-height: 1;
}

.faq-message {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
}

.faq-content {
  padding: 8px 0 16px;
}

.faq-content p {
  margin: 0 0 16px;
}

.faq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.faq-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e4f4f4;
  color: var(--color-brand);
  font-size: 14px;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--color-text);
  font-weight: 700;
}

.page-title {
  margin: 0 0 24px;
  font-size: 28px;
}

.placeholder-panel {
  padding: 32px 24px;
  border-radius: 4px;
  background: var(--color-bg);
}

.placeholder-panel p {
  margin: 0 0 16px;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 0 auto;
}

.contact-links > * {
  flex: 1;
}

.contact-links img {
  width: 100%;
}

.auth-panel {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 16px auto 30px;
  padding: 16px 250px;
  background: var(--color-bg);
}

.auth-error {
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid #df4759;
  color: #df4759;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.auth-error[hidden] {
  display: none;
}

.field-label {
  display: block;
  margin-top: 24px;
  font-size: 18px;
  font-weight: 500;
}

.text-input,
.select-input,
.textarea-input {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.textarea-input {
  min-height: 200px;
  resize: vertical;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--color-brand);
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
}

.primary-button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.primary-button--full {
  width: 100%;
  margin: 32px 0;
}

.contact-form-wrap {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 32px auto;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.form-label-box {
  display: flex;
  align-items: center;
  width: 280px;
  margin-bottom: 8px;
}

.form-label-text {
  width: 70%;
  margin-right: 8px;
  font-weight: 500;
}

.required-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #df4759;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.form-row__field {
  flex: 1;
}

.form-complete {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin: 64px auto 32px;
}

.site-footer {
  margin: 24px 0 32px;
}

.site-footer img {
  width: 100%;
}

@media (max-width: 640px) {
  .container,
  .container--narrow {
    width: min(calc(100% - 24px), var(--container-width));
  }

  .site-header__bar {
    align-items: center;
    flex-direction: row;
  }

  .site-header__utility,
  .site-tabs {
    display: none;
  }

  .site-header__menu-button {
    display: inline-flex;
  }

  .site-drawer {
    display: block;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
  }

  .site-drawer__overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .site-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(70vw, 320px);
    height: 100%;
    padding: 8px 16px 24px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.2s ease;
  }

  .site-drawer.is-open {
    pointer-events: auto;
  }

  .site-drawer.is-open .site-drawer__overlay {
    opacity: 1;
  }

  .site-drawer.is-open .site-drawer__panel {
    transform: translateX(0);
  }

  .site-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .site-drawer__title {
    font-size: 16px;
    font-weight: 700;
  }

  .site-drawer__close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-brand);
    border-radius: 12px;
    background: #fff;
    color: var(--color-brand);
    font-size: 28px;
    line-height: 1;
  }

  .site-drawer__nav {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
  }

  .site-drawer__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    color: #222;
    font-size: 16px;
    font-weight: 500;
  }

  .site-drawer__link:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .site-drawer__link--disabled {
    color: #222;
    opacity: 0.9;
  }

  .page-main {
    padding-top: 20px;
  }

  .page-main--faq {
    padding-top: 0;
  }

  .faq-page-heading {
    min-height: 68px;
  }

  .faq-page-heading__title {
    font-size: 20px;
  }

  .faq-hero__title,
  .page-title {
    font-size: 22px;
  }

  .section-heading {
    font-size: 20px;
  }

  .faq-grid {
    display: block;
  }

  .faq-list__label {
    width: 10%;
  }

  .faq-card {
    width: 100%;
  }

  .contact-links {
    flex-direction: column;
  }

  .auth-panel {
    width: min(calc(100% - 32px), var(--container-narrow));
    margin-top: 16px;
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-label-box {
    width: 100%;
  }

  .form-label-text {
    width: auto;
  }
}
