:root {
  --ink: #12212b;
  --muted: #66727c;
  --paper: #f6f2ea;
  --card: #fffdf9;
  --accent: #ef5b38;
  --accent-dark: #c83f22;
  --teal: #0f766e;
  --line: #ded8cd;
  --shadow: 0 18px 55px rgba(31, 38, 45, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 6%, rgba(239, 91, 56, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 30%, rgba(15, 118, 110, 0.09), transparent 26rem),
    var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 19px/1 "Manrope", sans-serif;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--ink);
}

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

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

.tool-shell {
  padding: 54px 0 74px;
  border-top: 1px solid rgba(18, 33, 43, 0.12);
}

.intro { max-width: 760px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font: 700 12px/1.4 "Manrope", sans-serif;
  letter-spacing: 0.14em;
}

h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: -0.035em; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: 1.02; }
.intro > p:last-child { margin: 22px 0 0; color: var(--muted); font-size: clamp(18px, 2.4vw, 23px); line-height: 1.5; }

.limits {
  margin: 32px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.limits span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.46);
  color: var(--muted);
  font-size: 13px;
}

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

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.input-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 25px; }
.card-heading h2 { margin: 0 0 4px; font-size: 21px; }
.card-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.step {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font: 700 12px/1 "Manrope", sans-serif;
}

label:not(.drop-zone) { display: block; margin-bottom: 8px; font-weight: 700; font-size: 13px; }
input[type="url"] {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  outline: none;
}
input[type="url"]:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }

.drop-zone {
  min-height: 110px;
  border: 1.5px dashed #b9b2a7;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  background: rgba(246, 242, 234, 0.55);
  transition: 160ms ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--teal); background: rgba(15,118,110,0.06); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone strong { color: var(--ink); }
.upload-icon { font-size: 25px; color: var(--teal); font-weight: 700; }
.file-name { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.primary-button, .secondary-button {
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 130ms ease, background 130ms ease;
}
.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  color: white;
  background: var(--accent);
}
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.58; transform: none; }
.route-note { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.status-panel, .result-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.status-panel { padding: 20px 24px; display: flex; gap: 15px; align-items: center; }
.status-panel[hidden], .result-panel[hidden] { display: none; }
.status-panel p { margin: 4px 0 0; color: var(--muted); }
.spinner { width: 24px; height: 24px; border: 3px solid #e6ded2; border-top-color: var(--accent); border-radius: 50%; animation: spin 850ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-panel { padding: 26px; }
.result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.result-header h2 { margin: 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.secondary-button { padding: 10px 13px; color: var(--ink); background: #eee8dd; }
.secondary-button:hover { background: #e2dacd; }
.result-meta { margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.transcript { max-height: 460px; overflow: auto; padding: 20px; border-radius: 13px; background: #f3efe7; white-space: pre-wrap; line-height: 1.72; }

.content-section {
  padding: 72px 0;
  border-top: 1px solid rgba(18, 33, 43, 0.12);
  display: grid;
  grid-template-columns: minmax(240px, .8fr) 1.7fr;
  gap: clamp(36px, 8vw, 110px);
}
.content-section h2 { margin: 0; font-size: clamp(28px, 4vw, 43px); line-height: 1.12; }
.feature-grid { display: grid; gap: 13px; }
.feature-grid article { padding: 20px 22px; border-left: 3px solid var(--accent); background: rgba(255,255,255,0.48); }
.feature-grid h3 { margin: 0 0 7px; font-size: 18px; }
.feature-grid p, .how-to p, .faq p { margin: 0; color: var(--muted); line-height: 1.65; }
.how-to ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 20px; }
.how-to li { display: flex; gap: 14px; align-items: flex-start; }
.how-to li > span { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: white; font-weight: 700; }
.faq-list { display: grid; gap: 10px; }
.faq details { padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.52); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { padding-top: 12px; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 46px; border-top: 1px solid rgba(18, 33, 43, 0.12); color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .privacy-note { display: none; }
  main, .site-header, footer { width: min(100% - 24px, 1180px); }
  .tool-shell { padding: 38px 0 56px; }
  .input-grid, .content-section { grid-template-columns: 1fr; }
  .input-card { padding: 20px; }
  .content-section { padding: 52px 0; gap: 27px; }
  .result-header { flex-direction: column; }
  .result-actions { justify-content: flex-start; }
  .secondary-button { flex: 1 1 auto; }
}

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