/* Breakpoints, reduced motion and print for the rules above. */
@media (max-width: 1000px) {
  .shell {
    padding: 0 24px;
  }
  :root {
    --workspace-gap: 18px;
  }
  .workspace {
    gap: var(--workspace-gap);
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
  }
  .panel,
  .plan {
    padding: 20px;
  }
  .recipe-card {
    padding: 17px;
  }
  .recipe-card[aria-pressed='true'] {
    padding: 16px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading h2 {
    font-size: var(--text-lg);
  }
  .section-heading > .text-button {
    max-width: 110px;
    line-height: 1.4;
    text-align: right;
  }
}
@media (max-width: 760px) {
  .shell {
    padding: 0 16px;
  }
  .topbar {
    padding: 16px 0;
  }

  .brand {
    font-size: var(--text-xl);
  }
  /* At phone size the tagline would be 7 px and wrap beside "Print plan": leave it out. */
  .brand small {
    display: none;
  }
  .topbar .button {
    font-size: var(--text-sm);
    gap: 10px;
    padding: 9px 12px;
  }
  .page-heading {
    padding: 25px 0 18px;
  }
  h1 {
    font-size: var(--text-3xl);
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .recipe-card {
    min-height: 154px;
    padding: 17px;
  }
  .recipe-hydration {
    font-size: var(--text-3xl);
  }
  .library-toolbar {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .filters button {
    padding: 7px 13px;
  }
  .library-toolbar > .text-button {
    font-size: var(--text-sm);
  }
  .library-step > summary {
    flex-wrap: wrap;
    gap: 5px;
  }
  .selected-label {
    font-size: var(--text-sm);
    margin-left: 0;
    order: 3;
    width: 100%;
    padding-left: 37px;
  }
  .library-step > summary:after {
    margin-left: auto;
  }
  .library-section {
    margin-bottom: 16px;
  }
  .welcome {
    padding: 22px;
    gap: 16px;
    margin: 22px 0 35px;
  }
  .welcome h2 {
    font-size: var(--text-xl);
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .workspace > form {
    width: 100%;
  }
  .plan {
    position: static;
    width: 100%;
    padding: 24px;
  }
  .panel {
    padding: 19px;
    margin-bottom: 14px;
  }
  .section-heading h2 {
    font-size: var(--text-lg);
  }
  .section-heading {
    margin-bottom: 20px;
  }
  .section-heading > .text-button {
    max-width: none;
    font-size: var(--text-sm);
  }
  .section-number {
    min-width: 24px;
    height: 24px;
    margin-right: 6px;
  }
  .batch-modes {
    margin-bottom: 18px;
  }
  .phase-editor {
    padding: 13px;
  }
  .form-actions {
    align-items: center;
  }
  .form-actions .button {
    padding: 12px 14px;
    gap: 12px;
  }
  .form-actions p {
    font-size: var(--text-sm);
  }
  .fields {
    gap: 12px;
  }
  footer {
    font-size: var(--text-sm);
    flex-direction: column;
    gap: 8px;
  }
  .ingredient-table th:nth-child(1) {
    width: 36%;
  }
  .ingredient-table th:nth-child(2) {
    width: 35%;
  }
  .ingredient-table th:nth-child(3) {
    width: 29%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
}
@media print {
  body {
    background: white;
  }
  .shell {
    padding: 0;
  }
  .topbar,
  .page-heading,
  .library-section,
  #welcome,
  #calculator,
  footer,
  .plan-actions,
  .skip-link,
  dialog {
    display: none !important;
  }
  .workspace {
    display: block !important;
  }
  .plan {
    position: static;
    background: white;
    border: 0;
    width: 100%;
    padding: 0;
    max-width: none;
  }
  .plan-top h2 {
    font-size: 26px;
  }
  .disclosure {
    display: none;
  }
  .timeline li {
    break-inside: avoid;
  }
  .plan-stats {
    margin: 14px 0;
  }
  .reliability {
    font-size: 11px;
  }
}
