:root {
  --ink: #111a31;
  --muted: #667089;
  --line: #e7e8f1;
  --surface: #ffffff;
  --surface-soft: #f7f6ff;
  --primary: #6538f5;
  --primary-dark: #4c25d7;
  --primary-soft: #eeeaff;
  --cyan: #19a6c8;
  --success: #168a5b;
  --danger: #c43d4e;
  --footer: #14223a;
  --shadow: 0 24px 70px rgba(69, 52, 145, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow-container { width: min(820px, calc(100% - 40px)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(231, 232, 241, 0.82);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px);
}
.nav-shell { height: 78px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.38rem; font-weight: 800; letter-spacing: -0.035em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(145deg, #7c4dff, #5125df);
  box-shadow: 0 8px 18px rgba(101, 56, 245, 0.28);
}
.main-nav { display: flex; align-items: center; gap: 31px; margin-left: auto; }
.main-nav a, .nav-login { color: #2d3344; font-size: .94rem; font-weight: 600; }
.main-nav a:hover, .nav-login:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 1.4rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.button-primary { color: #fff; background: linear-gradient(135deg, #703bff, #5830e7); box-shadow: 0 13px 28px rgba(92, 49, 230, .25); }
.button-primary:hover { box-shadow: 0 17px 34px rgba(92, 49, 230, .32); }
.button-secondary { color: #293048; border-color: #dedfeb; background: #fff; box-shadow: 0 10px 22px rgba(33, 36, 72, .06); }
.button-ghost { min-height: 42px; color: var(--primary); background: var(--primary-soft); border-color: #ded5ff; box-shadow: none; }
.button-small { min-height: 44px; padding: 9px 17px; font-size: .92rem; }
.button.loading .submit-label::after { content: "…"; }

.hero-section {
  overflow: hidden;
  padding: 70px 0 58px;
  background:
    radial-gradient(circle at 72% 42%, rgba(117, 75, 255, .12), transparent 27%),
    radial-gradient(circle at 18% 10%, rgba(34, 192, 218, .055), transparent 25%),
    linear-gradient(180deg, #fff 0%, #fcfbff 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 64px; }
.hero-copy { padding: 24px 0; }
.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5845a5;
  font-size: .84rem;
  font-weight: 750;
  letter-spacing: .015em;
}
.eyebrow { padding: 8px 13px; border-radius: 999px; background: #f2efff; }
.eyebrow strong { color: var(--cyan); }
.hero-copy h1 { margin: 24px 0 18px; font-size: clamp(2.55rem, 4.7vw, 4.1rem); line-height: 1.08; letter-spacing: -.055em; }
.hero-copy h1 span { color: var(--primary); }
.hero-lead { max-width: 660px; margin: 0; color: var(--muted); font-size: 1.1rem; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 22px; }
.zero-note { display: flex; align-items: center; gap: 9px; color: #79829a; font-size: .9rem; }
.zero-note span { color: var(--primary); }
.hero-visual {
  position: relative;
  min-height: 470px;
  padding: 24px 35px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #efedf7;
  border-radius: 25px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero-visual::before, .hero-visual::after { content: "✦"; position: absolute; color: #bdaeff; font-size: 1.4rem; }
.hero-visual::before { left: 18%; top: 23%; }
.hero-visual::after { right: 17%; top: 36%; font-size: .9rem; }
.hero-glow { position: absolute; inset: 23% 12% 28%; z-index: -1; border-radius: 50%; background: rgba(105, 62, 242, .14); filter: blur(48px); }
.hero-visual img { width: min(88%, 450px); max-height: 320px; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(54, 34, 115, .18)); }
.hero-visual h2 { margin: 9px 0 14px; font-size: 1.08rem; letter-spacing: -.02em; }
.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-pills span { padding: 8px 12px; border: 1px solid #eceaf3; border-radius: 10px; color: #3c4358; background: rgba(255,255,255,.86); font-size: .78rem; box-shadow: 0 7px 16px rgba(40, 39, 70, .05); }
.hero-pills span::first-letter { color: var(--primary); }

.creator-section { padding: 88px 0; background: #fbfaff; border-top: 1px solid #f0eef8; }
.section-heading { max-width: 650px; margin: 0 auto 36px; text-align: center; }
.section-heading h2 { margin: 8px 0 10px; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.18; letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--muted); }
.compact-heading { margin-bottom: 28px; }
.creator-card { max-width: 920px; margin: 0 auto; overflow: hidden; border: 1px solid #e9e6f4; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.creator-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px; gap: 8px; border-bottom: 1px solid #eceaf4; background: #faf9ff; }
.creator-tab { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; border: 1px solid transparent; border-radius: 14px; background: transparent; color: #4d556b; cursor: pointer; }
.creator-tab:hover { background: #f3f0ff; }
.creator-tab.active { color: #3e22aa; border-color: #ded4ff; background: #eeeaff; box-shadow: inset 0 0 0 1px rgba(101,56,245,.04); }
.creator-tab .tab-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; color: var(--primary); background: #fff; font-size: 1.25rem; box-shadow: 0 6px 14px rgba(73, 55, 151, .08); }
.creator-tab span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.creator-tab strong { font-size: .92rem; }
.creator-tab small { margin-top: 5px; color: #80879b; font-size: .72rem; }
#secretForm { padding: 30px; }
.field-label { display: block; margin: 0 0 9px; color: #252b3b; font-size: .9rem; font-weight: 750; }
.field-label span { color: #8b91a3; font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid #dddfea;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
  padding: 13px 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 170px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #9e82ff; box-shadow: 0 0 0 4px rgba(101,56,245,.1); }
input::placeholder, textarea::placeholder { color: #adb2c1; }
.field-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 7px; color: #9298aa; font-size: .76rem; }
.field-help { margin: 8px 0 0; color: #858c9f; font-size: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.attachment-zone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 23px; padding: 18px; border: 1.5px dashed #cec5ee; border-radius: 15px; background: #fcfbff; transition: border-color .15s ease, background .15s ease; }
.attachment-zone.dragging { border-color: var(--primary); background: #f3efff; }
.attachment-zone input { display: none; }
.attachment-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 13px; color: var(--primary); background: #ede8ff; font-size: 1.45rem; }
.attachment-zone div:nth-child(3) { min-width: 0; }
.attachment-zone strong, .attachment-zone span { display: block; }
.attachment-zone strong { font-size: .9rem; }
.attachment-zone span { margin-top: 2px; color: #868da0; font-size: .75rem; }
.attachment-list { margin-top: 10px; }
.attachment-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid #f0eef5; }
.attachment-item span:nth-child(2) { min-width: 0; }
.attachment-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.attachment-item small { display: block; color: #9298a8; }
.attachment-item button { width: 30px; height: 30px; border: 0; border-radius: 8px; color: #8a5060; background: #fff1f3; cursor: pointer; }
.file-symbol { color: var(--primary); }
.attachment-total { padding: 10px; text-align: right; color: #767d90; font-size: .78rem; }
.security-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.security-summary > div { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid #eceaf3; border-radius: 12px; background: #fafaff; }
.security-check { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; color: #fff; background: var(--primary); font-size: .7rem; }
.security-summary strong, .security-summary small { display: block; }
.security-summary strong { font-size: .77rem; }
.security-summary small { margin-top: 2px; color: #8b91a2; font-size: .66rem; line-height: 1.35; }
.form-status { margin-bottom: 14px; padding: 11px 13px; border-radius: 11px; font-size: .84rem; }
.form-status.info { color: #4c3c94; background: #f1edff; }
.form-status.error { color: #9b293a; background: #fff0f2; border: 1px solid #ffd5db; }
.submit-button { width: 100%; }
.submit-note { margin: 11px 0 0; text-align: center; color: #9298a8; font-size: .72rem; }

.features-section { padding: 86px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card { padding: 24px 10px 10px; }
.feature-icon { display: grid; place-items: center; width: 53px; height: 53px; margin-bottom: 17px; border-radius: 15px; color: var(--primary); background: #eeeaff; font-size: 1.55rem; }
.feature-card h3 { margin: 0 0 8px; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .86rem; }

.steps-section { padding: 86px 0; background: #f8f7fc; }
.steps-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 80px; }
.left-heading { margin: 0; text-align: left; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps-list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 18px; border: 1px solid #e6e4ee; border-radius: 15px; background: #fff; }
.steps-list > li > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: var(--primary); font-weight: 800; }
.steps-list h3 { margin: 0 0 4px; font-size: .96rem; }
.steps-list p { margin: 0; color: var(--muted); font-size: .84rem; }

.security-section { padding: 78px 0; }
.security-card { display: grid; grid-template-columns: 1.25fr .75fr; gap: 50px; align-items: center; padding: 48px; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #22204f, #4a2bc6 62%, #6b3cf1); box-shadow: 0 30px 70px rgba(56,38,150,.23); }
.light-kicker { color: #c8bcff; }
.security-card h2 { margin: 8px 0 14px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.045em; }
.security-card p { margin: 0; color: #ddd8f8; }
.security-code { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; padding: 23px; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; background: rgba(255,255,255,.08); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .77rem; }
.security-code span { color: #bfb7e8; }
.security-code strong { color: #fff; }

.faq-section { padding: 78px 0 100px; }
details { margin-bottom: 12px; border: 1px solid #e8e7ef; border-radius: 14px; background: #fff; }
summary { padding: 17px 19px; cursor: pointer; font-weight: 750; }
details p { margin: 0; padding: 0 19px 18px; color: var(--muted); }

.site-footer { color: #e7ebf6; background: var(--footer); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 50px; padding: 52px 0 35px; }
.footer-brand { margin-bottom: 12px; }
.site-footer p, .site-footer a { color: #aeb7ca; font-size: .82rem; }
.site-footer h3 { margin: 0 0 12px; color: #fff; font-size: .85rem; }
.footer-grid > div:not(:first-child) a { display: block; margin: 8px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; padding: 19px 0 24px; border-top: 1px solid rgba(255,255,255,.1); color: #8f9aaf; font-size: .74rem; }

/* Shared app pages */
.app-page { min-height: 100vh; background: radial-gradient(circle at 50% 0, #f1edff 0, #fbfaff 34%, #f5f6fa 100%); }
.simple-header { padding: 24px 0; }
.simple-header .container { display: flex; justify-content: space-between; align-items: center; }
.simple-header a.back-link { color: #687086; font-size: .86rem; font-weight: 650; }
.page-shell { width: min(760px, calc(100% - 32px)); margin: 35px auto 80px; }
.page-card { padding: 34px; border: 1px solid #e7e4f1; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.page-card.center { text-align: center; }
.page-card .wizard-mini { width: 155px; max-height: 125px; margin: -5px auto 4px; object-fit: contain; }
.success-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 11px; border-radius: 999px; color: #126b48; background: #e9f8f1; font-size: .78rem; font-weight: 750; }
.page-card h1 { margin: 5px 0 9px; font-size: clamp(1.8rem, 5vw, 2.55rem); line-height: 1.18; letter-spacing: -.04em; }
.page-intro { max-width: 560px; margin: 0 auto 25px; color: var(--muted); }
.link-output { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 18px; padding: 7px; border: 1px solid #ddd9eb; border-radius: 14px; background: #faf9ff; }
.link-output input { border: 0; background: transparent; box-shadow: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .79rem; }
.link-output .button { min-height: 43px; }
.ready-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 19px 0; text-align: left; }
.ready-meta > div { padding: 13px; border: 1px solid #eceaf3; border-radius: 12px; background: #fcfbff; }
.ready-meta span, .ready-meta strong { display: block; }
.ready-meta span { color: #898fa1; font-size: .7rem; }
.ready-meta strong { margin-top: 3px; font-size: .86rem; }
.warning-box { margin: 18px 0; padding: 14px 15px; text-align: left; border: 1px solid #ffe0ad; border-radius: 12px; color: #7a5417; background: #fff9ed; font-size: .8rem; }
.ready-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.read-gate { text-align: center; }
.read-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #7a4dff, #4e29d7); font-size: 1.9rem; box-shadow: 0 18px 34px rgba(77,41,214,.24); }
.read-meta { display: flex; justify-content: center; gap: 20px; margin: 20px 0; color: #80879a; font-size: .8rem; }
.read-content { margin-top: 24px; text-align: left; }
.message-box { padding: 20px; border: 1px solid #e7e4f0; border-radius: 15px; background: #fbfaff; white-space: pre-wrap; overflow-wrap: anywhere; }
.link-result { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid #e5e2ef; border-radius: 15px; background: #fbfaff; }
.link-result a { color: var(--primary); overflow-wrap: anywhere; }
.files-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.files-list a { display: flex; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #e6e4ed; border-radius: 12px; background: #fff; }
.destroyed-note { margin-top: 20px; text-align: center; color: #168a5b; font-size: .82rem; font-weight: 700; }
.error-state { color: var(--danger); }

/* Legacy account/admin pages */
.wrap { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; }
.card { padding: 24px; margin-bottom: 18px; border: 1px solid #e6e4ee; border-radius: 18px; background: #fff; box-shadow: 0 14px 35px rgba(44,38,86,.07); }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; color: #5535bf; background: #eeeaff; font-size: .78rem; }
.tabs { display: flex; gap: 8px; }
.tab { padding: 9px 13px; border: 1px solid #ddd9eb; border-radius: 10px; background: #faf9ff; }
.tab.active { color: #fff; background: var(--primary); }
.grid2, .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stats-grid { grid-template-columns: repeat(4,1fr); }
.stat { padding: 15px; border: 1px solid #e8e6ef; border-radius: 13px; }
.stat span, .stat strong { display: block; }
.stat span { color: var(--muted); }
.stat strong { font-size: 1.4rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #eceaf1; }
button.small { padding: 7px 10px; border: 0; border-radius: 8px; cursor: pointer; }
button.danger { color: #fff; background: var(--danger); }
.nav-links { text-align: center; }

@media (max-width: 960px) {
  .main-nav { position: absolute; left: 20px; right: 20px; top: 72px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid #e6e3ee; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px; }
  .mobile-menu { display: block; margin-left: auto; }
  .nav-actions { display: none; }
  .hero-grid, .steps-grid, .security-card { grid-template-columns: 1fr; }
  .hero-grid { gap: 24px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .zero-note { justify-content: center; }
  .hero-visual { min-height: 410px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 26px, 1180px); }
  .nav-shell { height: 68px; }
  .hero-section { padding: 40px 0; }
  .hero-copy h1 { font-size: 2.45rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-visual { min-height: 345px; padding: 20px 13px; }
  .hero-visual img { max-height: 235px; }
  .hero-pills span { font-size: .68rem; }
  .creator-section, .features-section, .steps-section, .security-section, .faq-section { padding: 62px 0; }
  .creator-tabs { grid-template-columns: 1fr; }
  .creator-tab { padding: 10px 12px; }
  #secretForm { padding: 20px; }
  .form-grid, .security-summary, .feature-grid, .ready-meta, .grid2, .stats-grid { grid-template-columns: 1fr; }
  .attachment-zone { grid-template-columns: auto 1fr; }
  .attachment-zone .button { grid-column: 1 / -1; }
  .security-card { padding: 30px 22px; gap: 28px; }
  .security-code { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .page-card { padding: 24px 18px; }
  .link-output { grid-template-columns: 1fr; }
  .read-meta { flex-direction: column; gap: 4px; }
}
/* Rebuilt security controls */
.warning-box input[type=checkbox] { width:auto; margin-right:.5rem; }
#accountPanel form, #loginPanel form, #mfaPanel { margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid #e9e5f4; }
#accountPanel input, #loginPanel input, #passwordRow input { margin: .5rem 0 1rem; }
#readStatus, #mfaSecret, #tempPassword { overflow-wrap:anywhere; }
.attachment-item button { flex-shrink:0; }
#readPassword { text-align:left; }
[hidden] { display:none !important; }
