
/* --------------------------------------------------------------------------
   Shared foundation. Every rule here is a constraint the previous four builds
   proved necessary, not a style choice -- the look of each site comes from its
   own tokens file, loaded after this one.
-------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; }
/* a 1px border on a max-width:100% image overflows a 320px viewport by 2px --
   the only thing that overflowed the whole of the previous job */
img { box-sizing: border-box; }
a { color: inherit; }
table { max-width: 100%; }

/* Skip link: visually hidden but keyboard-reachable. The 1x1+clip pattern is
   deliberate -- the mobile audit skips clipped elements rather than counting
   this as a failed tap target, which is what it is not. */
.skip {
    position: absolute; left: -1px; top: 0; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
    background: #fff; color: #000; z-index: 999;
    /* NO padding in the hidden state. With box-sizing:border-box a 1px box
       with 10px/16px padding still lays out at 32x20 -- the link was not
       hidden at all, and the mobile audit reported it as a failed tap target
       on every page. Padding belongs to the focused state, which is the only
       state anyone sees. */
    padding: 0;
}
.skip:focus {
    width: auto; height: auto; clip: auto; clip-path: none;
    padding: 10px 16px; left: 0;
}

/* missing-image fallback, wired in js/site.js */
img.img-missing {
    background: repeating-linear-gradient(135deg,#efece6 0 10px,#e6e2d8 10px 20px);
    min-height: 40px; object-fit: contain;
}

@media (max-width: 900px) {
    /* iOS Safari zooms the whole page when a focused control is under 16px.
       Name the CLASSES the stylesheet uses, not just the element types -- a
       bare `input` selector loses on specificity to any `.field` rule and the
       fix ships inert. That happened on the previous job. */
    input, select, textarea, button,
    .field, .field2, input[type="text"], input[type="email"], input[type="tel"] {
        font-size: 16px;
    }
    input, select, textarea, button { min-height: 44px; }
    /* every tap target reaches 44x44 */
    nav a, .nav a, footer a, .btn { min-height: 44px; display: inline-flex;
        align-items: center; }
    /* a.tap is stamped at build time by mark_tap_targets(): a link that is the
       whole of its <p> or <li>. min-WIDTH too -- an inline-flex box shrinks to
       its text, and "Bonjing" is 60px wide however tall it is. */
    a.tap { min-height: 44px; min-width: 44px; display: inline-flex;
        align-items: center; }
    .also li { margin-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------------------
   The theme's own stylesheets ship untouched. Everything here is additive and
   scoped to the blocks this rebuild introduces, so the original rendering is
   unchanged.
-------------------------------------------------------------------------- */
/* The theme's header sits in normal flow but every archived page opens with a
   full-bleed hero that pushes the content clear of it. A page built WITHOUT a
   hero has nothing doing that job, so the navigation printed straight over the
   first two hundred pixels of the menu -- measured, not guessed: .menu-wrap
   ends at 184px while main.content started at 26px. Same class of defect as
   the absolutely-positioned nav on the previous job, and the mobile audit now
   checks landmark blocks for intersection so it cannot come back. */
body.bb-nohero main.content { padding-top: 196px; }
@media (max-width: 991px) { body.bb-nohero main.content { padding-top: 116px; } }
@media (max-width: 767px) { body.bb-nohero main.content { padding-top: 96px; } }

/* --------------------------------------------------------------------------
   Mobile tap targets. Every selector below names markup that was MEASURED at
   under 44x44 in the audit, at 320px and 390px; nothing here is precautionary
   and nothing applies above 900px, so the desktop rendering is byte-for-byte
   what the theme produces.

   The class names matter. sitegen's shared block says `input, select, textarea
   { min-height: 44px }`, and this theme's Contact Form 7 fields carry
   `.wpcf7-form-control { height: 40px }` -- a class selector, which beats a
   bare element selector, so the shared rule shipped inert and the fields
   measured 196x40. Second time that specificity trap has cost a build; the
   answer is to name what the markup actually uses.
-------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* the mobile menu is #mobile-menu-container, NOT the <nav class="nav-bar">
       the shared rule targets -- that nav is .d-none below the md breakpoint,
       so the rule that was written for it never applied to anything a phone
       could see */
    #mobile-menu-container ul.menu li > a,
    #copyright ul.menu li > a {
        min-height: 44px; display: flex; align-items: center;
    }
    input.wpcf7-form-control, textarea.wpcf7-form-control,
    .wpcf7-form input, .wpcf7-form textarea,
    .biziq-review-input, input.biziq-button {
        /* !important, reluctantly and specifically: the plugin ships
           `.wpcf7-form input { min-height: 2.5em !important }`, which is 40px
           at the 16px font iOS requires, and no amount of specificity beats an
           !important without one. Scoped to <=900px, so the desktop form is
           the plugin's own 40px exactly as before. */
        min-height: 44px !important; height: auto; font-size: 16px;
    }
    /* blog and archive listings: the post title and its "read more" are the
       two things a thumb aims at on those pages */
    .thumbnail-post-content h2.title > a,
    a.read-more, .up-down > a,
    .wp-block-latest-posts__post-title,
    main#content ul li > a, main.content ul li > a {
        /* min-WIDTH as well: an inline-flex box shrinks to its text, so the
           sitemap's "Home" and "Blog" links measured 36x44 -- tall enough and
           still too narrow. */
        min-height: 44px; min-width: 44px;
        display: inline-flex; align-items: center;
    }
    /* the carousel arrows are 32px of hit area on a 320px screen */
    .carousel-control-prev, .carousel-control-next { width: 44px; }
}

/* Two elements on /blog/ and the archive templates share id="content", which
   breaks the skip link and every aria reference to it. The duplicate is
   renamed rather than removed, and this class carries the exact declarations
   the theme's `#content` rule was giving it -- verified by measuring the page
   in a browser before and after, not by reading the stylesheet. */
.bb-idcontent { min-height: 500px; width: 100%; }
/* ...and the theme's own mobile override of that rule, which the renamed
   element stopped matching. Without this line /blog/ carried 400px of blank
   space on a phone -- a regression introduced by the duplicate-id fix, found
   by measuring the page rather than by reading the diff. */
@media only screen and (max-width: 768px) { .bb-idcontent { min-height: 0; } }

/* A heading that exists for the document outline and paints nothing. Same
   visually-hidden idiom as the skip link, and the mobile audit knows to
   ignore an element clipped to nothing. */
.skip-h {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
    white-space: nowrap; border: 0;
}

.bb-plan { padding: 24px 0 8px; }
.bb-plan h2 { margin-top: 28px; }
.bb-figs { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
           gap: 16px; margin: 14px 0; }
.bb-figs figure { margin: 0; }
.bb-figs img { width: 100%; border: 1px solid #e2ddd5; }
.bb-hours { border-collapse: collapse; margin: 6px 0 4px; }
.bb-hours th, .bb-hours td { text-align: left; padding: 5px 22px 5px 0;
                             border-bottom: 1px solid #ece7df; font-weight: 400; }
.bb-hours th { white-space: nowrap; }
.bb-dishes { margin: 4px 0 18px; }
.dish { display: flex; gap: 16px; align-items: baseline; justify-content: space-between;
        border-bottom: 1px dotted #ddd5c9; padding: 9px 0; }
.dish .n { font-weight: 600; }
.dish .d { display: block; font-weight: 400; font-size: .92em; color: #5d564c;
           max-width: 62ch; }
.dish .p { white-space: nowrap; font-weight: 600; }
.bb-lead { font-size: 1.06em; }
.bb-note { color: #5d564c; font-style: italic; }
.bb-closing { margin-top: 26px; font-style: italic; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
                   clip: rect(0 0 0 0); clip-path: inset(50%); }
@media (max-width: 900px) {
    .dish { flex-direction: column; gap: 2px; }
}
