:root {
  color-scheme: light;
  --ink: #142b28;
  --muted: #75827f;
  --line: #e5ebe8;
  --green: #176d58;
  --green-dark: #105844;
  --mint: #eaf4ef;
  --paper: #ffffff;
  --page: #f6f8f7;
  --shadow: 0 18px 54px rgba(26, 57, 47, .075);
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; background: var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { max-width: 1180px; padding: 0 38px; margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8eeeb; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 800 21px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -1.1px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 10px; }
.brand-mark svg { width: 19px; height: 19px; }
.brand-period { color: #46a47d; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; color: #53655e; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid #e6ece8; border-radius: 100px; padding: 9px 13px; }
.privacy-dot, .local-badge span, .footer-dot { width: 7px; height: 7px; border-radius: 50%; background: #51a67d; box-shadow: 0 0 0 3px #e9f5ed; }
main { padding: 52px 0 26px; }
.intro { max-width: 690px; margin: 0 auto 31px; text-align: center; }
.eyebrow, .step-label { color: #71807b; font-size: 10px; font-weight: 700; letter-spacing: 1.45px; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 9px; }
.eyebrow-line { display: inline-block; height: 1px; width: 20px; background: #85b79b; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 14px 0 12px; font: 700 clamp(34px, 4vw, 48px)/1.14 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -2.4px; }
h1 span { color: #3d9070; }
.intro-copy { max-width: 570px; margin: 0 auto; color: #687773; font-size: 14px; line-height: 1.75; }
.workspace { overflow: hidden; background: var(--paper); border: 1px solid #e6ece9; border-radius: 17px; box-shadow: var(--shadow); }
.mode-switch { display: flex; align-items: stretch; gap: 5px; height: 64px; padding: 0 34px; border-bottom: 1px solid #edf0ee; }
.mode-tab { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 0 12px; border: 0; background: transparent; color: #87918e; font-size: 13px; font-weight: 600; }
.mode-tab svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mode-tab.is-active { color: var(--green); }
.mode-tab.is-active::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; content: ''; background: var(--green); border-radius: 2px 2px 0 0; }
.workspace-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(248px, .82fr); gap: 37px; padding: 30px 34px 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.step-label { display: block; margin-bottom: 7px; font-size: 9px; letter-spacing: 1.3px; }
.step-label span { margin: 0 2px; color: #9bad9f; }
.section-heading h2 { margin: 0; font: 700 17px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -.45px; }
.source-switch { display: inline-flex; flex: none; padding: 3px; background: #f2f5f3; border-radius: 8px; }
.source-button { min-width: 50px; height: 28px; padding: 0 10px; color: #77837f; background: transparent; border: 0; border-radius: 6px; font-size: 11px; font-weight: 600; }
.source-button.is-active { color: #315f4e; background: white; box-shadow: 0 1px 4px rgba(24, 49, 40, .1); }
.source-panel textarea, #text-result { display: block; width: 100%; min-height: 132px; resize: vertical; padding: 14px 15px; color: #243a34; background: #fbfcfb; border: 1px solid #e3eae6; border-radius: 9px; outline: none; font-size: 13px; line-height: 1.6; transition: border-color .18s, box-shadow .18s; }
.source-panel textarea::placeholder, #text-result::placeholder { color: #a4afaa; }
.source-panel textarea:focus, #text-result:focus, .password-wrap:focus-within { border-color: #75ad91; box-shadow: 0 0 0 3px rgba(68, 142, 103, .1); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: #9aa49f; font-size: 10px; }
.dropzone { min-height: 132px; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #fbfcfb; border: 1px dashed #cbd9d1; border-radius: 9px; cursor: pointer; transition: border-color .18s, background .18s; }
.dropzone:hover, .dropzone.is-dragging { border-color: #559574; background: #f4faf6; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; color: var(--green); background: #eaf4ee; border-radius: 10px; }
.upload-icon svg { width: 18px; height: 18px; }
.drop-title { color: #465a52; font-size: 12px; font-weight: 600; }
.drop-title span { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.drop-subtitle, .file-meta { margin-top: 6px; color: #99a49f; font-size: 10px; }
.file-meta { padding: 5px 9px; color: #35684f; background: #eaf4ee; border-radius: 5px; }
.password-block { margin-top: 21px; }
.password-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.password-label-row label { color: #334b42; font-size: 11px; font-weight: 700; }
.password-note { color: #9aa49f; font-size: 10px; }
.password-wrap { display: flex; align-items: center; gap: 10px; height: 43px; padding: 0 12px; border: 1px solid #e3eae6; border-radius: 8px; transition: border-color .18s, box-shadow .18s; }
.password-lock { flex: none; width: 16px; height: 16px; color: #82948b; }
.password-wrap input { min-width: 0; flex: 1; height: 100%; color: #243a34; background: transparent; border: 0; outline: 0; font-size: 12px; }
.password-wrap input::placeholder { color: #a4afaa; }
.visibility-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #82918a; background: transparent; border: 0; border-radius: 5px; }
.visibility-button:hover { color: var(--green); background: #f2f6f3; }
.visibility-button svg { width: 17px; height: 17px; }
.password-help { margin: 7px 0 0; color: #9aa49f; font-size: 10px; }
.primary-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; height: 46px; margin-top: 18px; color: #fff; background: var(--green); border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; transition: background .18s, transform .18s, box-shadow .18s; }
.primary-button:hover { background: var(--green-dark); box-shadow: 0 6px 14px rgba(23, 109, 88, .17); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .72; transform: none; }
.primary-button svg { width: 17px; height: 17px; }
.crypto-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: #8b9892; font-size: 9px; }
.crypto-note svg { width: 13px; height: 13px; color: #609178; }
.crypto-note span { color: #bdc7c1; }
.side-column { display: flex; flex-direction: column; gap: 12px; padding-top: 2px; }
.side-card { padding: 17px 17px 16px; border: 1px solid #e7eeea; border-radius: 10px; }
.security-card { background: linear-gradient(145deg, #f5faf6, #fbfdfb); }
.side-card-icon { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 12px; color: #367a5a; background: #e6f2e9; border-radius: 8px; }
.side-card-icon svg { width: 19px; height: 19px; }
.side-card h3 { margin: 0 0 6px; font: 700 13px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -.2px; }
.side-card p { margin: 0; color: #77857e; font-size: 10px; line-height: 1.65; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 9px; color: #4a725b; background: #eaf4ec; border-radius: 6px; font-size: 9px; font-weight: 600; }
.local-badge span { width: 6px; height: 6px; box-shadow: none; }
.steps-card { padding: 16px 17px 14px; }
.steps-card .step-label { margin-bottom: 12px; }
.mini-step { display: flex; align-items: center; gap: 9px; margin: 9px 0; color: #62716a; font-size: 10px; }
.mini-step-number { display: grid; place-items: center; flex: none; width: 20px; height: 20px; color: #518166; background: #edf5ef; border-radius: 50%; font-size: 9px; font-weight: 700; }
.format-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf0ee; color: #8d9993; font-size: 9px; line-height: 1.5; }
.format-icon { display: grid; place-items: center; flex: none; width: 14px; height: 14px; border: 1px solid #aab9b0; border-radius: 50%; font-size: 9px; font-weight: 700; }
.result-card { display: flex; align-items: flex-start; gap: 13px; margin-top: 15px; padding: 17px; background: white; border: 1px solid #dce9df; border-radius: 12px; box-shadow: 0 7px 24px rgba(26, 57, 47, .045); }
.result-icon { display: grid; place-items: center; flex: none; width: 29px; height: 29px; color: #398261; background: #e9f5ed; border-radius: 50%; }
.result-icon svg { width: 17px; height: 17px; }
.result-content { min-width: 0; flex: 1; }
.result-content h2 { margin: 2px 0 4px; font: 700 13px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.result-content p { margin: 0; color: #77857e; font-size: 11px; line-height: 1.5; }
#text-result-wrap { margin-top: 12px; }
#text-result { min-height: 80px; max-height: 200px; background: #fbfcfb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.result-actions { display: flex; flex: none; gap: 7px; margin-left: 8px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 12px; color: #35644f; background: white; border: 1px solid #dce8df; border-radius: 7px; font-size: 10px; font-weight: 700; }
.secondary-button:hover { background: #f3f8f4; border-color: #b9d4c0; }
.secondary-button svg { width: 15px; height: 15px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 23px 2px 0; color: #9aa49f; font-size: 10px; }
.footer > span:last-child { display: inline-flex; align-items: center; gap: 7px; }
.footer-dot { width: 6px; height: 6px; box-shadow: none; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: calc(100vw - 44px); padding: 11px 15px; color: white; background: #243f34; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.17); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .page-shell { padding: 0 22px; }
  main { padding-top: 42px; }
  .workspace-body { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; }
  .mode-switch { height: 58px; padding: 0 24px; }
  .intro { margin-bottom: 25px; }
}
@media (max-width: 520px) {
  .page-shell { padding: 0 15px; }
  .topbar { height: 69px; }
  .privacy-pill { padding: 8px 10px; font-size: 10px; }
  main { padding-top: 35px; }
  h1 { letter-spacing: -1.7px; }
  .intro-copy { font-size: 12px; }
  .workspace-body { padding: 21px 17px; }
  .mode-switch { gap: 2px; padding: 0 9px; }
  .mode-tab { flex: 1; justify-content: center; min-height: 44px; padding: 0 8px; }
  .mode-tab.is-active::after { right: 8px; left: 8px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .source-switch { width: 100%; }
  .source-button { flex: 1; min-height: 36px; }
  .source-panel textarea, #text-result { min-height: 158px; }
  .password-wrap { height: 48px; }
  .visibility-button { width: 36px; height: 36px; }
  .primary-button { height: 50px; }
  .side-column { grid-template-columns: 1fr; }
  .password-note { max-width: 125px; text-align: right; line-height: 1.4; }
  .result-card { flex-wrap: wrap; }
  .result-content { min-width: calc(100% - 46px); }
  .result-actions { width: 100%; margin: 0; }
  .secondary-button { flex: 1; min-height: 42px; }
  .footer { align-items: flex-start; flex-direction: column; padding: 19px 2px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
