:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-subtle: #f0f4f9;
  --text: #101828;
  --muted: #526175;
  --line: #d5dde8;
  --accent: #155eef;
  --accent-hover: #004eeb;
  --accent-soft: #eaf1ff;
  --success: #087a55;
  --success-soft: #e8f7f1;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.13);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

p {
  line-height: 1.65;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(var(--shell), calc(100% - 40px));
  min-height: 76px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(21, 94, 239, 0.25);
}

.brand-small .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.site-header nav,
.site-footer nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header nav a,
.site-footer nav a,
.text-button,
.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.site-header nav a,
.text-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 0 12px;
}

.site-header nav a:hover,
.site-header nav a.active,
.text-button:hover,
.text-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.header-actions {
  justify-self: end;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  box-shadow: 0 8px 20px rgba(21, 94, 239, 0.2);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-small {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.button-large {
  min-height: 52px;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: #aab7c8;
  background: var(--surface-subtle);
  color: var(--text);
  box-shadow: none;
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  padding-block: 60px 84px;
}

.hero-copy {
  max-width: 680px;
}

.hero-lede {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 28px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  list-style: none;
}

.trust-list li::before {
  content: "✓";
  margin-right: 7px;
  color: var(--success);
  font-weight: 900;
}

.creator-card,
.summary-card,
.links-section,
.converter-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.creator-card,
.converter-card {
  padding: clamp(22px, 4vw, 32px);
}

.card-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.creator-card .card-heading,
.converter-card .card-heading {
  display: grid;
}

.creator-card .card-heading .segmented-control,
.converter-card .card-heading .segmented-control {
  width: 100%;
}

.card-heading h2,
.section-heading h2 {
  margin-bottom: 0;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
  padding: 4px;
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.09);
}

form {
  display: grid;
  gap: 10px;
}

label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #b8c4d3;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #8190a5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.13);
}

input:user-invalid {
  border-color: var(--danger);
}

textarea {
  min-height: 120px;
  padding-block: 12px;
  resize: vertical;
}

.optional {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.field-hint,
.form-note {
  margin: -2px 0 6px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.url-field,
.password-field {
  display: flex;
  align-items: center;
  border: 1px solid #b8c4d3;
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.url-field:focus-within,
.password-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.13);
}

.url-field > span {
  align-self: stretch;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.url-field input,
.password-field input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.password-field button {
  align-self: stretch;
  border: 0;
  background: #fff;
  color: var(--accent);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-message {
  margin-top: 16px;
  border: 1px solid rgba(8, 122, 85, 0.28);
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  color: var(--success);
  padding: 13px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.status-message.error {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

.result-content {
  display: grid;
  gap: 12px;
}

.result-link {
  color: var(--accent);
  font-size: 1.02rem;
}

.result-actions,
.link-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-result {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.qr-code {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.qr-code svg {
  width: 100%;
  height: auto;
}

.proof-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-block: 22px;
}

.proof-grid > div {
  display: grid;
  gap: 3px;
  padding-inline: 28px;
  text-align: center;
}

.proof-grid > div + div {
  border-left: 1px solid var(--line);
}

.proof-grid span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding-block: clamp(72px, 10vw, 120px);
}

.section-intro {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-grid article {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.feature-grid .number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 50px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 900;
}

.feature-grid p,
.workflow-list p,
.faq-grid p,
.tool-intro p,
.dashboard-intro p {
  margin: 0;
  color: var(--muted);
}

.workflow-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 8vw, 100px);
}

.workflow-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  position: relative;
  padding-bottom: 34px;
}

.workflow-list li > span {
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-weight: 900;
}

.workflow-list li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 42px;
  bottom: 0;
  left: 20px;
  width: 1px;
  background: var(--line);
}

.workflow-list strong {
  display: block;
  margin: 4px 0 5px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  margin-top: 14px !important;
}

.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 80px;
  border-radius: var(--radius-lg);
  background: var(--text);
  color: #fff;
  padding: clamp(28px, 6vw, 56px);
}

.cta-section h2 {
  margin-bottom: 0;
}

.cta-section .eyebrow {
  color: #9dbdff;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-block: 34px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.86rem;
}

.privacy-note {
  grid-column: 1 / -1;
  max-width: 740px;
}

.modal {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.modal-small {
  width: min(460px, calc(100% - 28px));
}

.modal::backdrop {
  background: rgba(16, 24, 40, 0.62);
  backdrop-filter: blur(4px);
}

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

.modal-header h2 {
  margin: 0;
}

.icon-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.3rem;
}

.auth-switcher {
  width: 100%;
  margin-bottom: 20px;
}

.auth-form {
  gap: 10px;
}

.centered {
  justify-self: center;
  margin-top: 4px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.danger-text {
  color: var(--danger);
}

.app-header {
  border-bottom: 1px solid var(--line);
}

.account-menu {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.account-menu > div {
  display: grid;
  line-height: 1.2;
}

.account-menu small {
  color: var(--muted);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.dashboard {
  padding-block: 48px 80px;
}

.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.dashboard-intro h1,
.tool-intro h1 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.dashboard-intro p {
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  align-items: start;
  gap: 18px;
}

.dashboard-creator {
  box-shadow: var(--shadow-sm);
}

.summary-card {
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.metrics {
  display: grid;
  gap: 0;
  margin: 22px 0;
}

.metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-block: 15px;
}

.metrics > div:last-child {
  border-bottom: 1px solid var(--line);
}

.metrics dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.metrics dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: right;
}

.summary-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.links-section {
  margin-top: 18px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.scope-toggle {
  display: inline-flex;
  gap: 6px;
}

.chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 800;
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.link-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.sort-field {
  display: grid;
  grid-template-columns: auto 170px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.link-row:hover {
  border-color: #afbdce;
  background: #fbfcfe;
}

.link-primary {
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.link-destination {
  display: block;
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.link-actions .button {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 0.82rem;
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #aebccd;
  border-radius: var(--radius);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-size: 0.88rem;
}

.tool-page {
  max-width: 860px;
  padding-block: 64px 100px;
}

.tool-intro {
  max-width: 720px;
  margin-bottom: 36px;
}

.tool-intro p {
  font-size: 1.05rem;
}

.converter-card {
  box-shadow: var(--shadow-sm);
}

.drop-zone {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px dashed #aebccd;
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--text);
  padding: 30px;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone small,
.converter-file small {
  color: var(--muted);
}

.upload-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
}

.converter-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.converter-file strong,
.converter-file small {
  display: block;
  overflow-wrap: anywhere;
}

.converter-card > .button {
  width: 100%;
  margin-top: 14px;
}

.privacy-callout {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 14px;
}

.privacy-callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.42);
  outline-offset: 3px;
}

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

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    padding-bottom: 12px;
  }

  .hero,
  .dashboard-grid,
  .workflow-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 50px;
    padding-top: 48px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: 0;
  }

  .feature-grid .number {
    margin-bottom: 30px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .account-menu {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  .shell,
  .site-header {
    width: min(100% - 28px, var(--shell));
  }

  .site-header {
    gap: 10px;
    padding-block: 12px;
  }

  .public-nav {
    display: none !important;
  }

  .site-header nav a {
    padding-inline: 9px;
    font-size: 0.88rem;
  }

  .header-actions .text-button,
  .account-menu > div {
    display: none;
  }

  .account-menu {
    gap: 4px;
  }

  .account-menu .text-button {
    display: inline-flex;
  }

  .hero {
    min-height: 0;
    padding-block: 42px 64px;
  }

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

  .card-heading,
  .section-heading,
  .dashboard-intro,
  .cta-section {
    align-items: stretch;
    flex-direction: column;
  }

  .card-heading {
    display: grid;
  }

  .segmented-control {
    width: 100%;
  }

  .url-field {
    display: grid;
  }

  .url-field > span {
    min-height: 38px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid > div {
    padding-block: 16px;
  }

  .proof-grid > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section {
    padding-block: 72px;
  }

  .cta-section {
    display: flex;
    margin-bottom: 48px;
  }

  .link-toolbar {
    grid-template-columns: 1fr;
  }

  .sort-field {
    grid-template-columns: auto 1fr;
  }

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

  .link-actions {
    width: 100%;
  }

  .link-actions .button {
    flex: 1;
  }

  .qr-result {
    grid-template-columns: 1fr;
  }

  .qr-code {
    width: 160px;
  }

  .converter-file {
    align-items: stretch;
    flex-direction: column;
  }
}
