@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=PT+Mono&display=swap');

:root {
  --ink: #17201d;
  --muted: #6c7671;
  --paper: #f5f3ec;
  --surface: #fffefa;
  --line: #d9d8cf;
  --green: #176b4d;
  --green-soft: #dcece4;
  --orange: #db653d;
  --orange-soft: #f7e1d9;
  --shadow: 0 18px 45px rgba(34, 43, 39, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(31, 44, 39, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 44, 39, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: Manrope, system-ui, sans-serif;
}

button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 68px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 236, .88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 4px 12px 4px 4px;
  font-family: "PT Mono", monospace;
}

.format-badge, .document-code, .step-number, .privacy-mark {
  font-family: "PT Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.format-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.format-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39a878;
  box-shadow: 0 0 0 4px rgba(57, 168, 120, .13);
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 24px 50px;
}

.intro { max-width: 760px; margin-bottom: 48px; }
.eyebrow {
  color: var(--orange);
  font-family: "PT Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 17px;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .94;
  letter-spacing: -.075em;
  font-weight: 800;
}

h1 span { color: var(--green); }
.intro > p {
  max-width: 630px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-panel, .converter-panel { min-width: 0; padding: 30px; }
.profile-panel { overflow: hidden; border-right: 1px solid var(--line); background: #efeee7; }

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 5px;
}

.panel-heading > div { display: flex; gap: 12px; align-items: baseline; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.step-number { color: var(--orange); font-size: 11px; }
.panel-note { margin: 0 0 25px 31px; color: var(--muted); font-size: 12px; }
.text-button {
  padding: 0;
  border: 0;
  color: var(--green);
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

#profile-form, .address-fields {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px 12px;
}
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field span { color: #58625d; font-size: 11px; font-weight: 700; }
.field input, .field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cfcec5;
  border-radius: 3px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  font-size: 13px;
}
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 77, .1); }
.address-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.address-fields { grid-column: 1 / -1; }
.address-fields[hidden] { display: none; }

.converters-heading { margin-bottom: 26px; }
.privacy-mark { color: var(--muted); font-size: 9px; }
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.converter-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.converter-card::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  top: -65px;
  right: -65px;
  border-radius: 50%;
  background: var(--green-soft);
}
.converter-card.buyout::before { background: var(--orange-soft); }
.converter-card.is-dragging { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow); }
.converter-card.is-loading { pointer-events: none; opacity: .62; }
.card-topline { position: relative; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.document-code {
  padding: 5px 8px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
}
.buyout .document-code { color: #a84223; background: var(--orange-soft); }
.route { color: var(--muted); font-size: 10px; }
.converter-card h3 { margin: 28px 0 10px; font-size: 25px; line-height: 1.1; letter-spacing: -.045em; }
.converter-card > p { min-height: 66px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.converter-card ol { margin: 20px 0; padding: 16px 0 16px 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #59635e; font-size: 11px; line-height: 1.9; }
.drop-zone {
  min-height: 116px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed #aeb5b0;
  background: #faf9f4;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease, border-color .15s ease;
}
.drop-zone:hover { border-color: var(--green); background: #f3f8f4; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); }
.drop-zone strong { font-size: 12px; }
.drop-zone small { color: var(--muted); font-size: 10px; }

.status { margin-top: 18px; padding: 13px 15px; border-left: 3px solid; font-size: 12px; }
.status.loading { color: #5f5147; border-color: #9f7b62; background: #f2ebe3; }
.status.success { color: #15583f; border-color: var(--green); background: var(--green-soft); overflow-wrap: anywhere; }
.status.error { color: #842f25; border-color: #b74636; background: #f7dfdb; }
.footnotes { display: flex; gap: 24px; margin-top: 24px; color: var(--muted); font-size: 10px; }
.footnotes p { margin: 0; }

footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 35px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: "PT Mono", monospace;
  font-size: 10px;
}
footer a { color: inherit; }

@media (max-width: 1080px) {
  .converter-grid { grid-template-columns: minmax(0, 1fr); }
  .converter-card > p { min-height: 0; }
}

@media (max-width: 900px) {
  main { padding-top: 48px; }
  .workspace { grid-template-columns: 1fr; }
  .profile-panel { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .topbar { height: 58px; padding: 0 16px; }
  main { padding: 38px 14px 35px; }
  h1 { font-size: 50px; }
  .intro { margin-bottom: 34px; }
  .intro > p { font-size: 14px; }
  .profile-panel, .converter-panel { padding: 22px 18px; }
  .converter-grid { grid-template-columns: 1fr; }
  .footnotes { flex-direction: column; gap: 6px; }
  #profile-form, .address-fields { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .address-title, .address-fields { grid-column: 1; }
  .privacy-mark { display: none; }
}
