/* Free tools for the public website. D1 Ice colours, copied from
   design-system/d1/tokens.css so the pages deploy as plain static files. */
:root {
  --canvas: #d3d2d8;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --ice: #cde3e6;
  --lilac: #ddd3ea;
  --text: #16181b;
  --text-secondary: #56616c;
  --text-muted: #646f79;
  --border: #82909f;
  --focus: #355cc9;
  --action: #181a1e;
  --action-hover: #2b3037;
  --on-action: #ffffff;
  --warn: #8a4b00;
  --error: #a3262a;
  --ok: #276247;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: linear-gradient(160deg, var(--ice), var(--lilac));
  min-height: 100vh;
}
header.site,
footer.site {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
header.site a.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
main {
  max-width: 960px;
  margin: 0 auto 32px;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgb(22 24 27 / 8%);
}
@media (max-width: 640px) {
  main {
    margin: 0 8px 24px;
    padding: 20px 16px;
  }
}
h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 8px;
}
p.lead,
.muted {
  color: var(--text-secondary);
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}
input,
textarea,
select {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
textarea {
  resize: vertical;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stack {
  display: grid;
  gap: 16px;
}
button,
.button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--action);
  color: var(--on-action);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  background: var(--action-hover);
}
button.secondary {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
}
.output {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 14px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}
.tools {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tools a {
  display: block;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  height: 100%;
}
.tools a:hover {
  background: var(--ice);
}
.tools strong {
  display: block;
  margin-bottom: 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--surface-soft);
}
.over {
  color: var(--error);
  font-weight: 600;
}
.near {
  color: var(--warn);
  font-weight: 600;
}
.fine {
  color: var(--ok);
}
.cta {
  margin-top: 28px;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface-soft);
}
canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--surface-soft);
}
