/* 2026 interface refresh */
:root {
  --ink: #17171c;
  --ink-soft: #303038;
  --canvas: #f7f7f9;
  --canvas-warm: #fbf8f8;
  --panel: #ffffff;
  --line: #e4e4e9;
  --line-strong: #d7d7de;
  --muted: #6e6e78;
  --red: #c53147;
  --red-dark: #a92135;
  --red-soft: #fff0f2;
  --sg-blue: #2374d8;
  --sg-blue-dark: #185cae;
  --sg-blue-soft: #edf5ff;
  --shadow-sm: 0 8px 26px rgba(24, 24, 32, .06);
  --shadow-md: 0 20px 60px rgba(24, 24, 32, .09);
  --shadow-lg: 0 32px 100px rgba(24, 24, 32, .13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 3%, rgba(197, 49, 71, .07), transparent 26rem),
    radial-gradient(circle at 92% 15%, rgba(35, 116, 216, .055), transparent 30rem),
    var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(35, 35, 42, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(35, 35, 42, .025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 46rem);
}

::selection { background: rgba(197, 49, 71, .18); }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, label:focus-within {
  outline: 3px solid rgba(197, 49, 71, .24);
  outline-offset: 3px;
}

.header {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(calc(100% - 32px), 1180px);
  max-width: none;
  height: 72px;
  margin: 12px auto 0;
  padding: 0 18px;
  gap: 22px;
  border: 1px solid rgba(222, 222, 228, .84);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 14px 45px rgba(25, 25, 32, .07);
  backdrop-filter: blur(18px) saturate(1.25);
}
.brand { gap: 11px; color: var(--ink); font-size: 18px; font-weight: 750; letter-spacing: -.65px; }
.brand-mark { width: 34px; height: 34px; flex-basis: 34px; filter: drop-shadow(0 7px 12px rgba(197, 49, 71, .18)); }
.product-nav { gap: 4px; }
.product-nav a, .account-nav button, .header-link, .credit-link {
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  transition: color .18s, background .18s, transform .18s;
}
.product-nav a:hover, .account-nav button:hover, .account-nav button.active { transform: translateY(-1px); }
.header-actions { gap: 7px; }
.credit-link { border: 1px solid #f2cbd1; background: #fff4f5; }

.button {
  min-height: 44px;
  padding: 11px 18px;
  border-color: var(--line-strong);
  border-radius: 11px;
  font-weight: 700;
  box-shadow: 0 1px 1px rgba(20, 20, 25, .03);
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
}
.button:hover { border-color: #cfcfd6; background: #f8f8fa; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, #d33b51, var(--red-dark)); box-shadow: 0 8px 22px rgba(197, 49, 71, .22); }
.button.primary:hover { background: linear-gradient(135deg, #c92e45, #971c2f); box-shadow: 0 12px 30px rgba(197, 49, 71, .28); }
.button:active { transform: translateY(0) scale(.985); }
.button.small { min-height: 38px; padding: 9px 13px; }

main { width: min(100%, 1180px); padding: 42px 32px 92px; }
.workspace { width: min(100%, 900px); }
.view { animation: refreshed-enter .34s cubic-bezier(.2, .75, .25, 1); }
@keyframes refreshed-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Landing and public preview */
.public-preview.preview-top { position: relative; padding: 64px 0 72px; }
.preview-heading { max-width: 780px; margin-bottom: 36px; }
.preview-brand-lockup { margin-bottom: 24px; gap: 10px; }
.preview-brand-lockup > span {
  width: 164px;
  height: 54px;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.preview-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #efcbd1;
  border-radius: 999px;
  background: rgba(255, 244, 246, .85);
  font-size: 9px;
  letter-spacing: 1.2px;
}
.preview-heading .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(197, 49, 71, .1); }
.preview-heading h1 { margin: 18px 0 14px; font-size: clamp(42px, 5vw, 62px); font-weight: 760; line-height: 1.01; letter-spacing: -3.2px; }
.preview-heading h1 span { background: linear-gradient(105deg, var(--red), #8e254d 47%, var(--sg-blue)); background-clip: text; -webkit-background-clip: text; color: transparent; }
.preview-heading p { max-width: 680px; margin: 0 auto; color: #666671; font-size: 16px; line-height: 1.65; }
.hero-proof { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 20px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 6px; color: #686873; font-size: 11px; font-weight: 600; }
.hero-proof i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #e8f5ef; color: #247653; font-size: 9px; font-style: normal; }

.preview-shell {
  grid-template-columns: .88fr 1.12fr;
  border-color: rgba(213, 213, 220, .95);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform: translateZ(0);
  align-items: stretch;
}
.preview-controls { min-height: 468px; padding: 28px; background: linear-gradient(160deg, #fff, #fcfcfd); }
.preview-encoders { gap: 10px; margin-bottom: 18px; }
.preview-decoder { min-height: 54px; padding: 11px 12px; border-radius: 12px; }
.preview-decoder:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.preview-dropzone, .preview-file { min-height: 160px; border-radius: 15px; }
.preview-dropzone { border-width: 1.5px; background: #fdfdfd; }
.preview-dropzone:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(197, 49, 71, .08); }
.preview-dropzone .upload-icon { width: 48px; height: 48px; border-radius: 13px; }
.preview-dropzone b { font-size: 14px; }
.preview-dropzone small { font-size: 11px; }
.preview-controls > .button { min-height: 47px; border-radius: 12px; }
.limits { color: #81818c; font-size: 10px; line-height: 1.5; }
.preview-result { height: 468px; min-height: 468px; overflow: hidden; background: linear-gradient(145deg, #1d1d22, #232329); }
.preview-result-head { min-height: 66px; flex: 0 0 66px; padding: 17px 22px; background: rgba(255,255,255,.015); }
.preview-result-head span { color: #ef8796; }
.preview-result-head > small { padding: 6px 9px; border: 1px solid #3e3e46; border-radius: 999px; background: #29292f; color: #b4b4bc; font-weight: 700; }
.preview-result ol {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  padding: 24px 22px 24px 60px;
  overflow-x: auto;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  font-size: 12px;
  line-height: 1.8;
  outline: none;
}
.preview-result ol:focus-visible { box-shadow: inset 0 0 0 2px rgba(239,126,141,.7); }
.preview-result ol::-webkit-scrollbar { width: 11px; height: 11px; }
.preview-result ol::-webkit-scrollbar-track { background: #1c1c21; }
.preview-result ol::-webkit-scrollbar-thumb { border: 3px solid #1c1c21; border-radius: 999px; background: #55555f; }
.preview-result ol::-webkit-scrollbar-thumb:hover { background: #72727e; }
.preview-result ol.has-hidden-lines::after { content: none; }
.preview-result .preview-locked-line {
  height: 21.6px;
  padding-top: 6px;
  pointer-events: none;
  user-select: none;
}
.preview-result .preview-locked-line span {
  display: block;
  width: var(--placeholder-width);
  height: 9px;
  border-radius: 2px;
  opacity: .48;
  background: linear-gradient(90deg,#5d5d67 0 16%,transparent 16% 20%,#4f4f58 20% 47%,transparent 47% 52%,#676771 52% 73%,transparent 73% 77%,#55555e 77% 100%);
}
.preview-result .preview-locked-line:nth-child(4n) span { opacity: .34; }
.preview-result .preview-locked-line:nth-child(7n) span { opacity: .58; }
.preview-result .preview-locked-more { margin-top: 9px; padding: 8px 10px; border: 1px solid #414149; border-radius: 8px; color: #92929b; background: #29292f; font: 10px/1.4 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; list-style: none; }
.preview-cta { min-height: 57px; flex: 0 0 57px; padding: 13px 20px; background: rgba(20,20,24,.76); backdrop-filter: none; }
.preview-cta span { display: inline-flex; align-items: center; gap: 7px; }
.preview-cta span i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #34343b; font-size: 11px; font-style: normal; }
.preview-cta button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; background: rgba(239,126,141,.08); }
.preview-cta button:hover { background: rgba(239,126,141,.15); }
.preview-cta button b { font-size: 14px; }
.trust-strip {
  position: relative;
  z-index: 2;
  width: calc(100% - 54px);
  margin: -1px auto 0;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 38px rgba(25, 25, 32, .06);
}
.trust-strip > div { display: grid; gap: 3px; padding-left: 16px; border-left: 1px solid var(--line); }
.trust-strip > div:first-child { padding-left: 0; border-left: 0; }
.trust-strip b { font-size: 13px; letter-spacing: -.25px; }
.trust-strip span { color: var(--muted); font-size: 9px; }

.decoder-learn, .seo-home-section { padding: 76px 0; }
.decoder-learn { grid-template-columns: .82fr 1.18fr; gap: 52px; }
.decoder-learn h2, .seo-home-section > div:first-child h2 { font-size: clamp(28px, 3vw, 37px); line-height: 1.12; letter-spacing: -1.3px; }
.decoder-learn p, .seo-home-section > div:first-child p { font-size: 13px; line-height: 1.75; }
.decoder-learn-links { gap: 14px; }
.decoder-learn-links a { min-height: 190px; padding: 22px; border-radius: 18px; box-shadow: var(--shadow-sm); }
.decoder-learn-links a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.decoder-learn-links span { font-size: 13px; }
.decoder-learn-links b { font-size: 11px; }
.seo-home-section { grid-template-columns: .72fr 1.28fr; gap: 58px; }
.seo-home-cards { gap: 14px; }
.seo-home-cards article { min-height: 190px; padding: 22px; border-radius: 17px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.seo-home-cards article:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.seo-home-cards h3 { margin-top: 38px; font-size: 14px; }
.seo-home-cards p { font-size: 11px; }
.home-faq-list { gap: 10px; }
.home-faq-list details { padding: 18px 20px; border-radius: 14px; box-shadow: 0 4px 16px rgba(24, 24, 32, .025); }
.home-faq-list summary { position: relative; padding-right: 30px; font-size: 13px; list-style: none; }
.home-faq-list summary::-webkit-details-marker { display: none; }
.home-faq-list summary::after { content: "+"; position: absolute; right: 0; top: -3px; color: var(--red); font-size: 20px; font-weight: 400; }
.home-faq-list details[open] summary::after { content: "−"; }

/* Signed-in workspace */
.workspace { position: relative; }
.workspace::before { content: ""; position: absolute; inset: -30px -34px; z-index: -1; border: 1px solid rgba(225, 225, 231, .7); border-radius: 28px; background: rgba(255, 255, 255, .48); box-shadow: var(--shadow-sm); }
#view-decode { padding: 12px; }
.hero { margin-bottom: 30px; }
.hero h2, .hero h1 { font-size: clamp(36px, 4vw, 48px); font-weight: 740; letter-spacing: -2px; }
.hero p { font-size: 14px; }
.flow { max-width: 500px; margin-bottom: 26px; }
.flow-step { font-size: 11px; font-weight: 650; }
.flow-step span { width: 28px; height: 28px; box-shadow: 0 3px 10px rgba(197, 49, 71, .08); }
.encoder-switch { gap: 14px; }
.decoder-option { min-height: 68px; padding: 16px; border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.decoder-option img { width: 165px; }
.dropzone { min-height: 330px; border-width: 1.5px; border-radius: 20px; box-shadow: var(--shadow-sm); }
.dropzone .upload-icon { width: 62px; height: 62px; border-radius: 17px; box-shadow: 0 10px 25px rgba(197, 49, 71, .1); }
.dropzone h2 { font-size: 20px; font-weight: 700; }
.dropzone p { font-size: 13px; }
.selected-file { min-height: 70px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.decode-button { min-height: 50px; border-radius: 13px; }

.history-summary { gap: 12px; }
.history-summary article { padding: 19px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.history-summary b { font-size: 29px; }
.retention-notice { padding: 16px 18px; border-radius: 14px; }
.history-filters { padding: 5px; border-radius: 12px; }
.history-filters button { min-height: 34px; padding: 8px 14px; }
.history-row { padding: 18px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.history-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.history-file-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 13px; }
.history-actions .button.primary.download { color: #fff; }

.balance { padding: 12px 17px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.payment-progress { padding: 17px 18px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.payment-progress > div > span { width: 28px; height: 28px; flex-basis: 28px; }
.payment-wizard, .payments-panel { padding: 28px; border-radius: 18px; box-shadow: var(--shadow-md); }
.payment-options { gap: 12px; }
.payment-option { min-height: 70px; padding: 15px; border-radius: 14px; }
.payment-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.payment-option img { width: 40px; height: 40px; flex-basis: 40px; }
.file-volume { padding: 24px; border-radius: 16px; }
.exact-payment { border-radius: 16px; }
.wallet { border: 1px solid var(--line); border-radius: 13px; }
.payment-waiting { border-radius: 13px; }
.payments-panel { margin-top: 18px; }

.account-grid { gap: 15px; }
.account-profile-card, .account-info-card { border-radius: 18px; box-shadow: var(--shadow-sm); }
.account-profile-card { padding: 22px; }
.account-info-card { padding: 21px; }
.account-avatar { width: 56px; height: 56px; border-radius: 16px; }
.account-danger { border-radius: 16px; }

/* Dialogs and feedback */
.auth-backdrop, .result-preview-backdrop { background: rgba(17, 17, 22, .68); backdrop-filter: blur(10px); }
.auth-modal-card { border: 1px solid rgba(255, 255, 255, .2); border-radius: 22px; box-shadow: var(--shadow-lg); }
.auth-brand-panel { background: radial-gradient(circle at 12% 8%, rgba(239, 126, 141, .25), transparent 18rem), linear-gradient(150deg, #211b1e, #481922 58%, #851d2d); }
.auth-form-panel { padding: 40px 42px 30px; }
.auth-form-panel input { height: 48px; border-radius: 11px; }
.tabs { padding: 5px; border-radius: 12px; }
.tabs button { min-height: 38px; border-radius: 9px; }
.result-preview-card { border-radius: 20px; box-shadow: var(--shadow-lg); }
.toast { padding: 13px 18px; border-radius: 11px; box-shadow: var(--shadow-md); }
.preview-notice { border-radius: 13px; }

/* Guide pages and footer */
.seo-main { padding-top: 30px; }
.seo-hero { min-height: 560px; gap: 70px; }
.seo-hero h1 { font-size: clamp(44px, 5vw, 62px); font-weight: 760; line-height: 1.01; letter-spacing: -3px; }
.seo-hero p { font-size: 16px; }
.seo-brand-card { min-height: 310px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.seo-section { gap: 72px; padding: 72px 0; }
.seo-section h2 { font-size: 32px; letter-spacing: -1.1px; }
.seo-section-content { font-size: 15px; }
.seo-step, .faq details { border-radius: 15px; box-shadow: var(--shadow-sm); }
.seo-step { padding: 21px; }
.seo-list li { padding: 15px 16px; border: 1px solid #ededf0; border-radius: 12px; background: #fff; }
.seo-cta { padding: 38px 40px; border-radius: 22px; background: radial-gradient(circle at 80% 10%, rgba(35, 116, 216, .23), transparent 24rem), linear-gradient(135deg, #1d1d23, #292931); box-shadow: var(--shadow-lg); }
.site-footer, .seo-footer {
  width: min(calc(100% - 64px), 1116px);
  max-width: none;
  margin: 0 auto 28px;
  padding: 25px 0 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 25px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer .brand { font-size: 14px; color: var(--ink); }
.site-footer p { margin: 0; font-size: 10px; }
.site-footer nav, .seo-footer nav { display: flex; gap: 18px; font-size: 10px; font-weight: 650; }
.site-footer a:hover, .seo-footer a:hover { color: var(--red); }
.auth-pending .site-footer { display: none; }

/* Responsive */
@media (max-width: 920px) {
  .header { width: calc(100% - 24px); top: 8px; margin-top: 8px; }
  main { padding: 34px 24px 72px; }
  .preview-heading h1 { letter-spacing: -2.4px; }
  .trust-strip { width: calc(100% - 28px); grid-template-columns: 1fr 1fr; }
  .trust-strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .decoder-learn, .seo-home-section { gap: 34px; }
  .workspace::before { inset: -22px -18px; }
  .site-footer, .seo-footer { width: calc(100% - 48px); }
}

@media (max-width: 780px) {
  body::before { background-size: 44px 44px; }
  .header { min-height: 68px; padding: 12px 14px; border-radius: 15px; }
  .header .brand > span:last-child { display: none; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .public-preview.preview-top { padding-top: 42px; }
  .preview-heading h1 { font-size: clamp(39px, 10vw, 52px); }
  .preview-shell { grid-template-columns: 1fr; border-radius: 20px; }
  .preview-controls { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-result { height: 430px; min-height: 430px; }
  .preview-result ol { min-height: 0; }
  .decoder-learn, .seo-home-section { grid-template-columns: 1fr; padding: 60px 0; }
  .seo-home-cards { grid-template-columns: 1fr; }
  .seo-home-cards article { min-height: 0; }
  .workspace::before { display: none; }
  #view-decode { padding: 0; }
  .payment-progress { grid-template-columns: 1fr 1fr; }
  .seo-hero { min-height: auto; gap: 32px; }
  .seo-section { gap: 28px; padding: 56px 0; }
  .site-footer, .seo-footer { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 520px) {
  .header { gap: 8px; }
  .header-actions { margin-left: auto; }
  .header-actions .button { min-height: 36px; padding: 8px 10px; font-size: 11px; }
  .header-link { display: none; }
  .account-nav { order: 3; width: 100%; padding-top: 4px; overflow: auto; justify-content: flex-start; }
  .account-nav button { flex: 0 0 auto; }
  main { padding: 28px 16px 60px; }
  .public-preview.preview-top { padding-top: 34px; }
  .preview-brand-lockup > span { width: 47%; height: 48px; padding: 10px; }
  .preview-heading h1 { margin-top: 15px; font-size: 37px; letter-spacing: -2px; }
  .preview-heading p { font-size: 14px; }
  .hero-proof { gap: 8px 12px; }
  .preview-controls { padding: 16px; }
  .preview-result { height: 410px; min-height: 410px; }
  .preview-result-head { padding-inline: 16px; }
  .preview-result ol { padding: 20px 14px 20px 50px; }
  .preview-cta { padding-inline: 14px; }
  .preview-cta span { font-size: 10px; }
  .preview-encoders { grid-template-columns: 1fr; }
  .preview-dropzone, .preview-file { min-height: 145px; }
  .trust-strip { width: calc(100% - 18px); grid-template-columns: 1fr; padding: 16px; }
  .trust-strip > div, .trust-strip > div:nth-child(3) { padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--line); }
  .trust-strip > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .decoder-learn-links { grid-template-columns: 1fr; }
  .hero h2, .hero h1 { font-size: 35px; }
  .flow { gap: 7px; }
  .encoder-switch { grid-template-columns: 1fr; }
  .dropzone { min-height: 275px; }
  .history-summary { grid-template-columns: 1fr 1fr; }
  .history-summary article { padding: 15px; }
  .history-row { grid-template-columns: 1fr; }
  .payment-progress { grid-template-columns: 1fr; }
  .payment-wizard, .payments-panel { padding: 19px; }
  .account-profile-card { grid-template-columns: auto minmax(0, 1fr); }
  .auth-form-panel { padding: 32px 20px 24px; }
  .seo-hero h1 { font-size: 39px; letter-spacing: -2px; }
  .seo-hero-actions { flex-direction: column; }
  .seo-hero-actions .button { width: 100%; }
  .site-footer, .seo-footer { width: calc(100% - 32px); }
  .site-footer nav, .seo-footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
