:root {
  color-scheme: light;
  --page: #f7f7f8;
  --panel: #ffffff;
  --soft: #f2f2f4;
  --line: #e7e7ea;
  --line-2: #d9d9de;
  --text: #111114;
  --text-2: #5d6068;
  --text-3: #8c8f97;
  --accent: #2f6fec;
  --accent-soft: #edf2fe;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.banner { padding: 6px 16px; font-size: 11.5px; color: var(--text-3); text-align: center; border-bottom: 1px solid var(--line); background: var(--panel); }

.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - 30px);
  background: linear-gradient(90deg, var(--panel) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px), var(--line) var(--side), transparent var(--side)); }

/* Sidebar */
.side { position: sticky; top: 0; align-self: start; height: calc(100vh - 30px); display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: -0.03em; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.group { font-size: 11.5px; font-weight: 500; color: var(--text-3); padding: 0 10px 6px; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; transition: background .15s, color .15s;
}
.nav button:hover { background: var(--soft); color: var(--text); }
.nav button[aria-current="step"] { background: var(--soft); color: var(--text); }
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .tick { margin-left: auto; width: 15px; height: 15px; color: var(--accent); }
.side-foot { margin-top: auto; font-size: 11px; color: var(--text-3); padding: 0 10px; }

/* Main */
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 10px; padding: 14px 40px; border-bottom: 1px solid var(--line); background: var(--panel); }
.camp { min-width: 0; flex: 0 1 auto; max-width: 100%; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 8px; margin-left: -8px; font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.camp:hover { border-color: var(--line); }
.camp:focus { outline: none; border-color: var(--line-2); background: var(--page); }
.status { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 3px 10px; border-radius: 100px; background: var(--soft); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.status.live { background: var(--accent-soft); color: var(--accent); }
.status.live i { background: var(--accent); }

.tabs { display: none; }

.content { padding: 36px 40px 64px; max-width: 1040px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; border: 0; border-radius: 100px; padding: 9px 16px; font-size: 13.5px; font-weight: 500; transition: background .15s, opacity .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #2a2a30; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: #2160dc; }
.btn-quiet { background: transparent; color: var(--text-2); padding: 7px 12px; }
.btn-quiet:hover { background: var(--soft); color: var(--text); }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.icon { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); flex: none; }
.icon:hover { background: var(--soft); color: var(--text); }
.icon svg { width: 16px; height: 16px; }

/* Surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; min-width: 0; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); min-width: 0; }
.list-row:first-child { border-top: 0; }
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 12px; }
.section { margin-top: 28px; }
.label { font-size: 12.5px; font-weight: 500; color: var(--text-2); margin: 0 0 10px; }
.meta { font-size: 12.5px; color: var(--text-3); }
.count { font-size: 13px; color: var(--text-2); margin: 0 0 14px; }
.count b { color: var(--text); font-weight: 600; }
.title { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.grow { flex: 1; min-width: 0; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inputs */
.input, .select {
  width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.bare { border-color: transparent; padding: 4px 6px; margin-left: -6px; }
.input.bare:hover { border-color: var(--line); }
.input.num { width: 64px; text-align: center; padding: 6px 4px; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8f97' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
label.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); min-width: 0; }

/* Chips, toggles */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--text-2); white-space: nowrap; }
.chip.blue { background: var(--accent-soft); color: var(--accent); }
.chip.out { background: var(--panel); border: 1px solid var(--line); color: var(--text-3); }
.chip svg { width: 11px; height: 11px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 100px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-size: 13px; font-weight: 500; }
.pill:hover { border-color: var(--line-2); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.pill .n { font-size: 12px; opacity: .6; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 34px; height: 20px; border-radius: 100px; background: var(--line-2); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform .18s cubic-bezier(.3,.7,.2,1); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.locked { cursor: default; }
.switch.locked .track { opacity: .5; }

/* Grade badge */
.grade { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.grade.A { background: var(--text); color: #fff; }
.grade.B { background: #55585f; color: #fff; }
.grade.C { background: var(--soft); color: var(--text-2); border: 1px solid var(--line-2); }
.grade.D { background: var(--panel); color: var(--text-3); border: 1px solid var(--line); }
.grade.X { background: var(--panel); color: var(--text-3); border: 1px dashed var(--line-2); }

/* Offer */
.pkg { display: grid; gap: 12px; align-content: start; }
.pkg-top { display: flex; align-items: center; gap: 6px; }
.pkg-top .input.bare { font-weight: 600; font-size: 15px; }
.check-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--page); font-size: 13.5px; font-weight: 500; }
.check-btn:hover { border-color: var(--line-2); }
.check-btn .score { display: inline-flex; align-items: center; gap: 6px; }
.check-btn .score i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.check-btn .score.ok i { background: var(--accent); }
.check-btn svg { width: 14px; height: 14px; color: var(--text-3); transition: transform .15s; }
.check-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; font-size: 13px; color: var(--text-2); cursor: pointer; border-radius: 8px; }
.checks label:hover { background: var(--page); }
.checks input { margin: 2px 0 0; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.checks input:checked + span { color: var(--text); }

.pair { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; }
.money { position: relative; }
.money span, .money em { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-3); font-style: normal; pointer-events: none; }
.money span { left: 11px; }
.money em { right: 10px; }
.money .input { padding-left: 24px; padding-right: 34px; -moz-appearance: textfield; }
.money .input::-webkit-outer-spin-button, .money .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
textarea.input { min-height: 84px; }

/* Website reader */
.site-row { display: flex; gap: 8px; }
.site-row .input { flex: 1; }
.btn-line { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); padding: 8px 16px; }
.btn-line:hover { background: var(--soft); }
.btn-line[disabled] { opacity: 1; color: var(--text-2); cursor: progress; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-hint { margin: 10px 0 0; font-size: 13px; color: var(--text); }
.site-done { margin: 10px 0 0; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.site-done svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.site-note { margin: 8px 0 0; }

/* Area */
.towns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Journey */
.touch-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; }
.tbadge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--text); }
.touch-row .input.bare { width: 100%; font-size: 14px; }
.gap { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 22px; font-size: 12.5px; color: var(--text-3); background: var(--page); border-top: 1px solid var(--line); }
.gap .input.num { width: 52px; padding: 3px 4px; font-size: 12.5px; background: var(--panel); }
.gate-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 18px; border: 0; background: transparent; text-align: left; font-size: 14px; font-weight: 500; }
.gate-btn > span { white-space: nowrap; }
.gate-right { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13.5px; }
.gate-btn .bar { width: 120px; height: 6px; border-radius: 100px; background: var(--soft); overflow: hidden; }
.gate-btn .bar i { display: block; height: 100%; background: var(--accent); border-radius: 100px; transition: width .2s; }
.gate-btn svg { width: 15px; height: 15px; color: var(--text-3); transition: transform .15s; flex: none; }
.gate-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.gate-list { list-style: none; margin: 0; padding: 4px 10px 12px; border-top: 1px solid var(--line); display: grid; }
.gate-list label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; font-size: 13.5px; color: var(--text-2); border-radius: 8px; cursor: pointer; }
.gate-list label:hover { background: var(--page); }
.gate-list input { margin: 2px 0 0; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.gate-list input:checked + span { color: var(--text); }

/* Board */
.board-box { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 244px; gap: 12px; align-items: start; }
.col { background: var(--soft); border-radius: var(--r-lg); padding: 8px; min-height: 140px; display: grid; gap: 6px; align-content: start; transition: background .15s, box-shadow .15s; }
.col.drop { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; font-size: 13px; font-weight: 600; }
.col-head span { font-weight: 500; font-size: 12px; color: var(--text-3); }
.lead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 10px 6px 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); cursor: grab; transition: box-shadow .15s, border-color .15s; }
.lead:hover { border-color: var(--line-2); box-shadow: 0 2px 8px rgba(17,17,20,.05); }
.lead.dragging { opacity: .45; }
.lead-name { font-weight: 600; font-size: 13px; letter-spacing: -0.005em; }
.lead-meta { grid-column: 1 / 2; font-size: 12px; color: var(--text-3); }
.lead-side { grid-row: 1 / 3; grid-column: 2; display: flex; align-items: center; gap: 2px; }
.lead .grade { width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
.more { position: relative; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); }
.more:hover { background: var(--soft); color: var(--text); }
.more svg { width: 15px; height: 15px; }
.more select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; font-size: 16px; }
.empty { font-size: 12px; color: var(--text-3); text-align: center; padding: 14px 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--text); color: #fff; padding: 9px 16px; border-radius: 100px; font-size: 13px; font-weight: 500; box-shadow: 0 10px 30px rgba(17,17,20,.18); max-width: calc(100vw - 32px); text-align: center; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Responsive */
@media (max-width: 960px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { display: none; }
  .top { padding: 12px 16px; }
  .tabs {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: sticky; top: 0; z-index: 20;
    background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 6px 6px;
  }
  .tabs button { border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; padding: 5px 0; border-radius: 10px; color: var(--text-3); font-size: 10.5px; font-weight: 500; min-width: 0; }
  .tabs svg { width: 18px; height: 18px; }
  .tabs button[aria-current="step"] { color: var(--accent); background: var(--accent-soft); }
  .content { padding: 22px 16px 48px; }
  .head h1 { font-size: 22px; }
  .head { margin-bottom: 20px; }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .list-row { padding: 12px 14px; }
  .board { grid-auto-columns: 76vw; }
  .gate-btn .bar { display: none; }
  .gate-btn { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* The offer line wraps, so a line filled from a website is never cut off. */
textarea.grow-line { display: block; width: 100%; min-height: 0; height: auto; resize: none; line-height: 1.45; font-family: inherit; }
