:root {
  color-scheme: light;
  --bg: #fffaf4;
  --bg-soft: #fff3e6;
  --ink: #202631;
  --muted: #68717f;
  --line: #e8ddd3;
  --surface: #ffffff;
  --red: #f04b45;
  --red-strong: #db3530;
  --yellow: #ffc64d;
  --green: #138b62;
  --blue: #3157d5;
  --shadow: 0 22px 70px rgba(32, 38, 49, 0.12);
  --soft-shadow: 0 12px 34px rgba(32, 38, 49, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--red);
}

.landing,
.setup,
.dashboard {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 28px 22px 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.brand-link,
.header-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-link {
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.brand-link img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.header-link {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.header-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 520px);
  gap: 44px;
  align-items: center;
  padding: 46px 0 34px;
}

.hero-copy {
  min-width: 0;
}

.title-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.title-lockup img {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  font-size: 68px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #3d4653;
  font-size: 23px;
  line-height: 1.42;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.trust-row span,
.quota,
.limit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.trust-row span {
  padding: 9px 12px;
  color: #35404d;
  font-size: 14px;
  font-weight: 800;
}

.upload-panel,
.setup-card,
.document-card,
.center-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.upload-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.setup-card,
.center-card {
  padding: 24px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 390px;
  padding: 32px;
  place-items: center;
  align-content: center;
  gap: 12px;
  overflow: hidden;
  border: 2px dashed #f3a23a;
  border-radius: 8px;
  background: #fff8ef;
  text-align: center;
  cursor: pointer;
}

.dropzone:hover {
  border-color: var(--red);
  background: #fff4e5;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone img {
  width: 132px;
  height: 132px;
  object-fit: contain;
}

.dropzone-title {
  color: var(--ink);
  font-size: 31px;
  font-weight: 900;
  line-height: 1.1;
}

.dropzone-note,
.microcopy,
.upload-footer p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.upload-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: center;
}

.upload-footer p {
  margin: 0;
}

button,
.button-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--red);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button {
  width: 100%;
}

button:hover,
.button-link:hover {
  background: var(--red-strong);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff8ef;
  color: var(--ink);
}

.secondary-button:hover {
  background: #ffeece;
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  background: #f0ebe6;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 12px;
}

.error {
  margin: 0;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff0ee;
  color: #9d211d;
}

.stickers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 0 38px;
}

.stickers article {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transform: rotate(-1deg);
}

.stickers article:nth-child(2) {
  transform: rotate(1.2deg);
}

.stickers article:nth-child(3) {
  transform: rotate(0.4deg);
}

.stickers article:nth-child(4) {
  transform: rotate(-0.6deg);
}

.stickers strong,
.stickers span {
  display: block;
  line-height: 1.35;
}

.stickers strong {
  font-size: 17px;
}

.stickers span {
  margin-top: 8px;
  color: var(--muted);
}

.explain-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
  margin-top: 10px;
}

.open-block,
.notifications-demo,
.faq-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.open-block {
  padding: 24px;
}

.open-block p {
  margin: 16px 0 0;
  color: #46515e;
  font-size: 17px;
  line-height: 1.6;
}

.notifications-demo {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  background: #202631;
  color: #ffffff;
}

.notifications-demo .eyebrow {
  color: var(--yellow);
}

.notifications-demo h2 {
  max-width: 420px;
}

.message-stack {
  display: grid;
  gap: 10px;
}

.message-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.09);
}

.message-card span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
}

.message-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.message-card strong {
  color: var(--yellow);
}

.extra-links {
  margin-top: 18px;
}

.faq-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.faq-strip article {
  padding: 18px;
}

.faq-strip p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.setup {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.setup-card {
  width: min(100%, 760px);
}

.share-box,
.form-grid label {
  display: grid;
  gap: 8px;
}

.share-box input,
.form-grid input,
.form-grid select,
.new-link-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffdf9;
}

.settings-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

fieldset {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 14px;
}

legend {
  padding: 0 6px;
  font-weight: 900;
}

.choice-group label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}

.choice-group input {
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
  gap: 14px;
}

.limit-row,
.quota {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.limit-row strong,
.quota strong {
  font-size: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.document-list {
  display: grid;
  gap: 14px;
}

.document-card {
  padding: 18px;
}

.document-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.document-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-main a {
  overflow-wrap: anywhere;
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.counters div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.counters dt {
  color: var(--muted);
  font-size: 13px;
}

.counters dd {
  margin: 5px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.share-links {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.section-row,
.share-link-row,
.new-link-form {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.section-row h3 {
  margin: 0;
  font-size: 16px;
}

.section-row span,
.share-link-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.share-link-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.share-link-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.share-link-row a {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.new-link-form input {
  min-width: 0;
  flex: 1;
}

.new-link-form label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.new-link-form button {
  width: auto;
}

.events {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.events p {
  margin: 0;
}

.events span {
  color: var(--ink);
  font-weight: 900;
}

.replay-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.replay-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf9;
}

.replay-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.replay-row p {
  margin: 0;
  color: #46515e;
  font-size: 14px;
  line-height: 1.45;
}

.replay-row span,
.empty-line {
  color: var(--muted);
  font-size: 13px;
}

.replay-link {
  width: auto;
  white-space: nowrap;
}

.viewer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
}

.viewer-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  background: var(--surface);
}

.viewer-bar h1 {
  max-width: 70vw;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.viewer-actions span {
  min-width: 54px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.pdf-stage {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 18px;
  padding: 22px 14px 42px;
  border: 0;
  background: #f0ede8;
}

.viewer-loading {
  margin: 18vh 0 0;
  color: var(--muted);
  font-weight: 900;
}

.pdf-page {
  overflow: hidden;
  max-width: 100%;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 10px 36px rgba(20, 28, 34, 0.18);
}

.pdf-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.center-card {
  width: min(100% - 32px, 520px);
  margin: 20vh auto 0;
}

@media (max-width: 980px) {
  .hero,
  .explain-grid,
  .notifications-demo,
  .faq-strip {
    grid-template-columns: 1fr;
  }

  .stickers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 52px;
  }
}

@media (max-width: 760px) {
  .landing,
  .setup,
  .dashboard {
    padding: 20px 16px 54px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    gap: 26px;
    padding-top: 28px;
  }

  .title-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .title-lockup img {
    width: 82px;
    height: 82px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 24px;
  }

  .lead {
    font-size: 19px;
  }

  .upload-footer,
  .form-grid,
  .counters,
  .stickers {
    grid-template-columns: 1fr;
  }

  .dropzone {
    min-height: 310px;
    padding: 22px;
  }

  .dropzone-title {
    font-size: 25px;
  }

  .notifications-demo {
    min-width: 0;
  }

  .section-row,
  .share-link-row,
  .replay-row,
  .new-link-form {
    align-items: stretch;
    flex-direction: column;
  }

  .replay-row {
    grid-template-columns: 1fr;
  }

  .replay-link {
    width: 100%;
  }

  .new-link-form button {
    width: 100%;
  }

  .topbar,
  .viewer-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-bar h1 {
    max-width: 100%;
  }

  .viewer-actions {
    width: 100%;
    justify-content: space-between;
  }
}
