/* The blog and the restaurant pages (server/site.mjs), on top of style.css: tables of numbers, the post list and
   the app's call to action. Uses style.css's tokens; light theme only, like the app. */

.doc.wide {
  max-width: calc(960px + 2 * var(--gutter));
}

.doc.post h2,
.doc.wide h2 {
  margin-top: 48px;
}

.doc.post h2 + p,
.doc.wide h2 + p {
  margin-top: 12px;
}

.crumbs {
  margin-bottom: 18px;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.crumbs a {
  color: var(--text-2);
  text-decoration: none;
}

.crumbs a::before {
  content: "← ";
}

.crumbs a:hover {
  color: var(--ink);
}

/* The page's answer in one paragraph, first. */
.doc .answer {
  padding: 20px 24px;
  border-radius: var(--radius-box);
  background: var(--surface);
}

/* Tables scroll sideways inside their own box on a phone; the page never does. */
.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
}

table.nutrition {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

table.nutrition caption {
  padding: 12px 16px 0;
  text-align: left;
  color: var(--text-2);
}

table.nutrition th,
table.nutrition td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  vertical-align: top;
}

table.nutrition tbody tr:last-child th,
table.nutrition tbody tr:last-child td {
  border-bottom: 0;
}

table.nutrition thead th {
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* The item's name: left, and allowed to wrap. */
table.nutrition th[scope="row"],
table.nutrition thead th:first-child,
table.nutrition td:first-child {
  text-align: left;
  white-space: normal;
  min-width: 11em;
}

table.nutrition th[scope="row"] {
  font-weight: 600;
}

table.nutrition .serving {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 400;
}

table.nutrition a {
  text-decoration-color: var(--faint);
}

.table-note {
  font-size: 0.875rem;
  color: var(--text-2);
}

.doc .table-note {
  margin-top: 10px;
}

/* /restaurants: the chains, A to Z. */
.chain-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 24px;
  margin-top: 28px !important;
  padding: 0 !important;
  list-style: none;
}

.chain-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 !important;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.chain-list .count {
  color: var(--text-2);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* /blog: the posts, newest first. */
.post-list {
  margin-top: 32px !important;
  padding: 0 !important;
  list-style: none;
}

.post-card {
  margin: 0 !important;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.post-card h2 {
  font-size: 1.375rem;
}

.post-card h2 a {
  text-decoration: none;
}

.post-card h2 a:hover {
  text-decoration: underline;
}

.post-card p {
  margin-top: 8px !important;
}

.post-card .updated {
  font-size: 0.875rem;
}

/* The app, once per page, after the content. */
.app-cta {
  margin-top: 56px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.app-cta p {
  margin: 0 !important;
}

.app-cta p + p {
  margin-top: 18px !important;
}

.app-cta .btn {
  min-height: 48px;
  padding: 0 24px;
  white-space: normal;
  text-align: center;
}

.doc .app-cta a.btn {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 600px) {
  .doc .answer,
  .app-cta {
    padding: 18px;
  }

  table.nutrition th,
  table.nutrition td {
    padding: 9px 10px;
  }
}
