:root {
  --ink: #172721;
  --muted: #6d7973;
  --forest: #184b3b;
  --forest-deep: #123a2e;
  --mint: #d8f0df;
  --mint-soft: #eff8f1;
  --cream: #f7f5ed;
  --paper: #fffefa;
  --line: #dfe5de;
  --error: #b23a3a;
  --shadow: 0 28px 70px rgba(27, 57, 46, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(206, 237, 215, 0.58), transparent 24rem),
    radial-gradient(circle at 88% 46%, rgba(222, 239, 213, 0.5), transparent 22rem),
    var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.page-shell {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--forest);
  background: var(--mint);
  border-radius: 12px;
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 24px;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(216, 224, 216, 0.8);
  border-radius: 999px;
  padding: 9px 13px;
  backdrop-filter: blur(10px);
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ea779;
  box-shadow: 0 0 0 4px rgba(94, 167, 121, 0.13);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-button {
  color: var(--forest);
  background: transparent;
  border: 1px solid #cfdad1;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 700;
}

.logout-button:hover {
  background: var(--mint-soft);
  border-color: #a9beaf;
}

.logout-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

main {
  padding: 60px 0 30px;
}

.hero {
  text-align: center;
  margin: 0 auto 46px;
  max-width: 780px;
  animation: rise 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mint);
  font-size: 11px;
}

.hero h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero h1 span {
  color: var(--forest);
  font-style: italic;
  font-weight: 600;
}

.hero p {
  max-width: 565px;
  margin: 25px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.launcher-card,
.recent-section {
  width: min(780px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(217, 224, 216, 0.9);
  border-radius: 26px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.launcher-card {
  padding: 34px;
  animation: rise 0.7s 0.12s ease both;
}

.card-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.step-label {
  margin: 0 0 7px;
  color: #679079;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-heading h2,
.section-heading h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.secure-badge {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--forest);
  background: var(--mint-soft);
  border-radius: 13px;
}

.secure-badge svg {
  width: 20px;
}

.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.location-grid.single-field {
  grid-template-columns: 1fr;
}

.field {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #495650;
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  color: #8a958f;
  font-size: 11px;
  font-weight: 500;
}

.device-fieldset {
  min-width: 0;
  margin: 2px 0 18px;
  padding: 0;
  border: 0;
}

.device-fieldset legend {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 0;
}

.device-fieldset legend .field-label {
  margin-bottom: 10px;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.device-picker {
  min-width: 0;
  padding: 11px;
  background: #fafbf7;
  border: 1px solid #e3e8e1;
  border-radius: 14px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.device-picker.is-active {
  background: var(--mint-soft);
  border-color: #89ad96;
  box-shadow: 0 0 0 3px rgba(94, 139, 111, 0.09);
}

.device-category {
  display: block;
  margin: 0 2px 7px;
  color: #52635a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-picker .control select {
  height: 46px;
  min-width: 0;
  padding: 0 32px 0 11px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.device-picker .chevron {
  right: 15px;
}

.device-error {
  padding-left: 2px;
}

.device-fieldset.has-error .device-picker {
  border-color: #d58a8a;
}

.device-note {
  margin: 2px 2px 0;
  color: #8a958f;
  font-size: 10px;
  line-height: 1.45;
}

.control {
  position: relative;
  display: flex;
  align-items: center;
}

.control input,
.control select {
  width: 100%;
  height: 54px;
  color: var(--ink);
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  padding: 0 44px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.control select {
  appearance: none;
  padding-right: 42px;
}

.control input::placeholder {
  color: #a1aaa5;
}

.control input:focus,
.control select:focus {
  background: white;
  border-color: #75a187;
  box-shadow: 0 0 0 4px rgba(94, 139, 111, 0.11);
}

.field.has-error .control input,
.field.has-error .control select {
  border-color: #d58a8a;
  box-shadow: 0 0 0 4px rgba(178, 58, 58, 0.07);
}

.control-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  display: grid;
  place-items: center;
  color: #739080;
  pointer-events: none;
}

.control-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chevron {
  position: absolute;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #738078;
  border-bottom: 1.5px solid #738078;
  transform: rotate(45deg) translateY(-3px);
  pointer-events: none;
}

.field-error {
  display: block;
  min-height: 18px;
  padding-top: 5px;
  color: var(--error);
  font-size: 11px;
}

.website-field {
  margin-top: 0;
}

.launch-button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  width: 100%;
  min-height: 64px;
  margin-top: 5px;
  padding: 12px 56px 12px 20px;
  overflow: hidden;
  color: white;
  text-align: left;
  background: var(--forest);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(24, 75, 59, 0.18);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.launch-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.1), transparent 80%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.launch-button:hover {
  background: var(--forest-deep);
  box-shadow: 0 15px 30px rgba(24, 75, 59, 0.24);
  transform: translateY(-1px);
}

.launch-button:hover::before {
  transform: translateX(100%);
}

.launch-button:active {
  transform: translateY(1px);
}

.launch-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.button-label {
  align-self: end;
  font-weight: 700;
  line-height: 1.2;
}

.button-location {
  grid-row: 2;
  align-self: start;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
}

.launch-button svg {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  color: #52635a;
  background: var(--mint-soft);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.status.visible {
  display: block;
}

.status.error {
  color: #8f3030;
  background: #fbeeee;
}

.card-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: #829087;
  font-size: 11px;
  line-height: 1.5;
}

.card-footnote svg {
  flex: 0 0 auto;
  width: 15px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recent-section {
  margin-top: 22px;
  padding: 28px 30px;
}

.recent-section[hidden] {
  display: none;
}

.recent-section .section-heading {
  align-items: center;
  margin-bottom: 16px;
}

.recent-section h2 {
  font-size: 19px;
}

.text-button {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px;
  font-size: 12px;
}

.text-button:hover {
  color: var(--forest);
}

.recent-list {
  display: grid;
  gap: 8px;
}

.recent-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #fafbf7;
  border: 1px solid #e8ece6;
  border-radius: 12px;
}

.recent-item:hover {
  border-color: #b9cbbf;
  background: white;
}

.recent-favicon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--forest);
  background: var(--mint-soft);
  border-radius: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.recent-copy {
  min-width: 0;
}

.recent-copy strong,
.recent-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy strong {
  font-size: 13px;
}

.recent-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.recent-arrow {
  color: #829087;
  font-size: 18px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: min(780px, 100%);
  margin: 40px auto 0;
  padding: 0 10px;
  animation: rise 0.7s 0.24s ease both;
}

.feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.feature-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #5e8870;
  background: rgba(219, 239, 224, 0.68);
  border-radius: 12px;
}

.feature-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature strong,
.feature span {
  display: block;
}

.feature strong {
  font-size: 12px;
}

.feature span {
  margin-top: 2px;
  color: #829087;
  font-size: 10px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 60px 0 30px;
  color: #929b96;
  font-size: 11px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-shell {
  width: min(440px, 100%);
  padding: 0;
}

.login-brand {
  display: flex;
  width: fit-content;
  margin: 0 auto 26px;
}

.login-card {
  position: relative;
  padding: 38px;
  text-align: center;
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid rgba(217, 224, 216, 0.95);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 0.55s ease both;
}

.login-lock {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 19px;
  color: var(--forest);
  background: var(--mint);
  border-radius: 16px;
  transform: rotate(-3deg);
}

.login-lock svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  letter-spacing: -0.055em;
}

.login-copy {
  margin: 11px auto 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-card .field {
  text-align: left;
}

.login-password-control input {
  padding-right: 65px;
}

.password-toggle {
  position: absolute;
  z-index: 2;
  right: 9px;
  color: var(--forest);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
}

.password-toggle:hover {
  background: var(--mint-soft);
}

.login-button {
  margin-top: 3px;
}

.login-footnote {
  margin: 18px 0 0;
  color: #8a958f;
  font-size: 10px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 24px, 560px);
  }

  .nav {
    height: 72px;
  }

  .privacy-pill {
    display: none;
  }

  main {
    padding-top: 42px;
  }

  .hero {
    margin-bottom: 32px;
  }

  .hero h1 {
    font-size: clamp(45px, 15vw, 66px);
  }

  .hero p {
    font-size: 15px;
  }

  .launcher-card {
    padding: 24px 18px;
    border-radius: 21px;
  }

  .card-heading h2 {
    font-size: 20px;
  }

  .location-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .device-grid {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 18px;
    width: fit-content;
  }

  .feature {
    justify-content: flex-start;
  }

  .login-page {
    padding: 22px 12px;
  }

  .login-card {
    padding: 30px 20px;
    border-radius: 21px;
  }
}

@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;
  }
}
