:root {
  --bg: #f2efe8;
  --panel: #fffdf9;
  --ink: #1b1b18;
  --muted: #5f5a50;
  --accent: #001f3e;
  --line: #d9d0c2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 31, 62, 0.12), transparent 28%),
    linear-gradient(180deg, #faf7f0 0%, var(--bg) 100%);
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 48px auto;
}

.hero {
  margin-bottom: 24px;
}

html[dir="rtl"] body {
  text-align: right;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 31, 62, 0.18);
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.65);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 0.96;
  max-width: 11ch;
}

p {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.65;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(45, 35, 18, 0.08);
  padding: 24px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.error-banner {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #efb0b0;
  background: #fff1f1;
  color: #9a1c1c;
  font-size: 14px;
  line-height: 1.55;
}

.mode-picker {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.mode-picker legend {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.mode-card {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.mode-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.mode-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.brand-lockup {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.brand-logo {
  width: 100%;
  max-width: 240px;
  height: auto;
  max-height: 84px;
  object-fit: contain;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .brand-lockup {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .brand-logo {
    max-width: 220px;
  }
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="color"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px 16px;
  font: inherit;
}

input[type="color"] {
  min-height: 54px;
  padding: 6px;
}

button,
.download-link,
.secondary-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
}

button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #001f3e, #0e3a66);
  cursor: pointer;
}

.note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f8f7;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95em;
}

.result-panel {
  display: grid;
  gap: 16px;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  font-size: 24px;
}

.download-link {
  color: white;
  background: #001f3e;
}

.secondary-link {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.ghost-button {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.auth-panel {
  max-width: 520px;
}

.result-panel form {
  margin: 0;
}

@media (max-width: 640px) {
  .shell {
    margin: 24px auto;
  }

  .panel {
    border-radius: 20px;
    padding: 18px;
  }
}
