body { background: var(--page); color: var(--text); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; translate: 0 -160%; padding: 10px 14px; background: white; color: #111827; border-radius: 8px; }
.skip-link:focus { translate: 0; }
.tool-hero { width: min(1440px, calc(100% - 32px)); margin: auto; padding-block: clamp(54px,7vw,96px) clamp(36px,5vw,62px); display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: clamp(36px,8vw,130px); align-items: end; }
.eyebrow { margin: 0; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.tool-hero h1 { margin: 14px 0 22px; font-family: var(--font-mono); font-size: clamp(44px,6vw,86px); line-height: 1.04; letter-spacing: -.055em; }
.tool-hero h1 em { color: var(--primary); font-style: normal; }
.hero-copy { color: var(--muted); line-height: 1.9; }
.privacy-card { display: flex; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.privacy-dot { width: 10px; height: 10px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(74 222 128 / 12%); }
.privacy-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

.base64-workspace { width: min(1500px, calc(100% - 24px)); margin: auto; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,.5fr); gap: 14px; }
.mode-card, .info-card, .content-section { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.mode-card { overflow: hidden; }
.mode-tabs { display: flex; gap: 4px; padding: 12px 14px 0; background: var(--surface-deep); }
.mode-tabs button { min-height: 40px; padding-inline: 18px; border: 1px solid transparent; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); }
.mode-tabs button[aria-selected="true"] { border-color: var(--line); border-bottom-color: var(--surface); background: var(--surface); color: var(--accent); }
.options-row { display: flex; justify-content: flex-end; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.options-row button { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; }
.editor-grid label { display: grid; gap: 8px; padding: 14px 18px; color: var(--muted); font-size: 10px; }
.editor-grid label + label { border-left: 1px solid var(--line); }
textarea { width: 100%; min-height: 460px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-deep); color: var(--text); padding: 14px; font-family: var(--font-mono); line-height: 1.7; }
.action-row { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.primary-button, .quiet-button, .download-button { min-height: 44px; border-radius: 10px; cursor: pointer; }
.primary-button { border: 0; background: var(--primary); color: #07111f; font-weight: 800; padding-inline: 18px; }
.quiet-button { border: 1px solid var(--line); background: transparent; color: var(--text); padding-inline: 18px; }
.full { width: calc(100% - 36px); margin: 12px 18px 0; }
.drop-zone { min-height: 220px; margin: 20px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface-soft); text-align: center; cursor: pointer; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone span { display: grid; width: 42px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--primary); color: #07111f; font-size: 24px; }
.drop-zone small { color: var(--muted); }
.file-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 18px; }
.file-summary span { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 10px; }
.file-summary strong { display: block; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.output-option { display: block; margin: 14px 18px 0; color: var(--muted); font-size: 11px; }
.status-box { display: flex; gap: 12px; margin: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.status-box > span { width: 10px; height: 10px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.status-box[data-status="success"] > span { background: var(--accent); }
.status-box[data-status="error"] > span { background: var(--danger); }
.status-box p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.info-card { padding: 28px; align-self: start; }
.info-card h2 { margin: 7px 0 0; font-family: var(--font-mono); }
.info-card dl { display: grid; margin: 24px 0; }
.info-card dl div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); }
.info-card dt { color: var(--muted); font-size: 11px; }
.info-card dd { margin: 0; font-weight: 700; }
.download-button { width: 100%; border: 1px solid var(--line); background: transparent; color: var(--text); }
.download-button:disabled, .quiet-button:disabled, .primary-button:disabled { opacity: .4; cursor: not-allowed; }

.content-section { width: min(1180px, calc(100% - 32px)); margin: 30px auto 0; padding: 30px; }
.content-section h2 { margin: 0 0 18px; font-family: var(--font-mono); }
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.steps article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.steps p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) { .base64-workspace { grid-template-columns: 1fr; } }
@media (max-width: 780px) { .tool-hero, .editor-grid { grid-template-columns: 1fr; } .editor-grid label + label { border-left: 0; border-top: 1px solid var(--line); } .action-row, .options-row { flex-wrap: wrap; } .steps { grid-template-columns: 1fr; } }
