/* ============================================================================
   Buy-RealTraffic.com - "New Look" stylesheet
   Built 26 Aug 2026 for Dan. Palette locked to his three colours:
   black #000000, white #ffffff, tan #D2B48C.

   This file only ever ADDS rules on top of tooplate_style.css and
   responsive.css. Nothing in either of those files is edited, so removing
   the one <link> that loads this file returns the site to exactly how it
   looks today.

   Written fresh. It deliberately does NOT reuse the stylesheet from the
   warrior3 clone page - that page is an exact copy of someone else's
   design and its CSS is not ours to move onto this site.
   ========================================================================= */

:root {
  --brt-tan:        #D2B48C;
  --brt-tan-soft:   #e3cfb2;
  --brt-tan-deep:   #a8875c;

  /* dark scheme (default) */
  --brt-page:       #0a0a0a;   /* the big content surface           */
  --brt-panel:      #101010;   /* the framed panel inside it        */
  --brt-card-a:     #1b1b1b;   /* card gradient, top               */
  --brt-card-b:     #0d0d0d;   /* card gradient, bottom            */
  --brt-text:       #e8e8e8;
  --brt-muted:      #b0b0b0;
  --brt-head:       #ffffff;
  --brt-rule:       rgba(210,180,140,.30);
  --brt-glow:       rgba(210,180,140,.20);
  --brt-shadow:     rgba(0,0,0,.55);

  /* how wide running text is allowed to get, even on a huge monitor */
  --brt-read:       1180px;
}

/* ---- light scheme: same design, white paper, dark cards ----------------- */
html[data-brt-theme="light"] {
  --brt-page:       #f4f1ec;
  --brt-panel:      #ffffff;
  --brt-card-a:     #1b1b1b;
  --brt-card-b:     #0d0d0d;
  --brt-text:       #1a1a1a;
  --brt-muted:      #4a4a4a;
  --brt-head:       #000000;
  --brt-rule:       rgba(0,0,0,.14);
  --brt-glow:       rgba(0,0,0,.10);
  --brt-shadow:     rgba(0,0,0,.18);
}

/* ========================================================================
   1. FULL WIDTH
   The page is capped at 1000px today, which is what makes the empty
   strips down both sides. Backgrounds, the menu strip, the banner row
   and the footer now run edge to edge; running text is still capped so
   a sentence does not stretch to 200 characters on a wide monitor.
   ===================================================================== */
/* The theme paints the page white on <body>, and #tooplate_main does not run
   the full height - on the home page there is a 320px strip between the end
   of the main block and the footer holding the bottom banner and the three
   promo cards. That strip was showing as a white band across a black page.
   Painting the body itself is the fix; it also covers any short page where
   the content does not reach the bottom of the window. */
html, body { background: var(--brt-page) !important; color: var(--brt-text); }
#tooplate_wrapper                          { max-width: none !important; }
#tooplate_wrapper > div[style*="box-shadow"] {
  max-width: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* the banner + header row is rebuilt in section 12 (logo left, nav right) */

#tooplate_main {
  background: var(--brt-page) !important;
  color: var(--brt-text);
  padding: 30px 20px 46px !important;
  border-top: none;
}
#tooplate_content {
  max-width: var(--brt-read);
  margin: 0 auto;
  padding-left: 0 !important;
}

/* ========================================================================
   2. THE CONTENT PANEL
   Verified against the live DOM rather than assumed. The white block on
   the page today is table#AutoNumber1[bgcolor="#ffffff"] sitting directly
   in #tooplate_content; the tan call-to-action further down is a separate
   div.shadowed nested inside it. They need opposite treatment, so they
   are handled separately below.
   ===================================================================== */
/* Every one of these must lose its white bgcolor or it renders as a white
   slab on a black page - but the default is TRANSPARENT, not the panel
   colour. First time round I set them all to var(--brt-panel) #101010, which
   against the page at #0a0a0a is a slightly lighter rectangle: I had removed
   the border but the empty spacer tables were still visible as faint boxes,
   which is exactly what Dan came back about. Transparent means invisible. */
#tooplate_main [bgcolor="#ffffff"],
#tooplate_main [bgcolor="#FFFFFF"] {
  background-color: transparent !important;
  color: var(--brt-text);
}

/* ...but the FRAME only goes on panels that actually hold something.
   Six pages (both add-site pages and the four buy pages) end with an EMPTY
   spacer table that also carries bgcolor="#ffffff". It contains nothing but
   nested empty tables. While the site was white it was a white box on a white
   page and nobody ever saw it; the moment I gave these panels a border and a
   shadow it turned into a stray outlined rectangle under the content. That
   was my regression, and Dan spotted two of the six.

   :has() is what separates them - the real panels contain divs, text, links,
   images and so on, the spacer contains only <table>/<tr>/<td>, so <table>
   is deliberately NOT in this list. */
#tooplate_main [bgcolor="#ffffff"]:has(div, img, input, select, textarea, button,
                                       h1, h2, h3, h4, h5, h6, p, ul, ol, a, br,
                                       b, strong, font, center, span),
#tooplate_main [bgcolor="#FFFFFF"]:has(div, img, input, select, textarea, button,
                                       h1, h2, h3, h4, h5, h6, p, ul, ol, a, br,
                                       b, strong, font, center, span) {
  background-color: var(--brt-panel) !important;
  border: 1px solid var(--brt-rule);
  border-radius: 14px;
  box-shadow: 0 10px 34px var(--brt-shadow);
}
#tooplate_main [bgcolor="#ffffff"]:has(div, img, input, h1, h2, h3, p, ul, a, br, b, font, center)
  > tbody > tr > td { padding: 26px 34px; }
#tooplate_main .shadow-inside td { color: var(--brt-text); }

/* ========================================================================
   3. TYPOGRAPHY
   ===================================================================== */
#tooplate_main .shadow-inside h1,
#tooplate_main .shadow-inside h2,
#tooplate_main .shadow-inside h3,
#tooplate_main .shadow-inside h4,
#tooplate_main .shadow-inside h5,
#tooplate_main .shadow-inside h6 {
  color: var(--brt-head) !important;
  letter-spacing: -.01em;
}
/* Catch-all. h4/h5/h6 were missed first time round and the member pages use
   them - "Direct Referrals For User" is an <h4> and it was painting black on
   a black panel, i.e. invisible. Anything inside the main block that is a
   heading and has not been given a colour above lands here. */
#tooplate_main h1, #tooplate_main h2, #tooplate_main h3,
#tooplate_main h4, #tooplate_main h5, #tooplate_main h6 { color: var(--brt-head); }
#tooplate_main .shadow-inside h1 {
  color: var(--brt-tan) !important;
  border-bottom: 1px solid var(--brt-rule);
  padding-bottom: 14px;
  margin-bottom: 18px !important;
}
#tooplate_main .shadow-inside h2 { font-size: 26px; }
#tooplate_main .shadow-inside h3 { font-size: 19px; color: var(--brt-tan-soft) !important; }
html[data-brt-theme="light"] #tooplate_main .shadow-inside h3 { color: var(--brt-tan-deep) !important; }
/* plain tan on white is too pale to read - darken the H1 in the light scheme */
html[data-brt-theme="light"] #tooplate_main .shadow-inside h1 { color: #8a6a3a !important; }

#tooplate_main .shadow-inside p,
#tooplate_main .shadow-inside td,
#tooplate_main .shadow-inside li,
#tooplate_main .shadow-inside font { line-height: 1.65; }

#tooplate_main .shadow-inside a,
#tooplate_main .shadow-inside a:link,
#tooplate_main .shadow-inside a:visited { color: var(--brt-tan); }
html[data-brt-theme="light"] #tooplate_main .shadow-inside a,
html[data-brt-theme="light"] #tooplate_main .shadow-inside a:link,
html[data-brt-theme="light"] #tooplate_main .shadow-inside a:visited { color: #8a6a3a; }
#tooplate_main .shadow-inside a:hover { color: var(--brt-tan-soft); }

/* The hard-coded oranges. There are two: one in the body copy, and one on
   the "Get More Traffic" link in the top menu - that second one is a paid
   text link (static_click_ad.php, rel="sponsored"), so it is deliberately
   loud. Tan still stands out against the white menu links, but if you want
   that one to shout in orange, delete this rule and it goes straight back. */
#tooplate_main font[color="#FFA500"],
#tooplate_menu font[color="#FFA500"],
#tooplate_menu_footer_satt font[color="#FFA500"],
#tooplate_footer font[color="#FFA500"] { color: var(--brt-tan) !important; }

/* Left over from when the page was white: <font color="black"> tags. On a
   dark panel they are invisible - the "Click Here" link through to the
   traffic report was painting black on near-black. Links take the tan link
   colour, anything else takes the normal page text colour. */
#tooplate_main a font[color="black"],
#tooplate_main a font[color="#000000"],
#tooplate_main a font[color="#000"] { color: var(--brt-tan) !important; }
#tooplate_main font[color="black"],
#tooplate_main font[color="#000000"],
#tooplate_main font[color="#000"] { color: var(--brt-text) !important; }

/* Same problem, different mechanism: prices on the two credit-purchase pages
   are <span style="color: black"> written inline into the markup, so they
   were invisible on the dark panel. Found by sweeping every member page
   rather than waiting to be told. An inline style can only be beaten with
   !important. Deliberately NOT applied inside anything with a tan background
   (the join button, the table header row) where black is the correct colour. */
#tooplate_main [style*="color: black" i],
#tooplate_main [style*="color:black" i],
#tooplate_main [style*="color: #000" i],
#tooplate_main [style*="color:#000" i] { color: var(--brt-text) !important; }
#tooplate_main a.action-btn[style*="color" i],
#tooplate_main tr:first-child[style*="d2b48c" i] [style*="color" i] { color: inherit !important; }

/* ========================================================================
   3b. DATA TABLES IN THE MEMBER AREA
   Commissions, referrals and stats tables carry their own inline row colours
   (background:#D2B48C and #c19a6b) written into the markup. Against the new
   light body text that is close to unreadable, so Dan asked for black.
   Attribute selectors with the i flag because the markup mixes cases; these
   have to be !important to beat an inline style. Kept as a faint two-tone so
   you can still follow a row across the page.
   ===================================================================== */
#tooplate_main tr[style*="d2b48c" i] { background: #111111 !important; }
#tooplate_main tr[style*="c19a6b" i] { background: #191919 !important; }
#tooplate_main tr[style*="d2b48c" i] td,
#tooplate_main tr[style*="c19a6b" i] td,
#tooplate_main tr[style*="d2b48c" i] font,
#tooplate_main tr[style*="c19a6b" i] font { color: var(--brt-text) !important; }
/* the header row of those tables - first row, tan text on black with a rule
   under it so it still reads as a header */
#tooplate_main tr:first-child[style*="d2b48c" i] {
  background: #000000 !important;
  border-bottom: 2px solid var(--brt-tan) !important;
}
#tooplate_main tr:first-child[style*="d2b48c" i] td,
#tooplate_main tr:first-child[style*="d2b48c" i] a,
#tooplate_main tr:first-child[style*="d2b48c" i] b,
#tooplate_main tr:first-child[style*="d2b48c" i] font { color: var(--brt-tan) !important; }

/* ========================================================================
   4. MEMBER TEXT ADS -> CARDS
   The ad generator already wraps every text ad in
   <div class="col_w260 fp_box"><a><h2>title</h2></a> body </div>,
   so this is styling only. No PHP is touched and nothing changes about
   how ads rotate or how views are counted.

   :has(h2) is what separates a text ad from the banner rows, which reuse
   the same .fp_box class but contain no heading. Dan asked for the
   banners to stay standalone, so they are left exactly as they are.
   ===================================================================== */
/* Equal height, evenly spaced. The theme floats the three ads and gives
   them a fixed 253px width plus a 50px right margin, which is why they
   currently end up different heights and sit unevenly. Flex is applied
   ONLY to a row whose own direct children are text ads, so the banner
   rows - which reuse the same .fp_box class - are not touched. */
.col_w880:has(> .fp_box > a > h2),
.col_w880_satt:has(> .fp_box > a > h2) {
  display: flex;
  align-items: stretch;
  gap: 24px;
  width: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.col_w880:has(> .fp_box > a > h2) > .fp_box,
.col_w880_satt:has(> .fp_box > a > h2) > .fp_box {
  float: none !important;
  width: auto !important;
  flex: 1 1 0;
  margin-right: 0 !important;
}
.col_w880:has(> .fp_box > a > h2) > .cleaner,
.col_w880_satt:has(> .fp_box > a > h2) > .cleaner { display: none; }

.fp_box:has(> a > h2) {
  background: linear-gradient(180deg, var(--brt-card-a) 0%, var(--brt-card-b) 100%);
  border: 1px solid var(--brt-rule);
  border-left: 3px solid var(--brt-tan);
  border-radius: 10px;
  padding: 16px 18px 18px;
  box-sizing: border-box;
  box-shadow: 0 6px 18px var(--brt-shadow);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fp_box:has(> a > h2):hover {
  border-color: var(--brt-tan);
  box-shadow: 0 0 0 1px var(--brt-glow), 0 10px 26px var(--brt-shadow);
  transform: translateY(-2px);
}
.fp_box:has(> a > h2) h2 {
  font-size: 16px !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.3;
}
.fp_box a h2,
.fp_box a:link h2,
.fp_box a:visited h2 {
  color: var(--brt-tan) !important;
  text-decoration: none !important;
}
.fp_box a:hover h2 { color: #ffffff !important; }
.fp_box:has(> a > h2) font,
.fp_box:has(> a > h2) { color: #cfcfcf; }
.fp_box:has(> a > h2) img { max-width: 100%; height: auto; }

/* ========================================================================
   5. BANNERS - left standalone, only centred and given breathing room
   ===================================================================== */
.fp_box:not(:has(> a > h2)) img { max-width: 100%; height: auto; }

/* ========================================================================
   6. NAV
   ===================================================================== */
.nav-bg { border-bottom: 4px solid var(--brt-tan); }
#tooplate_menu a { transition: color .15s ease, background .15s ease; }

/* ========================================================================
   7. FORMS  (login / sign up / support / forgot password)
   ===================================================================== */
/* input:not([type]) matters. The "Site URL" field on both add-site pages is
   written as <input size="50" name="site_url"> with NO type attribute. It
   behaves as a text box, but it does NOT match input[type="text"], so it was
   the only field on the site still wearing the default browser chrome - grey
   2px border, square corners - right next to a properly styled Site Name box.
   Same trap as the .action-btn buttons: match the behaviour, not the attribute
   you happen to expect to be there. */
#tooplate_main input[type="text"],
#tooplate_main input[type="email"],
#tooplate_main input[type="password"],
#tooplate_main input[type="url"],
#tooplate_main input[type="search"],
#tooplate_main input[type="tel"],
#tooplate_main input[type="number"],
#tooplate_main input:not([type]),
#tooplate_main textarea,
#tooplate_main select {
  background: #ffffff;
  color: #111111;
  border: 1px solid var(--brt-tan-deep);
  border-radius: 6px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
}
#tooplate_main input[type="text"]:focus,
#tooplate_main input[type="email"]:focus,
#tooplate_main input[type="password"]:focus,
#tooplate_main input[type="url"]:focus,
#tooplate_main input[type="search"]:focus,
#tooplate_main input[type="tel"]:focus,
#tooplate_main input[type="number"]:focus,
#tooplate_main input:not([type]):focus,
#tooplate_main textarea:focus,
#tooplate_main select:focus {
  outline: none;
  border-color: var(--brt-tan);
  box-shadow: 0 0 0 3px var(--brt-glow);
}
#tooplate_main input[type="submit"],
#tooplate_main input[type="button"],
#tooplate_main button {
  background: var(--brt-tan);
  color: #000000;
  border: 1px solid var(--brt-tan-deep);
  border-radius: 7px;
  padding: 10px 22px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
#tooplate_main input[type="submit"]:hover,
#tooplate_main input[type="button"]:hover,
#tooplate_main button:hover { background: var(--brt-tan-soft); }
#tooplate_main input[type="submit"]:active { transform: translateY(1px); }



/* ========================================================================
   8. FOOTER
   ===================================================================== */
#tooplate_footer { border-top: 5px solid var(--brt-tan); background: #0b0b0b; }
#tooplate_footer img { max-width: 100%; height: auto; }
/* the footer logo sits in the first bare div; the theme centres the whole
   footer, so this pulls the logo alone over to the left and leaves the
   nav links centred where they are */
#tooplate_footer > div:first-of-type { text-align: left; }
/* The footer mark is now /newlook-footer-logo.png - the same lockup as the
   header with the tagline dropped, transparent, no beige block. It is a wider
   shape than the old 142x68 file, so it is sized by height here. Scoped to the
   logo div so it cannot catch a banner ad further down the footer. */
#tooplate_footer > div:first-of-type img {
  height: 40px;
  width: auto;
  max-width: 100%;
}
@media (max-width: 520px) {
  #tooplate_footer > div:first-of-type img { height: 32px; }
}

/* ========================================================================
   9. MOBILE
   Kept BELOW the rules it overrides so it actually wins - see the note in
   responsive.css about specificity.
   ===================================================================== */
@media (max-width: 1020px) {
  #tooplate_content { max-width: 100%; }
}
@media (max-width: 767px) {
  #tooplate_main { padding: 18px 12px 30px !important; }
  #tooplate_main .shadow-inside > tbody > tr > td > table { border-radius: 10px !important; }
  .fp_box:has(> a > h2) { padding: 14px 14px 16px; margin-bottom: 14px; }
  /* stack the ad cards on a phone instead of squeezing three across */
  .col_w880:has(> .fp_box > a > h2),
  .col_w880_satt:has(> .fp_box > a > h2) { flex-direction: column; gap: 14px; }
  #tooplate_main .shadow-inside h1 { padding-bottom: 10px; margin-bottom: 14px !important; }
  #tooplate_main .shadow-inside h2 { font-size: 21px; }
  #tooplate_main .shadow-inside h3 { font-size: 17px; }
}


/* ========================================================================
   10. THE "OPTIONAL" SECTION
   This is the block holding "Optional: Login Ad Credits" and "Optional:
   Solo Email Ads". In the markup it is a table with bgcolor=#d8ecff; the
   jQuery at the foot of index.php wraps it in a div.shadowed at runtime
   and strips the bgcolor off the inner table.
   Dan asked (27 Aug 2026) for it to read like the rest of the page rather
   than sit in its own coloured box, so everything below just hands it the
   normal page colours back.
   Still deliberately LAST in the file: these selectors tie on specificity
   with the heading rules in section 3, so order is the only thing that
   decides the winner - same note as in responsive.css.
   ===================================================================== */
#tooplate_main .shadowed {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--brt-text) !important;
}
#tooplate_main .shadowed td,
#tooplate_main .shadowed p,
#tooplate_main .shadowed li,
#tooplate_main .shadowed font,
#tooplate_main .shadowed b,
#tooplate_main .shadowed strong { color: var(--brt-text) !important; }
#tooplate_main .shadowed h1,
#tooplate_main .shadowed h2,
#tooplate_main .shadowed h3 {
  color: var(--brt-tan-soft) !important;
  border-bottom: none !important;
}
html[data-brt-theme="light"] #tooplate_main .shadowed h1,
html[data-brt-theme="light"] #tooplate_main .shadowed h2,
html[data-brt-theme="light"] #tooplate_main .shadowed h3 { color: var(--brt-tan-deep) !important; }
#tooplate_main .shadowed a,
#tooplate_main .shadowed a:link,
#tooplate_main .shadowed a:visited { color: var(--brt-tan) !important; }
html[data-brt-theme="light"] #tooplate_main .shadowed a,
html[data-brt-theme="light"] #tooplate_main .shadowed a:link,
html[data-brt-theme="light"] #tooplate_main .shadowed a:visited { color: #8a6a3a !important; }
#tooplate_main .shadowed a:hover { color: var(--brt-tan-soft) !important; }

/* Belt and braces: if that jQuery has not run yet - slow connection, script
   blocked, JS error further up the page - the inner table still carries its
   old light-blue bgcolor. Kill it so there is never a pale flash. */
#tooplate_main .shadowed [bgcolor],
#tooplate_main [bgcolor="#d8ecff"],
#tooplate_main [bgcolor="#D8ECFF"] { background-color: transparent !important; }

/* ========================================================================
   11. THE JOIN BUTTON
   The button is an <a class="action-btn"> and it sits INSIDE the Optional
   block, so the .shadowed link rules in section 10 match it too. Both
   carry !important, and between two !important declarations it is
   SPECIFICITY that decides, not which one comes last - so a plain
   "a.action-btn" loses to "#tooplate_main .shadowed a" and the button
   paints tan text on a tan background. It has to out-specify that rule.
   ===================================================================== */
#tooplate_main a.action-btn,
#tooplate_main a.action-btn:link,
#tooplate_main a.action-btn:visited,
#tooplate_main .shadowed a.action-btn,
#tooplate_main .shadowed a.action-btn:link,
#tooplate_main .shadowed a.action-btn:visited,
#tooplate_footer a.action-btn,
body a.action-btn:link {
  background: var(--brt-tan) !important;
  background-image: none !important;
  color: #111111 !important;
  border: 1px solid var(--brt-tan-deep) !important;
  border-radius: 7px !important;
  font-weight: bold !important;
  text-shadow: none !important;
  text-decoration: none !important;
  box-shadow: 0 6px 18px var(--brt-shadow);
  transition: background .15s ease, transform .1s ease;
}
#tooplate_main a.action-btn:hover,
#tooplate_main .shadowed a.action-btn:hover,
body a.action-btn:hover {
  background: var(--brt-tan-soft) !important;
  color: #000000 !important;
}
#tooplate_main a.action-btn:active,
body a.action-btn:active { transform: translateY(1px); }

/* The same .action-btn class is also used on <input> buttons - "Click Here To
   Move Login Credits" / "Move Traffic Credits" on the two sites pages are
   inputs, not links, so the rules above (which name a.action-btn) never
   reached them and tooplate_style's ".action-btn { color:#ffffff !important }"
   kept the text white on tan. */
#tooplate_main input.action-btn,
#tooplate_main button.action-btn,
#tooplate_main .action-btn {
  background: var(--brt-tan) !important;
  background-image: none !important;
  color: #111111 !important;
  border: 1px solid var(--brt-tan-deep) !important;
  border-radius: 7px !important;
  font-weight: bold !important;
  text-shadow: none !important;
  cursor: pointer;
}
#tooplate_main input.action-btn:hover,
#tooplate_main button.action-btn:hover {
  background: var(--brt-tan-soft) !important;
  color: #000000 !important;
}

/* ---- the Action column on login_sites.php and traffic_sites.php ----------
   The edit icon, the delete icon and the Reset button were jammed together
   with a 4px and a 6px gap. Keyed off the IMAGE FILENAMES rather than the
   link titles: both pages emit the same structure but with different title
   text ("Edit" on one, "Click To Edit Site" on the other), so a title-based
   selector would only have fixed one of the two pages. */
#tooplate_main img[src*="edit.png"],
#tooplate_main img[src*="delete.png"] {
  margin: 0 6px 0 2px;
  vertical-align: middle;
}
#tooplate_main td:has(> a > img[src*="edit.png"]) .btn-action {
  margin-left: 6px !important;
  vertical-align: middle;
}

/* Keeping the edit icon, the delete icon and Reset on ONE line, without
   pushing the table into a scrollbar. The numbers, measured:
     cell content space          154px
     two icon links  24 + 24  =   48px
     Reset button                 96px  (+8px of its own margins)
     whitespace between the three inline links, ~4px each = 8px
     -> 160px needed in 154px available, so Reset dropped to a second line.
   The table is 900px inside a 920px .table-container, so there are only
   20px of slack before that container starts scrolling - which is what
   went wrong the first time I tried to fix this with wider margins.
   So: remove the whitespace rather than demand more width. font-size:0 on
   the cell collapses those inter-element text nodes (the cell holds nothing
   but the three controls); the button's own size is restored straight after.
   A couple of pixels off the button padding buys headroom, and nowrap means
   that if a browser still renders a shade wider it takes from the 20px of
   slack instead of wrapping. */
#tooplate_main td:has(> a > img[src*="edit.png"]) {
  white-space: nowrap;
  font-size: 0;
}
#tooplate_main td:has(> a > img[src*="edit.png"]) .btn-action {
  font-size: 11px;
  padding: 5px 10px !important;
}

/* traffic_sites.php wraps its table in <div class="table-container"> with
   max-width:920px, declared inside that page. login_sites.php has no such
   wrapper, so its table fills the panel at 1090px while the traffic one was
   pinned at 900px and pushed off-centre - which is why the two pages looked
   different. Dan asked for the traffic table to match the login one.
   The cap comes off; overflow-x:auto stays, so a narrow screen can still
   scroll the table rather than break the page. Specificity beats the page's
   own .table-container rule regardless of which loads first. */
#tooplate_main .table-container { max-width: none; }

/* The sites tables hold long URLs and need more room than running prose does.
   #tooplate_content is capped at 1180px so a paragraph never stretches across
   a huge monitor - right for text, too tight for a seven column data grid:
   19 of the 41 URLs were wrapping onto a second line. So pages that actually
   contain the grid get a wider cap. Everything else keeps the reading width. */
#tooplate_main:has(td > a > img[src*="edit.png"]) #tooplate_content,
#tooplate_main:has(.table-container) #tooplate_content {
  max-width: 1560px;
}
/* ...and rebalance the columns, because the widths in the markup are the
   wrong way round for the content. The header row carries width attributes of
   Site name 20%, Site URL 5%, Visitors 5% + 5%, Site Status 20%,
   Pause/Resume 10% and Action 35% - so the column holding long URLs was told
   to be the smallest on the table while three buttons were given a third of
   it. The URL cells also carry an inline max-width:5%, which is why simply
   widening the table changed nothing: the URL column stayed at 265px however
   much room it was given, and 19 of the 41 URLs wrapped onto two lines.
   Percentages below add up to 100. Action gets width:1%, which in table
   layout means "shrink to your contents" - with the nowrap above that is
   exactly the width of the two icons and the Reset button, no more. */
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(1) { width: 13%; }
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(2) {
  width: 38% !important;
  max-width: none !important;
}
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(3),
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(4) { width: 8%; }
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(5) { width: 11%; }
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(6) { width: 12%; }
/* width:1% alone shrank this column BELOW what the buttons need and the
   Reset buttons spilled 12px past the table, so it carries a real pixel
   minimum as well: 24 + 24 for the icons, 92 for Reset, margins and the
   cell's 7px padding either side. */
#tooplate_main table:has(td > a > img[src*="edit.png"]) tr > *:nth-child(7) {
  width: 1%;
  min-width: 168px;
}
/* NO white-space:nowrap here.
   traffic_sites.php wraps its table in <div class="table-container"> with
   max-width:920px and overflow-x:auto - a scroll wrapper defined inside that
   page. nowrap made this column refuse to shrink, so the table could push
   past 920px, which produced a horizontal scrollbar under the table and left
   the Reset button looking like it had fallen out of the right-hand edge.
   Letting the column shrink keeps the whole table inside the wrapper. */


/* ========================================================================
   12. HEADER: LOGO LEFT, NAVIGATION RIGHT, ONE TAN RULE
   Dan asked for the myinstantads.com arrangement (27 Aug 2026): logo hard
   left with the tagline under it, links hard right, and a single tan line
   instead of the two the site has today.

   The two lines today are:
     - a 0.5px one from #tooplate_header::before, declared !important with
       z-index 9999 in an inline <style> inside templates/header.php. It is
       a PSEUDO-element, which is why it never shows up when you inspect
       real elements looking for a tan border.
     - the 4px border-bottom on .nav-bg.
   The pseudo one goes; the 4px one is redrawn under the whole row.

   .head1-banner and #tooplate_header are siblings, not parent and child,
   so the row is made by turning #tooplate_wrapper into a two-column grid
   and putting one in each column. Both carry the same bottom border and
   the grid stretches them to equal height, so the line joins up seamlessly
   across the middle. No template file is touched.
   ===================================================================== */
#tooplate_wrapper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}
/* the 380px black slab behind the old banner is not needed any more */
.header1-bg { display: none !important; }
/* the hairline. Needs html body to out-specify the !important inline rule. */
html body #tooplate_header::before { display: none !important; }
/* .nav-bg drew the old strip and its 4px rule - both are redrawn below */
.nav-bg { display: none !important; }

.head1-banner {
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  padding: 15px 30px 15px 26px;
  background: #000000;
  border-bottom: 4px solid var(--brt-tan);
}
/* The <img> in templates/header.php now points at /newlook-logo.png and is
   simply sized here. An earlier version hid the <img> and painted the logo
   as a background on the <a> instead - that looked identical but display:none
   takes the image out of the accessibility tree, which left the link back to
   the home page with no accessible name and no alt text. Sizing the real
   image keeps both. */
.head1-banner a { display: block; line-height: 0; }
.head1-banner a img {
  display: block !important;
  height: 82px;
  width: auto;
  max-width: 100%;
}

#tooplate_header {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  background: #000000;
  border-bottom: 4px solid var(--brt-tan);
  padding: 0 26px 0 0 !important;
}
#tooplate_menu {
  width: auto !important;
  margin: 0 !important;
  min-width: 0;
  text-align: right !important;
}
/* A grid item will not shrink below the width of its own content unless it
   is told it may - hence minmax(0,1fr) on the column and min-width:0 here.
   Without BOTH, the row of links keeps the header wider than the screen and
   the whole page scrolls sideways on a phone. flex-wrap then lets the links
   drop onto a second line instead. */
/* NOTE the child combinator. This must only ever hit the TOP-LEVEL list.
   The member area menu has drop-downs, and menu-style.css keeps them shut
   with "#ssss ul ul { display:none }". A descendant selector here
   ("#tooplate_menu ul") matched those nested lists too and, being
   !important, held every drop-down permanently open - which also pushed
   the Stats sub-menu 20px past the right edge of the screen. */
/* The public menu and the member menu are NOT the same shape:
     public  #tooplate_menu > ul
     member  #tooplate_menu > div#ssss > ul     (10 items, 3 with drop-downs)
   Both have to be named explicitly. Note the child combinators throughout -
   the member drop-downs are nested <ul>s that menu-style.css keeps shut with
   "#ssss ul ul { display:none }", and a descendant selector here would match
   those too and, being !important, hold every drop-down permanently open. */
#tooplate_menu > #ssss {
  display: flex !important;
  justify-content: flex-end !important;
  min-width: 0;
  width: 100%;
}
#tooplate_menu > ul,
#tooplate_menu > #ssss > ul {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  background: transparent !important;
}
#tooplate_menu > ul > li,
#tooplate_menu > #ssss > ul > li {
  display: block !important;
  float: none !important;
  height: auto !important;
  position: relative;
}
#tooplate_menu > ul > li > a,
#tooplate_menu > #ssss > ul > li > a {
  height: auto !important;
  line-height: 1.2;
  padding: 10px 13px !important;
}

/* the drop-downs themselves: they were slate grey #5f6975, which is outside
   the three colours. Opened against the right edge of their parent so a menu
   near the right-hand side cannot hang off the screen - before this the Stats
   sub-menu ran 20px past the edge and put a scrollbar on the whole page. */
#tooplate_menu > ul > li > ul,
#tooplate_menu > #ssss > ul > li > ul {
  left: auto !important;
  right: 0;
  max-width: calc(100vw - 20px);
  background: #000000 !important;
  border: 1px solid var(--brt-rule);
  border-top: 3px solid var(--brt-tan);
  box-shadow: 0 12px 28px var(--brt-shadow);
}
/* menu-style.css turns the hovered top-level item slate grey (#4b545f).
   That is a fourth colour on a page that is meant to have three, so the
   hover is shown by turning the label tan instead. */
#tooplate_menu > #ssss > ul > li:hover,
#tooplate_menu > ul > li:hover { background: transparent !important; }
#tooplate_menu > #ssss > ul > li:hover > a,
#tooplate_menu > ul > li:hover > a { color: var(--brt-tan) !important; }
/* tooplate_style also drops a #222 chip behind the hovered link and behind
   the current page. Measured, not assumed: the grey block left on the
   hovered item after the rule above was that chip, on the <a>, not the <li>.
   Both are shown in tan instead - the current page keeps a tan underline so
   you can still see which one you are on. */
#tooplate_menu > ul > li > a:hover,
#tooplate_menu > #ssss > ul > li > a:hover {
  background: transparent !important;
  color: var(--brt-tan) !important;
}
#tooplate_menu > ul > li > a.current,
#tooplate_menu > #ssss > ul > li > a.current {
  background: transparent !important;
  color: var(--brt-tan) !important;
  box-shadow: inset 0 -3px 0 var(--brt-tan);
}
/* THE DROP-DOWN GAP.
   Measured: the sub-menu opens 9px BELOW the bottom of its parent link, and
   in that 9px strip the element under the pointer is a link from the SECOND
   row of the wrapped menu. So moving the mouse down towards the sub-menu
   leaves the parent, li:hover goes false, and the menu shuts before you can
   reach it. Two fixes, both needed:
     1. a transparent bridge under the hovered item that covers the gap, so
        the pointer never leaves the parent li;
     2. lift the hovered item and its sub-menu above the second row of links,
        which otherwise paints on top of the sub-menu itself. */
#tooplate_menu > #ssss > ul > li:hover::after,
#tooplate_menu > ul > li:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 1000;
}
#tooplate_menu > #ssss > ul > li:hover,
#tooplate_menu > ul > li:hover { z-index: 1001; }
#tooplate_menu > #ssss > ul > li > ul,
#tooplate_menu > ul > li > ul { z-index: 1002 !important; }
#tooplate_menu ul ul li { height: auto !important; }
#tooplate_menu ul ul li a { color: #ffffff !important; height: auto !important; }
#tooplate_menu ul ul li a:hover { background: var(--brt-tan) !important; color: #000000 !important; }

/* everything below the header goes back to spanning the full width.
   That block carries a -15.4px top margin in the theme, which used to tuck
   it under the old banner; on the new grid it just drags the content up
   over the header rule, so it is zeroed. */
#tooplate_wrapper > div[style*="box-shadow"],
#tooplate_wrapper > div:last-child {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 0 !important;
}

/* ---- narrow screens: stack the logo above the links -------------------- */
@media (max-width: 1080px) {
  #tooplate_menu ul li a { padding: 10px 9px !important; font-size: 12px; }
  .head1-banner a img { height: 70px; }
}
@media (max-width: 900px) {
  /* minmax(0,1fr), not 1fr - a bare 1fr still refuses to go below the width
     of the widest row of links, which is what put a sideways scrollbar on
     every phone-width page. */
  #tooplate_wrapper { grid-template-columns: minmax(0, 1fr); }
  .head1-banner {
    grid-column: 1; grid-row: 1;
    border-bottom: none;
    padding: 14px 16px 6px 16px;
  }
  #tooplate_header {
    grid-column: 1; grid-row: 2;
    justify-content: center;
    padding: 0 8px 0 8px !important;
  }
  #tooplate_menu { text-align: center !important; }
  #tooplate_menu > #ssss { justify-content: center !important; }
  #tooplate_menu > ul,
  #tooplate_menu > #ssss > ul { justify-content: center; }
  .head1-banner a img { height: 61px; }
}
@media (max-width: 420px) {
  .head1-banner a img { height: 48px; }
  #tooplate_menu ul li a { padding: 9px 7px !important; font-size: 11px; }
}
