/* Content pages (guides, tools, printables). Variables come from /style.css. */

.content-page {
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 320px);
  background-repeat: no-repeat;
  background-color: var(--sky-bottom);
}

/* ---------- Header and footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-brand img {
  border-radius: 10px;
}

.header-cta {
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 0 #16151a;
  transition: transform 120ms ease;
}

.header-cta:hover {
  transform: translateY(-1px);
}

.site-footer {
  margin-top: 72px;
  padding: 40px 16px 28px;
  background: var(--near-snow);
  font-size: 14px;
  /* Darker than --ink-soft: the blue footer needs it for 4.5:1 contrast. */
  color: rgba(46, 44, 48, 0.85);
}

.footer-grid {
  display: grid;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 8px;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-about .site-brand {
  color: var(--ink);
}

.footer-about p {
  max-width: 32ch;
  margin: 12px 0;
  line-height: 1.5;
}

.footer-survey {
  font-weight: 600;
  color: #34418a;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 960px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(46, 44, 48, 0.12);
  font-size: 13px;
  color: rgba(46, 44, 48, 0.8);
}

.footer-legal span {
  margin-right: auto;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

/* ---------- Hub cards ---------- */

.cards {
  display: grid;
  gap: 12px;
  margin: 16px 0 8px;
}

.article a.card {
  display: block;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(46, 44, 48, 0.08), 0 4px 16px rgba(46, 44, 48, 0.05);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.article a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(46, 44, 48, 0.08), 0 8px 24px rgba(46, 44, 48, 0.1);
}

.card-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.card-text {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Article ---------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 0;
  font-size: 17px;
  line-height: 1.65;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
}

.article .crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

.article h1 {
  max-width: none;
  margin: 16px 0 0;
  font-size: 34px;
  line-height: 1.1;
}

.lede {
  margin: 12px 0 0;
  font-size: 19px;
  color: var(--ink-soft);
}

.meta {
  margin: 12px 0 32px;
  font-size: 13px;
  color: var(--ink-faint);
}

.article h2 {
  margin: 48px 0 12px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article h3 {
  margin: 28px 0 8px;
  font-size: 20px;
}

.article p,
.article li {
  color: rgba(46, 44, 48, 0.85);
}

/* :where() keeps this rule weak, so breadcrumbs, cards and buttons can override it. */
.article a:where(:not(.cta-button):not(.button)) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article ul,
.article ol {
  padding-left: 22px;
}

.article li + li {
  margin-top: 6px;
}

.article strong {
  color: var(--ink);
}

.callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: #fff;
}

.callout p {
  margin: 0;
}

.sources {
  font-size: 14px;
}

/* ---------- Tables ---------- */

.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(46, 44, 48, 0.08), 0 4px 16px rgba(46, 44, 48, 0.05);
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.article th,
.article td {
  padding: 10px 14px;
  border-bottom: 1px solid #eceef3;
  text-align: left;
  vertical-align: top;
}

.article th {
  background: #f4f6fb;
  font-weight: 600;
  white-space: nowrap;
}

.article tr:last-child td {
  border-bottom: 0;
}

/* ---------- FAQ ---------- */

.faq details {
  margin: 10px 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  margin: 10px 0 0;
}

/* ---------- CTA ---------- */

.cta {
  display: flex;
  gap: 16px;
  margin: 48px 0 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--sky-top);
}

.cta img {
  flex-shrink: 0;
  border-radius: 12px;
}

.cta p {
  margin: 0 0 12px;
  font-size: 15px;
}

.cta .cta-title {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.cta-button,
.button {
  display: inline-block;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 0 #16151a;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.cta-button:hover,
.button:hover {
  transform: translateY(-1px);
}

.cta-button:active,
.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #16151a;
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 0 #c9ccd6;
}

/* ---------- Related ---------- */

.related ul {
  padding-left: 22px;
}

/* ---------- Tools ---------- */

.tool {
  margin: 8px 0 32px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(46, 44, 48, 0.08), 0 8px 24px rgba(46, 44, 48, 0.06);
}

.tool label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.tool textarea,
.tool input,
.tool select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d9e2;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.tool textarea {
  min-height: 120px;
  resize: vertical;
}

.tool .hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.tool-grid {
  display: grid;
  gap: 16px;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .tool-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* Chore wheel */

.wheel-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.wheel-box {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
}

.wheel-box canvas {
  width: 100%;
  height: 100%;
}

.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -14px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid var(--ink);
}

.wheel-result {
  min-height: 1.6em;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

/* Chore chart (tool output and printables) */

.chart {
  margin-top: 24px;
}

.chart-sheet {
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fff;
}

.chart-sheet h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.chart-sheet .chart-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-faint);
}

.chart-sheet table {
  font-size: 14px;
}

.chart-sheet th,
.chart-sheet td {
  padding: 8px 6px;
  border: 1px solid #c9ccd6;
  text-align: center;
}

.chart-sheet td:first-child,
.chart-sheet th:first-child {
  text-align: left;
}

.chart-sheet .box {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #9a9daa;
  border-radius: 5px;
}

.chart-sheet .who {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
}

.chart-sheet .chart-foot {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- Print ---------- */

@media print {
  .no-print,
  .site-header,
  .site-footer,
  .crumbs,
  .meta,
  .cta,
  .related,
  .faq,
  .print-hide {
    display: none !important;
  }

  .content-page {
    background: #fff;
  }

  /* On a page with a chart, print only the chart. */
  .has-chart .article > *:not(.print-area) {
    display: none !important;
  }

  .print-area .tool {
    padding: 0;
    box-shadow: none;
  }

  .print-area .tool > *:not(.chart) {
    display: none !important;
  }

  .chart-sheet {
    border-width: 1px;
    break-inside: avoid;
  }

  .article {
    max-width: none;
    padding: 0;
  }
}

@media (min-width: 640px) {
  .article h1 {
    font-size: 44px;
  }
}
