/* Screen typography is independent of the compact exported/printed report. */
@media screen {
  :root { --muted: #607168; }
  body { font-size: 16px; line-height: 1.6; }
  .site-header nav { font-size: 14px; }
  .header-tag { font-size: 13px; }
  .lead, .journal-screen .lead { font-size: 16px; line-height: 1.75; }
  .eyebrow, .intro .eyebrow { font-size: 11px; }
  .intro-note { font-size: 14px; }

  .app-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 600px);
    gap: 6px;
    margin-top: 18px;
    padding: 7px;
    border: 1px solid #c5d3bf;
    border-radius: 17px;
    background: #e7eddf;
    box-shadow: 0 3px 12px #183f3609;
  }
  .app-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 11px 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #405649;
    transition: background .15s, color .15s;
  }
  .app-tabs a:hover { background: #d8e3cf; color: var(--green); }
  .app-tabs a[aria-current="page"] {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    box-shadow: 0 2px 5px #183f3620;
  }
  .in-telegram .app-tabs {
    top: 8px;
    padding: 7px;
    background: #e7eddf;
    box-shadow: 0 4px 16px #183f3612;
  }

  label, .field-label { font-size: 14px; line-height: 1.5; }
  .section-title h2, .forecast-panel .section-title h2 { font-size: 19px; line-height: 1.35; }
  .journal-screen h2, .share-dialog h2 { font-size: 20px; }
  .step { flex-basis: 29px; height: 29px; font-size: 12px; }
  .text-button { font-size: 13px; }
  .segmented button { min-height: 43px; font-size: 15px; }
  input[type="number"], select, .cycle-date input,
  .journal-screen input[type="text"], .journal-screen input[type="date"],
  .share-dialog textarea {
    min-height: 48px;
    font-size: 16px;
    line-height: 1.5;
  }
  input::placeholder { font-size: 15px; }
  .input-unit > span { top: 21px; font-size: 13px; }
  .input-unit input { padding-right: 36px; }
  .optional { font-size: 11px; }
  .help, .check, .cycle-settings .check, .share-options .check { font-size: 14px; line-height: 1.7; }
  .check { gap: 10px; }
  .check input { flex-basis: 18px; width: 18px; height: 18px; margin-top: 3px; }
  .range-label output { font-size: 16px; }
  .range-ends, .tiny-label { font-size: 12px; }
  .subheading h3 { font-size: 15px; }
  .advanced summary, .assumptions summary { font-size: 15px; }
  .primary-button, .secondary-button, .danger-button { min-height: 46px; font-size: 14px; }
  .form-error, .error-box, #saveStatus { font-size: 14px; }

  .stat p { font-size: 13px; line-height: 1.5; }
  .stat > div > span, .stat small { font-size: 12px; line-height: 1.5; }
  .macro-label, .macro-grid small, .macro-grid p, .nutrition-footer { font-size: 12px; }
  .chart-legend, .goal-note, .chart-caption, .pill { font-size: 12px; }
  .breakdown-row, .breakdown-row strong, .breakdown-row small { font-size: 13px; }
  .assumptions ul { font-size: 14px; }
  .science-intro, .science-grid p { font-size: 15px; }
  .science-grid h3 { font-size: 18px; }
  .science-grid a, .science-heading > a, .scope-note { font-size: 13px; }
  .source-number { font-size: 11px; }

  .journal-stat span, .journal-stat small,
  .weight-averages span, .weight-averages small { font-size: 13px; line-height: 1.6; }
  .meal-item, .weight-entry { font-size: 14px; }
  .meal-item strong, .journal-empty { font-size: 15px; }
  .meal-item p, .import-label input { font-size: 13px; }
  .privacy-subheading { font-size: 17px; }
  .cycle-status-grid span, .cycle-status-grid small,
  .cycle-guidance, .cycle-source-links, .cycle-message,
  .cycle-chart-note, .cycle-compare { font-size: 13px; line-height: 1.7; }

  @media (max-width: 680px) {
    .app-tabs { width: 100%; }
    .site-header { gap: 12px; }
    .site-header nav { font-size: 12px; gap: 14px; }
    .optional { display: none; }
    .section-title { flex-wrap: wrap; }
    .section-title h2 { flex: 1; }
    .section-title > .text-button { margin-left: auto; }
    .forecast-panel .section-title { flex-wrap: wrap; }
    .nutrition-layout { display: block; }
    .calories {
      min-width: 0;
      padding: 0 0 16px;
      margin-bottom: 16px;
      border: 0;
      border-bottom: 1px solid var(--line);
    }
    .macro-grid { gap: 12px; }
    .science-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 370px) {
    .app-tabs { gap: 4px; padding: 6px; }
    .in-telegram .app-tabs { padding: 6px; }
    .app-tabs a { padding: 10px 5px; font-size: 14px; }
    .site-header { flex-wrap: wrap; height: auto; min-height: 90px; padding-top: 15px; padding-bottom: 15px; }
    .in-telegram .site-header { height: auto; }
    .controls .fields.three, .controls .fields.two { gap: 9px; }
  }
}
