/* File Encryption Box. Contained width; tokens from layout.css. */

body {
  --copy: #eef4f8;
}

body.grid-bg {
  background:
    radial-gradient(ellipse 70% 52% at 50% 36%, rgba(0, 170, 210, 0.22) 0%, transparent 48%),
    radial-gradient(ellipse 90% 46% at 50% 100%, rgba(4, 14, 24, 0.88) 0%, transparent 58%),
    #050c14;
}

body.grid-bg::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 38%, transparent 44%, rgba(4, 10, 18, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 216, 240, 0.05) 0%, transparent 18%, transparent 78%, rgba(4, 14, 24, 0.45) 100%);
}

main,
.footer { position: relative; z-index: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.tool-page {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 56px;
}

.tool-intro {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.tool-intro .label {
  font-size: 13px;
  color: var(--copy);
}

.tool-intro h1 {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 10px 0 12px;
}

.tool-intro h1 .a { color: var(--lime); }

.tool-intro p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--copy);
}

.tool-intro code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #f5f5f5;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 18px;
}

.trust span {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copy);
}

.trust span::before {
  content: "◆";
  color: var(--lime);
  margin-right: 8px;
  font-size: 8px;
}

.board {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  border: 1px solid rgba(0, 216, 240, 0.28);
  background: rgba(5, 12, 20, 0.62);
  box-shadow: 0 0 80px rgba(0, 216, 240, 0.1);
}

.board-setup {
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
}

.mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  margin-bottom: 16px;
}

.mode-tags label,
.keep-empty { cursor: pointer; }

.mode-tags input,
.keep-empty input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-tags span,
.keep-empty span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #143044;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8eef4;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mode-tags label:hover span,
.keep-empty:hover span {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mode-tags label:has(input:checked) span,
.keep-empty:has(input:checked) span {
  border-color: var(--lime);
  color: #041018;
  background: var(--lime);
}

.op-tags { margin-top: 4px; }

.live-note {
  margin: -6px 0 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copy);
}

.dropzone {
  box-sizing: border-box;
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 1px dashed rgba(0, 216, 240, 0.32);
  background: rgba(0, 216, 240, 0.04);
  cursor: pointer;
  text-align: center;
}

.dropzone:hover,
.dropzone:focus,
.dropzone:focus-visible,
.dropzone.is-dragover {
  outline: none;
  border-color: var(--lime);
  background: rgba(0, 216, 240, 0.08);
}

.dropzone.has-file {
  text-align: left;
}

.dropzone-idle {
  width: 100%;
}

.dropzone-idle[hidden] { display: none; }

.dropzone-title {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dropzone-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--copy);
}

.dropzone.is-dragover .dropzone-hint {
  color: var(--lime);
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.file-preview[hidden] { display: none; }

.file-preview strong {
  display: block;
  word-break: break-all;
  font-size: 14px;
}

.file-preview p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--copy);
}

.file-preview .btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.rule {
  display: block;
  margin-top: 16px;
}

.rule[hidden] { display: none; }

.rule > span,
.setup-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copy);
}

.rule > span em {
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #c8d6e0;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.secret-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--white);
  font: inherit;
}

.secret-row input:focus {
  outline: none;
}

.secret-row:focus-within {
  border-bottom-color: var(--lime);
}

.secret-toggle {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copy);
}

.secret-toggle:hover,
.secret-toggle[aria-pressed="true"] { color: var(--lime); }

.hint {
  margin-top: 10px;
  font-size: 13px;
  color: #fbbf24;
}

.filebox-area {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
}

.filebox-area:focus {
  outline: none;
  border-bottom-color: var(--lime);
}

.filebox-area-out { min-height: 220px; }

.keep-empty { display: inline-block; margin-top: 12px; }

.import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.import-row .btn,
.result-tools .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

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

.setup-actions .btn:hover,
.result-tools .btn:hover,
.import-row .btn:hover,
.file-preview .btn:hover,
.site-confirm-actions .btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.setup-actions .btn:active,
.result-tools .btn:active,
.import-row .btn:active,
.file-preview .btn:active,
.site-confirm-actions .btn:active {
  border-color: var(--lime);
  color: #041018;
  background: var(--lime);
}

.setup-actions .btn-solid:hover,
.site-confirm-actions .btn-solid:hover {
  border-color: #7ef4ff;
  background: #7ef4ff;
  color: #041018;
}

.setup-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.burn-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--copy);
}

.board-out {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.output-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copy);
}

.output-lead {
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--copy);
}

.result-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filebox-empty,
.filebox-progress,
.filebox-result,
#filebox-text-output {
  padding: 22px 20px 24px;
}

.filebox-empty p {
  color: var(--copy);
  font-size: 15px;
  line-height: 1.7;
}

.progress-track {
  height: 2px;
  background: #143044;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width 0.2s ease;
}

.progress-text {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--copy);
}

.link-label,
.setup-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copy);
}

.link-full {
  display: block;
  margin-top: 10px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-all;
  color: var(--lime);
}

.filebox-result-tools {
  margin-top: 16px;
}

.result-note,
.filebox-inline-next {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--copy);
}

.filebox-inline-next {
  font-size: 15px;
}

.filebox-inline-next a,
.line-desc a {
  color: var(--lime);
  letter-spacing: 0.06em;
}

.filebox-inline-next a::after,
.line-desc a::after {
  content: " →";
  opacity: 0.5;
}

.filebox-inline-next a:hover,
.line-desc a:hover { color: #5eefff; }

.error-box {
  margin-top: 12px;
  white-space: pre-wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #fbbf24;
}

.filebox-empty code,
.line-desc code,
.result-note code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #f5f5f5;
}

.chapter {
  padding: 28px 24px 12px;
  margin: 0 0 24px;
  border: 1px solid rgba(0, 216, 240, 0.28);
  background: rgba(5, 12, 20, 0.62);
  box-shadow: 0 0 64px rgba(0, 216, 240, 0.08);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(200px, 1.05fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: 24px;
}

.sec-head h2 {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sec-head h2 em {
  font-style: normal;
  color: var(--lime);
}

.craft-lead {
  color: var(--copy);
  font-size: 15px;
  line-height: 1.7;
  max-width: 520px;
}

.line-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.line-item {
  display: block;
  width: 100%;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.line-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.line-item .name,
.next-item .name {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #d2d2d2;
}

.line-item .num,
.next-item .num {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #b8b8b8;
}


.line-desc {
  display: block;
  margin-top: 10px;
  color: var(--copy);
  font-size: 15px;
  line-height: 1.7;
}

.next {
  padding-bottom: 28px;
  margin-bottom: 64px;
}

.next-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
}

.next-item {
  min-width: 160px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  padding: 12px 20px;
  border: 1px solid var(--lime);
  background: #050c14;
  color: var(--lime);
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-confirm {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
}

.site-confirm[hidden] { display: none; }

.site-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.72);
}

.site-confirm-panel {
  position: relative;
  width: min(440px, calc(100% - 40px));
  padding: 24px 22px;
  border: 1px solid rgba(0, 216, 240, 0.28);
  background: #050c14;
  box-shadow: 0 0 64px rgba(0, 216, 240, 0.12);
}

.site-confirm-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copy);
}

.site-confirm-panel h2 {
  margin: 10px 0 12px;
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-confirm-copy {
  font-size: 15px;
  line-height: 1.7;
  color: var(--copy);
}

.site-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

body.is-confirm-open { overflow: hidden; }

@media (hover: hover) and (pointer: fine) {
  .line-item:hover .name,
  .next-item:hover .name,
  .line-item:hover .num,
  .next-item:hover .num {
    color: var(--lime);
  }
}

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .board-setup { border-right: 0; border-bottom: 1px solid var(--line); }
  .sec-head,
  .line-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .line-desc { display: none; }
  .line-item.is-on .line-desc { display: block; }
  .line-item.is-on .name,
  .line-item.is-on .num { color: var(--lime); }
  .next-item { width: 100%; }
}
