*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #e9ebee;
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 40px 16px 60px;
}

/* ── Logo / top-bar ───────────────────────────────── */
.top-bar {
  width: 100%; max-width: 820px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  background: #e8901a; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; color: #fff;
  flex-shrink: 0; text-decoration: none;
}
.logo-text { font-size: 1.20rem; font-weight: 700; color: #222; text-decoration: none; }
.logo-text b { color: #e8901a; }
.logo-slogan { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.ls-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 3px;
  text-transform: uppercase;
}
.ls-green  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.ls-blue   { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.ls-orange { background: #fff7ed; color: #e8901a; border: 1px solid #fed7aa; }

/* ── Search row ───────────────────────────────────── */
.search-row {
  width: 100%; max-width: 820px;
  display: flex;
  border: 1px solid #bbb; border-radius: 3px;
  background: #fff; overflow: hidden;
  margin-bottom: 6px;
}
.search-row input {
  flex: 1; padding: 9px 12px;
  border: none; outline: none;
  font-size: .9rem; color: #333;
  background: #fff; font-family: inherit;
}
.search-row input::placeholder { color: #aaa; }
.search-row button {
  padding: 9px 20px;
  background: #e8901a; border: none; border-left: 1px solid #d4841a;
  color: #fff; font-size: .82rem; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .1s;
}
.search-row button:hover { background: #d4841a; }

.hint {
  width: 100%; max-width: 820px;
  font-size: .68rem; color: #999;
  margin-bottom: 4px;
}

/* ── Nav tabs ─────────────────────────────────────── */
.tabs {
  width: 100%; max-width: 820px;
  display: flex; gap: 3px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.tab {
  padding: 5px 13px;
  background: #fff; border: 1px solid #ccc; border-radius: 2px;
  font-size: .78rem; color: #555;
  cursor: pointer; text-decoration: none;
  transition: background .1s;
}
.tab:hover { background: #f5f5f5; border-color: #bbb; }
.tab.active { background: #e8901a; border-color: #d4841a; color: #fff; }
.tab.soon { color: #bbb; pointer-events: none; background: #f9f9f9; border-color: #ddd; }

/* ── Box + box-header ─────────────────────────────── */
.box {
  width: 100%; max-width: 820px;
  background: #fff; border: 1px solid #d8d8d8; border-radius: 2px;
  overflow: hidden; margin-bottom: 10px;
}
.box-header {
  background: #f4f4f4; border-bottom: 1px solid #ddd;
  padding: 7px 14px;
  font-size: .75rem; font-weight: 700; color: #666;
  letter-spacing: .01em;
}

/* ── Info card (rows of label+value) ──────────────── */
.info-card {
  width: 100%; max-width: 820px;
  background: #fff; border: 1px solid #d8d8d8; border-radius: 2px;
  overflow: hidden; margin-bottom: 10px;
}
.info-row {
  display: flex; align-items: stretch;
  padding: 0 14px;
  border-bottom: 1px solid #eceef1;
}
.info-row:last-child { border-bottom: none; }
.info-row:nth-child(even) { background: #f7f8fa; }
.info-label {
  width: 140px; flex-shrink: 0;
  display: flex; align-items: center;
  font-size: .69rem; color: #999;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 10px 8px 0;
  border-right: 1px solid #dde0e6;
}
.info-value { font-size: .88rem; color: #333; word-break: break-all; padding: 8px 0 8px 12px; }
.info-value.accent,
.info-value .accent { font-family: ui-monospace, monospace; font-weight: 600; color: #222; }
.info-value.mono   { font-family: ui-monospace, monospace; font-size: .82rem; }
.info-value.long   { font-size: .78rem; color: #555; }
.info-value.na     { color: #ccc; }

/* ── Source label (section heading above card) ────── */
.source-label {
  width: 100%; max-width: 820px;
  font-size: .65rem; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: .09em;
  margin-top: 18px; margin-bottom: 6px;
}

/* ── Cache badge ──────────────────────────────────── */
.cache-badge {
  display: inline-block; margin-left: 6px;
  font-size: .62rem; padding: 1px 6px;
  background: #f0faf0; border: 1px solid #b2d8b2;
  border-radius: 3px; color: #3a7a3a;
  vertical-align: middle; font-weight: 700;
}

/* ── Meta line ────────────────────────────────────── */
.meta-line {
  width: 100%; max-width: 820px;
  font-size: .67rem; color: #bbb;
  text-align: right; margin-bottom: 10px;
}

/* ── Query title ──────────────────────────────────── */
.query-title {
  width: 100%; max-width: 820px;
  font-size: .82rem; color: #888;
  margin-bottom: 10px;
}
.query-value {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f4f4f4; border: 1px solid #ddd; border-radius: 2px;
  padding: 2px 9px; vertical-align: middle;
}
.query-value b { color: #333; font-family: ui-monospace, monospace; font-weight: 600; }
.query-value .idn { color: #e8901a; font-size: .78rem; }

/* ── Error / Warning ──────────────────────────────── */
.error {
  width: 100%; max-width: 820px;
  padding: 10px 14px; margin-bottom: 10px;
  background: #fff5f5; border: 1px solid #f5c6c6; border-radius: 2px;
  font-size: .82rem; color: #c0392b;
}
.warn {
  width: 100%; max-width: 820px;
  padding: 10px 14px; margin-bottom: 10px;
  background: #fffde7; border: 1px solid #ffe082; border-radius: 2px;
  font-size: .82rem; color: #b45309;
}

/* ── Donate block ─────────────────────────────────── */
.donate-block {
  width: 100%; max-width: 820px;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; margin-bottom: 10px;
  background: #fff8f0; border: 1px solid #fdd9aa; border-radius: 3px;
}
.donate-text { font-size: .78rem; color: #b45309; flex: 1; }
.donate-btn-img { height: 34px; display: block; }

/* ── Tools grid (index page) ──────────────────────── */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; }
.tool-cell {
  padding: 11px 14px; border-bottom: 1px solid #f0f0f0;
  text-decoration: none; color: inherit;
  transition: background .1s;
}
.tool-cell:hover { background: #fafafa; }
.tool-cell:nth-child(odd)  { border-right: 1px solid #f0f0f0; }
.tool-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tool-cell.dim { pointer-events: none; }
.tc-name { font-size: .8rem; font-weight: 700; color: #e8901a; margin-bottom: 3px; }
.tc-name.dim { color: #ccc; }
.tc-desc { font-size: .72rem; color: #777; line-height: 1.4; }

/* ── Hosted-with block ────────────────────────────── */
.hosted-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 14px;
}
.hosted-item {
  padding: 4px 12px;
  background: #f9f9f9; border: 1px solid #ddd; border-radius: 2px;
  font-size: .78rem; font-weight: 700; color: #555;
  text-decoration: none; transition: background .1s, border-color .1s;
}
.hosted-item:hover { background: #fff4e6; border-color: #e8901a; color: #e8901a; }

/* ── Footer ───────────────────────────────────────── */
.footer {
  width: 100%; max-width: 820px;
  font-size: .68rem; color: #aaa;
  text-align: center; padding-top: 10px;
  line-height: 1.9;
  margin-top: auto;
}
.footer a { color: #e8901a; text-decoration: none; margin: 0 4px; }
.footer a:hover { text-decoration: underline; }
.footer .copy { color: #ccc; }

/* ── Intro box (SEO content block, shown without query) ── */
.intro-box .box-header h1 {
  font-size: .75rem; font-weight: 700; color: #666;
  letter-spacing: .01em; margin: 0; font-family: inherit;
}
.intro-body {
  padding: 11px 14px;
  font-size: .81rem; color: #555; line-height: 1.65;
}
.intro-body p { margin-bottom: 8px; }
.intro-body ul { padding-left: 18px; margin: 0; }
.intro-body li { margin-bottom: 3px; }

/* ── Language switcher ────────────────────────────── */
.lang-switch {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  font-size: .72rem; flex-shrink: 0;
}
.lang-cur {
  font-weight: 700; color: #e8901a;
  padding: 2px 7px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 2px;
}
.lang-alt {
  color: #777; text-decoration: none;
  padding: 2px 7px; border: 1px solid #ddd; border-radius: 2px;
  transition: border-color .1s, color .1s;
}
.lang-alt:hover { color: #e8901a; border-color: #e8901a; }
