@import url("/static/fonts/fonts.css");

/* ==========================================================================
   Nightjar — night watch.
   Dark by default: this is a tool you open at 8am to find out what happened
   while you slept, and a tool that sits open on a second monitor all day.
   ========================================================================== */

:root {
  --nuit:    #0D1117;
  --releve:  #131A23;
  --releve2: #1A222D;
  --trait:   #232C38;
  --trait-2: #1B232D;
  --clair:   #E9E7E2;
  --doux:    #A3ABB8;
  --faible:  #6B7480;
  --ambre:   #E2A03F;
  --ambre-2: #F0B75E;
  --critique:#E5544B;
  --serieux: #DB9A3C;
  --mineur:  #7C8798;
  --bien:    #4EA97B;

  --titre: "Cabinet Grotesk", "Helvetica Neue", Arial, sans-serif;
  --texte: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --large: 1160px;
  --etroit: 720px;
  --r: 6px;
}

@media (prefers-color-scheme: light) {
  :root {
    --nuit: #F7F6F3; --releve: #FFFFFF; --releve2: #F0EEE9;
    --trait: #DFDBD2; --trait-2: #EAE6DE;
    --clair: #14181E; --doux: #4C5560; --faible: #7A828D;
    --ambre: #A96F12; --ambre-2: #8C5A0B;
    --critique: #C0392F; --serieux: #A97516; --mineur: #6B7480; --bien: #2F7D55;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--nuit);
  color: var(--clair);
  font-family: var(--texte);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.022em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 600; margin: 0 0 .3em; }
p { margin: 0 0 1.05em; }
a { color: inherit; text-decoration-color: var(--trait); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ambre); }
hr { border: 0; border-top: 1px solid var(--trait); margin: 3rem 0; }
::selection { background: var(--ambre); color: #0D1117; }

.wrap { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: var(--etroit); }

.kicker {
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ambre);
  margin: 0 0 1rem; display: flex; align-items: center; gap: .8rem;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.kicker.alone::after { display: none; }

.lede { font-size: 1.16rem; line-height: 1.6; color: var(--doux); max-width: 58ch; }

/* --- Header --------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--nuit) 90%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--trait-2);
}
.top .wrap { display: flex; align-items: center; gap: 1.6rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
         font-family: var(--titre); font-size: 1.38rem; font-weight: 800; letter-spacing: -.03em; }
.brand svg { width: 29px; height: 29px; flex: none; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-size: .93rem; color: var(--doux); }
.nav a:hover { color: var(--clair); }
@media (max-width: 720px) { .nav .opt { display: none; } }

/* --- Signed-in chip ------------------------------------------------------- */
.who { position: relative; }
.who > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  font-size: .9rem; color: var(--doux); padding: .32rem .6rem; border-radius: 999px;
  border: 1px solid var(--trait); background: var(--releve);
}
.who > summary::-webkit-details-marker { display: none; }
.who > summary:hover { color: var(--clair); border-color: var(--faible); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bien); flex: none;
       box-shadow: 0 0 0 3px color-mix(in srgb, var(--bien) 22%, transparent); }
.who[open] > summary { border-color: var(--ambre); color: var(--clair); }
.who .menu {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60; min-width: 216px;
  background: var(--releve); border: 1px solid var(--trait); border-radius: var(--r);
  padding: .45rem; box-shadow: 0 12px 32px -12px rgba(0,0,0,.6);
}
.who .menu .mail { font-size: .78rem; color: var(--faible); margin: 0; padding: .45rem .6rem .55rem;
                   border-bottom: 1px solid var(--trait); word-break: break-all; }
.who .menu a, .who .menu button {
  display: block; width: 100%; text-align: left; text-decoration: none; font-family: var(--texte);
  font-size: .9rem; color: var(--clair); background: none; border: 0; cursor: pointer;
  padding: .48rem .6rem; border-radius: 4px;
}
.who .menu a:hover, .who .menu button:hover { background: var(--releve2); color: var(--ambre); }
.who .menu form { margin: .3rem 0 0; padding-top: .3rem; border-top: 1px solid var(--trait); }
.who .menu button { color: var(--critique); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--texte); font-size: .95rem; font-weight: 600;
  padding: .7rem 1.3rem; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--ambre); background: var(--ambre); color: #10141A;
  text-decoration: none; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--clair); border-color: var(--trait); }
.btn.ghost:hover { border-color: var(--ambre); color: var(--ambre); filter: none; }
.btn.small { padding: .4rem .8rem; font-size: .85rem; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--faible); padding: .4rem .55rem; font-size: .85rem; }
.btn.quiet:hover { color: var(--ambre); transform: none; }
.btn.danger { border-color: var(--critique); color: var(--critique); background: transparent; }
.btn.danger:hover { background: var(--critique); color: #fff; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* --- Hero + scan box ------------------------------------------------------ */
.hero { padding: clamp(3.2rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 em { font-style: normal; color: var(--ambre); }

.scanbox { margin-top: 2.2rem; max-width: 620px; }
.scanbox form { display: flex; gap: .6rem; }
.scanbox input {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: .95rem;
  padding: .82rem .95rem; border-radius: var(--r);
  border: 1px solid var(--trait); background: var(--releve); color: var(--clair);
}
.scanbox input::placeholder { color: var(--faible); }
.scanbox input:focus { outline: none; border-color: var(--ambre);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ambre) 18%, transparent); }
@media (max-width: 560px) { .scanbox form { flex-direction: column; } }
.note { font-size: .85rem; color: var(--faible); margin: .8rem 0 0; }

/* --- Sections ------------------------------------------------------------- */
.section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--trait-2); }
.section.raised { background: var(--releve); border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.rows { margin: 0; padding: 0; list-style: none; }
.rows li { padding: 1.25rem 0; border-top: 1px solid var(--trait); display: grid; grid-template-columns: 1.9rem 1fr; gap: .9rem; }
.rows li:last-child { border-bottom: 1px solid var(--trait); }
.rows .n { font-family: var(--mono); font-size: .82rem; color: var(--ambre); padding-top: .15rem; }
.rows p { margin: 0; color: var(--doux); font-size: .96rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--trait); border-radius: var(--r); padding: 1.4rem; background: var(--releve); }
.card h3 { font-size: 1.05rem; }
.card p { margin: 0; color: var(--doux); font-size: .94rem; }
.card + .card { margin-top: 0; }

/* --- Severity ------------------------------------------------------------- */
.sev { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono);
       font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.sev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sev.critical { color: var(--critique); }
.sev.serious  { color: var(--serieux); }
.sev.minor    { color: var(--mineur); }
.sev.note     { color: var(--faible); }
.sev.resolved { color: var(--bien); }

.finding { border-top: 1px solid var(--trait); padding: 1.1rem 0; }
.finding:last-child { border-bottom: 1px solid var(--trait); }
.finding h4 { margin: .3rem 0 .35rem; font-size: 1.02rem; font-weight: 600; }
.finding p { margin: 0 0 .5rem; color: var(--doux); font-size: .94rem; }
.finding .where { font-family: var(--mono); font-size: .78rem; color: var(--faible); word-break: break-all; }
.finding .proof { font-family: var(--mono); font-size: .78rem; color: var(--doux);
  background: var(--releve2); border-left: 2px solid var(--trait); padding: .4rem .6rem;
  border-radius: 0 3px 3px 0; margin-top: .5rem; white-space: pre-wrap; word-break: break-all; }

/* --- Score ---------------------------------------------------------------- */
.score { display: flex; align-items: baseline; gap: .5rem; font-family: var(--titre); }
.score b { font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.score span { font-size: .9rem; color: var(--faible); font-family: var(--texte); font-weight: 400; }
.tally { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.tally div { font-size: .88rem; color: var(--doux); }
.tally b { display: block; font-family: var(--titre); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }

/* --- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: .35rem; }
.field .hint { font-size: .82rem; color: var(--faible); margin: .3rem 0 0; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font-family: var(--texte); font-size: .97rem; color: var(--clair);
  background: var(--releve); border: 1px solid var(--trait); border-radius: var(--r);
  padding: .6rem .72rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ambre);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ambre) 16%, transparent); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; color: var(--doux); }
.check input { margin-top: .3rem; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }

.box { border: 1px solid var(--trait); border-radius: var(--r); padding: 1.4rem; background: var(--releve); }
.box + .box { margin-top: 1.1rem; }

.alert { border-left: 3px solid var(--ambre); background: var(--releve2); padding: .8rem 1rem;
         border-radius: 0 var(--r) var(--r) 0; font-size: .92rem; margin-bottom: 1.3rem; }
.alert.bad { border-left-color: var(--critique); }
.alert.good { border-left-color: var(--bien); }
.alert.flat { border-left-color: var(--faible); }
.alert p:last-child { margin-bottom: 0; }

pre, code { font-family: var(--mono); font-size: .84rem; }
pre { background: var(--releve2); border: 1px solid var(--trait); border-radius: var(--r);
      padding: .9rem 1rem; overflow-x: auto; margin: 0 0 1rem; }
p code { background: var(--releve2); padding: .1em .35em; border-radius: 3px; }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .65rem .55rem; border-bottom: 1px solid var(--trait); }
th { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
     color: var(--faible); font-weight: 500; }

/* --- Pricing -------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1.1rem; }
.plan { border: 1px solid var(--trait); border-radius: var(--r); padding: 1.6rem 1.4rem;
        background: var(--releve); display: flex; flex-direction: column; }
.plan.pick { border-color: var(--ambre); position: relative; }
.plan.pick::before { content: "Most agencies"; position: absolute; top: -.65rem; left: 1.3rem;
  background: var(--ambre); color: #10141A; font-family: var(--mono); font-size: .65rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .18rem .55rem; border-radius: 3px; }
.plan h3 { font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .12em;
           text-transform: uppercase; color: var(--faible); }
.price { font-family: var(--titre); font-size: 2.8rem; font-weight: 800; line-height: 1;
         margin: .35rem 0 .1rem; letter-spacing: -.03em; }
.price span { font-family: var(--texte); font-size: .88rem; font-weight: 400; color: var(--faible); letter-spacing: 0; }
.plan ul { list-style: none; margin: 1.2rem 0 1.5rem; padding: 0; font-size: .93rem; }
.plan li { padding: .38rem 0 .38rem 1.35rem; position: relative; color: var(--doux);
           border-top: 1px solid var(--trait-2); }
.plan li:first-child { border-top: 0; }
.plan li::before { content: "›"; position: absolute; left: 0; color: var(--ambre); }
.plan li.no { color: var(--faible); }
.plan li.no::before { content: "×"; color: var(--faible); }
.plan .btn { margin-top: auto; width: 100%; }

/* --- Workspace ------------------------------------------------------------ */
.work { padding: 2.2rem 0 4rem; }
.tabs { display: flex; gap: 1.3rem; border-bottom: 1px solid var(--trait); margin-bottom: 1.8rem; }
.tabs a { text-decoration: none; padding: .55rem 0; font-size: .93rem; color: var(--faible);
          border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--clair); border-bottom-color: var(--ambre); }

.pagehead { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.pagehead h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin: 0; }
.pagehead .right { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.sitelist { border-top: 1px solid var(--trait); }
.siterow { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
           padding: 1rem .2rem; border-bottom: 1px solid var(--trait); text-decoration: none; }
.siterow:hover { background: var(--releve); }
.siterow .name { font-weight: 600; }
.siterow .url { font-family: var(--mono); font-size: .8rem; color: var(--faible); word-break: break-all; }
.siterow .counts { display: flex; gap: .7rem; }
.siterow .ring { font-family: var(--titre); font-weight: 800; font-size: 1.15rem; min-width: 2.6rem;
                 text-align: right; }
@media (max-width: 620px) { .siterow { grid-template-columns: 1fr auto; } .siterow .counts { display: none; } }

.tag { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .09em;
       text-transform: uppercase; padding: .14rem .45rem; border-radius: 3px;
       border: 1px solid var(--trait); color: var(--faible); }
.tag.paused { border-color: var(--faible); }

.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--trait);
         border-radius: var(--r); color: var(--faible); }
.empty h3 { color: var(--clair); }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--trait);
           border-top-color: var(--ambre); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Footer --------------------------------------------------------------- */
.foot { border-top: 1px solid var(--trait); padding: 2.6rem 0 3rem; margin-top: 2rem;
        font-size: .88rem; color: var(--faible); background: var(--releve); }
.foot .grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .foot .grid { grid-template-columns: 1fr 1fr; } }
.foot h5 { font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
           color: var(--doux); margin: 0 0 .7rem; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .4rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ambre); }
.foot .end { margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--trait);
             display: flex; gap: 1rem; flex-wrap: wrap; }

.testbanner { background: var(--ambre); color: #10141A; text-align: center; font-size: .83rem;
              padding: .4rem 1rem; font-weight: 600; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--ambre); color: #10141A;
              padding: .55rem 1rem; border-radius: var(--r); }
.secret { font-family: var(--mono); font-size: 1rem; letter-spacing: .05em; background: var(--releve2);
          border: 1px solid var(--trait); padding: .95rem; border-radius: var(--r); word-break: break-all; }

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