* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #050505;
  --muted: #575757;
  --line: #050505;
  --shade: #efefef;
  --focus: #003cff;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.38;
}

body {
  margin: 0;
  padding: 14px;
  min-width: 320px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--focus);
}

.site-header,
main,
footer {
  max-width: 1480px;
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(220px, max-content) 1fr;
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
}

h1,
h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h2 {
  margin-top: 20px;
}

p {
  margin: 9px 0;
  max-width: 86ch;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0 10px;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 13px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a[aria-current="page"] {
  font-weight: 700;
}

.intro {
  max-width: 1000px;
}

.controls,
.submit-review,
.product-index,
.reviews {
  margin-top: 18px;
}

.filter-grid,
.submit-review form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.submit-review form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 5px;
  padding: 7px;
  background: var(--paper);
  min-width: 0;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.3;
  padding: 5px 6px;
}

textarea {
  resize: vertical;
}

button {
  align-self: stretch;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}

button:hover,
button:focus {
  background: var(--ink);
  color: var(--paper);
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.submit-review textarea,
.submit-review button {
  grid-column: span 2;
}

.bot-field {
  display: none;
}

.status {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  padding: 6px 7px;
  overflow-wrap: anywhere;
}

th {
  background: var(--shade);
  font-weight: 700;
}

.col-date {
  width: 11ch;
}

.col-product {
  width: 22ch;
}

.col-meta {
  width: 24ch;
}

.col-body {
  width: auto;
}

.col-meta span,
.variant,
.status,
footer {
  color: var(--muted);
}

.variant {
  display: inline-block;
  margin-top: 4px;
}

tr[hidden] {
  display: none;
}

.product-index table {
  max-width: 760px;
}

.product-index th:nth-child(2),
.product-index td:nth-child(2) {
  width: 10ch;
  text-align: right;
}

.product-index th:nth-child(3),
.product-index td:nth-child(3) {
  width: 10ch;
}

footer {
  margin-top: 22px;
  padding-bottom: 30px;
}

footer a + a {
  margin-left: 12px;
}

@media (max-width: 760px) {
  body {
    padding: 10px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  nav ul {
    justify-content: flex-start;
  }

  .filter-grid,
  .submit-review form {
    grid-template-columns: 1fr;
  }

  .submit-review textarea,
  .submit-review button {
    grid-column: auto;
  }

  table {
    min-width: 780px;
  }
}
