:root {
  --ink: #172938;
  --bg: #f1f5f7;
  --paper: #fff;
  --accent: #137b85;
  --muted: #647787;
  --line: #dce5e9;
  --warn: #b65e24;
  --soft: #eaf4f4;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.2;
  font-weight: 600;
}
button:hover {
  background: #f0f6f7;
  border-color: #b8cdd3;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary,
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button.primary:hover {
  background: #0c626b;
}
button.ghost {
  background: transparent;
  border-color: transparent;
}
button.danger {
  color: #a54130;
}
button.small {
  padding: 7px 10px;
  font-size: 12px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid #57acb7;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: "Trebuchet MS", sans-serif;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 34px;
  margin-bottom: 12px;
  line-height: 1.14;
}
h2 {
  font-size: 23px;
  margin-bottom: 12px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
.boot {
  padding: 80px;
  text-align: center;
}
.wordmark {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--ink);
}
.wordmark span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background: var(--ink);
  color: #fff;
  padding: 10vh 9vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
}
.login-story .wordmark {
  color: #fff;
}
.login-story h1 {
  font-size: clamp(38px, 4vw, 64px);
  max-width: 490px;
}
.login-story p {
  color: #b5c7d0;
  max-width: 390px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 360px;
}
.login-form h2 {
  font-size: 30px;
}
.login-rule {
  border-top: 1px solid #395161;
  padding-top: 24px;
  font-size: 12px;
  letter-spacing: 0.07em;
}
.shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .wordmark {
  margin-bottom: 45px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-btn {
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  font-weight: 500;
  color: var(--muted);
}
.nav-btn.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.nav-icon {
  width: 20px;
  font-family: monospace;
  font-size: 17px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 30px;
  display: grid;
  gap: 9px;
}
.avatar {
  background: var(--ink);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 600;
}
.user-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.main {
  padding: 32px 40px;
  min-width: 0;
  max-width: 1700px;
  width: 100%;
  margin: auto;
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.day {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
}
.topline .eyebrow {
  margin: 0;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head p {
  margin-bottom: 0;
  max-width: 630px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.toolbar input {
  max-width: 300px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.workspace.with-detail {
  grid-template-columns: minmax(260px, 0.85fr) minmax(380px, 1.2fr);
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.pad {
  padding: 24px;
}
.quota {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.quota strong {
  font-family: monospace;
  font-size: 28px;
  font-weight: 400;
}
.quota .muted {
  color: #b5c7d0;
}
.quota-line {
  height: 4px;
  background: #486070;
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  max-width: 260px;
}
.quota-line i {
  height: 100%;
  display: block;
  background: #70c4c7;
}
.list-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 19px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  text-align: left;
  width: 100%;
  font-weight: 400;
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row.selected {
  background: var(--soft);
  box-shadow: inset 3px 0 var(--accent);
}
.list-row:hover {
  background: #f6f9fa;
}
.list-row .grow {
  min-width: 0;
  flex: 1;
}
.person {
  font-weight: 650;
  margin-bottom: 5px;
  display: block;
}
.company {
  color: var(--muted);
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.initial {
  font-weight: 700;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #edf2f5;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.row-end {
  text-align: right;
  display: grid;
  gap: 7px;
}
.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 5px;
  background: #edf2f5;
  display: inline-block;
  white-space: nowrap;
  color: #4f6777;
}
.badge.good {
  background: #e2f3ed;
  color: #247258;
}
.badge.warn {
  background: #fff1e3;
  color: #a55b23;
}
.badge.dark {
  background: #e0edf0;
  color: #16646c;
}
.empty {
  padding: 58px 26px;
  text-align: center;
}
.empty-symbol {
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  width: 56px;
  height: 56px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: 23px;
}
.empty p {
  max-width: 380px;
  margin: 0 auto 22px;
  color: var(--muted);
}
.empty h2 {
  font-size: 23px;
}
.detail {
  position: sticky;
  top: 24px;
}
.detail-heading {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.detail-heading h2 {
  margin-bottom: 5px;
  font-size: 27px;
}
.detail-section {
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}
.detail-section:last-child {
  border-bottom: 0;
}
.detail-section h3 {
  margin-bottom: 12px;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  overflow: auto;
  padding: 0 12px;
}
.detail-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 15px 12px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.detail-tabs button.active {
  box-shadow: inset 0 -2px var(--accent);
  color: var(--accent);
}
.flow {
  display: flex;
  gap: 0;
  margin: 18px 0 3px;
}
.flow-node {
  flex: 1;
  position: relative;
  color: var(--muted);
  font-size: 10px;
  padding-top: 22px;
}
.flow-node:before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}
.flow-node:last-child:before {
  right: 90%;
}
.flow-node:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
}
.flow-node.done:after {
  background: var(--accent);
  border-color: var(--accent);
}
.flow-node.now:after {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--soft);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
input,
textarea,
select {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid #c8d6dc;
  border-radius: 7px;
  padding: 11px 12px;
  line-height: 1.4;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
textarea.message {
  min-height: 170px;
  font-size: 14px;
  line-height: 1.65;
}
.field {
  margin-bottom: 18px;
}
.field small {
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}
.fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.fields-2 .field {
  margin-bottom: 0;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 400;
  line-height: 1.5;
}
.checkbox input {
  width: auto;
  margin-top: 3px;
}
.note {
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #315c65;
}
.note.warn {
  background: #fff3e7;
  color: #87522b;
}
.error-box {
  background: #fff0ed;
  color: #a53c2e;
  padding: 12px;
  border-radius: 7px;
  font-size: 13px;
  margin: 14px 0;
}
.error-box:empty {
  display: none;
}
.facts {
  display: grid;
  gap: 12px;
}
.fact {
  border-left: 2px solid #70aab1;
  padding-left: 13px;
  font-size: 12px;
}
.fact p {
  margin-bottom: 6px;
}
.fact blockquote {
  color: var(--muted);
  margin: 8px 0;
  font-size: 11px;
  line-height: 1.6;
}
.resource-preview {
  background: #f7fafb;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 8px;
}
.resource-preview li {
  line-height: 1.65;
  padding-bottom: 9px;
}
.resource-preview p {
  font-size: 13px;
}
.resource-preview h3 {
  font-size: 18px;
}
.resource-preview ol {
  padding-left: 19px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.stat strong {
  display: block;
  font-family: monospace;
  font-size: 32px;
  font-weight: 400;
  margin: 10px 0;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
td {
  line-height: 1.5;
  max-width: 300px;
  overflow-wrap: anywhere;
}
.scroll-table {
  overflow-x: auto;
}
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
}
.mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.history-entry {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.history-entry:last-child {
  border: 0;
}
.history-entry p {
  font-size: 12px;
  white-space: pre-wrap;
  margin: 7px 0;
}
.history-entry time {
  font: 10px monospace;
  color: var(--muted);
}
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pagination {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 23px 0;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(560px, 90vw);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 30px #17293830;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
}
#notice:not(:empty) {
  padding: 14px 20px;
}
#notice.error {
  background: #973e30;
}
.resource-page {
  background: #edf2f4;
}
.resource-paper {
  background: white;
  margin: 55px auto;
  padding: 60px;
  max-width: 820px;
  border-top: 5px solid var(--accent);
  box-shadow: 0 10px 50px #17293809;
}
.resource-paper .wordmark {
  display: block;
  margin-bottom: 60px;
}
.resource-paper h1 {
  font-size: 40px;
  max-width: 660px;
}
.resource-paper section {
  margin-top: 35px;
}
.resource-paper section h2 {
  font-size: 20px;
}
.resource-paper li {
  padding: 7px 0;
  line-height: 1.7;
}
.resource-question {
  padding: 24px;
  background: var(--soft);
  margin: 30px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}
.inline-code {
  font-family: monospace;
  overflow-wrap: anywhere;
}
.account-card {
  max-width: 520px;
}
.mobile-brand {
  display: none;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.skeleton {
  height: 10px;
  background: #e8eff2;
  border-radius: 4px;
  margin: 15px 0;
}
.skeleton:nth-child(2) {
  width: 70%;
}
@media (min-width: 1500px) {
  .main {
    padding: 40px 52px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 13px;
  }
  .main {
    padding: 26px 24px;
  }
  .workspace.with-detail {
    grid-template-columns: 1fr;
  }
  .detail {
    position: static;
  }
  .import-layout {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    padding: 12px 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar > .wordmark,
  .sidebar-foot {
    display: none;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .mobile-brand .wordmark {
    display: block;
    margin: 0;
    font-size: 22px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 2px;
  }
  .nav-btn {
    padding: 13px 11px;
    white-space: nowrap;
    font-size: 12px;
    border-radius: 0;
  }
  .nav-icon {
    display: none;
  }
  .main {
    padding: 23px 16px;
  }
  .topline {
    margin-bottom: 22px;
  }
  .page-head {
    display: block;
  }
  .page-head .toolbar {
    margin-top: 16px;
  }
  h1 {
    font-size: 29px;
  }
  .day {
    font-size: 10px;
  }
  .fields-2,
  .mapping,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .quota {
    padding: 16px;
  }
  .quota-line {
    display: none;
  }
  .workspace.with-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-heading,
  .detail-section {
    padding: 20px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 25px;
  }
  .login-page {
    display: block;
  }
  .login-story {
    padding: 30px;
    gap: 25px;
  }
  .login-story h1 {
    font-size: 36px;
    margin-bottom: 8px;
  }
  .login-story p,
  .login-rule {
    display: none;
  }
  .login-form {
    padding: 35px 25px;
  }
  .resource-paper {
    margin: 0;
    padding: 30px 23px;
  }
  .resource-paper h1 {
    font-size: 31px;
  }
  .resource-paper .wordmark {
    margin-bottom: 35px;
  }
  .list-row {
    padding: 17px 16px;
  }
  .detail-top {
    align-items: flex-start;
  }
  .toolbar input {
    max-width: 100%;
  }
  th,
  td {
    padding: 11px;
  }
  .page-head p {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .detail {
    animation: appear 0.18s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media print {
  .resource-page {
    background: white;
  }
  .resource-paper {
    margin: 0;
    box-shadow: none;
    max-width: 100%;
  }
}

.sequence-step{border-left:3px solid #137b85;padding:4px 0 20px 18px;margin:20px 0}.commercial-review{border:1px solid #c9d9dd;padding:18px;margin:22px 0;background:#f1f5f7}.detail-tabs{flex-wrap:wrap}.commercial-review p{white-space:pre-line}

/* Linekin variants editor */
.lk-panel{margin-bottom:20px}
.lk-variant{border:1px solid var(--line, #dfe3ea);border-radius:10px;padding:14px 16px;margin:0 0 14px}
.lk-variant legend{font-weight:650;padding:0 6px}
.lk-variant textarea{width:100%;font:inherit;line-height:1.5}
.lk-variant small{display:block;margin-top:4px}
.lk-variant input[data-lk-field]{width:100%}
.team-line{align-items:center}
.team-actions{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
.team-actions button{padding:6px 10px;font-size:13px}
.team-line > div:nth-child(2){min-width:0;flex:1}
.team-actions{flex-wrap:nowrap}
.team-actions button{white-space:nowrap}
