:root {
  --red: #b71d1b;
  --ink: #202b36;
  --muted: #566471;
  --line: #dce2e5;
  --paper: #f5f7f8;
  --blue: #216a8c;
  --green: #216446;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: white;
  font-size: 15px;
  line-height: 1.55;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button,
a {
  transition: background 0.15s;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #216a8c;
  outline-offset: 4px;
}
.demo {
  padding: 9px 5%;
  background: #f1ede5;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #59452d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.demo button {
  background: none;
  border: 0;
  text-decoration: underline;
  font-size: 12px;
  color: inherit;
  white-space: nowrap;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 23px 5%;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.brandmark {
  width: 42px;
  height: 42px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 27px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.17em;
  color: var(--muted);
}
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 27px;
}
nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
nav a:hover {
  color: var(--red);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 16px;
}
.eyebrow {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 17px;
}
.muted {
  color: var(--muted);
}
.primary,
.secondary {
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-block;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.primary {
  background: var(--red);
  color: #fff;
}
.primary:hover {
  background: #941817;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover {
  background: var(--paper);
}
.hero {
  max-width: 1200px;
  margin: auto;
  padding: 85px 6%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 70px;
  align-items: center;
}
.hero h1 {
  font-size: 53px;
}
.hero p {
  color: var(--muted);
  font-size: 17px;
  max-width: 500px;
}
.hero .primary {
  margin: 15px 10px 0 0;
}
.hero-panel {
  background: var(--paper);
  padding: 32px;
  border-top: 4px solid var(--red);
  box-shadow: 16px 16px 0 #edf2f4;
}
.flow {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 17px;
}
.flow:last-child {
  border: 0;
}
.flow b {
  color: var(--red);
  font-size: 13px;
}
.flow p {
  font-size: 13px;
  margin: 3px 0 0;
}
.intro {
  background: var(--paper);
  padding: 52px max(6%, calc((100vw - 1060px) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.intro p {
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 214px 1fr;
  max-width: 1440px;
  margin: auto;
  min-height: 650px;
  background: var(--paper);
}
aside {
  background: white;
  border-right: 1px solid var(--line);
  padding: 32px 18px;
}
.org {
  padding: 0 12px 25px;
  font-weight: 600;
  font-size: 13px;
}
.org small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.side-links a {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  margin-bottom: 5px;
  font-size: 13px;
  border-radius: 5px;
  color: var(--muted);
}
.side-links a.active {
  background: #faeeed;
  color: var(--red);
  font-weight: bold;
}
.aside-note {
  margin: 80px 12px 0;
  font-size: 12px;
  color: var(--muted);
}
main {
  padding: 38px 42px;
}
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-top h1 {
  font-size: 32px;
  margin-bottom: 9px;
}
.page-top p {
  margin: 0;
}
.badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 30px;
  padding: 5px 10px;
  background: #eaf3ed;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}
.badge.pending {
  background: #fcf0dc;
  color: #7b4e06;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 7px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  font-size: 28px;
  display: block;
  margin: 4px 0;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.buy-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.panel-heading {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel-heading h2 {
  margin: 0;
  font-size: 18px;
}
.panel-heading p {
  font-size: 12px;
  margin: 4px 0 0;
}
.product {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
}
.product:last-child {
  border: 0;
}
.product h3 {
  margin-bottom: 4px;
}
.product p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0;
}
.product .tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--blue);
  font-weight: bold;
  margin-bottom: 8px;
}
.product .stock {
  color: var(--green);
  margin-top: 10px;
}
.qty {
  align-self: center;
  text-align: right;
}
.qty label {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--muted);
}
input[type="number"] {
  width: 77px;
  padding: 9px;
  border: 1px solid #a9b6bf;
  border-radius: 4px;
  text-align: center;
}
.summary {
  padding: 23px;
  align-self: start;
  position: sticky;
  top: 20px;
}
.summary h2 {
  font-size: 18px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
  margin: 16px 0;
}
.total {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-weight: bold;
  font-size: 18px;
}
.summary button {
  width: 100%;
  margin-top: 8px;
}
.summary p {
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0 0;
}
.callout {
  margin-top: 20px;
  border-left: 3px solid var(--blue);
  background: #edf4f7;
  padding: 13px 16px;
  font-size: 12px;
  color: #365b6c;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 15px 24px;
  background: #fafbfc;
  white-space: nowrap;
}
td {
  padding: 19px 24px;
  border-top: 1px solid var(--line);
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.stack {
  display: grid;
  gap: 22px;
}
.detail {
  padding: 25px;
}
.detail p {
  margin-bottom: 12px;
}
.fields {
  display: grid;
  gap: 17px;
  max-width: 450px;
}
.fields label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.fields input,
.fields select {
  padding: 11px;
  border: 1px solid #a9b6bf;
  border-radius: 4px;
}
.fields button {
  justify-self: start;
}
#notice {
  position: fixed;
  right: 25px;
  bottom: 26px;
  background: var(--ink);
  color: white;
  max-width: 400px;
  padding: 16px 24px;
  border-radius: 6px;
  box-shadow: 0 8px 30px #0002;
  display: none;
  z-index: 5;
}
footer {
  padding: 24px 5%;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
dialog {
  border: 0;
  border-radius: 10px;
  padding: 32px;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 16px 80px #0003;
}
dialog::backdrop {
  background: #18232b80;
}
dialog h2 {
  margin-top: 20px;
}
.close {
  float: right;
  border: 0;
  background: none;
  font-size: 27px;
  color: var(--muted);
}
dialog .primary,
dialog .secondary {
  width: 100%;
  margin-top: 10px;
}
.blank {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1100px) {
  main {
    padding: 28px 22px;
  }
  .buy-layout {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
  .hero {
    gap: 30px;
  }
  .hero h1 {
    font-size: 43px;
  }
}
@media (max-width: 720px) {
  header {
    padding: 18px 5%;
    align-items: flex-start;
    flex-direction: column;
  }
  nav {
    gap: 12px 22px;
  }
  .demo {
    font-size: 9px;
  }
  .hero {
    padding: 45px 6%;
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero-panel {
    margin-right: 15px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 35px 6%;
  }
  .workspace {
    display: block;
  }
  aside {
    padding: 16px 5%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .org {
    padding: 0 0 12px;
  }
  .side-links {
    display: flex;
    overflow: auto;
    gap: 6px;
  }
  .side-links a {
    white-space: nowrap;
    padding: 9px 12px;
  }
  .aside-note {
    display: none;
  }
  main {
    padding: 26px 5%;
  }
  .page-top {
    align-items: flex-start;
  }
  .page-top h1 {
    font-size: 27px;
  }
  .stats {
    gap: 7px;
  }
  .stat {
    padding: 13px 10px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat small {
    font-size: 10px;
  }
  .product {
    padding: 20px;
  }
  .panel-heading {
    padding: 20px;
  }
  td,
  th {
    padding: 15px;
  }
  .page-top p {
    font-size: 13px;
  }
  .badge {
    font-size: 10px;
  }
  .summary {
    padding: 22px;
  }
  #notice {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

#identity-controls {
  background: #edf4f7;
  padding: 12px 5%;
}
.preview-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.preview-selector select {
  max-width: 100%;
  padding: 8px;
  border: 1px solid #a9b6bf;
  border-radius: 4px;
  background: white;
}
.history-panel {
  margin-top: 24px;
}
.debit {
  color: var(--red);
  font-weight: bold;
}
.credit {
  color: var(--green);
  font-weight: bold;
}
.fields input:not([type="number"]),
.fields select {
  width: 100%;
  min-width: 0;
}
.fields {
  width: 100%;
}
@media (max-width: 720px) {
  .preview-selector {
    flex-wrap: wrap;
  }
  .fields {
    padding: 20px;
  }
  .summary-line {
    overflow-wrap: anywhere;
  }
}
/* Record-first design, 0.3 */
main,
.workspace > * {
  min-width: 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
}
.hero-footnote {
  font-size: 12px !important;
  margin-top: 24px !important;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hero .actions .primary {
  margin: 0;
}
.hero .actions {
  align-items: center;
}
.mini-receipt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.mini-receipt small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.receipt-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 100%;
}
.intro {
  grid-template-columns: 1fr 1.8fr;
}
.plan-grid,
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.plan-grid article {
  border-top: 2px solid var(--blue);
  padding-top: 20px;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--blue);
  font-weight: bold;
  display: block;
  margin-bottom: 12px;
}
.home-bottom {
  padding: 48px 6%;
  text-align: center;
}
.home-bottom p {
  color: var(--muted);
}
.steps {
  padding-left: 22px;
}
.steps li {
  padding: 10px 0;
}
.steps span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.proposal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff7e9;
  border: 1px solid #e8d4ae;
  border-radius: 6px;
  padding: 14px 18px;
  color: #725011;
  font-size: 12px;
}
.proposal strong {
  font-size: 13px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 30px 0 16px;
}
.section-title h2 {
  margin: 0;
}
.section-title span {
  font-size: 12px;
  color: var(--muted);
}
.record h3 {
  font-size: 20px;
  margin: 4px 0;
}
.record .eyebrow {
  margin: 0;
}
.record .panel-heading {
  align-items: flex-start;
}
.record .badge {
  white-space: normal;
}
.receipt-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
  font-size: 13px;
}
.receipt-line small {
  width: 100%;
  color: var(--muted);
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.status-grid div {
  border-left: 2px solid var(--line);
  padding-left: 12px;
}
.status-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.status-grid b {
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.fields {
  max-width: none;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fields input[type="number"] {
  width: 100%;
  text-align: left;
}
.fields label small {
  font-size: 11px;
  color: var(--muted);
}
.fields label.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.fields label.checkbox input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
}
.fields input,
.fields select {
  max-width: 100%;
  min-width: 0;
}
details {
  margin-top: 20px;
  font-size: 12px;
}
summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: bold;
}
.timeline {
  border-left: 1px solid var(--line);
  list-style: none;
  padding-left: 16px;
}
.timeline li {
  margin: 12px 0;
}
.timeline small {
  display: block;
  color: var(--muted);
}
.text-button {
  padding: 9px 0;
  background: none;
  border: 0;
  color: var(--blue);
  text-decoration: underline;
  font-size: 12px;
}
.nav-card {
  text-decoration: none;
}
.nav-card:hover {
  border-color: var(--blue);
}
.nav-card h2 {
  font-size: 19px;
  margin-top: 16px;
}
.guide-grid p,
.guide-grid li {
  font-size: 13px;
}
.guide-grid ul {
  padding-left: 20px;
}
.guide-grid li {
  margin: 8px 0;
}
#identity-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
#identity-controls > span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--blue);
}
.summary-line small {
  display: block;
  color: var(--muted);
}
.detail,
.panel-heading {
  overflow-wrap: anywhere;
}
td .badge {
  white-space: normal;
  min-width: 90px;
}
dialog .fields {
  padding: 0;
}
.record .actions button {
  font-size: 12px;
  padding: 10px 13px;
}
@media (max-width: 1100px) {
  .intro {
    grid-template-columns: 1fr;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .guide-grid {
    gap: 16px;
  }
  .record .panel-heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 720px) {
  .plan-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .hero-panel {
    padding: 24px;
  }
  .hero h1 {
    font-size: 39px;
  }
  #identity-controls {
    flex-wrap: wrap;
  }
  .form-grid {
    gap: 10px;
  }
  .status-grid {
    gap: 16px;
  }
  .record .detail {
    padding: 20px;
  }
  .page-top > .badge {
    display: none;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
  .form-grid label {
    min-width: 0;
  }
  .stat {
    min-width: 0;
  }
  .hero .secondary {
    margin-top: 8px;
  }
  .preview-selector select {
    max-width: 220px;
  }
  .blank {
    padding: 32px 22px;
  }
}

@media (max-width: 720px) {
  .table-wrap table {
    min-width: 600px;
  }
  .table-wrap::before {
    content: "Swipe horizontally to see all columns →";
    display: block;
    padding: 10px 15px;
    font-size: 11px;
    color: var(--muted);
  }
}
