/* Antilopes — cream and white interface with black type. */

:root {
  --bg: #f5f1e8;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --field: #ffffff;
  --line: #e4ded1;
  --line-strong: #d3ccbc;
  --text: #111111;
  --text-muted: #55524b;
  --text-faint: #8a857a;
  --accent: #111111;
  --accent-strong: #000000;
  --accent-ink: #ffffff;
  --accent-soft: #f5f1e8;
  --violet: #111111;
  --error: #b42318;
  --error-soft: #fdf0ee;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px rgba(17, 17, 17, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.backdrop {
  display: none;
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: #111111;
  border-radius: 9px;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 500;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #1f9d55;
  border-radius: 50%;
}

.logout-button {
  padding: 8px 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.logout-button:hover {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

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

/* ---------- Layout ---------- */

.layout {
  display: grid;
  gap: 24px;
  width: min(600px, 100%);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 460px;
  margin: 12px auto 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

.highlight-icon svg,
.device-category svg,
.control-icon svg,
.secure-badge svg,
.card-footnote svg,
.button-arrow svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Launcher card ---------- */

.launcher-card,
.login-card,
.recent-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.launcher-card {
  position: relative;
  padding: 28px;
}


.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.step-label {
  margin: 0 0 6px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-heading h2,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.secure-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.secure-badge svg {
  width: 14px;
  height: 14px;
}

/* ---------- Fields ---------- */

.field {
  display: block;
}

.field + .field,
.location-grid + .device-fieldset,
.device-fieldset + .website-field {
  margin-top: 20px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  margin-left: 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
}

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

.control-icon {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color 0.15s;
}

.control-icon svg {
  width: 18px;
  height: 18px;
}

.control input,
.control select {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 44px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.control input::placeholder {
  color: var(--text-faint);
}

.control input:hover,
.control select:hover:not(:disabled) {
  border-color: #b9b1a0;
}

.control input:focus,
.control select:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.control:focus-within .control-icon {
  color: var(--accent);
}

.field-error {
  display: block;
  min-height: 0;
  color: var(--error);
  font-size: 12.5px;
}

.field-error:not(:empty) {
  margin-top: 6px;
}

.has-error .control input,
.has-error .control select {
  border-color: var(--error);
}

.has-error .control input:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

/* ---------- Device pickers ---------- */

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

.device-fieldset legend {
  display: flex;
  align-items: baseline;
  padding: 0;
  margin-bottom: 8px;
}

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

.device-grid {
  display: grid;
  gap: 8px;
}

.device-picker {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.device-picker:hover {
  border-color: #b9b1a0;
}

.device-picker.is-active {
  background: var(--bg);
  border-color: #111111;
  box-shadow: inset 0 0 0 1px #111111;
}

.device-category {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.device-category svg {
  width: 17px;
  height: 17px;
}

.device-picker.is-active .device-category {
  color: var(--text);
}

.device-picker .control select {
  height: 38px;
  padding: 0 28px 0 10px;
  background: var(--bg);
  border-color: var(--line);
  border-radius: 8px;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
}

.device-picker .control select:disabled {
  color: var(--text-faint);
  cursor: progress;
}

.device-picker select option,
.device-picker select optgroup {
  color: #111111;
  background: #ffffff;
}

.chevron {
  position: absolute;
  right: 11px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--text-muted);
  border-bottom: 1.6px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}

.device-fieldset.has-error .device-picker {
  border-color: var(--error);
}

.device-note {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 12.5px;
}

/* ---------- Launch button ---------- */

.launch-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 24px;
  padding: 14px 14px 14px 20px;
  color: #ffffff;
  background: #111111;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.launch-button:hover:not(:disabled) {
  background: #2a2a2a;
}

.launch-button:active:not(:disabled) {
  transform: translateY(0);
}

.launch-button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.button-text {
  display: grid;
  min-width: 0;
}

.button-label {
  font-size: 16px;
  font-weight: 700;
}

.button-location {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.button-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.button-arrow svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* ---------- Status + footnote ---------- */

.status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
}

.status.visible {
  display: block;
}

.status.error {
  color: var(--error);
  background: var(--error-soft);
  border-color: #f3c7c1;
}

.card-footnote {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 20px 0 0;
  padding-top: 18px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.card-footnote svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* ---------- Install guide ---------- */

.install-guide {
  margin-top: 16px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}

.install-guide[hidden] {
  display: none;
}

.install-guide h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.install-guide p {
  margin: 0;
  color: var(--text-muted);
}

.install-guide ol {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding-left: 22px;
}

.install-guide li::marker {
  color: var(--violet);
  font-weight: 700;
}

.install-guide code {
  padding: 2px 6px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
}

.install-download {
  display: inline-block;
  margin-right: 4px;
  padding: 5px 12px;
  color: #ffffff;
  background: #111111;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.install-download:hover {
  background: #2a2a2a;
}

.install-copy {
  padding: 2px 9px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.install-copy:hover {
  border-color: #111111;
}

.install-guide .install-note {
  font-size: 12.5px;
}

/* ---------- Recent sessions ---------- */

.recent-section {
  grid-column: 1 / -1;
  padding: 24px 28px;
}

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

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

.text-button {
  padding: 6px 10px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.recent-item:hover {
  border-color: #111111;
}

.recent-favicon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: #111111;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
}

.recent-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

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

.recent-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.recent-copy span {
  color: var(--text-muted);
  font-size: 12.5px;
}

.recent-arrow {
  color: var(--text-faint);
}

.recent-item:hover .recent-arrow {
  color: var(--text);
}

/* ---------- Footer + credit ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 22px 0 28px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.credit strong {
  color: var(--text);
  font-weight: 600;
}

.credit svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.credit:hover {
  color: var(--text);
  border-color: #111111;
}

.credit:hover svg {
  color: #0a66c2;
}

/* ---------- Login ---------- */

.login-page .login-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px 0;
}

.login-brand {
  margin-top: auto;
  margin-bottom: 24px;
}

.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px 28px 28px;
}


.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-copy {
  margin: 6px 0 24px;
  color: var(--text-muted);
}

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

.password-toggle {
  position: absolute;
  right: 8px;
  padding: 6px 10px;
  color: var(--text-muted);
  background: var(--bg);
  border: 0;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
}

.login-footer {
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding-top: 32px;
  border-top: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .page-shell {
    padding: 0 16px;
  }

  .nav-pill {
    display: none;
  }

  .launcher-card {
    padding: 22px 18px;
  }

  .device-picker {
    grid-template-columns: 92px minmax(0, 1fr);
    padding-left: 12px;
  }

  .recent-section {
    padding: 20px 18px;
  }

  .site-footer {
    flex-direction: column-reverse;
    gap: 12px;
  }
}

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