:root {
  color-scheme: light;
  --bg: #fbf8ef;
  --ink: #092c2f;
  --body: #3d5b5f;
  --muted: #607579;
  --line: #e2d9c8;
  --panel: #fffdf8;
  --accent: #047b7a;
  --accent-strong: #043f43;
  --accent-dark: #052e32;
  --soft: #dcefed;
  --pill: #f1eadb;
  --warn: #92400e;
  font-family:
    Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(251, 248, 239, 0.92);
  border-bottom: 1px solid #e9dfce;
  backdrop-filter: blur(14px);
}

.brand,
.nav-cta,
.badge,
.limit-pills span,
.choose-file,
.primary {
  font-weight: 760;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 1rem;
}

.brand-mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.brand-mark svg {
  width: 16px;
  height: 16px;
}


.nav-cta {
  justify-self: end;
  padding: 11px 19px;
  color: #fff;
  font-size: 0.86rem;
  background: var(--accent-dark);
  border-radius: 999px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0 34px;
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -62px;
  width: min(590px, 80vw);
  height: 220px;
  background: radial-gradient(ellipse at center, rgba(4, 123, 122, 0.42), rgba(4, 123, 122, 0.18) 44%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 7px 13px;
  color: var(--body);
  font-size: 0.78rem;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid #e5dccb;
  border-radius: 999px;
  box-shadow: 0 10px 35px rgba(9, 44, 47, 0.08);
}

.badge svg {
  width: 14px;
  height: 14px;
  color: #f17b3a;
}

h1,
.dropzone h2,
.feature-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0;
  font-size: clamp(3rem, 6.8vw, 5.4rem);
  line-height: 0.92;
}

h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(820px, 100%);
  margin: 28px 0 0;
}

.hero-step {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  text-align: left;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hero-step span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
  background: var(--accent);
  border-radius: 999px;
}

.hero-step strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.hero-step p {
  margin: 0;
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.45;
}

.converter {
  width: min(860px, 100%);
  margin: 38px auto 0;
}

.quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  color: var(--body);
  font-size: 0.88rem;
}

.quota-row p,
.quota-row span {
  margin: 0;
}

.quota-row strong {
  color: var(--ink);
}

.quota-row span {
  font-size: 0.78rem;
}

.converter-surface {
  display: grid;
  gap: 18px;
}

.dropzone {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px dashed #d6c9b7;
  border-radius: 22px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.dropzone.is-dragging {
  border-color: var(--accent);
  background: #f2faf8;
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-copy {
  display: grid;
  justify-items: center;
  max-width: 520px;
  text-align: center;
  pointer-events: none;
}

.upload-icon {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 18px;
  color: var(--accent);
  background: var(--soft);
  border-radius: 18px;
}

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

.dropzone h2 {
  margin: 0 0 7px;
  font-size: 1.65rem;
}

.dropzone p {
  margin: 0;
  color: var(--body);
  font-size: 0.9rem;
}

.choose-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 42px;
  margin-top: 22px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.limit-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.limit-pills span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 13px 4px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1;
  background: var(--pill);
  border-radius: 999px;
}

.upload-status {
  margin: 0;
  padding: 14px 16px;
  color: #b91c1c;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(9, 44, 47, 0.07);
}

.file-card {
  min-height: 86px;
  padding: 14px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.file-card strong,
.file-card span {
  display: block;
  overflow-wrap: anywhere;
}

.file-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.file-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: start;
}

.file-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.file-remove svg {
  width: 17px;
  height: 17px;
}

.file-remove:hover,
.file-remove:focus-visible {
  color: var(--accent-strong);
  border-color: #99cfc5;
  outline: none;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  background: #f5efe2;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.segmented-control label {
  position: relative;
  min-height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 820;
  border-radius: 8px;
}

.segmented-control input:checked + span {
  color: #fff;
  background: var(--accent);
}

.segmented-control input:focus-visible + span {
  outline: 2px solid #99cfc5;
  outline-offset: 2px;
}
.field {
  display: grid;
  gap: 8px;
}

[hidden] {
  display: none !important;
}

.field span {
  font-size: 0.86rem;
  font-weight: 750;
}

.field-label,
.range-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-label output {
  min-width: 48px;
  padding: 3px 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
  background: var(--soft);
  border: 1px solid #c4e1da;
  border-radius: 8px;
}

.range-labels span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

select,
input[type="number"] {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

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

.primary,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 820;
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.primary svg,
.secondary-action svg {
  width: 18px;
  height: 18px;
}

.is-spinning {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.primary:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  background: #9ca3af;
}

.secondary-action {
  color: var(--accent-strong);
  background: var(--soft);
  border: 1px solid #b8ddd4;
}

.primary:not(:disabled):hover,
.secondary-action:not(:disabled):hover {
  color: #fff;
  background: var(--accent-strong);
}

.secondary-action:not(:disabled):hover svg,
.secondary-action:not(:disabled):hover span {
  color: #fff;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--body);
  font-size: 0.82rem;
  font-weight: 720;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #efe6d5;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #0aa09c);
  border-radius: inherit;
  transition: width 180ms ease;
}

.status {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.status:empty {
  display: none;
}

.status.is-warning {
  color: var(--warn);
}

.history-panel {
  margin-top: 18px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 18px;
  align-items: center;
  padding: 16px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 42px rgba(9, 44, 47, 0.06);
}

.history-source,
.history-flow,
.history-result,
.format-chip,
.history-action,
.history-actions,
.history-share,
.history-download {
  display: flex;
  align-items: center;
}

.history-source {
  min-width: 0;
  gap: 12px;
}

.history-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent);
  background: var(--soft);
  border-radius: 12px;
}

.history-icon svg,
.history-flow svg,
.history-share svg,
.history-download svg {
  width: 17px;
  height: 17px;
}

.history-source strong,
.history-result strong {
  display: block;
  overflow-wrap: anywhere;
}

.history-source span,
.history-result span:not(.history-status) {
  color: var(--muted);
  font-size: 0.86rem;
}

.history-flow {
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.history-action,
.format-chip {
  gap: 6px;
  white-space: nowrap;
}

.history-flow.is-share-only {
  justify-content: flex-end;
}


.format-chip {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: #f5efe2;
  border-radius: 8px;
}

.history-arrow {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.history-result {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid #eee4d3;
}

.history-actions {
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  background: #dff2ed;
  border: 1px solid #b8ddd4;
  border-radius: 999px;
}

.history-share,
.history-download {
  flex: 0 0 auto;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  font-weight: 820;
  border-radius: 12px;
  cursor: pointer;
}

.history-share {
  color: var(--accent-strong);
  background: var(--soft);
  border: 1px solid #b8ddd4;
}

.history-share:disabled {
  color: var(--muted);
  cursor: wait;
  background: #e6edf0;
  border-color: #d7e1e2;
}

.history-download {
  color: #fff;
  background: var(--accent);
  border: 0;
}

.history-result .history-download span,
.history-result .history-download svg {
  color: #fff;
}

.history-share-status {
  flex-basis: 100%;
  min-width: 0;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 720;
}

.history-share-status.is-warning {
  color: var(--warn);
}

.history-share:hover,
.history-share:focus-visible,
.history-download:hover,
.history-download:focus-visible {
  color: #fff;
  background: var(--accent-strong);
  outline: none;
}

.history-share:hover svg,
.history-share:hover span,
.history-share:focus-visible svg,
.history-share:focus-visible span {
  color: #fff;
}

.share-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.share-shell {
  width: min(100%, 560px);
  display: grid;
  gap: 22px;
}

.share-card {
  display: grid;
  justify-items: center;
  padding: 44px 28px;
  text-align: center;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 70px rgba(9, 44, 47, 0.08);
}

.share-card h1 {
  margin: 22px 0 10px;
  font-size: clamp(1.9rem, 6vw, 2.85rem);
  line-height: 1;
}

.share-card p {
  margin: 0;
  color: var(--body);
  overflow-wrap: anywhere;
}

.share-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  margin-top: 28px;
  padding: 0 20px;
  color: #fff;
  font-weight: 820;
  text-decoration: none;
  background: var(--accent);
  border-radius: 999px;
}

.share-download:hover,
.share-download:focus-visible {
  color: #fff;
  background: var(--accent-strong);
  outline: none;
}

.share-note {
  margin-top: 18px !important;
  font-size: 0.86rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 82px 0 0;
}

.feature-card {
  min-height: 190px;
  padding: 28px 26px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.feature-card > svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.feature-card h2 {
  margin: 18px 0 8px;
  font-size: 1.55rem;
}

.feature-card p {
  margin: 0;
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.45;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 24px;
}

.legal-shell h1 {
  margin-bottom: 14px;
  font-size: clamp(2.7rem, 8vw, 4.6rem);
  line-height: 1;
}

.legal-updated {
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.legal-content {
  color: var(--body);
  font-size: 0.96rem;
  line-height: 1.75;
}

.legal-content h2 {
  margin: 34px 0 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.legal-content p,
.legal-content ul {
  margin: 0 0 16px;
}

.legal-content a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}


@media (max-width: 880px) {
  .site-nav {
    grid-template-columns: 1fr auto;
    padding: 12px 18px;
  }


  .page-shell {
    width: min(100% - 28px, 680px);
    padding-top: 48px;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .quota-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .dropzone {
    min-height: 300px;
    padding: 34px 18px;
  }


  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }
  .history-item {
    grid-template-columns: 1fr;
  }

  .history-flow {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .history-result {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-actions,
  .history-actions {
    width: 100%;
    flex-direction: column;
    margin-left: 0;
  }

  .secondary-action,
  .history-share,
  .history-download {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  .nav-cta {
    padding-inline: 14px;
  }

  .limit-pills {
    align-items: center;
    flex-direction: column;
  }

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


.settings-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}


/* Footer badges and maker credit. */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.footer-details { display: grid; gap: 14px; }
.maker-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  line-height: 1.5;
}
.maker-credit strong { color: var(--ink); }
.maker-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  max-width: 100%;
}
.footer-badges > a { display: inline-flex; max-width: 100%; }
.footer-badges img { display: block; max-width: 100%; height: auto; }
.footer-badges a[href*="maidensail.com"] img { height: 44px; width: auto; }
