:root {
  color-scheme: light;
  --ink: #13201d;
  --ink-strong: #071614;
  --muted: #64726c;
  --paper: #f7f0e5;
  --paper-soft: #fbf6ee;
  --surface: #fffdfa;
  --surface-green: #eef8ef;
  --line: #ddd3c4;
  --deep: #0b3b32;
  --deep-2: #092823;
  --clay: #ed684a;
  --sun: #f2c95d;
  --blue: #4aa8d8;
  --mint: #bfead3;
  --lime: #d9ff64;
  --shadow: 0 22px 54px rgba(24, 33, 30, 0.12);
  --tight-shadow: 0 12px 28px rgba(24, 33, 30, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(247, 240, 229, 0.9)),
    var(--paper);
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  outline-color: var(--blue);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 48px;
  border-bottom: 1px solid rgba(221, 211, 196, 0.82);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--deep-2);
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fffdfa;
  background:
    linear-gradient(var(--lime) 0 0) calc(100% - 7px) 7px / 9px 9px no-repeat,
    linear-gradient(var(--blue) 0 0) calc(100% - 20px) 7px / 9px 9px no-repeat,
    linear-gradient(var(--clay) 0 0) calc(100% - 7px) 20px / 9px 9px no-repeat,
    var(--deep-2);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
}

.brand-mark::before {
  content: none;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-weight: 850;
  font-size: 15px;
}

nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--deep-2);
  background: rgba(11, 59, 50, 0.07);
  outline: none;
}

.page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0 76px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-title h1 {
  margin: 0;
  color: var(--deep-2);
  font-size: 58px;
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
}

.page-title p,
.muted {
  color: var(--muted);
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 0.76fr) minmax(0, 1.24fr);
  gap: 18px;
  align-items: start;
}

.founder-workspace {
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1fr);
}

.stack,
.form-grid {
  display: grid;
  gap: 18px;
}

.panel,
.scan-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--tight-shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  color: var(--deep-2);
  font-size: 24px;
  line-height: 1.1;
}

.panel-body {
  padding: 20px;
}

.legal-panel {
  display: grid;
  gap: 26px;
  padding: 28px;
}

.legal-panel section {
  display: grid;
  gap: 10px;
}

.legal-panel h2 {
  margin: 0;
  color: var(--deep-2);
  font-size: 26px;
  line-height: 1.12;
}

.legal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.legal-panel a {
  color: var(--deep-2);
  font-weight: 900;
}

.field {
  display: grid;
  gap: 7px;
}

label,
legend {
  color: var(--deep-2);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #d5cabb;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fffdfa;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 168, 216, 0.18);
  outline: none;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.4;
}

.check-row input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 2px 0 0;
}

.button,
.ghost-button,
.icon-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
}

.button {
  border: 0;
  padding: 12px 16px;
  color: #fffdfa;
  background: var(--deep);
  box-shadow: 0 12px 24px rgba(11, 59, 50, 0.17);
}

.button:hover,
.button:focus-visible {
  background: var(--deep-2);
  outline: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.ghost-button {
  border: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--deep-2);
  background: rgba(255, 253, 250, 0.78);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: #fffdfa;
  border-color: rgba(11, 59, 50, 0.28);
  outline: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-buttons {
  gap: 7px;
}

.compact-buttons .ghost-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.36;
}

.helper-note {
  margin: -2px 0 0;
  font-size: 13px;
  line-height: 1.42;
}

.status[data-tone="error"] {
  color: #b33727;
}

.status[data-tone="success"] {
  color: #137250;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.next-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(11, 59, 50, 0.18);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-green);
}

.next-box strong {
  color: var(--deep-2);
}

.next-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.38;
}

.print-note {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fffdfa;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.metric strong {
  display: block;
  margin-top: 9px;
  color: var(--deep-2);
  font-size: 27px;
  line-height: 1.05;
}

.tag-table {
  width: 100%;
  border-collapse: collapse;
}

.tag-table th,
.tag-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tag-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag-table input {
  min-width: 190px;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 950;
}

.pill {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--deep-2);
  background: var(--mint);
  font-size: 12px;
  font-weight: 950;
}

.pill.gold {
  background: #f5df9b;
}

.pill.coral {
  background: #ffd8cf;
}

.qr-mini {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: #ffffff;
}

.qr-mini svg {
  width: 100%;
  height: 100%;
  display: block;
}

.labels {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.label-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.label-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #8fa49a;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  break-inside: avoid;
}

.label-card svg {
  width: 102px;
  height: 102px;
  display: block;
}

.label-card strong {
  display: block;
  color: #111816;
  font-size: 16px;
}

.label-card span {
  display: block;
  margin-top: 4px;
  color: #444;
  font-size: 12px;
}

.label-card span:last-child {
  color: #111816;
  font-weight: 800;
}

.empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 22px;
  background: rgba(255, 253, 250, 0.5);
}

.scan-page {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.scan-panel {
  width: min(700px, 100%);
  overflow: hidden;
}

.scan-hero {
  display: grid;
  gap: 12px;
  padding: 30px;
  color: #fffdfa;
  background:
    linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 100%);
}

.scan-hero h1 {
  margin: 0;
  color: #fffdfa;
  font-size: 46px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.scan-hero p {
  margin: 0;
  color: rgba(255, 253, 250, 0.74);
}

.scan-hero .pill {
  width: fit-content;
  background: var(--lime);
}

.scan-body {
  padding: 24px;
}

.item-line {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.item-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item-line strong {
  color: var(--deep-2);
  font-size: 24px;
}

.success-box {
  border: 1px solid rgba(11, 59, 50, 0.18);
  border-radius: 8px;
  padding: 16px;
  color: #14563d;
  background: var(--surface-green);
  font-weight: 800;
}

.success-page .success-box {
  margin-bottom: 18px;
}

.success-page {
  align-items: start;
  padding-top: 76px;
}

.success-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.45;
}

.success-list li::marker {
  color: var(--deep);
  font-weight: 900;
}

.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.45;
}

.plain-list li::marker {
  color: var(--deep);
}

.inline-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper-soft);
}

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

.inline-row .button {
  box-shadow: none;
}

.inline-row .button:disabled {
  cursor: progress;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .site-header,
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding-left: 24px;
    padding-right: 24px;
  }

  nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace,
  .founder-workspace,
  .summary-strip,
  .inline-row,
  .next-box {
    grid-template-columns: 1fr;
  }

  .page-title h1 {
    font-size: 48px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  nav {
    width: 100%;
    gap: 4px;
    font-size: 14px;
  }

  nav a {
    padding: 8px 9px;
  }

  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 34px;
  }

  .page-title h1,
  .scan-hero h1 {
    font-size: 36px;
  }

  .scan-page {
    padding: 16px;
  }

  .panel-head,
  .panel-body,
  .scan-hero,
  .scan-body {
    padding: 18px;
  }

  .button-row,
  .button,
  .ghost-button {
    width: 100%;
  }

  .tag-table,
  .tag-table tbody,
  .tag-table tr,
  .tag-table td {
    display: block;
    width: 100%;
  }

  .tag-table thead {
    display: none;
  }

  .tag-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

  .tag-table td {
    border: 0;
    padding: 8px 0;
  }

  .tag-table input {
    min-width: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: auto;
    background: #ffffff;
  }

  .site-header,
  .page-title,
  .workspace > .panel:first-child,
  .panel-head,
  .summary-strip,
  .next-box,
  .print-note,
  .tag-table {
    display: none !important;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }

  .panel-body {
    padding: 0;
  }

  .labels {
    display: block;
    width: 210mm;
    margin: 0;
  }

  .label-sheet {
    width: 210mm;
    height: 297mm;
    display: grid;
    grid-template-columns: repeat(3, 63.5mm);
    grid-template-rows: repeat(7, 38.1mm);
    column-gap: 2.5mm;
    row-gap: 0;
    box-sizing: border-box;
    padding: 15.15mm 7.25mm;
    margin: 0;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }

  .label-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .label-card {
    width: 63.5mm;
    height: 38.1mm;
    min-height: 0;
    grid-template-columns: 24mm minmax(0, 1fr);
    gap: 3mm;
    border: 0;
    border-radius: 0;
    padding: 4mm 3.5mm;
    box-shadow: none;
    overflow: hidden;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .label-card svg {
    width: 24mm;
    height: 24mm;
  }

  .label-card strong {
    color: #111;
    font-size: 8.8pt;
    line-height: 1.1;
  }

  .label-card span {
    margin-top: 1mm;
    color: #333;
    font-size: 6.6pt;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .label-card span:last-child {
    color: #111;
    font-size: 5.8pt;
  }
}
