/* UTM Link Builder & QA Checker — ToolNest mobile-first styles.
   System font stack only (no webfont downloads, PRD 8). */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif;
  background: #f4f7f5;
  color: #17211d;
  line-height: 1.5;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 14px 32px;
}

header.site {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand .tool { font-weight: 600; color: #0b6b57; }

.spacer { flex: 1; }

.lang-toggle {
  display: flex;
  border: 1px solid #b9ccc4;
  border-radius: 8px;
  overflow: hidden;
}

.lang-toggle button {
  border: 0;
  background: #fff;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
}

.lang-toggle button[aria-pressed="true"] {
  background: #0b6b57;
  color: #fff;
}

h1 { font-size: 1.45rem; line-height: 1.3; margin: 14px 0 8px; }
h2 { font-size: 1.2rem; margin: 4px 0 6px; }
h3 { font-size: 1.05rem; margin: 18px 0 6px; }
h4 { font-size: 1rem; margin: 14px 0 6px; }

.purpose { color: #3c4a44; margin: 0 0 12px; }
.hint { color: #3c4a44; font-size: 0.92rem; margin: 4px 0 8px; }

.notice {
  background: #eef4f1;
  border-left: 4px solid #0b6b57;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 10px 0;
}

.banner {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0;
}

.banner.warn { background: #fdf3e3; border: 1px solid #e8c98a; }
.banner.info { background: #eef4f1; border: 1px solid #b9ccc4; }

.confirm-bar {
  background: #fdf3e3;
  border: 1px solid #e8c98a;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.card {
  background: #fff;
  border: 1px solid #d8e2dd;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.tabs button {
  flex: 1;
  min-height: 48px;
  border: 1px solid #b9ccc4;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #eef4f1;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: #0b6b57;
  color: #fff;
}

label { display: block; font-weight: 600; margin: 14px 0 4px; }

.req {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9a4b00;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  border: 1px solid #b9ccc4;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: inherit;
}

textarea { resize: vertical; overflow-wrap: anywhere; }

textarea[readonly] { background: #f4f7f5; }

input:focus-visible, textarea:focus-visible, button:focus-visible,
a:focus-visible, summary:focus-visible, .file-btn:focus-visible {
  outline: 3px solid #f2a93b;
  outline-offset: 1px;
}

.field-block { margin-bottom: 4px; }

.written {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: #0b6b57;
  overflow-wrap: anywhere;
  min-height: 1.2em;
}

.field-error {
  color: #a11c1c;
  font-weight: 600;
  margin: 6px 0 0;
}

fieldset.group {
  border: 1px solid #d8e2dd;
  border-radius: 10px;
  padding: 10px 12px 14px;
  margin: 16px 0 4px;
}

fieldset.group legend { font-weight: 700; padding: 0 6px; }

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin: 6px 14px 6px 0;
  min-height: 44px;
  cursor: pointer;
}

.choice input { width: 20px; height: 20px; }

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.wrap-row { row-gap: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #0b6b57;
  border-radius: 8px;
  background: #fff;
  color: #0b6b57;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary { background: #0b6b57; color: #fff; }
.btn.small-btn { min-height: 44px; padding: 7px 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.file-btn { cursor: pointer; margin: 0; }

.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-grid .btn { flex: 1 1 140px; justify-content: center; }

.preset-list { list-style: none; padding: 0; margin: 8px 0; }

.preset-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.preset-list .preset-name { font-weight: 700; overflow-wrap: anywhere; }
.preset-list .preset-detail { color: #3c4a44; font-size: 0.9rem; overflow-wrap: anywhere; }

.plain-list { margin: 6px 0 10px; padding-left: 20px; }
.plain-list li { margin: 4px 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }

.table-scroll { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th, td {
  border: 1px solid #d8e2dd;
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th { background: #eef4f1; }

.finding-group { margin: 10px 0; }

.finding-group h4 { margin: 8px 0 4px; }

.finding {
  border-left: 4px solid #b9ccc4;
  padding: 6px 10px;
  margin: 6px 0;
  background: #f8faf9;
  overflow-wrap: anywhere;
}

.finding.error { border-left-color: #a11c1c; }
.finding.warning { border-left-color: #d98a00; }
.finding.note { border-left-color: #0b6b57; }

.finding .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  display: block;
}

details {
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}

summary { font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; }

footer { color: #3c4a44; font-size: 0.92rem; margin-top: 18px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 480px) {
  h1 { font-size: 1.25rem; }
  .card { padding: 13px; }
  .preset-grid .btn { flex: 1 1 120px; }
}
