/* RemarkableCloud Tools design system. Brand tokens from docs/BRAND.md. */
:root {
  --navy-950: #011640;
  --navy-900: #0a2258;
  --primary: #1C389A;
  --accent: #4F80FF;
  --accent-soft: #A7BDF6;
  --light: #E6EFFF;
  --page: #F4F7FF;
  --ink: #303030;
  --body: #55607a;
  --muted: #8a93a8;
  --line: #dde5f5;
  --card: #ffffff;
  --pass: #0e9f6e;
  --pass-bg: #e6f7f1;
  --warn: #c27803;
  --warn-bg: #fdf6e3;
  --fail: #e02424;
  --fail-bg: #fdeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(1, 22, 64, 0.05), 0 8px 24px -12px rgba(1, 22, 64, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy-950); font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand .tag { color: var(--accent); font-weight: 600; }
.head-cta {
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 8px;
}
.head-cta:hover { text-decoration: none; filter: brightness(1.06); }

/* Hero */
.hero { padding: 52px 0 34px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; margin: 0 0 12px; color: var(--navy-950); letter-spacing: -0.02em; }
.hero p { color: var(--body); max-width: 620px; margin: 0 auto; font-size: 17px; }

/* Input row */
.run-row { display: flex; gap: 10px; max-width: 640px; margin: 26px auto 0; }
.run-row input[type="text"] {
  flex: 1; font-size: 17px; padding: 14px 18px; border: 2px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); outline: none;
  transition: border-color 0.15s;
}
.run-row input[type="text"]:focus { border-color: var(--accent); }
.btn {
  background: var(--accent); color: #fff; border: 0; font: inherit; font-weight: 700;
  font-size: 16px; padding: 14px 26px; border-radius: 10px; cursor: pointer;
  transition: transform 0.06s, filter 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: wait; }
.btn-ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }

/* Tool grid (hub) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 8px 0 60px; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: block; color: inherit;
  transition: transform 0.12s, border-color 0.12s;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent-soft); text-decoration: none; }
.tool-card .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--light); display: grid; place-items: center; margin-bottom: 14px; color: var(--primary); }
.tool-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy-950); }
.tool-card p { margin: 0; color: var(--body); font-size: 14px; }
.tool-card .soon { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--page); border: 1px solid var(--line); padding: 2px 9px; border-radius: 99px; }

/* Results */
.results { max-width: 860px; margin: 8px auto 40px; }
.summary {
  display: flex; align-items: center; gap: 22px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.grade-ring { position: relative; width: 92px; height: 92px; flex: none; }
.grade-ring svg { transform: rotate(-90deg); }
.grade-ring .track { stroke: var(--light); }
.grade-ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.grade-ring .label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--navy-950); }
.summary h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy-950); }
.summary .sub { color: var(--body); font-size: 14px; margin: 0; }
.summary .counts { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.chip.pass { color: var(--pass); background: var(--pass-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.chip.fail { color: var(--fail); background: var(--fail-bg); }
.chip.info { color: var(--primary); background: var(--light); }

.check {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 10px; padding: 0; margin-bottom: 10px; overflow: hidden;
  opacity: 0; transform: translateY(6px); animation: rise 0.3s ease forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.check summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; font-weight: 600; color: var(--navy-950); font-size: 15px;
}
.check summary::-webkit-details-marker { display: none; }
.check .status { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.check.pass { border-left-color: var(--pass); } .check.pass .status { background: var(--pass); }
.check.warn { border-left-color: var(--warn); } .check.warn .status { background: var(--warn); }
.check.fail { border-left-color: var(--fail); } .check.fail .status { background: var(--fail); }
.check.info { border-left-color: var(--accent); } .check.info .status { background: var(--accent); }
.check .quick { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; text-align: right; }
.check .body { padding: 2px 18px 16px 52px; color: var(--body); font-size: 14px; }
.check .body .what { margin: 0 0 8px; }
.check .body .why { margin: 0 0 8px; }
.check .body .fix { margin: 0; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.check .body .fix strong { color: var(--navy-950); }
.check .body code { background: var(--light); padding: 1px 6px; border-radius: 5px; }

.pending {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 10px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 10px;
  color: var(--muted); font-size: 14px;
}
.spinner { width: 16px; height: 16px; border: 2px solid var(--light); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Share bar */
.share-bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin: 4px 0 14px; }
.share-bar button { font-size: 13px; padding: 8px 14px; }

/* Conversion block */
.sell {
  background: linear-gradient(135deg, var(--navy-950), var(--primary));
  color: #fff; border-radius: var(--radius); padding: 28px 30px; margin: 26px 0 10px;
  box-shadow: var(--shadow);
}
.sell h3 { margin: 0 0 8px; font-size: 20px; color: #fff; }
.sell p { margin: 0 0 6px; color: var(--accent-soft); font-size: 15px; }
.sell ul { margin: 10px 0 16px; padding: 0 0 0 18px; color: #dbe6ff; font-size: 14px; }
.sell li { margin: 3px 0; }
.sell .btn { background: var(--accent); }
.sell small { display: block; margin-top: 12px; color: #93a7d9; }

/* Tables (propagation) */
.res-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.res-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--page); }
.res-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.res-table tr:last-child td { border-bottom: 0; }
.res-table td.ok { color: var(--pass); font-weight: 700; }
.res-table td.no { color: var(--fail); font-weight: 700; }

/* Calculator */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto 40px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 14px; font-size: 16px; color: var(--navy-950); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--body); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 14px;
  border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; }
.big-number { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.vs { text-align: center; padding: 14px 0 4px; color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.cmp { border-radius: 10px; padding: 18px; }
.cmp.theirs { background: var(--page); border: 1px solid var(--line); }
.cmp.ours { background: linear-gradient(135deg, var(--navy-950), var(--primary)); color: #fff; }
.cmp.ours .lbl { color: var(--accent-soft); }
.cmp .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }

.footnote { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0 44px; }
.footnote a { color: var(--muted); text-decoration: underline; }

@media (max-width: 720px) {
  .calc-grid { grid-template-columns: 1fr; }
  .run-row { flex-direction: column; }
  .summary { flex-direction: column; text-align: center; }
  .summary .counts { justify-content: center; }
  .check .quick { display: none; }
}
