:root {
  color-scheme: light;
  --bg: #f7f2ea;
  --card: #ffffff;
  --ink: #1c1b1a;
  --muted: #6a5d4d;
  --accent: #e2582e;
  --accent-dark: #bf4220;
  --line: #e1d7c8;
  --shadow: 0 20px 40px rgba(28, 27, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #fff2df 0%, #f7f2ea 55%, #efe7d9 100%);
  color: var(--ink);
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  gap: 24px;
}

.hero {
  padding: 32px;
  background: linear-gradient(130deg, #fff1dc 0%, #ffe0c5 100%);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

h1 {
  margin: 0 0 12px;
  font-size: 36px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

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

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

.auth-actions {
  display: flex;
  gap: 12px;
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
}

.trip-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.trip {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fffdf9;
  display: grid;
  gap: 12px;
}

.trip-actions {
  display: flex;
  gap: 12px;
}

.trip-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.trip-row {
  display: grid;
  gap: 12px;
}

.trip-row-top {
  grid-template-columns: minmax(180px, 1fr) 24px minmax(180px, 1fr) minmax(180px, 1fr);
  align-items: end;
}

.swap {
  align-self: start;
  justify-self: center;
  padding: 0;
  width: 24px;
  height: 24px;
  min-width: 0;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -1px;
  font-weight: 600;
  background: transparent;
  margin-bottom: 10px;
  transform: none;
}

.swap.btn.ghost {
  border: none;
  box-shadow: none;
  color: #3a352f;
}

.swap.btn:hover {
  transform: none;
  box-shadow: none;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.field input {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.checkboxes {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(28, 27, 26, 0.12);
}

.output {
  background: #161514;
  color: #f4efe6;
  padding: 16px;
  border-radius: 12px;
  min-height: 120px;
  overflow: auto;
  font-size: 13px;
}

.status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff8ee;
  font-size: 13px;
  font-weight: 600;
  cursor: help;
}

.tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1c1b1a;
  color: #f4efe6;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 12px 28px rgba(28, 27, 26, 0.2);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.tooltip a {
  color: #ffe0c5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tooltip a:hover {
  color: #fff1dc;
}

.info:hover .tooltip,
.info:focus .tooltip,
.info:focus-within .tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 720px) {
  .hero {
    padding: 24px;
  }

  h1 {
    font-size: 28px;
  }

  .auth-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
