:root {
  color-scheme: light;
  --ink: #24332e;
  --muted: #747b73;
  --paper: #f5f3ee;
  --white: #fffefa;
  --green: #355f4b;
  --green-dark: #284c3a;
  --green-light: #e6eee8;
  --line: #e8e6df;
  --serif: "Manrope", "Avenir Next", sans-serif;
  --sans: "DM Sans", "Avenir Next", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.topbar {
  width: min(1120px, calc(100% - 64px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(43, 59, 51, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1.4px;
  text-decoration: none;
}

.brand-period {
  color: #86a98f;
}

.brand-mark {
  position: relative;
  width: 23px;
  height: 23px;
  display: inline-flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--green);
  border-radius: 7px;
  transform: rotate(-7deg);
}

.brand-mark span {
  width: 1.5px;
  height: 12px;
  border-radius: 2px;
  background: var(--green);
}

.brand-mark span:last-child {
  height: 8px;
  background: #85a88e;
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #626d65;
  font-size: 12px;
  font-weight: 500;
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73a47e;
  box-shadow: 0 0 0 3px rgba(115, 164, 126, 0.13);
}

main {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}

.intro {
  max-width: 610px;
  margin: 65px auto 37px;
  text-align: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.65px;
}

.eyebrow-line {
  width: 20px;
  height: 1px;
  background: #87a78e;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 18px 0 13px;
  font-family: var(--serif);
  font-size: clamp(42px, 6.3vw, 60px);
  font-weight: 600;
  letter-spacing: -3.7px;
  line-height: 1.02;
}

h1 span {
  color: #66866e;
  font-weight: 500;
}

.intro-copy {
  max-width: 440px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #616b63;
  font-size: 11px;
  font-weight: 500;
}

.step-number {
  color: #6c8e75;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.step-arrow {
  color: #b6b9af;
  font-size: 12px;
}

.workspace {
  width: min(720px, 100%);
  margin: 0 auto;
}

.upload-panel,
.document-panel {
  border: 1px solid #e6e4dc;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 13px 34px rgba(43, 53, 45, 0.045);
}

.upload-panel {
  position: relative;
  min-height: 286px;
  padding: 31px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.upload-panel.is-dragging {
  border-color: #6f9879;
  background: #f8fbf7;
}

.upload-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #e5eae2;
  border-radius: 14px;
  background: #f5f8f3;
  color: var(--green);
}

.upload-icon svg {
  width: 34px;
  height: 34px;
}

.upload-panel h2 {
  margin: 15px 0 6px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.45px;
}

.upload-panel > p:not(.file-hint) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

#file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

#file-input:focus-visible + .file-hint {
  outline: 2px solid var(--green);
}

.button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.upload-panel .button {
  margin-top: 16px;
}

.file-hint {
  margin: 10px 0 0;
  color: #91968e;
  font-size: 10px;
}

.drop-hint {
  position: absolute;
  right: 0;
  bottom: -27px;
  left: 0;
  color: #92968f;
  font-size: 10px;
}

.document-panel {
  padding: 22px;
}

.document-heading,
.document-file,
.document-actions,
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.document-file {
  justify-content: flex-start;
  gap: 11px;
  min-width: 0;
}

.pdf-badge {
  width: 36px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #eedbd5;
  border-radius: 5px;
  background: #fcf4f1;
  color: #a75e4e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.document-name-wrap {
  min-width: 0;
}

.document-name-wrap h2 {
  max-width: 420px;
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-name-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.text-button {
  padding: 7px 0 7px 10px;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.text-button:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.status-message {
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid #ead7cf;
  border-radius: 6px;
  background: #fff8f5;
  color: #874c3d;
  font-size: 11px;
  line-height: 1.5;
}

.preview-heading {
  margin-top: 22px;
  padding: 17px 0 12px;
  border-top: 1px solid var(--line);
}

.option-nav {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font-size: 10px;
}

.option-nav a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.option-nav a:hover {
  text-decoration: underline;
}

.layout-option {
  scroll-margin-top: 58px;
}

.preview-heading h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.preview-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.sheet-count {
  color: #6c766c;
  font-size: 10px;
  font-weight: 600;
}

.preview-list {
  max-height: 550px;
  overflow-y: auto;
  padding: 0 3px 2px 0;
  scrollbar-color: #cdd5ca transparent;
  scrollbar-width: thin;
}

.sheet-row {
  margin-bottom: 11px;
  padding: 11px;
  border: 1px solid #eeede7;
  border-radius: 7px;
  background: #fffefa;
}

.sheet-label {
  margin: 0 0 8px;
  color: #69746a;
  font-size: 10px;
  font-weight: 600;
}

.sheet-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-side {
  min-width: 0;
}

.side-caption {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #93988f;
  font-size: 9px;
}

.side-caption strong {
  color: #71796f;
  font-weight: 600;
}

.sheet-canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e2e1d9;
  background: white;
}

.word-conversion {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 128mm;
  padding: 0;
  background: white;
  color: #202020;
  font-family: Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.45;
}

.word-conversion h1,
.word-conversion h2,
.word-conversion h3 {
  color: #202020;
  font-family: Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1.25;
}

.word-conversion h1 {
  font-size: 20pt;
}

.word-conversion h2 {
  font-size: 16pt;
}

.word-conversion h3 {
  font-size: 13pt;
}

.word-conversion p {
  margin: 0 0 8pt;
}

.word-conversion img {
  max-width: 100%;
}

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

.word-conversion td,
.word-conversion th {
  border: 1px solid #888;
  padding: 4pt;
}

.document-actions {
  gap: 14px;
  margin-top: 14px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.print-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #737c73;
  font-size: 10px;
  line-height: 1.45;
}

.print-note strong {
  color: #4e5c51;
  font-weight: 600;
}

.info-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #cfd8ce;
  border-radius: 50%;
  color: #6f8d75;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}

.download-button {
  flex: 0 0 auto;
  min-width: 178px;
}

.download-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.privacy-note {
  width: min(720px, 100%);
  margin: 32px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #777f76;
}

.lock-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #d9e0d7;
  border-radius: 50%;
  color: #62816a;
  font-size: 15px;
  transform: rotate(180deg);
}

.privacy-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.privacy-note strong {
  color: #56685a;
  font-weight: 600;
}

footer {
  min-height: 68px;
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(43, 59, 51, 0.09);
  color: #81877e;
  font-size: 8px;
  letter-spacing: 0.7px;
}

.footer-dot {
  padding: 0 4px;
  color: #99aa96;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .topbar {
    width: calc(100% - 36px);
    height: 64px;
  }

  main {
    width: calc(100% - 28px);
  }

  .intro {
    margin-top: 48px;
    margin-bottom: 30px;
  }

  h1 {
    letter-spacing: -2.6px;
  }

  .intro-copy {
    max-width: 350px;
    font-size: 13px;
  }

  .steps {
    gap: 8px;
  }

  .step {
    gap: 5px;
    font-size: 9px;
  }

  .step-arrow {
    font-size: 10px;
  }

  .document-panel {
    padding: 15px;
  }

  .sheet-sides {
    gap: 7px;
  }

  .sheet-row {
    padding: 8px;
  }

  .document-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-button {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
