:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #313a46;
  --muted: #627083;
  --brand: #37a6c7;
  --brand-dark: #197c99;
  --brand-soft: #e6f6fb;
  --accent: #f59e0b;
  --card: #f7f9fb;
  --line: #e5eef4;
  --dark: #0b1118;
  --dark-soft: #131b23;
  --danger: #b52b3a;
  --shadow: 0 18px 48px rgba(8, 33, 44, 0.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(55, 166, 199, 0.15), transparent 30rem),
    linear-gradient(180deg, #fff 0%, #f6fafc 100%);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0 72%, var(--accent) 72% 100%);
}

button, input { font: inherit; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
}

.brand img {
  display: block;
  width: 164px;
  height: auto;
}

.link-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  padding: 9px 16px;
  transition: 0.2s ease;
}

.link-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  width: min(100%, 980px);
  min-height: 590px;
  margin: 44px auto 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 54px);
  color: #fff;
  background:
    radial-gradient(circle at 4% 4%, rgba(55, 166, 199, 0.32), transparent 50%),
    linear-gradient(155deg, var(--dark) 0%, var(--dark-soft) 100%);
  border-right: 3px solid var(--brand);
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-visual::before {
  width: 310px;
  height: 310px;
  right: -190px;
  top: 95px;
  border: 54px solid rgba(55, 166, 199, 0.12);
}

.login-visual::after {
  width: 180px;
  height: 180px;
  left: -115px;
  bottom: 48px;
  border: 34px solid rgba(245, 158, 11, 0.09);
}

.sticker {
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0c11;
  font-size: 0.78rem;
  font-weight: 850;
  transform: rotate(-2deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.sticker small {
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  background: #000;
  color: #fff;
  font-size: 0.68rem;
}

.login-visual > div { z-index: 1; }

.visual-kicker {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-visual h2 {
  max-width: 9ch;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.35rem, 4vw, 3.55rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.login-visual p:not(.visual-kicker) {
  max-width: 38ch;
  margin: 0;
  color: #adb9c7;
  font-size: 1rem;
}

.visual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(55, 166, 199, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe7ee;
  font-size: 0.76rem;
  font-weight: 700;
}

.login-panel {
  align-self: center;
  padding: clamp(34px, 6vw, 68px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(55, 166, 199, 0.24);
  border-radius: 999px;
  background: rgba(55, 166, 199, 0.12);
  color: #0a5161;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 16px 0 12px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.45rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.login-panel h1 { font-size: clamp(2rem, 4vw, 2.75rem); }

.intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}

.login-form label {
  margin-top: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.input-wrap {
  display: flex;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(55, 166, 199, 0.13);
  background: #fff;
}

.input-wrap i {
  padding-left: 15px;
  color: var(--brand-dark);
  font-size: 1.1rem;
}

.login-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 13px 14px 13px 10px;
}

.primary-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(55, 166, 199, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  margin-top: 17px;
  padding: 13px 20px;
}

.primary-button:hover,
.download-button:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(55, 166, 199, 0.38);
}

.privacy-note {
  margin: 22px 0 0;
  color: #7a8794;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.privacy-note i { color: var(--brand-dark); }

.alert,
.empty-state {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 12px;
}

.alert {
  border-left: 4px solid var(--danger);
  background: #fff0f1;
  color: var(--danger);
}

.empty-state {
  border: 2px dashed var(--line);
  background: var(--card);
  color: var(--muted);
}

.downloads {
  margin-top: 40px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0 clamp(24px, 5vw, 50px) clamp(26px, 5vw, 50px);
}

.downloads-heading {
  position: relative;
  margin: 0 calc(clamp(24px, 5vw, 50px) * -1) 0;
  padding: clamp(30px, 5vw, 52px);
  overflow: hidden;
  border-bottom: 3px solid var(--brand);
  background:
    radial-gradient(circle at 92% 20%, rgba(55, 166, 199, 0.25), transparent 28%),
    linear-gradient(155deg, var(--dark) 0%, var(--dark-soft) 100%);
}

.downloads-heading::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -95px;
  width: 260px;
  height: 260px;
  border: 48px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
}

.downloads-heading h1 {
  position: relative;
  z-index: 1;
  max-width: 740px;
  color: #fff;
}

.downloads-heading .intro {
  position: relative;
  z-index: 1;
  color: #adb9c7;
}

.downloads-heading .eyebrow {
  position: relative;
  z-index: 1;
  border-color: rgba(55, 166, 199, 0.32);
  background: rgba(55, 166, 199, 0.16);
  color: #8dd7e9;
}

.manual-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
  padding: 20px;
  border: 2px solid rgba(245, 158, 11, 0.55);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff9ec, #fff);
  box-shadow: 0 10px 28px rgba(122, 83, 12, 0.08);
}

.manual-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--accent);
  color: #111820;
  font-size: 1.65rem;
}

.resource-label {
  display: block;
  margin-bottom: 2px;
  color: #94610b;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.manual-copy h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1.05rem;
}

.manual-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.resource-meta {
  display: block;
  margin-top: 5px;
  color: #7a8794;
  font-size: 0.74rem;
}

.manual-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.87rem;
  font-weight: 750;
  text-decoration: none;
  transition: 0.2s ease;
}

.manual-button:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(49, 58, 70, 0.22);
}

.coming-soon,
.unavailable-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.coming-soon { padding: 9px 14px; }
.unavailable-button { min-width: 126px; padding: 10px 14px; }

.recommended {
  margin-top: 30px;
  padding: 18px;
  border: 2px solid var(--brand);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(55, 166, 199, 0.12), rgba(245, 158, 11, 0.08));
  box-shadow: 0 10px 30px rgba(55, 166, 199, 0.13);
}

.recommended-label {
  display: block;
  margin: 1px 2px 12px;
  color: #0a5161;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.recommended .download-card { margin: 0; }

.app-section { margin-top: 32px; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.22rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.other-apps {
  padding-top: 28px;
  border-top: 2px solid var(--line);
}

.download-grid { display: grid; gap: 13px; }

.download-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.download-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(8, 33, 44, 0.08);
}

.download-card--matched { border-color: var(--brand); }

.download-card--unavailable {
  border-style: dashed;
  box-shadow: none;
}

.download-card--unavailable:hover {
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}

.platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.65rem;
}

.card-copy h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.03rem;
}

.card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.metadata {
  display: flex;
  gap: 12px;
  margin-top: 7px;
  color: #748292;
  font-size: 0.75rem;
}

.download-button {
  min-width: 126px;
  padding: 10px 16px;
  font-size: 0.9rem;
}

.help-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #fff8e8;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.help-box strong { color: var(--ink); }

@media (max-width: 840px) {
  .login-card { grid-template-columns: 1fr; }
  .login-visual { min-height: 360px; border-right: 0; border-bottom: 3px solid var(--brand); }
  .login-visual h2 { max-width: 13ch; }
}

@media (max-width: 660px) {
  .shell { width: min(100% - 20px, 1120px); padding-top: 18px; }
  .brand img { width: 145px; }
  .login-card, .downloads { margin-top: 24px; border-radius: 18px; }
  .login-card { min-height: 0; }
  .login-visual { min-height: 330px; padding: 28px; }
  .login-visual h2 { font-size: 2.55rem; }
  .login-panel { padding: 30px 24px 34px; }
  .manual-card { grid-template-columns: 50px 1fr; }
  .manual-icon { width: 50px; height: 50px; }
  .manual-button, .coming-soon { grid-column: 1 / -1; width: 100%; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 4px; text-align: left; }
  .download-card { grid-template-columns: 48px 1fr; align-items: start; }
  .platform-icon { width: 48px; height: 48px; }
  .download-button, .unavailable-button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.setup-guides { margin-top: 30px; }
.setup-heading h2 { margin: 4px 0; font-size: 1.25rem; }
.setup-heading p { margin: 0 0 16px; color: var(--muted); font-size: .88rem; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.setup-guide { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, #f2fafd, #fff 75%); }
.setup-guide summary { display: flex; align-items: center; gap: 12px; padding: 20px; cursor: pointer; list-style: none; }
.setup-guide summary::-webkit-details-marker { display: none; }
.setup-guide summary:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; border-radius: 18px; }
.setup-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 1px solid #c6e9f3; border-radius: 13px; background: #fff; color: var(--brand-dark); font-size: 1.5rem; box-shadow: 0 4px 12px #197c9910; }
.setup-guide strong, .setup-guide small { display: block; }
.setup-guide small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.setup-chevron { margin-left: auto; color: var(--brand-dark); }
.setup-guide[open] .setup-chevron { transform: rotate(180deg); }
.setup-body { padding: 0 22px 22px; color: var(--muted); font-size: .87rem; }
.setup-body ol { margin: 0; padding-left: 20px; }
.setup-body li + li { margin-top: 10px; }
.setup-body strong { display: inline; color: var(--ink); }
.setup-body p { margin: 15px 0 0; }
.setup-body a { display: inline-block; margin-top: 12px; color: var(--brand-dark); font-weight: 700; }
@media (max-width: 660px) { .setup-grid { grid-template-columns: 1fr; } }
