/* oxcel.pages.dev: one page plus the policies. Brand colours from brand/README.md. */

:root {
  --paper: #ffffff;
  --ink: #1a1614;
  --muted: #6b635d;
  --rule: #e6e0d8;
  --head: #f6f0e7;       /* spreadsheet header cells: bone, lightened */
  --bone: #f2e4cf;
  --ox: #6b1e19;         /* the brand colour: actions, the selected cell */
  --ox-text: #6b1e19;    /* oxblood as text/links (lighter in dark mode) */
  --btn: #6b1e19;
  --btn-text: #f2e4cf;   /* bone on oxblood: 9.3 : 1 */
  --focus: #6b1e19;
  --code: #f6f0e7;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1614;
    --ink: #f2e4cf;
    --muted: #b3a89c;
    --rule: #3a322d;
    --head: #241e1b;
    --bone: #3b2a25;
    --ox: #d66a5e;
    --ox-text: #e48a7f;
    --focus: #e48a7f;
    --code: #241e1b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1614;
  --ink: #f2e4cf;
  --muted: #b3a89c;
  --rule: #3a322d;
  --head: #241e1b;
  --bone: #3b2a25;
  --ox: #d66a5e;
  --ox-text: #e48a7f;
  --focus: #e48a7f;
  --code: #241e1b;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  /* Short pages keep the footer at the bottom. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1;
  width: 100%;
}

a {
  color: var(--ox-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--paper);
  padding: 6px 10px;
}

/* ---- header -------------------------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  color: var(--ox);
  display: inline-flex;
  line-height: 0;
}
.brand svg {
  height: 28px;
  width: auto;
}
.top nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9375rem;
}
.top nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
}
.top nav a:not(.btn):hover {
  color: var(--ox-text);
}

.btn {
  display: inline-block;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6em 1.05em;
  border-radius: 7px;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover {
  background: #7d2620;
  text-decoration: none;
}
.btn.small {
  font-size: 0.9375rem;
  padding: 0.45em 0.85em;
}

/* ---- type ---------------------------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, Roboto, sans-serif;
  color: var(--ink);
  margin: 0;
}
h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
h2 {
  font-size: clamp(1.625rem, 3.4vw, 2.125rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}
p {
  margin: 0;
}
.lede {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 36em;
}
.muted {
  color: var(--muted);
}

/* ---- sections ------------------------------------------------------------------------------ */

main > section {
  padding-top: clamp(56px, 9vw, 104px);
}
main > section > .wrap > h2 + * {
  margin-top: 20px;
}
.prose {
  max-width: 36em;
}
.prose p + p {
  margin-top: 0.9em;
}

.hero {
  padding-top: clamp(28px, 6vw, 64px);
}
.hero .lede {
  margin-top: 22px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 30px;
}

/* ---- the billion-row sheet ----------------------------------------------------------------- */

.sheet {
  --row: 28px;
  margin-top: clamp(40px, 6vw, 64px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  font-size: 0.8125rem;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.fbar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
  height: 34px;
}
.fbar label {
  display: flex;
}
.namebox {
  width: 14.5ch;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
  user-select: text;
  -webkit-user-select: text;
}
.namebox:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  border-radius: 0;
}
.fx {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-style: italic;
  border-right: 1px solid var(--rule);
}
.fval {
  display: flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.grid {
  position: relative;
  display: flex;
  outline: none;
  touch-action: none;
}
.grid:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}
.cells {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.r {
  display: grid;
  grid-template-columns: var(--cols);
  height: var(--row);
}
.sheet {
  --cols: 11ch 11ch 11ch 9ch 14ch 6ch 10ch 12ch minmax(0, 1fr);
}
.c {
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: cell;
}
.c.num {
  justify-content: flex-end;
}
.c.pad {
  cursor: default;
  border-right: 0;
}
.r.letters .c,
.c.rh {
  background: var(--head);
  color: var(--muted);
  justify-content: center;
  cursor: default;
}
.c.rh {
  justify-content: flex-end;
}
.r.fields .c:not(.rh) {
  font-weight: 650;
}
.r.sel .c.rh,
.r.letters .c.sel {
  background: var(--bone);
  color: var(--ink);
}
.c.active {
  box-shadow: inset 0 0 0 2px var(--ox);
}

.vbar {
  position: relative;
  width: 14px;
  flex: none;
  border-left: 1px solid var(--rule);
  background: var(--head);
  cursor: default;
}
.thumb {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 0;
  min-height: 28px;
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.55;
}
.vbar:hover .thumb,
.thumb.drag {
  opacity: 0.85;
}

.sbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
  padding: 9px 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.sbar .msg {
  color: var(--ink);
}
.caption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Excel's last row, marked where it passes. */
.r.limit .c {
  border-bottom: 2px solid var(--ox);
}
.r.limit .c.pad {
  color: var(--ox-text);
  font-weight: 600;
}

/* The measured figures under the demo. */
.speed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(16px, 4vw, 48px);
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}
.speed li {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
  color: var(--muted);
  line-height: 1.35;
}
.speed strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(3rem, 7.5vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}
.speed strong span {
  margin-left: 0.12em;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ox-text);
}
@media (max-width: 560px) {
  .speed {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .speed li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 0;
    border-top-width: 1px;
  }
  .speed li:first-child {
    border-top-width: 2px;
  }
  .speed strong {
    flex: none;
    min-width: 5.4ch;
    margin: 0;
    font-size: 2.5rem;
  }
}
@media (max-width: 720px) {
  /* Too narrow for the label: the line under the row says it. */
  .r.limit .c.pad {
    color: transparent;
  }
}

/* Narrow screens: drop the date, product and unit price columns. */
@media (max-width: 720px) {
  .sheet {
    --cols: 12ch 10.5ch 8ch 4ch 9ch minmax(0, 1fr);
    font-size: 0.75rem;
  }
  .c.col-B,
  .c.col-D,
  .c.col-F {
    display: none;
  }
  .fx {
    display: none;
  }
}

/* ---- numbers -------------------------------------------------------------------------------- */

.bench {
  width: 100%;
  max-width: 52rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.bench th,
.bench td {
  text-align: left;
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.bench thead th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.875rem;
}
.bench tbody th {
  font-weight: 400;
}
.bench td {
  font-weight: 600;
  white-space: nowrap;
}
.bench td span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: normal;
}
.table-scroll {
  overflow-x: auto;
}
.note {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 44em;
}

/* ---- what it does -------------------------------------------------------------------------- */

.does {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 56px;
  margin: 0;
  max-width: 60rem;
}
.does div {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.does dt {
  font-weight: 650;
  line-height: 1.35;
}
.does dd {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 34em;
}
@media (max-width: 720px) {
  .does {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ---- price, install ------------------------------------------------------------------------ */

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.price strong {
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plain {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  max-width: 36em;
}
.plain li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.plain li:first-child {
  border-top: 1px solid var(--rule);
}
.fine {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 36em;
}

.steps {
  margin: 22px 0 0;
  padding-left: 1.4em;
  max-width: 40em;
}
.steps li {
  padding-left: 0.3em;
}
.steps li + li {
  margin-top: 18px;
}
.cmd {
  display: flex;
  align-items: stretch;
  margin-top: 10px;
  max-width: 34rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--code);
  overflow: hidden;
}
.cmd code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font: 0.875rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}
.cmd button {
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: 600 0.8125rem/1 inherit;
  font-family: inherit;
  padding: 0 14px;
  cursor: pointer;
}
.cmd button:hover {
  color: var(--ox-text);
}

/* ---- questions ----------------------------------------------------------------------------- */

.faq {
  max-width: 44rem;
  margin-top: 16px;
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq details:first-child {
  border-top: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  padding: 15px 28px 15px 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 13px;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--muted);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details > div {
  padding: 0 0 18px;
  color: var(--muted);
  max-width: 38em;
}
.faq details > div p + p {
  margin-top: 0.7em;
}

/* ---- footer -------------------------------------------------------------------------------- */

footer {
  margin-top: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  font-size: 0.875rem;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: baseline;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer nav a {
  color: var(--ink);
}
footer .who {
  flex-basis: 100%;
}

/* ---- policy pages -------------------------------------------------------------------------- */

.doc {
  padding-top: clamp(24px, 5vw, 48px);
  max-width: 44rem;
}
.doc h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  max-width: none;
}
.doc .updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.doc h2 {
  font-size: 1.25rem;
  margin-top: 36px;
  max-width: none;
}
.doc p,
.doc ul {
  margin: 12px 0 0;
  max-width: 38em;
}
.doc ul {
  padding-left: 1.2em;
}
.doc li + li {
  margin-top: 6px;
}

@media (max-width: 560px) {
  .top nav .hide-s {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
