:root {
  color-scheme: light dark;
  --bg: #fbfbf9;
  --text: #1c1d1f;
  --muted: #5b5e63;
  --rule: #dcdcd6;
  --warn: #8c2f21;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --text: #e6e6e3;
    --muted: #a0a3a8;
    --rule: #34363b;
    --warn: #e8998e;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

main,
footer {
  max-width: 38rem;
  margin: 0 auto;
}

/* **Tightened 2026-10-09, after looking at /trove on a 4K display at 175%
   scaling.** Every one of these was generous on its own and they stack: the
   page opened with the title an inch down and spent four rem on each rule
   between sections, so the buy buttons sat at the bottom edge of a large
   screen. Reduced by about a third each, which is visible as air regained and
   not as crowding.                                                          */
main {
  padding-block: 2.75rem 2rem;
}

header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.25;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

.official {
  color: var(--muted);
}

.registry span {
  white-space: nowrap;
}

/* Padding on both sides, so consecutive sections put twice this between a
   rule and the heading under it. That doubling is what made the gap above
   "Licenses" look like a mistake.                                           */
section {
  padding-block: 1.375rem;
  border-bottom: 1px solid var(--rule);
}

section:last-child {
  border-bottom: 0;
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

dl {
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

dd {
  margin: 0 0 1.25rem;
}

dd:last-child {
  margin-bottom: 0;
}

address {
  font-style: normal;
}

.domain-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.copyable {
  font-family: Consolas, ui-monospace, "SF Mono", Menlo, "Roboto Mono", "Liberation Mono", monospace;
  font-size: 1.0625rem;
  -webkit-user-select: all;
  user-select: all;
  overflow-wrap: anywhere;
}

footer {
  padding-block: 1.25rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

.updated {
  margin-top: 0.75rem;
}

@media (max-width: 30rem) {
  main {
    padding-block: 2.75rem 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* ---------------------------------------------------------- legal documents

   The policy pages, built from the drafts by tools/build-legal.mjs. They are
   longer and denser than the company page, so they get a little more room
   between blocks and a narrower measure is not wanted: a defined term and the
   sentence defining it should sit on one line where they can.                */

main.legal {
  max-width: 42rem;
}

main.legal h1 {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

main.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.1875rem;
}

main.legal code {
  font-size: 0.9375em;
  word-break: break-word;
}

main.legal blockquote {
  margin: 1.25rem 0 1.25rem 0;
  padding-left: 1.125rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

main.legal blockquote p {
  margin: 0.5rem 0;
}

main.legal table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

main.legal th,
main.legal td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

main.legal th {
  font-weight: 600;
}

/* So a wide table scrolls rather than pushing the page sideways. */
@media (max-width: 34rem) {
  main.legal table {
    display: block;
    overflow-x: auto;
  }
}

.legal-nav {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

.legal-nav a,
.legal-nav span {
  display: inline-block;
  margin: 0 1.125rem 0.375rem 0;
}

.legal-nav span[aria-current="page"] {
  font-weight: 600;
  color: var(--text);
}

.legal-links {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ------------------------------------------------------------- the buy page

   /trove, which the application's "Buy a license" button opens. Wider than the
   company page because the comparison table has four columns and shrinking the
   measure to fit them would make the prose worse to read than the table is to
   scan.                                                                     */

main.buy {
  max-width: 50rem;
}

.spaced {
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* **The three tiers are the same width, and the browser is not asked to
   choose.** Left to size by content, the Free column gets whatever is left over
   and then wraps "Up to 100 messages" to make up for it -- so the narrowest
   column is the one holding the longest answer, which is backwards. Fixed
   layout gives the three columns the same width whatever is in them, and the
   comparison is read across a row rather than around the wrapping.            */
table.tiers {
  width: 100%;
  margin: 1.25rem 0 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

table.tiers col.feature {
  width: 28%;
}

table.tiers col.tier {
  width: 24%;
}

table.tiers th,
table.tiers td {
  padding: 0.45rem 0.75rem 0.45rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

table.tiers tbody th {
  font-weight: 400;
  color: var(--muted);
}

table.tiers thead th {
  font-size: 1rem;
  font-weight: 600;
}

table.tiers tr.prices td {
  border-bottom: 0;
  padding-top: 0;
}

table.tiers tr.prices strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.once {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

table.tiers tfoot td {
  border-bottom: 0;
  padding-top: 0.875rem;
}

/* **The human test, directly under the buttons it switches on.** Its own
   block rather than a table cell: the widget has a 300px minimum width and a
   tier column is a quarter of the table, which on a phone is about ninety.   */
.human-check {
  margin-top: 1.25rem;
}

.check-state {
  margin: 0.625rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  max-width: 34rem;
}

/* Nothing to say once it has passed: the green tick is the message, and an
   empty paragraph would still take a line.                                   */
.check-state:empty {
  display: none;
}

.check-state.failed {
  color: var(--warn);
}

/* **Deliberately a plain, unanimated button.** The page has no script of its
   own and nothing here needs to feel clever; what a buyer wants is to be able
   to tell which thing they are about to pay for.                             */
table.tiers button {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--text);
  border-radius: 0.3125rem;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

table.tiers button:hover {
  opacity: 0.85;
}

table.tiers button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.tier-note,
.checkout-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.cf-turnstile {
  margin-top: 1.75rem;
}

.checkout-note {
  margin-top: 1rem;
}

main.buy a {
  color: inherit;
}

footer a {
  color: inherit;
}

/* So the four columns scroll rather than pushing the page sideways. The prose
   above and below still fits the screen.                                     */
@media (max-width: 40rem) {
  table.tiers {
    display: block;
    overflow-x: auto;
    font-size: 0.875rem;

    /* Equal columns are worth having when they all fit. Once the table is
       scrolling sideways they are not: sizing by content is what keeps the
       scroll as short as it can be.                                          */
    table-layout: auto;
  }

  table.tiers tbody th {
    min-width: 10rem;
  }
}

/* ------------------------------------------------- the Worker's own pages

   /trove/thanks and /trove/resend are rendered by the Worker rather than
   served from here, but they link to this stylesheet so that they look like
   the rest of the site rather than like a different company's error page.   */

form label {
  display: block;
  margin: 1.5rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

form input[type="email"] {
  width: 100%;
  max-width: 24rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--rule);
  border-radius: 0.3125rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

form button {
  margin-top: 1.25rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--text);
  border-radius: 0.3125rem;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

form button:hover {
  opacity: 0.85;
}

form .cf-turnstile {
  margin-top: 1.5rem;
}

p.after {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* **A button that cannot be pressed has to look like one.** These are enabled
   by Turnstile's callback, so between loading the page and passing the check
   they are genuinely inert -- and a buyer clicking a button that looks ready
   and does nothing is the failure this whole arrangement replaces.           */
table.tiers button[disabled] {
  border-color: var(--rule);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}
