/* Smart Machine Monitor — one stylesheet, served locally.
   No remote fonts, no CDN: join.html carries a live activation code in its URL
   fragment and must make zero external requests, and sharing one stylesheet
   means that rule cannot be broken later by accident.

   Deliberately light-only. The previous version derived a dark theme by
   inverting tokens nobody had designed, which produced an "Install on Android"
   button at #161d23 on a #0f1519 ground - the two install channels are equally
   important and one of them was nearly invisible. An industrial product
   committing to a single well-made look is the better trade, and it matches the
   light-theme app screenshots. */

:root {
  --ink:      #0f2233;   /* deep navy, primary text            */
  --ink-2:    #3d5566;   /* secondary text                     */
  --muted:    #6b8394;   /* tertiary, captions                 */
  --accent:   #1565c0;   /* the mark's blue                    */
  --accent-2: #0f4c9c;   /* hover / pressed                    */
  --tint:     #eaf2fb;   /* accent at low strength             */
  --ground:   #f4f7fa;   /* page                               */
  --surface:  #ffffff;   /* cards                              */
  --border:   #dbe4ec;
  --border-2: #c3d2df;
  --warn:     #8a5a00;
  --android:  #b45309;   /* deep amber. 5.02:1 on white text against the blue's
                            5.75:1 - the two install channels are equally
                            important and now read as equally prominent, while
                            staying instantly distinguishable from each other. */
  --android-2:#94430a;
  --ok:       #1f7a43;
  --shadow:   0 1px 2px rgba(15,34,51,.05), 0 4px 14px rgba(15,34,51,.05);
  --shadow-l: 0 2px 4px rgba(15,34,51,.06), 0 12px 34px rgba(15,34,51,.09);
  --r:        12px;
}

* { box-sizing: border-box; }

/* The `hidden` attribute hides an element only because the browser's own
   stylesheet says `[hidden] { display: none }` - and ANY author rule setting
   `display` on that element beats it. `.signin { display: flex }` therefore
   left the sign-in card on screen while the JS believed it had hidden it, so a
   signed-in partner saw the dashboard AND a sign-in prompt above it.
   This makes `hidden` mean hidden, whatever else a class asks for. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  /* Sticky footer: a short page (the signed-out portal) should not leave the
     footer stranded in the middle with dead space beneath it. */
  min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* Two measures: `wrap` for reading, `wide` for composition. Desktop content
   should not sit in a 570px column inside a 1440px viewport. */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wide, .wrap { padding: 0 20px; } }

h1, h2, h3, h4 { letter-spacing: -0.022em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); line-height: 1.06; margin: 0 0 18px; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: 1.06rem; line-height: 1.35; margin: 0 0 6px; }
p  { margin: 0 0 16px; }
a  { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.eyebrow { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
           color: var(--accent); font-weight: 700; margin: 0 0 14px; }
.lede { font-size: 1.14rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 8px; }
.fineprint { color: var(--muted); font-size: .9rem; margin: 16px 0 0; }

/* ---- masthead ------------------------------------------------------- */
.masthead { background: var(--surface); border-bottom: 1px solid var(--border); }
.masthead .bar { display: flex; align-items: center; gap: 12px;
                 max-width: 1140px; margin: 0 auto; padding: 16px 32px; }
@media (max-width: 640px) { .masthead .bar { padding: 14px 20px; } }
.mark { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.mark svg { display: block; flex: none; }
.mark b { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.015em; }
.mark .tag { font-size: .7rem; font-weight: 700; letter-spacing: .1em;
             text-transform: uppercase; color: var(--accent);
             background: var(--tint); padding: 3px 8px; border-radius: 999px; }
.spacer { flex: 1; }
.navlink { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.navlink:hover { color: var(--accent); }

/* ---- hero ----------------------------------------------------------- */
.hero { padding: 68px 0 56px; }
.hero .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero .cols { grid-template-columns: 1fr; gap: 40px; }
                            .hero { padding: 44px 0 40px; } }
.hero h1 { max-width: 13ch; }
.hero .lede { max-width: 46ch; }

/* Product visual: the real screenshots, overlapped, large enough to read. */
.shotpair { display: flex; justify-content: center; align-items: center; gap: 16px; }
.shotpair img { width: 196px; height: auto; border-radius: 18px;
                border: 1px solid var(--border-2); background: var(--surface);
                box-shadow: var(--shadow-l); }
/* A slight stagger reads as two devices rather than a flat pair, without one
   covering the other - the whole point is that both are legible. */
.shotpair img:first-child { transform: translateY(-14px) rotate(-2deg); }
.shotpair img:last-child  { transform: translateY(14px) rotate(2deg); }
@media (max-width: 940px) { .shotpair img { width: 176px; } }
@media (max-width: 420px) { .shotpair img { width: 144px; } .shotpair { gap: 10px; } }

/* ---- buttons -------------------------------------------------------- */
/* Both install channels get identical weight. They are equally important, and
   the previous pairing made one of them nearly invisible. */
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 11px;
       padding: 15px 22px; border-radius: 10px; border: 1px solid var(--accent);
       background: var(--accent); color: #fff; text-decoration: none;
       font-weight: 650; font-size: .98rem; line-height: 1.2;
       box-shadow: var(--shadow); cursor: pointer; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn svg { flex: none; }
.btn span { display: block; }
.btn small { display: block; font-weight: 450; font-size: .8rem; opacity: .85; margin-top: 1px; }
.btn.alt { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn.alt:hover { background: var(--tint); border-color: var(--accent); color: var(--ink); }
.btn.android { background: var(--android); border-color: var(--android); }
.btn.android:hover { background: var(--android-2); border-color: var(--android-2); color: #fff; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: default; }
@media (max-width: 560px) { .cta { flex-direction: column; } .cta .btn { width: 100%; justify-content: center; } }

/* ---- sections and cards --------------------------------------------- */
.band { padding: 72px 0; }
.band.tint { background: var(--surface); border-top: 1px solid var(--border);
             border-bottom: 1px solid var(--border); }
.band > .wide > h2 { margin-bottom: 8px; }
.sub { color: var(--muted); max-width: 60ch; margin: 0 0 28px; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .cards, .cards.four { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .cards, .cards.four { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.card .n { font: 700 .74rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
           letter-spacing: .16em; color: var(--accent); margin-bottom: 14px; }
.card svg { color: var(--accent); margin-bottom: 12px; display: block; }
.card p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---- product gallery ------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 16px;
               border: 1px solid var(--border-2); box-shadow: var(--shadow); display: block; }
.gallery figcaption { color: var(--ink-2); font-size: .92rem; margin-top: 12px; text-align: center; }
.platform { display: flex; align-items: center; gap: 10px; margin: 34px 0 16px;
            font-weight: 650; color: var(--ink); }
.platform::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- steps / notes / code (join.html, privacy.html) ------------------ */
.steps { list-style: none; padding: 0; margin: 22px 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 0 44px; margin-bottom: 18px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 29px; height: 29px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: .85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.note { background: var(--tint); border: 1px solid #cfe0f4; border-left: 4px solid var(--accent);
        padding: 16px 20px; margin: 22px 0; border-radius: 0 10px 10px 0; }
.note.warn { background: #fdf6e8; border-color: #f0dfb8; border-left-color: var(--warn); }
.note p:last-child { margin-bottom: 0; }
/* join.html onboarding: replaces the inline style= attributes that were there
   before. style-src 'self' has no 'unsafe-inline', so those attributes were
   already blocked and quietly logging console errors. */
.tight { margin-top: 0; }
.coderow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 0; }
.codehint { color: var(--muted); font-size: .9rem; margin: 0; flex: 1 1 220px; }
.plat { margin: 30px 0 0; }
.took { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
details#other { margin: 30px 0 0; border-top: 1px solid var(--border); padding-top: 18px; }
details#other summary { cursor: pointer; font-weight: 650; color: var(--accent);
                        list-style: none; padding: 6px 0; }
details#other summary::-webkit-details-marker { display: none; }
details#other summary::before { content: "\25B8  "; display: inline-block;
                                transition: transform .15s; }
details#other[open] summary::before { transform: rotate(90deg); }
.code { font: 700 1.55rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
        letter-spacing: .07em; background: var(--surface); border: 2px solid var(--accent);
        border-radius: 10px; padding: 20px; text-align: center; margin: 10px 0 4px;
        color: var(--ink); user-select: all; -webkit-user-select: all; word-break: break-all; }
dt { font-weight: 650; margin-top: 18px; }
dd { margin: 5px 0 0; color: var(--ink-2); }

/* ---- footer --------------------------------------------------------- */
footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface);
         padding: 30px 0 44px; color: var(--muted); font-size: .9rem; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }

/* --- mobile: recompose, do not simply stack ---------------------------
   Desktop spacing carried wholesale onto a phone produces very tall cards,
   large gaps and little information per screen. */
@media (max-width: 700px) {
  body { font-size: 15.5px; }
  .band { padding: 44px 0; }
  .card { padding: 18px; }
  h2 { margin-bottom: 10px; }
  .sub { margin-bottom: 20px; }
  .hero { padding: 34px 0 32px; }
  .gallery { gap: 14px; }
  .gallery figcaption { font-size: .86rem; margin-top: 8px; }
  .platform { margin: 26px 0 12px; }
  footer { padding: 24px 0 34px; }
  /* Product name, contact and Privacy were three columns squeezed onto one
     row - fine at exactly this width, ugly one notch narrower or with larger
     accessibility text. */
  footer .row { flex-direction: column; align-items: flex-start; gap: 8px; }
  footer .spacer { display: none; }
  footer .mark b { font-size: .95rem; }
}
