@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e8ef;
    --blue: #3159d9;
    --blue-dark: #2345b8;
    --surface: #ffffff;
    --background: #f4f7fc;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: radial-gradient(circle at top left, #e5edff 0, transparent 36%), var(--background);
    color: var(--ink);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    line-height: 1.8;
}
.page { width: min(920px, calc(100% - 32px)); margin: 44px auto; }
.hero { text-align: center; margin: 0 auto 26px; }
.eyebrow { color: var(--blue); font-size: .9rem; font-weight: 700; }
h1 { font-size: clamp(1.65rem, 4vw, 2.35rem); margin: 8px 0; line-height: 1.5; }
h1 span { color: var(--blue); }
.hero p { color: var(--muted); margin: 6px 0; }
.panel, .warning {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: clamp(18px, 4vw, 32px);
    box-shadow: 0 12px 35px rgba(20, 38, 80, .06);
}
.controls { display: grid; grid-template-columns: 1fr; gap: 9px; margin-bottom: 24px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
select, input, textarea {
    width: 100%;
    border: 1px solid #d5dbe7;
    border-radius: 10px;
    background: #fbfcff;
    color: var(--ink);
    padding: 12px 14px;
    font: 14px/1.7 Consolas, "Vazirmatn", monospace;
}
select { font-family: "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
input { margin-bottom: 17px; overflow-wrap: anywhere; }
textarea { min-height: 235px; resize: vertical; white-space: pre; }
.button {
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: #eef2ff; color: #243fa8; }
.output-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hint { font-size: .82rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.status { min-height: 1.6em; margin: 8px 0 0; color: #16734a; font-size: .9rem; }
.warning { margin-top: 18px; box-shadow: none; }
.warning strong { font-size: 1.05rem; }
.warning ul { margin-bottom: 0; padding-right: 22px; color: #515b70; }
.warning li { padding: 3px 0; }
code { background: #edf1fb; padding: 2px 6px; border-radius: 5px; }
footer { text-align: center; color: #8a93a5; font-size: .82rem; padding: 22px 0 0; }
@media (min-width: 640px) {
    .controls { grid-template-columns: 1fr auto; align-items: end; }
    .controls label { grid-column: 1 / -1; margin-bottom: -2px; }
    .controls select { min-width: 260px; }
    .controls button { min-width: 220px; }
}
