:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: #0d1b2a;
  --panel-soft: #102233;
  --line: rgba(185, 211, 229, .16);
  --line-strong: rgba(185, 211, 229, .28);
  --text: #f1f6f8;
  --muted: #91a7b8;
  --accent: #b9f36d;
  --accent-dark: #0b1a12;
  --blue: #8bd3ff;
  --danger: #ff9b9b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 211, 255, .13), transparent 34rem),
    var(--bg);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark { color: var(--text); font-size: 19px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; margin-right: 24px; }
.site-nav a, .footer a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .footer a:hover, .footer a:focus-visible, .site-nav a[aria-current="page"], .footer a[aria-current="page"] { color: var(--accent); }
.topbar-note { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(185, 243, 109, .1); }

main { padding: 54px 0 72px; }

.tool-card {
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(20, 43, 61, .96), rgba(10, 24, 38, .96));
  box-shadow: var(--shadow);
}

.tool-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.055em; line-height: 1.08; }
h1 { max-width: 650px; font-size: clamp(38px, 6vw, 68px); }
h2 { font-size: clamp(27px, 4vw, 42px); }
.lede { max-width: 560px; margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.privacy-badge { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(185, 243, 109, .34); border-radius: 999px; color: var(--accent); font-size: 12px; white-space: nowrap; }

.drop-zone {
  display: grid;
  justify-items: center;
  padding: clamp(28px, 5vw, 52px) 20px;
  border: 1px dashed rgba(185, 243, 109, .5);
  border-radius: 20px;
  background: rgba(185, 243, 109, .035);
  text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging { border-color: var(--accent); background: rgba(185, 243, 109, .09); outline: none; transform: translateY(-1px); }
.drop-mark { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 13px; border-radius: 16px; background: var(--accent); color: var(--accent-dark); }
.drop-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.drop-title { margin: 0; font-size: 20px; font-weight: 750; }
.drop-hint { margin: 4px 0 0; color: var(--muted); }
.inline-button { padding: 0; border: 0; background: transparent; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.drop-meta { margin: 16px 0 0; color: #6f8798; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.selected-file { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(3, 11, 19, .26); }
.selected-file img { width: 58px; height: 58px; border-radius: 10px; object-fit: contain; background: repeating-conic-gradient(#233546 0 25%, #172838 0 50%) 50% / 12px 12px; }
.file-details { min-width: 0; flex: 1; }
.file-name, .file-meta { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.file-name { font-weight: 700; }
.file-meta { margin-top: 3px; color: var(--muted); font-size: 13px; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-button:hover, .icon-button:focus-visible { border-color: var(--line-strong); color: var(--text); }

.size-picker { min-width: 0; margin: 28px 0 0; padding: 0; border: 0; }
.size-picker legend { padding: 0; font-size: 16px; font-weight: 750; }
.fieldset-help { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }
.size-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.size-option { position: relative; }
.size-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.size-option span { display: block; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-align: center; transition: .2s ease; }
.size-option .unit { display: inline; margin-left: 2px; border: 0; padding: 0; color: inherit; font-size: 11px; }
.size-option input:checked + span { border-color: var(--accent); background: rgba(185, 243, 109, .12); color: var(--accent); }
.size-option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.selection-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.action-row { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 13px; background: var(--accent); color: var(--accent-dark); font-weight: 800; transition: transform .2s ease, opacity .2s ease; }
.primary-button span { font-size: 22px; line-height: 1; }
.primary-button:hover:not(:disabled), .primary-button:focus-visible:not(:disabled) { transform: translateY(-2px); }
.primary-button:disabled { cursor: not-allowed; opacity: .4; }
.privacy-note { margin: 0; color: var(--muted); font-size: 13px; }
.privacy-note span { margin-right: 7px; color: var(--accent); font-size: 10px; }
.status { min-height: 24px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.status.error { color: var(--danger); }
.status.success { color: var(--accent); }

.signal-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0 70px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); }
.signal-row > div { padding: 18px 20px; background: rgba(13, 27, 42, .68); }
.signal-row strong, .signal-row span { display: block; }
.signal-row strong { color: var(--text); font-size: 15px; }
.signal-row span { margin-top: 2px; color: var(--muted); font-size: 12px; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.content-card { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: rgba(13, 27, 42, .68); }
.content-card > p:not(.section-kicker), .explain-section > p { color: var(--muted); }
.check-list { display: grid; gap: 11px; margin: 26px 0 0; padding: 0; list-style: none; color: #c9d7df; }
.check-list li { position: relative; padding-left: 24px; }
.check-list li::before { position: absolute; left: 0; content: "✓"; color: var(--accent); font-weight: 800; }
.steps-list { display: grid; gap: 22px; margin: 28px 0 0; padding: 0; list-style: none; }
.steps-list li { display: flex; gap: 15px; }
.steps-list li > span { color: var(--accent); font: 800 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.steps-list strong { font-size: 15px; }
.steps-list p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

.explain-section { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 18px 60px; margin-top: 82px; padding-top: 34px; border-top: 1px solid var(--line); }
.explain-section > p { margin: 0; }
.size-guide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.size-guide > div { padding: 15px 12px; border-left: 2px solid var(--accent); background: rgba(13, 27, 42, .66); }
.size-guide strong, .size-guide span { display: block; }
.size-guide strong { font-size: 14px; }
.size-guide span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.faq-section { max-width: 820px; margin-top: 82px; padding-top: 34px; border-top: 1px solid var(--line); }
.faq-section details { border-bottom: 1px solid var(--line); }
.faq-section summary { padding: 19px 0; cursor: pointer; font-weight: 700; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { float: right; color: var(--accent); content: "+"; font-size: 22px; font-weight: 400; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p { max-width: 680px; margin: -4px 0 19px; color: var(--muted); font-size: 14px; }

.info-page { max-width: 820px; margin: 0 auto; }
.prose-card { padding: clamp(26px, 5vw, 58px); border: 1px solid var(--line); border-radius: 24px; background: rgba(13, 27, 42, .72); box-shadow: var(--shadow); }
.prose-card h1 { max-width: 700px; }
.prose-card h2 { margin-top: 42px; font-size: clamp(24px, 3vw, 32px); }
.prose-card p { color: var(--muted); }
.prose-card .page-intro { max-width: 660px; margin: 20px 0 0; color: var(--text); font-size: 19px; }
.prose-card a { color: var(--blue); text-underline-offset: 3px; }
.contact-card { text-align: center; }
.contact-card .page-intro { margin-right: auto; margin-left: auto; }
.contact-address { margin: 28px 0; font-size: clamp(22px, 4vw, 34px); font-weight: 750; }
.footer { display: flex; justify-content: space-between; gap: 26px; padding: 24px 0 34px; border-top: 1px solid var(--line); color: #718897; font-size: 12px; }
.footer strong, .footer span { display: block; }
.footer strong { color: var(--text); }
.footer span { margin-top: 5px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, 620px); }
  main { padding: 28px 0 54px; }
  .topbar { min-height: 62px; }
  .topbar-note { font-size: 11px; }
  .site-nav { gap: 10px; margin-right: 12px; font-size: 13px; }
  .tool-card { padding: 22px 16px; border-radius: 21px; }
  .tool-heading { display: block; margin-bottom: 26px; }
  .privacy-badge { display: inline-block; margin-top: 17px; }
  .lede { font-size: 16px; }
  .size-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-row { display: block; }
  .primary-button { width: 100%; }
  .privacy-note { margin-top: 13px; text-align: center; }
  .signal-row { grid-template-columns: 1fr; margin-bottom: 52px; }
  .signal-row > div { padding: 14px 16px; }
  .content-grid { grid-template-columns: 1fr; }
  .explain-section { display: block; margin-top: 60px; }
  .explain-section > p { margin-top: 20px; }
  .size-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }
  .faq-section { margin-top: 60px; }
  .footer { display: block; }
  .footer-links { justify-content: flex-start; margin-top: 18px; }
}

@media (max-width: 420px) {
  .site-nav { gap: 8px; margin-right: 0; font-size: 12px; }
  .topbar-note { display: none; }
  h1 { font-size: 39px; }
  .drop-zone { padding: 30px 12px; }
  .drop-meta { font-size: 10px; letter-spacing: .08em; }
  .size-grid { gap: 7px; }
  .size-option span { padding: 10px 4px; font-size: 14px; }
}
