/* Bounded homeowner polish from the approved design boards. Keep this after
   dark-theme.css. Screen-only rules leave the existing paper previews alone. */
@media screen {
  /* main is a 1280px border box with a 1192px inner rail. Percentage-based
     outer gutters use the containing width, avoiding a scrollbar-width drift. */
  body.dark-theme .header,
  body.dark-theme footer {
    padding-left: max(44px, calc((100% - 1192px) / 2));
    padding-right: max(44px, calc((100% - 1192px) / 2));
  }
  body.dark-theme main {
    padding-left: 44px;
    padding-right: 44px;
  }

  /* Do not compete with the compact heading used during a conversation. */
  body.dark-theme .primary-home-help:not(.has-conversation) .help-title-row h1 {
    font-size: 48px;
    letter-spacing: -.035em;
  }
  body.dark-theme .primary-home-help:not(.has-conversation) .help-framing > p:not(.help-safety-note) {
    font-size: 18px;
  }

  /* A minimum row height, rather than a fixed height, lets long titles and
     larger text wrap without clipping a tool or its secondary description. */
  body.dark-theme .tool-link {
    min-height: 96px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  body.dark-theme .tool-icon .icon { width: 30px; height: 30px; }
  body.dark-theme .tool-copy strong { font-size: 18px; }
  body.dark-theme .tool-copy > span { font-size: 15px; }
  body.dark-theme .tool-copy small { font-size: 14px; }

  /* The existing submit button retains the composer's filled amber emphasis. */
  body.dark-theme #help-form .chat-tools .text-button {
    min-height: 44px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    background: transparent;
  }
  body.dark-theme #help-form .chat-tools .text-button:hover {
    color: var(--ink);
    text-decoration: underline;
  }

  body.dark-theme .home-record,
  body.dark-theme .home-task,
  body.dark-theme .home-empty {
    border-radius: 12px;
    padding: 24px;
  }
}

@media screen and (max-width: 700px) {
  body.dark-theme .header,
  body.dark-theme main,
  body.dark-theme footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  body.dark-theme .primary-home-help:not(.has-conversation) .help-title-row h1 {
    font-size: 32px;
  }
  body.dark-theme .tool-icon .icon { width: 28px; height: 28px; }
  body.dark-theme .tool-copy strong { font-size: 17px; }
  body.dark-theme .tool-copy > span,
  body.dark-theme .tool-copy small { font-size: 14px; }
  body.dark-theme #help-form .chat-tools .text-button { font-size: 14px; }
  body.dark-theme .home-record,
  body.dark-theme .home-task,
  body.dark-theme .home-empty { padding: 16px; }
}

@media screen and (max-width: 360px) {
  body.dark-theme .header,
  body.dark-theme main,
  body.dark-theme footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media screen {
 body.dark-theme .vendor-row .vendor-category { color:var(--ink); font-size:1.0625rem; font-weight:650; }
 body.dark-theme .vendor-row .vendor-company { color:var(--muted); font-size:.9375rem; font-weight:450; }
 body.dark-theme .vendor-row .vendor-link:hover .vendor-category { text-decoration:underline; text-underline-offset:3px; }
 body.dark-theme .help-vendor-service { color:var(--ink); }
 body.dark-theme .help-vendor-company { color:var(--muted); }
}

/* Restrained owner-requested finishing pass: existing components and layout. */
@media screen {
 body.dark-theme .button:not(.outline):not(:disabled) { color:#171b1f; background:linear-gradient(180deg,#ffcf79,#ffbf54); box-shadow:0 2px 8px rgba(0,0,0,.2); }
 body.dark-theme .button:not(.outline):not(:disabled):hover { background:#ffcf7c; box-shadow:0 3px 12px rgba(0,0,0,.26); }
 body.dark-theme .button.outline { border-color:#8b969d; }
 body.dark-theme .chat-answer a:not(.button), body.dark-theme .home-actions a.text-button, body.dark-theme .home-record a:not(.button) { color:#ffcf7c; text-decoration:underline; text-underline-offset:3px; }
 body.dark-theme .home-record .text-button:not(:disabled), body.dark-theme .home-next-task .text-button { color:#ffcf7c; }
 body.dark-theme .home-record, body.dark-theme .home-task, body.dark-theme .maintenance-month { box-shadow:0 3px 14px rgba(0,0,0,.15); }
 body.dark-theme .home-next-maintenance h3, body.dark-theme .maintenance-month-heading h3 { color:#ffcf7c; }
 body.dark-theme :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid #ffe2a4; outline-offset:3px; }
 body.dark-theme .manual-lookup-outcome, body.dark-theme .chat-assistant .manual-lookup-outcome { color:#ffd0c7; background:#3b2421; border-color:#b96b5c; }
 body.dark-theme .manual-lookup-outcome a { color:#ffcf7c; }
 body.dark-theme #primary-nav a[aria-current="page"] { color:#ffcf7c; text-decoration:underline; text-underline-offset:5px; }
}
