:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #061833;
  --muted: #66758d;
  --line: #dfe6ef;
  --blue: #3478f6;
  --blue-soft: #eaf2ff;
  --green: #00b879;
  --green-soft: #dcfbea;
  --red: #f04e5e;
  --red-soft: #ffe7ea;
  --amber: #d99b00;
  --amber-soft: #fff5d6;
  --shadow: 0 1px 2px rgba(6, 24, 51, 0.06), 0 8px 24px rgba(6, 24, 51, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  font-size: 14px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 16px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: 36px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin: 30px 0 12px;
}

.dashboard-view {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.sidebar {
  flex: 0 0 clamp(280px, 16vw, 320px);
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-size: 17px;
}

.brand-icon {
  color: var(--blue);
  font-size: 18px;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.sidebar-main {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  overflow: hidden;
}

.nav-item {
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: transparent;
  color: #34445c;
  text-align: left;
  font-size: 14px;
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-icon {
  color: inherit;
  text-align: center;
}

.nav-count {
  color: var(--muted);
  font-size: 12px;
}

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

.market-info-form {
  grid-template-columns: 150px minmax(220px, 1fr) minmax(220px, 1fr) 150px;
}

.market-info-form button,
#refreshMarketInfoButton {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.market-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.market-info-card {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: grab;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.market-info-card.is-dragging,
.task-card.is-dragging,
.vps-card.is-dragging,
.wide-card.is-dragging,
.credit-card-table tbody tr.is-dragging {
  z-index: 3;
  border-color: #8db5ff;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .2);
  cursor: grabbing;
  transform: scale(.985);
  opacity: .92;
}

.task-card,
.vps-card,
.wide-card,
.credit-card-table tbody tr[data-id] {
  cursor: grab;
}

.credit-card-table tbody tr.is-dragging td {
  background: #eef5ff;
  border-color: #8db5ff;
}

.market-sorting {
  cursor: grabbing;
  user-select: none;
}

.market-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.market-card-identity {
  min-width: 0;
}

.market-card-head h3 {
  margin: 10px 0 3px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.market-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.market-code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-drag-handle {
  display: inline-grid;
  width: 30px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #8a98ac;
  font-size: 18px;
  font-weight: 800;
  cursor: grab;
}

.market-drag-handle:hover {
  background: #f5f7fb;
  color: var(--blue);
}

.market-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: #eef4ff;
  color: #3277e8;
  font-size: 12px;
  font-weight: 800;
}

.market-type-us {
  background: #fff4df;
  color: #9a6200;
}

.market-type-cn {
  background: #fff0f1;
  color: #c33442;
}

.market-type-hk {
  background: #eaf8f2;
  color: #087a54;
}

.market-delete-button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  background: #f5f7fb;
  color: var(--muted);
  font-size: 13px;
}

.market-price {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.market-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  background: #f7f9fc;
  color: var(--muted);
}

.market-change strong {
  color: var(--text);
}

.market-change.up strong {
  color: #008e5c;
}

.market-change.down strong {
  color: #c82d3d;
}

.market-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.market-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aeb9c7;
}

.market-status.online span {
  background: #18a874;
}

.content-shell {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  min-width: 0;
}

.section-view {
  display: grid;
  gap: 24px;
  width: 100%;
}

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

.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.15;
}

.eyebrow {
  margin: 0;
  color: #8a98ac;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.task-compose,
.inline-form {
  display: grid;
  grid-template-columns: 1fr 220px 220px auto;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.task-compose textarea {
  grid-column: 1 / 4;
}

.task-compose button[type="submit"],
#vpsForm button[type="submit"],
#refreshAirportsButton,
#airportForm button[type="submit"],
#creditCardForm button[type="submit"],
#refreshLpButton,
#lpForm button[type="submit"] {
  background: var(--blue-soft);
  color: var(--blue);
}

.todo-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.todo-tabs button {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
}

.todo-tabs button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.inline-form {
  grid-template-columns: 1fr 2fr 140px auto;
}

#airportForm {
  grid-template-columns: 1fr 2fr 1.4fr 120px auto;
}

.credit-card-form {
  grid-template-columns: minmax(120px, .8fr) minmax(160px, 1fr) minmax(120px, .75fr) minmax(120px, .75fr);
}

.credit-card-form input:nth-of-type(5),
.credit-card-form input:nth-of-type(8) {
  grid-column: span 2;
}

.credit-card-table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.credit-card-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
}

.credit-card-table th,
.credit-card-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.credit-card-table th {
  color: #64748b;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  padding-top: 6px;
  padding-bottom: 8px;
}

.credit-card-table td:nth-child(3),
.credit-card-table td:nth-child(4),
.credit-card-table td:nth-child(6),
.credit-card-table td:nth-child(7) {
  text-align: right;
}

.credit-card-table td:nth-child(8) {
  min-width: 300px;
  white-space: normal;
}

.credit-card-table tbody tr {
  transition: transform .15s ease, box-shadow .15s ease;
}

.credit-card-table tbody tr:hover {
  transform: translateY(-1px);
}

.credit-card-table tbody td {
  background: #fff;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  color: var(--text);
}

.credit-card-table tbody td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 12px 0 0 12px;
  font-weight: 800;
}

.credit-card-table tbody td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0 12px 12px 0;
}

.credit-card-table td:last-child {
  white-space: nowrap;
}

.credit-card-table td:last-child button + button {
  margin-left: 8px;
}

.credit-card-table button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.credit-card-table button[data-action="delete-credit-card"] {
  background: #f6f8fc;
  color: #52657f;
}

.credit-card-table td input {
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 8px;
}

.credit-card-table tr.editing td {
  background: #fbfdff;
  border-color: #d7e6fb;
}

.lp-form {
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 2.8fr) minmax(130px, 160px) auto;
}

.lp-table {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: visible;
  background: #fff;
}

.lp-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(280px, 2fr) minmax(120px, .75fr) minmax(110px, .65fr) minmax(72px, .45fr);
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.lp-row:last-child {
  border-bottom: 0;
}

.lp-head {
  color: #7b51e6;
  font-weight: 800;
  background: #fbfaff;
}

.lp-position {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-token-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--blue);
  font-weight: 800;
}

.lp-position strong,
.lp-row > strong {
  color: #21074d;
  font-size: 15px;
}

.lp-position .muted,
.lp-range .muted {
  font-size: 12px;
  line-height: 1.4;
}

.lp-range {
  display: grid;
  gap: 6px;
  min-width: 280px;
}

.range-values {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.range-values > div {
  display: grid;
  gap: 4px;
}

.range-values small {
  color: #8a70b9;
  font-size: 12px;
  font-weight: 700;
}

.range-track {
  height: 8px;
  border-radius: 999px;
  background: #eef3f7;
  position: relative;
  margin: 2px 0;
}

.range-track span {
  position: absolute;
  left: var(--range-start, 12%);
  right: calc(100% - var(--range-end, 88%));
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: #f052b3;
}

.range-track i {
  position: absolute;
  left: var(--current, 50%);
  top: 50%;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(33, 7, 77, .18);
  z-index: 2;
}

.range-deltas {
  display: flex;
  justify-content: space-between;
  color: #6f55a3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.range-alert {
  color: #c82d3d;
  font-weight: 800;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.todo-item,
.vps-card,
.info-card,
.wide-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.todo-item {
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
}

.todo-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.todo-check {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.todo-title {
  margin: 0;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}

.todo-detail {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.todo-actions {
  display: flex;
  gap: 8px;
}

.todo-actions button,
.vps-actions button,
.card-line button {
  min-height: 34px;
  padding: 0 11px;
  background: #f1f5fb;
  color: #31445f;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #f1f5fb;
}

.tag.ok {
  color: #008e5c;
  background: var(--green-soft);
}

.tag.warn {
  color: #9a6c00;
  background: var(--amber-soft);
}

.tag.bad {
  color: #c82d3d;
  background: var(--red-soft);
}

.vps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.vps-card {
  padding: 24px;
}

.vps-form {
  grid-template-columns: minmax(160px, 1.2fr) 110px minmax(140px, .8fr) minmax(160px, 1fr) auto;
  margin-bottom: 18px;
}

.vps-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  justify-items: start;
  text-align: left;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.vps-hero h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.vps-title-row {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
}

.vps-title-link {
  color: var(--text);
  text-decoration: none;
}

.vps-title-link:hover {
  color: var(--blue);
}

.icon-button {
  width: 22px;
  height: 22px;
  padding: 0;
  min-height: 22px !important;
  border-radius: 6px;
  background: #fff !important;
  color: #071427 !important;
  border: 1px solid #edf1f6;
  font-size: 12px;
  line-height: 1;
}

.vps-note-text {
  margin: 6px 0 0;
  color: #00a868;
  font-size: 13px;
}

.vps-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 16px 0 0;
}

.vps-edit-panel,
.lp-edit-panel {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) minmax(160px, 1fr) 150px auto;
  gap: 10px;
  margin: 16px 0 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.vps-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.info-card {
  min-height: 104px;
  padding: 16px;
  position: relative;
}

.info-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 28px;
  color: var(--blue);
}

.info-card strong.danger-text {
  color: #c82d3d;
}

.stack-list {
  display: grid;
  gap: 16px;
}

.wide-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.card-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.airport-title {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--text);
}

.airport-title a {
  color: var(--text);
  text-decoration: none;
}

.airport-title a:hover {
  color: var(--blue);
}

.airport-used {
  display: block;
  font-size: 28px;
  color: var(--blue);
}

.airport-used.danger-text {
  color: #c82d3d;
}

.lp-address-title {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.lp-address-count {
  margin: 2px 0 6px;
  color: var(--ink);
  font-weight: 700;
}

.task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.task-card.done {
  opacity: .72;
}

.task-card h3 {
  margin: 8px 0 4px;
  font-size: 18px;
  color: var(--text);
}

.task-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 17px;
}

.task-card .muted,
.task-meta,
.card-line .muted {
  font-size: 13px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.inline-metric {
  display: inline;
  font-size: inherit;
  font-weight: 800;
}

.profit-positive {
  color: #008e5c;
}

.profit-negative {
  color: #c82d3d;
}

.table-section {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.hover-details {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 48px));
  max-height: min(72vh, 680px);
  overflow: auto;
  z-index: 50;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(20, 31, 51, .18);
}

.reveal-card:hover .hover-details,
.reveal-card:focus-within .hover-details {
  display: block;
}

.section-title {
  margin-bottom: 10px;
}

.section-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.data-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.data-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px minmax(180px, 2fr);
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f6;
  align-items: center;
  background: #fff;
}

.table-section:last-child .data-row {
  grid-template-columns: 70px 80px 110px minmax(180px, 1fr);
}

.data-row:last-child {
  border-bottom: 0;
}

.data-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.data-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  body {
    font-size: 15px;
  }

  .content-shell {
    padding: 56px 32px 80px;
  }

  .section-view {
    gap: 28px;
  }

  .wide-card {
    padding: 24px;
  }

  .info-grid {
    gap: 16px;
  }

  .lp-range {
    min-width: 380px;
  }
}

@media (min-width: 1280px) {
  body {
    font-size: 16px;
  }

  .content-shell {
    padding: 64px 40px 88px;
  }

  .task-compose,
  .inline-form {
    gap: 18px;
  }

  .card-grid,
  .stack-list {
    gap: 20px;
  }

  .info-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 18px;
  }

  .vps-summary-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
  }

  .lp-row {
    grid-template-columns: minmax(240px, 1.25fr) minmax(380px, 2.4fr) minmax(130px, .7fr) minmax(120px, .65fr) minmax(80px, .4fr);
    gap: 24px;
    padding: 20px 24px;
  }

  .lp-position strong,
  .lp-row > strong {
    font-size: 16px;
  }

  .todo-title,
  .task-card h3,
  .vps-hero h3,
  .airport-title,
  .lp-address-title {
    font-size: 20px;
  }

  .task-detail {
    font-size: 19px;
  }

  .info-card strong,
  .airport-used {
    font-size: 30px;
  }
}

@media (min-width: 1536px) {
  .content-shell {
    padding: 72px 48px 96px;
  }

  .page-head h1 {
    font-size: 52px;
  }

  .lp-row {
    grid-template-columns: minmax(260px, 1.2fr) minmax(500px, 2.9fr) minmax(150px, .7fr) minmax(130px, .65fr) minmax(90px, .4fr);
    gap: 28px;
  }

  .range-track {
    height: 10px;
  }

  .lp-range {
    min-width: 460px;
  }

  .lp-position strong,
  .lp-row > strong {
    font-size: 18px;
  }

  .lp-position .muted,
  .lp-range .muted,
  .range-values small,
  .range-deltas,
  .tag,
  .nav-count {
    font-size: 13px;
  }
}

@media (max-width: 1279px) {
  .content-shell {
    max-width: 1180px;
  }

  .task-compose {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 220px) minmax(180px, 220px) auto;
  }

  .info-grid,
  .vps-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-view {
    flex-direction: column;
  }

  .sidebar {
    flex: 0 0 auto;
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-template-rows: auto auto;
    padding: 18px;
  }

  .logout-button {
    display: none;
  }

  .side-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .sidebar-main {
    grid-template-rows: auto auto;
    overflow: visible;
  }

  .content-shell {
    max-width: 100%;
    padding: 32px 18px 56px;
  }

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

  .vps-form,
  .vps-edit-panel,
  .lp-edit-panel,
  .vps-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-table {
    overflow-x: auto;
  }

  .lp-row {
    min-width: 960px;
    grid-template-columns: minmax(220px, 1.1fr) minmax(360px, 1.8fr) minmax(120px, .7fr) minmax(110px, .6fr) minmax(70px, .4fr);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 13px;
  }

  button {
    width: 100%;
  }

  .brand {
    margin-bottom: 18px;
  }

  .side-nav,
  .sidebar-main,
  .todo-tabs,
  .task-compose,
  .inline-form,
  .lp-form,
  .credit-card-form,
  .market-info-form,
  .market-info-grid,
  #airportForm,
  .info-grid,
  .vps-summary-grid,
  .vps-hero,
  .note-row,
  .vps-form,
  .vps-edit-panel,
  .lp-edit-panel {
    grid-template-columns: 1fr;
  }

  .page-head,
  .card-line,
  .vps-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head h1 {
    font-size: 30px;
  }

  .wide-card,
  .vps-card,
  .task-compose,
  .inline-form {
    padding: 16px;
  }

  .side-nav {
    gap: 8px;
  }

  .nav-item {
    min-height: 42px;
    font-size: 13px;
  }

  .todo-title,
  .task-card h3,
  .vps-hero h3,
  .airport-title,
  .lp-address-title,
  .lp-position strong,
  .lp-row > strong {
    font-size: 15px;
  }

  .task-detail {
    font-size: 14px;
  }

  .todo-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-card strong,
  .airport-used {
    font-size: 22px;
  }

  .lp-position .muted,
  .lp-range .muted,
  .range-values small,
  .range-deltas,
  .tag,
  .data-head {
    font-size: 11px;
  }

  .lp-table {
    overflow: visible;
  }

  .lp-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .lp-head {
    display: none;
  }

  .lp-range {
    min-width: 0;
  }

  .task-compose textarea {
    grid-column: auto;
  }

  .data-row,
  .table-section:last-child .data-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .credit-card-form input:nth-of-type(5),
  .credit-card-form input:nth-of-type(8) {
    grid-column: auto;
  }

  .credit-card-table {
    min-width: 980px;
  }
}
