/* The liddat.com family look (same palette and type as where.liddat.com): every site links /shared/liddat.css. */
:root {
  --pink: #ff4d8d; --orange: #ff9f1c; --yellow: #ffd166; --teal: #06d6a0; --blue: #4cc9f0; --purple: #9b5de5;
  --ink: #1b1b3a; --paper: #fffaf3; --muted: #5b5b78; --line: #e8dfd0;
  --good: #06a77d; --bad: #e63946;
  --shadow: 0 8px 0 rgba(27, 27, 58, .18);
  --radius: 22px;
  --font: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--body); color: var(--ink); -webkit-font-smoothing: antialiased;
  background: #ffb36b linear-gradient(135deg, #ff4d8d 0%, #ff9f1c 35%, #ffd166 55%, #06d6a0 80%, #4cc9f0 100%) fixed;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .25;
  background-image: radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px), radial-gradient(circle at 80% 60%, #fff 0 2px, transparent 3px), radial-gradient(circle at 50% 90%, #fff 0 2px, transparent 3px);
  background-size: 180px 180px, 240px 240px, 300px 300px;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }

/* ---------- top bar: the wordmark home and the sister tools ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.wordmark { font-family: var(--font); font-weight: 700; font-size: 26px; letter-spacing: -.5px; color: #fff; text-decoration: none; text-shadow: 0 3px 0 var(--ink); }
.wordmark span { color: var(--yellow); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { font-family: var(--font); font-weight: 600; font-size: 15px; text-decoration: none; background: rgba(255,255,255,.85); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; box-shadow: 0 3px 0 rgba(27,27,58,.2); }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
.tabs a:hover { transform: translateY(-1px); }

/* ---------- a tool page ---------- */
.hero { text-align: center; color: #fff; margin: 8px 0 18px; }
.hero h1 { font-family: var(--font); font-weight: 700; font-size: clamp(34px, 7vw, 56px); line-height: 1; margin: 0; letter-spacing: -1px; text-shadow: 0 5px 0 var(--ink), 0 10px 20px rgba(0,0,0,.2); }
.hero p { font-size: clamp(16px, 2.6vw, 19px); font-weight: 700; margin: 12px auto 0; max-width: 560px; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card h2 { font-family: var(--font); font-weight: 600; font-size: 22px; margin: 0 0 10px; }
.card p, .card li { line-height: 1.55; }

.field { display: block; }
.field > span { display: block; font-family: var(--font); font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-weight: 600; margin-top: 6px; }
.input-row { display: flex; gap: 8px; }
.input-row input {
  flex: 1; min-width: 0; font-family: var(--font); font-weight: 600; font-size: 28px; letter-spacing: 3px; text-transform: uppercase;
  padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; outline: none;
}
.input-row input:focus { box-shadow: 0 0 0 4px var(--yellow); }
.input-row input::placeholder { color: #b8b3c4; letter-spacing: 2px; }
.btn { font-family: var(--font); font-weight: 600; font-size: 16px; border: 3px solid var(--ink); border-radius: 14px; background: var(--yellow); padding: 0 16px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* the answer */
.answer { margin-top: 18px; }
.eyebrow { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.verdict { border: 3px solid var(--ink); border-radius: 18px; padding: 14px 16px; background: #fff; display: grid; gap: 2px; }
.verdict small { font-family: var(--font); font-weight: 600; font-size: 15px; }
.verdict b { font-family: var(--font); font-weight: 700; font-size: clamp(30px, 7vw, 44px); letter-spacing: 2px; line-height: 1.1; word-break: break-all; }
.verdict span { font-weight: 700; color: var(--muted); }
.verdict.good { background: #d9fbef; border-color: var(--good); }
.verdict.good small, .verdict.good b { color: #04694f; }
.verdict.bad { background: #ffe1e4; border-color: var(--bad); }
.verdict.bad small, .verdict.bad b { color: #b0202c; }
.verdict.info { background: #fff4d1; }
.note { font-weight: 700; margin: 12px 0 0; }
.ask { font-weight: 700; background: #fff4d1; border: 3px dashed var(--ink); border-radius: 14px; padding: 12px 14px; margin: 0; }
.fine { font-size: 14px; color: var(--muted); }

table.sums { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
table.sums td { padding: 7px 4px; border-bottom: 2px solid var(--line); vertical-align: top; }
table.sums td:last-child { text-align: right; font-family: var(--font); font-weight: 600; white-space: nowrap; padding-left: 12px; }
table.sums tr.total td { font-weight: 800; border-bottom-color: var(--ink); }
table.sums tr.sub td { color: var(--muted); }

.rules { padding-left: 20px; }
.rules li { margin-bottom: 6px; }
.grid-table { width: 100%; overflow-x: auto; }
.grid-table table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.grid-table th, .grid-table td { border: 2px solid var(--line); padding: 5px 7px; text-align: center; font-family: var(--font); }
.grid-table th { background: #fff4d1; font-weight: 600; }
.grid-table td:first-child, .grid-table th:first-child { text-align: left; }

details { border-top: 2px solid var(--line); padding: 10px 0; }
details:first-of-type { border-top: 0; }
summary { font-family: var(--font); font-weight: 600; font-size: 17px; cursor: pointer; }
details p { margin: 8px 0 0; }

.foot { text-align: center; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 0 rgba(0,0,0,.3); margin-top: 26px; }
.foot a { color: #fff; }

@media (max-width: 520px) {
  .card { padding: 16px; border-width: 3px; }
  .input-row input { font-size: 22px; letter-spacing: 2px; }
  .wordmark { font-size: 22px; }
  .tabs a { font-size: 14px; padding: 3px 11px; white-space: nowrap; }
  /* every tool in one row that scrolls sideways, bleeding to the screen's edges */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: calc(100% + 32px); margin: 0 -16px; padding: 2px 16px 6px; }
  .tabs::-webkit-scrollbar { display: none; }
}
