@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/fonts/familjen-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/fonts/familjen-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0;
}

:root {
  color-scheme: light;
  --ink: #111418;
  --body: #3d444d;
  --muted: #5d6570;
  --line: #d9dde2;
  --panel: #f1f3f5;
  --red: #c8281c;
  --red-soft: #fdecea;
  --green: #12724a;
  --green-soft: #e6f4ed;
  --gray-soft: #e9ecef;
  --mock: #0f5f6e;
  --mock-soft: #e3f0f2;
  --display: 'Familjen Grotesk', 'Trebuchet MS', sans-serif;
  --text: 'Instrument Sans', 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #fff;
  color: var(--body);
  font-family: var(--text);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
  overflow-x: clip;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--ink);
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

form {
  display: grid;
  gap: 0.75rem;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 600;
  gap: 0.25rem;
}

label small {
  color: var(--muted);
  font-weight: 400;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #8a929c;
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 0.5rem 0.625rem;
  width: 100%;
}

input[type='radio'],
input[type='checkbox'] {
  width: auto;
}

:focus-visible {
  outline: 2px solid var(--mock);
  outline-offset: 2px;
}

button,
.button {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 600;
  justify-self: start;
  padding: 0.5rem 0.875rem;
  text-decoration: none;
}

button.quiet,
.button.quiet {
  background: #fff;
  color: var(--ink);
}

button:disabled {
  cursor: default;
  opacity: 0.6;
}

pre {
  background: var(--panel);
  border-radius: 4px;
  margin: 0;
  overflow-x: auto;
  padding: 0.625rem 0.75rem;
}

.error {
  color: var(--red);
  font-weight: 600;
  margin: 0;
}

.hint {
  color: var(--muted);
  font-size: 0.875rem;
}

.spacer {
  flex: 1;
}

.visually-hidden {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.narrow {
  margin: 3rem auto;
  max-width: 26rem;
  padding: 0 1rem;
}

.narrow form {
  margin: 1.25rem 0;
}

.brand {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

/* Public tool pages */
.bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 1.5rem);
}

.tool {
  margin: clamp(2rem, 8vw, 4.5rem) auto;
  max-width: 40rem;
  padding: 0 1rem;
}

.tool h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.tool > * + * {
  margin-top: 1rem;
}

.tool-lead {
  font-size: 1.0625rem;
}

.url-form {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 1.5rem;
}

.url-form .error {
  grid-column: 1 / -1;
}

.url-line {
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Analysis result */
.result {
  margin: 0 auto;
  max-width: 76rem;
  padding: 1.25rem clamp(1rem, 3vw, 1.5rem) 3rem;
}

.result-head h1 {
  font-size: clamp(1.375rem, 3.2vw, 1.875rem);
  overflow-wrap: anywhere;
}

.result-head > * + * {
  margin-top: 0.375rem;
}

.disclaimer {
  color: var(--ink);
  font-weight: 600;
}

.device-view {
  margin-top: 1.25rem;
}

.device-view > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.device-view > label {
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
}

.device-view > input:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.device-view > input:disabled + label {
  color: var(--muted);
  cursor: default;
}

.device-view > input:focus-visible + label {
  outline: 2px solid var(--mock);
  outline-offset: 2px;
}

.section-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.section-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  padding-block: 1rem;
}

.crop {
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-height: 40rem;
  min-width: 0;
  overflow: hidden;
}

.crop img {
  margin-inline: auto;
}

.for-desktop {
  display: none;
}

#device-desktop:checked ~ .section-list .for-desktop {
  display: block;
}

#device-desktop:checked ~ .section-list .for-phone {
  display: none;
}

.no-crop {
  color: var(--muted);
  padding: 1rem;
}

.section-note {
  min-width: 0;
}

.section-note h2 {
  font-size: 1.125rem;
}

.section-role {
  color: var(--muted);
  font-size: 0.8125rem;
}

.hypothesis {
  background: var(--panel);
  border-radius: 4px;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.hypothesis h3 {
  font-size: 1.0625rem;
  margin: 0.25rem 0 0.375rem;
}

.hypothesis > * + p {
  margin-top: 0.375rem;
}

.hypothesis blockquote {
  border-top: 1px solid var(--line);
  color: var(--ink);
  margin: 0.5rem 0;
  padding-top: 0.375rem;
}

.reading {
  align-items: center;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 0.375rem;
}

.reading .dot {
  border-radius: 50%;
  display: inline-block;
  height: 0.625rem;
  width: 0.625rem;
}

.reading-red {
  color: var(--red);
}

.reading-red .dot {
  background: var(--red);
}

.reading-green {
  color: var(--green);
}

.reading-green .dot {
  background: var(--green);
}

.reading-gray {
  color: var(--muted);
}

.reading-gray .dot {
  background: #8a929c;
}

/* An alert (page down, form stopped, tag silent, events near the allowance) is said in ink
   with a warning sign: red stays for sections where more people leave. */
.reading-alert {
  color: var(--ink);
}

.reading-alert .dot {
  background: var(--ink);
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-top: 1.5rem;
  padding: 1rem;
}

.panel > * + * {
  margin-top: 0.5rem;
}

.panel h2 {
  font-size: 1.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 52rem) {
  .section-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .crop {
    max-height: 26rem;
  }

  .url-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Signed-in workbench */
.layout {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  min-height: 100vh;
}

.layout > nav {
  align-items: stretch;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100vh;
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
}

.layout > nav strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}

.layout > nav a {
  border-radius: 4px;
  color: var(--body);
  padding: 0.375rem 0.5rem;
  text-decoration: none;
}

.layout > nav a[aria-current='page'] {
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
}

.layout > nav button {
  background: none;
  border: 0;
  color: var(--muted);
  font-weight: 400;
  justify-self: stretch;
  padding: 0.375rem 0.5rem;
  text-align: left;
}

.layout > main {
  max-width: 76rem;
  min-width: 0;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 3rem;
}

.layout > main > * + * {
  margin-top: 1rem;
}

.layout h1 {
  font-size: 1.625rem;
  overflow-wrap: anywhere;
}

.layout h2 {
  font-size: 1.1875rem;
}

.layout h3 {
  font-size: 1rem;
}

.layout h3 small,
td small {
  color: var(--muted);
  font-family: var(--text);
  font-weight: 400;
}

.first-action {
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 1rem;
}

.first-action > * + * {
  margin-top: 0.5rem;
}

.action-title {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

details > summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

.section-note details {
  margin-top: 0.5rem;
}

.why {
  display: grid;
  gap: 0.25rem 1rem;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  margin: 0.5rem 0 0;
}

.why dt {
  color: var(--ink);
  font-weight: 600;
}

.why dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.org-block > * + *,
.site-block > * + *,
.page-side section > * + *,
.test-row > * + *,
.correct > * + * {
  margin-top: 0.5rem;
}

.org-block {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.site-block {
  margin-top: 1rem;
}

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.375rem 0.625rem 0.375rem 0;
  vertical-align: top;
}

td {
  overflow-wrap: anywhere;
}

th.num,
.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

table.compact {
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

table.compact th.num {
  white-space: normal;
}

.result > h2,
.result > section > h2 {
  margin-top: 1.5rem;
}

tr.touched td {
  background: var(--panel);
}

.filters {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.filters label {
  flex: 1 1 10rem;
  max-width: 18rem;
}

.inline-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 0.75rem;
}

.inline-form label {
  flex: 1 1 12rem;
}

.inline-form .error {
  flex-basis: 100%;
}

.record {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
  margin: 0.375rem 0 0;
}

.record dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.record dd {
  color: var(--ink);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin: 0;
}

.page-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
}

.page-side {
  align-content: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.page-grid .section-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.steps {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps > li > * + * {
  margin-top: 0.5rem;
}

.plain {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.plain li {
  overflow-wrap: anywhere;
  padding: 0.125rem 0;
}

.test-row {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

pre code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 52rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout > nav {
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 0.75rem;
    position: static;
  }

  .layout > nav strong {
    margin: 0;
    width: 100%;
  }

  .page-grid,
  .page-grid .section-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .why {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legal section h2 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
