:root {
  color-scheme: light dark;
  --ink: #17302d;
  --muted: #60726f;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --canvas: #eef6f3;
  --line: rgba(23, 63, 58, 0.12);
  --primary: #176e61;
  --primary-strong: #11564c;
  --accent: #5965d8;
  --success: #147d5b;
  --shadow: 0 18px 48px rgba(20, 67, 59, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(65, 195, 169, 0.2), transparent 34rem),
    radial-gradient(circle at 100% 28%, rgba(89, 101, 216, 0.14), transparent 31rem), var(--canvas);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
.button {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 19rem;
  height: 19rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.24;
  pointer-events: none;
}

.ambient-one {
  top: -7rem;
  inset-inline-start: -6rem;
  background: #44c5aa;
}

.ambient-two {
  top: 35%;
  inset-inline-end: -9rem;
  background: #6571e2;
}

.app-shell {
  width: min(100% - 24px, 920px);
  margin-inline: auto;
  padding: max(16px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 5px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-align: start;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(23, 110, 97, 0.18);
}

.brand span {
  display: grid;
}

.brand strong {
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.language-switch {
  display: flex;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(20, 67, 59, 0.06);
  backdrop-filter: blur(16px);
}

.language-button {
  min-width: 50px;
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.language-button.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 6px 15px rgba(23, 110, 97, 0.22);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 6vw, 52px);
  background:
    linear-gradient(125deg, rgba(17, 86, 76, 0.97), rgba(30, 101, 91, 0.94)), var(--primary-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  color: white;
}

.hero::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(255, 255, 255, 0.035),
    0 0 0 78px rgba(255, 255, 255, 0.025);
  content: '';
  pointer-events: none;
}

.privacy-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 650;
}

.privacy-chip span:first-child {
  color: #6fe0c5;
  font-size: 0.55rem;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 20px 0 8px;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

[dir='rtl'] .hero h1 {
  letter-spacing: 0;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
}

.search-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 610px;
  padding: 0 14px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(5, 35, 31, 0.18);
}

.search-box > span {
  font-size: 1.5rem;
  transform: translateY(-1px);
}

.search-box input {
  width: 100%;
  height: 54px;
  color: #17302d;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box kbd {
  padding: 4px 7px;
  color: #6a7775;
  background: #edf3f1;
  border: 1px solid #d9e5e2;
  border-radius: 7px;
  font:
    0.7rem ui-monospace,
    monospace;
  white-space: nowrap;
}

.status-region {
  min-height: 28px;
  padding: 16px 4px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.content-region {
  padding-block: 4px 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 13px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.12rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.support-card,
.article-card,
.detail-panel,
.state-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(20, 67, 59, 0.07);
  backdrop-filter: blur(16px);
}

.support-card,
.article-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 20px;
  color: inherit;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: start;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.support-card:hover,
.article-card:hover {
  border-color: rgba(23, 110, 97, 0.32);
  box-shadow: 0 16px 38px rgba(20, 67, 59, 0.12);
  transform: translateY(-2px);
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  background: rgba(23, 110, 97, 0.09);
  border-radius: 13px;
  font-size: 1.24rem;
}

.support-card strong,
.article-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.support-card p,
.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.card-arrow {
  position: absolute;
  top: 20px;
  inset-inline-end: 18px;
  color: var(--primary);
  font-weight: 800;
}

.detail-panel,
.state-card {
  padding: clamp(22px, 5vw, 38px);
  border-radius: var(--radius-xl);
}

.detail-panel h2,
.state-card h2 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.detail-panel p,
.state-card p {
  color: var(--muted);
  white-space: pre-line;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  color: white;
  background: var(--primary);
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 720;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.button:hover {
  background: var(--primary-strong);
}

.button.secondary {
  color: var(--primary-strong);
  background: rgba(23, 110, 97, 0.1);
}

.button.tertiary {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.back-button {
  margin-bottom: 14px;
}

.email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.email-address {
  display: block;
  overflow-wrap: anywhere;
  margin: 16px 0;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(23, 110, 97, 0.07);
  border-radius: 12px;
  font:
    0.9rem ui-monospace,
    monospace;
}

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(89, 101, 216, 0.07);
  border-inline-start: 3px solid var(--accent);
  border-radius: 10px;
  font-size: 0.82rem;
}

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

.skeleton {
  height: 148px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.48) 20%,
    rgba(255, 255, 255, 0.9) 45%,
    rgba(255, 255, 255, 0.48) 70%
  );
  background-size: 220% 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  animation: shimmer 1.4s infinite linear;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0);
  animation: ripple 560ms ease-out;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin-inline: auto;
  padding: 11px 16px;
  color: white;
  background: #17302d;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.84rem;
  animation: toast-in 180ms ease-out;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.footer-link {
  position: relative;
  overflow: hidden;
  padding: 5px 7px;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:focus-visible,
.button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(89, 101, 216, 0.42);
  outline-offset: 3px;
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 16px, 920px);
  }

  .hero {
    border-radius: 23px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .search-box kbd {
    display: none;
  }

  .card-grid,
  .skeleton-grid,
  .email-grid {
    grid-template-columns: 1fr;
  }

  .action-row .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1ef;
    --muted: #a8b9b6;
    --surface: rgba(22, 38, 36, 0.88);
    --surface-solid: #172724;
    --canvas: #0e1917;
    --line: rgba(214, 237, 232, 0.12);
    --primary: #39ab96;
    --primary-strong: #2e8e7e;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  }

  .search-box {
    background: rgba(245, 251, 249, 0.96);
  }

  .skeleton {
    background: linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.03) 20%,
      rgba(255, 255, 255, 0.1) 45%,
      rgba(255, 255, 255, 0.03) 70%
    );
    background-size: 220% 100%;
  }
}
