:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #52525b;
  --muted-2: #71717a;
  --header-bg: #ffffff;
  --brand: #ff7a40;
  --brand-hover: #e6653a;
  --brand-soft: rgba(255, 122, 64, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --success: #16a34a;
  --radius: 16px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
}

/* ---------- Header / Footer ---------- */

.site-header {
  padding: 16px;
  background: var(--header-bg);
}

.site-header .inner {
  display: flex;
  justify-content: center;
}

.site-header .inner,
main,
.site-footer .inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
}


main {
  flex: 1;
  padding: 32px 16px 64px;
}

.site-footer {
  padding: 24px 16px 32px;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.site-footer a {
  color: var(--muted-2);
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- Typography ---------- */

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand) !important;
  margin: 0 0 12px !important;
}

h1 {
  font-size: clamp(30px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 16px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.hero p,
.muted {
  color: var(--muted);
  margin: 0;
}

.hero p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  max-width: 576px;
  margin: 0 auto;
}

.accent {
  color: var(--brand);
}

/* ---------- Card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.12);
}

.card + .card {
  margin-top: 24px;
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }
}

/* ---------- Segmented control ---------- */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 20px;
}

.segmented button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-selected='true'] {
  background: var(--brand);
  color: #fff;
}

/* ---------- Dropzone ---------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 180px;
  padding: 24px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dropzone svg {
  width: 36px;
  height: 36px;
  color: var(--brand);
}

.dropzone .dz-title {
  color: var(--text);
  font-weight: 600;
}

.dropzone .dz-title u {
  color: var(--brand);
  text-decoration: none;
}

.dropzone .dz-hint {
  font-size: 13px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.file-chip .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.file-chip .size {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- Form fields ---------- */

.field {
  display: block;
  margin-top: 20px;
}

.field > span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

input[type='text'],
input[type='password'],
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

textarea {
  display: block;
  resize: none;
  height: 180px;
  line-height: 1.5;
}

textarea[readonly] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

.pw-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.pw-wrap input {
  padding-right: 48px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}

.pw-toggle:hover,
.pw-toggle:focus-visible {
  color: var(--text);
  background: var(--surface-2);
  outline: none;
}

.pw-toggle svg {
  width: 20px;
  height: 20px;
}

.pw-toggle .icon-hide,
.pw-toggle[aria-pressed='true'] .icon-show {
  display: none;
}

.pw-toggle[aria-pressed='true'] .icon-hide {
  display: block;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(255, 122, 64, 0.6);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
  padding: 10px 16px;
  font-size: 14px;
  white-space: nowrap;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-block {
  width: 100%;
  margin-top: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Alerts / progress ---------- */

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--danger);
}

.alert-info {
  background: var(--brand-soft);
  border-color: rgba(255, 122, 64, 0.3);
  color: var(--text);
}

.progress {
  margin-top: 16px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress .bar {
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.15s;
}

.status-text {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Result ---------- */

.link-box {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.link-box input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.badge-ok::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.result {
  text-align: center;
}

.result .link-box input {
  text-align: center;
}

.result .actions {
  justify-content: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.success-icon svg {
  width: 28px;
  height: 28px;
}

.expiry {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.expiry strong {
  color: var(--text);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.info-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-list li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.info-list strong {
  color: var(--text);
}

@media (max-width: 560px) {
  .input-row {
    flex-wrap: wrap;
  }

  .input-row .pw-wrap {
    flex-basis: 100%;
  }

  .input-row .btn-ghost {
    flex: 1;
  }
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
