/* Systems2follow Blog Maker. Palette from systems2follow.com: deep green, coral, off white. */
:root {
  --green: #03251A; --green-2: #0B3A2C; --green-3: #14503D;
  --coral: #FD675E; --coral-dark: #E04E46; --coral-soft: #FFE9E7;
  --paper: #F3F7F6; --card: #FFFFFF; --mist: #E6ECEA; --line: #D9E1DE;
  --ink: #021A1A; --ink-2: #33475B; --muted: #6B7C78;
  --ok: #1E7D4F; --bad: #C8352B; --warn: #B7791F;
  --chatgpt: #2E7DD7; --gemini: #9CAF2E; --perplexity: #5B2A86;
  --radius: 14px; --shadow: 0 1px 2px rgba(2, 26, 26, .06), 0 8px 24px -16px rgba(2, 26, 26, .25);
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--paper); }

/* Header */
header { background: var(--green); color: var(--paper); padding: 0 28px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; min-height: 58px; }
header a.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: 14px; padding: 0; border: 0; color: #fff; text-decoration: none; }
header a.brand .logo { display: block; height: 26px; width: auto; }
header a.brand .brand-text { font-family: var(--serif); font-size: 19px; }
header a.brand .app { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(243, 247, 246, .62); padding-left: 12px; border-left: 1px solid rgba(243, 247, 246, .25); line-height: 1; }
.login-logo { background: var(--green); display: inline-block; padding: 12px 16px; border-radius: 12px; margin: 0 0 22px; }
.login-logo img { display: block; height: 28px; width: auto; }
.login-logo strong { color: #fff; font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 28px; }
.auth-logo { margin: 0 0 26px; }
.auth-logo img { display: block; height: 37px; width: auto; }
.auth-logo strong { color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 22px; }

/* Login page */
.auth-body { background: var(--paper); }
.auth { min-height: 100vh; padding: 12px; }
.auth-grid { display: grid; grid-template-columns: 0.94fr 1.06fr; gap: 12px; min-height: calc(100vh - 24px); }
.auth-form { background: #fff; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.auth-inner { width: 100%; max-width: 400px; }
.auth-inner h1 { font-size: 36px; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 26px; }
.auth-fields .field { margin: 0 0 16px; }
.auth-fields label { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.auth-fields .control { position: relative; display: flex; align-items: center; }
.auth-fields .control input { height: 44px; padding: 0 44px 0 14px; border-radius: 10px; font-size: 14.5px; }
.auth-fields .control input::placeholder { color: #9AA8A4; }
.auth-fields .control input:focus { outline-color: var(--green-3); border-color: var(--green-3); }
.auth-fields .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.auth-fields .eye:hover { background: var(--paper); color: var(--ink); }
.auth-fields .eye .ic-hide { display: none; }
.auth-fields .eye.on .ic-show { display: none; }
.auth-fields .eye.on .ic-hide { display: block; }
.auth-submit { width: 100%; height: 46px; margin-top: 14px; border-radius: 10px; font-size: 15px; background: var(--green); border-color: var(--green); }
.auth-submit:hover { background: var(--green-2); border-color: var(--green-2); }
.auth-foot { margin: 22px 0 0; font-size: 12.5px; color: var(--muted); }

.auth-side { position: relative; overflow: hidden; border-radius: 16px; padding: 64px 56px; color: #fff; background: linear-gradient(180deg, #021A14 0%, #03251A 45%, #0B3A2C 100%); }
.auth-side::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(55% 45% at 78% 8%, rgba(253, 103, 94, .38), transparent 62%),
  radial-gradient(40% 35% at 10% 90%, rgba(20, 80, 61, .9), transparent 65%),
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 2px, rgba(255, 255, 255, 0) 2px 16px); }
.auth-side.has-video::before { background: none; }
.auth-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.auth-side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 26, 20, .78) 0%, rgba(2, 26, 20, .35) 45%, rgba(2, 26, 20, .1) 100%); pointer-events: none; z-index: 1; }
.auth-copy { position: relative; z-index: 2; max-width: 480px; animation: rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.auth-quote { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; color: rgba(255, 255, 255, .95); text-shadow: 0 1px 12px rgba(0, 0, 0, .25); animation: rise .8s .12s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); filter: blur(0); } }
@media (max-width: 960px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-form { min-height: 70vh; }
  .auth-side { min-height: 520px; padding: 40px 28px; }
  .auth-quote { font-size: 26px; }
}
@media (max-width: 760px) {
  .auth { padding: 8px; }
  .auth-grid { min-height: auto; }
  .auth-form { min-height: calc(100vh - 16px); padding: 36px 20px; }
  .auth-side { display: none; }
}
header a { color: rgba(243, 247, 246, .78); text-decoration: none; padding: 18px 8px; border-bottom: 3px solid transparent; font-size: 14px; }
header a:hover { color: #fff; }
header a.active { color: #fff; border-bottom-color: var(--coral); }
header .nav { display: contents; }
.navtoggle { display: none; }
header .right { margin-left: auto; color: rgba(243, 247, 246, .7); font-size: 13px; padding: 0; border: 0; }
header .right a { padding: 0; border: 0; color: rgba(243, 247, 246, .9); text-decoration: underline; text-underline-offset: 3px; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -.01em; margin: 0 0 14px; color: var(--ink); }
h2 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; color: var(--ink); }
h3 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
p { margin: 0 0 10px; }
a { color: var(--green-3); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.msg { background: var(--coral-soft); border: 1px solid #F7C6C1; color: var(--ink); padding: 9px 14px; margin-bottom: 18px; border-radius: 10px; }
.pagehead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { margin: 0; }
.draghint { color: var(--muted); }
@media (pointer: coarse) { .draghint::after { content: " (press and hold)"; } }

/* Glossary links and hover tips */
.help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 7px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: #fff; font-size: 10.5px; font-weight: 600; line-height: 1; text-decoration: none; vertical-align: 1px; cursor: help; flex-shrink: 0; }
.help:hover { border-color: var(--coral); color: var(--coral-dark); }
.widget header { position: relative; justify-content: flex-start; }
.widget header .meta { margin-left: auto; }
.widget header .help { position: static; padding: 0; border: 1px solid var(--line); font-size: 10.5px; margin-left: 7px; }
.widget header .help:hover { border-color: var(--coral); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: 300px; padding: 8px 11px; background: var(--green); color: var(--paper); font: 400 12.5px/1.45 var(--sans); letter-spacing: 0; text-transform: none; border-radius: 8px; box-shadow: var(--shadow); white-space: normal; pointer-events: none; text-align: left; }
.widget header .help[data-tip]:hover::after { top: calc(100% + 8px); max-width: 100%; }
th.term { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
th.num.term[data-tip]:hover::after { left: auto; right: 0; }
.action .kind[data-tip] { cursor: help; }
.action .kind[data-tip]:hover::after { font-weight: 400; letter-spacing: 0; }
.toc { margin: -6px 0 18px; color: var(--muted); }
.gl-group { margin-bottom: 16px; }
.gl-group h2 { margin: 2px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 21px; }
.gl-term { padding: 10px 0; border-top: 1px solid var(--mist); max-width: 760px; }
.gl-term h3 { margin: 0 0 3px; font-size: 15px; }
.gl-term h3:target, .gl-term:target h3 { color: var(--coral-dark); }
.gl-short { margin: 0 0 4px; font-weight: 500; }
.gl-long { margin: 0; color: var(--ink-2); }

/* Results page */
.group { margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.group.first { border-top: 0; padding-top: 0; margin-top: 4px; }
.group-title { font-family: var(--serif); font-weight: 400; font-size: 23px; margin: 0 0 4px; letter-spacing: -.01em; }
.group .muted { margin: 0; max-width: 820px; }
table.periods th.sub { font-size: 10.5px; letter-spacing: .04em; padding-top: 2px; border-bottom-color: var(--mist); }
td.pos-one { color: var(--ok); font-weight: 600; }
td.pos-two { color: var(--warn); }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.results-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
@media (max-width: 900px) { .results-grid, .results-grid.three { grid-template-columns: 1fr; } }
.card h2 { margin-top: 0; display: flex; align-items: center; }
.card h3 { margin: 18px 0 6px; }
.card > .muted.small { margin-top: -4px; }
.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart .grid { stroke: var(--mist); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend i.hollow { background: #fff; border: 2px solid var(--muted); width: 8px; height: 8px; }
.heatmap td.heat { text-align: center; min-width: 46px; font-variant-numeric: tabular-nums; }
.heatmap td.heat.empty { color: var(--muted); }
.heatmap td.heat[data-tip] { cursor: help; }
.heatmap td.heat[data-tip]:hover::after { left: auto; right: 0; white-space: nowrap; max-width: none; }
.action .why[data-tip]:hover::after { max-width: 420px; }
.cmp table { margin-top: 0; }
.cmp h3:first-child { margin-top: 0; }
@media print {
  header, .draghint, .help, .pagehead a, form.row, button { display: none !important; }
  body { background: #fff; font-size: 12px; }
  main { max-width: none; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; page-break-inside: avoid; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Opportunities */
.howto { margin: 0 0 14px; padding: 10px 16px; }
.howto summary { font-weight: 600; cursor: pointer; }
.howto-body { max-width: 820px; padding: 8px 0 2px; color: var(--ink-2); }
.howto-body p { margin: 0 0 8px; }
table.opps td.rank { font-family: var(--serif); font-size: 19px; color: var(--green-3); width: 36px; }
table.opps tr.done td { color: var(--muted); }
table.opps tr.done td.rank { color: var(--line); }
table.opps .score { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
table.opps tr.done .score { font-weight: 400; }
.factors { display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.factor b { display: inline-block; min-width: 44px; color: var(--green-3); font-weight: 600; font-variant-numeric: tabular-nums; }
tr.done .factor b { color: var(--muted); }
details.why { margin-top: 4px; }
details.why pre { margin: 4px 0 0; max-width: 480px; }
.actions-cell { white-space: nowrap; }
.badge.briefed { color: var(--green-3); border-color: var(--green-3); }
.badge.fix { color: var(--warn); border-color: var(--warn); }
.badge.dismissed { color: var(--muted); }

/* Table tools (tables.js) */
.tbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.tbar-search { width: 240px; padding: 6px 10px; font-size: 13.5px; }
.tbar-filter { width: auto; padding: 6px 28px 6px 10px; font-size: 13px; }
.tbar-count { margin-left: auto; }
.tpager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin: 6px 0 2px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--line); vertical-align: 2px; }
th.sortable.sort-asc::after { border-bottom-color: var(--coral); }
th.sortable.sort-desc::after { border-bottom: 0; border-top: 5px solid var(--coral); }
th.sel, td.sel { width: 28px; padding-right: 0; }
th.sel input, td.sel input { width: 15px; height: 15px; accent-color: var(--green-3); margin: 0; }
.bulk { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.bulk button:disabled { opacity: .4; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.url { word-break: break-all; }
.tablewrap { overflow-x: auto; }

/* Cards and the widget grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card .big { font-size: 26px; font-weight: 600; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; align-items: stretch; }
@media (max-width: 1000px) { .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .widgets { grid-template-columns: 1fr; } .widget.wide { grid-column: span 1; } .widget.tall { grid-row: span 1; } }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.widget.wide { grid-column: span 2; }
.widget.tall { grid-row: span 2; }
.widget.full { grid-column: 1 / -1; }
.widget.full .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.widget.full .action:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.widget header { background: none; color: inherit; padding: 0; min-height: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: grab; }
.widget header:active { cursor: grabbing; }
.widget header h2 { margin: 0; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.widget header .meta { font-size: 12px; color: var(--muted); text-align: right; }
.widget header .meta a { color: var(--green-3); }
.widget .big { font-size: 34px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; color: var(--ink); }
.widget .big .unit { font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 6px; }
.widget .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; color: var(--green-3); }
.widget .engines { display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); white-space: nowrap; }
.widget table { margin: 2px 0 0; }
.widget .rows { margin: 4px 0 0; }
.widget .rows .r { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--mist); }
.widget .rows .r:last-child { border-bottom: 0; }
.widget .rows dt { margin: 0; min-width: 0; }
.widget .rows dd { margin: 0; white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.widget .act { padding: 4px 0; border-bottom: 1px solid var(--mist); }
.widget .ready { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--mist); }
.widget .ready .act:last-child { border-bottom: 0; }
.ghost { opacity: .35; }
.chosen { box-shadow: 0 24px 48px -16px rgba(2, 26, 26, .45); }

.spark { color: var(--green-3); flex-shrink: 0; }
.spark-empty { font-size: 12px; color: var(--muted); }
.delta { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.delta.ok { color: var(--ok); }
.delta.bad { color: var(--bad); }
.delta.idle { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 0; }
.dot.chatgpt { background: var(--chatgpt); } .dot.gemini { background: var(--gemini); } .dot.perplexity { background: var(--perplexity); }

/* This week */
.actions { list-style: none; margin: 4px 0 0; padding: 0; }
.action { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--mist); }
.action:last-child { border-bottom: 0; }
.action .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 3px 0; border-radius: 6px; text-align: center; background: var(--mist); color: var(--ink-2); margin-top: 2px; }
.action .kind.fix { background: var(--coral-soft); color: var(--coral-dark); }
.action .kind.write { background: #E3EFE9; color: var(--green-3); }
.action .kind.earn { background: #FFF2D6; color: var(--warn); }
.action .kind.unblock { background: #EDE7F6; color: var(--perplexity); }
.action .kind.search { background: #E3EDF8; color: var(--chatgpt); }
.action .title { font-weight: 500; }
.action .why { color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.action .do { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.addissue { margin-top: 8px; }
.addissue summary { cursor: pointer; color: var(--muted); }
.addform { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; margin-top: 8px; }
.addform input, .addform select { padding: 6px 8px; }
.addform input[name=why] { grid-column: span 2; }

/* Forms and buttons */
form.inline { display: inline; }
input[type=text], input[type=date], input[type=url], input[type=password], select, textarea { font: inherit; width: 100%; padding: 7px 9px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: var(--coral); }
textarea { min-height: 120px; }
textarea.body { min-height: 560px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 3px; }
button, .btn { font: inherit; font-weight: 500; padding: 7px 14px; border: 1px solid var(--coral); background: var(--coral); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; border-radius: 999px; white-space: nowrap; }
button:hover, .btn:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--green); border-color: var(--line); }
button.secondary:hover, .btn.secondary:hover { background: var(--paper); border-color: var(--green-3); color: var(--green); }
button.small, .btn.small { padding: 4px 11px; font-size: 13px; }
button.link { border: none; background: none; color: var(--green-3); text-decoration: underline; padding: 0; border-radius: 0; font-weight: 400; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row select { width: auto; }

/* Checks, badges, facts */
.check { padding: 5px 0; border-bottom: 1px solid var(--mist); font-size: 13px; }
.check.ok::before { content: "ok  "; color: var(--ok); font-weight: 600; }
.check.fail::before { content: "fail  "; color: var(--bad); font-weight: 600; }
.check.warn::before { content: "warn  "; color: var(--warn); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; color: var(--muted); background: #fff; }
.badge.approved { color: var(--ok); border-color: var(--ok); }
.badge.proposed { color: var(--warn); border-color: var(--warn); }
.badge.published, .badge.pushed { color: var(--ok); border-color: var(--ok); }
pre { white-space: pre-wrap; background: var(--mist); padding: 10px 12px; font-size: 13px; border-radius: 10px; }
details summary { cursor: pointer; }
.fact { border-bottom: 1px solid var(--mist); padding: 8px 0; font-size: 13px; }
.fact .topic { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.preview { max-width: 760px; font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.preview h1 { font-size: 30px; }
.preview h2 { font-size: 22px; margin-top: 28px; font-family: var(--serif); font-weight: 400; }

/* Ask the data */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--green-3); color: var(--green-3); }
.chat { max-width: 860px; }
.turn { margin: 0 0 14px; }
.turn .bubble { padding: 10px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; }
.turn.q .bubble { background: var(--mist); display: inline-block; max-width: 90%; }
.turn.a .bubble { background: #fff; border: 1px solid var(--line); }
.turn.a .bubble p { margin: 0 0 8px; } .turn.a .bubble p:last-child { margin: 0; }
.turn .who { margin: 4px 2px 0; }
.chat-form { max-width: 860px; margin-top: 10px; }
.chat-form textarea { min-height: 72px; }

/* The chat bubble on every page */
.chatwrap { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chatbub { width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: var(--green); color: var(--coral); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(2, 26, 26, .28); transition: background .15s, color .15s, transform .15s; }
.chatbub:hover { background: var(--green-2); border-color: rgba(255, 255, 255, .14); transform: translateY(-1px); }
.chatbub.open, .chatbub.open:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.chatbub .emblem { display: block; }
.chatpanel { width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 110px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(2, 26, 26, .22); display: flex; flex-direction: column; overflow: hidden; }
.chatpanel[hidden] { display: none; }
.chatpanel-head { background: var(--green); color: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; }
.chatpanel-title { display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.chatpanel-title .emblem { color: var(--coral); }
.chatpanel-tools { display: inline-flex; align-items: center; gap: 10px; font-weight: 400; }
.chatpanel-tools a, .chatpanel-tools .link { color: rgba(243, 247, 246, .85); }
.chat-x { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; padding: 0 2px; cursor: pointer; }
.chatpanel-body { flex: 1; overflow: auto; padding: 14px; background: var(--paper); }
.chatpanel-body .turn { margin: 0 0 10px; }
.chatpanel-body .turn .bubble { font-size: 13.5px; padding: 8px 12px; }
.chatpanel-body .turn.q .bubble { background: #fff; border: 1px solid var(--line); }
.chatpanel-body .turn.a .bubble { background: var(--mist); border: 0; }
.chatpanel-body .examples { margin: 10px 0 0; }
.chatpanel-body .chip { font-size: 12.5px; text-align: left; }
.chatpanel-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chatpanel-form textarea { flex: 1; min-height: 44px; resize: none; font-size: 13.5px; margin: 0; }
.chatpanel-form button { align-self: flex-end; height: 40px; }
@media (max-width: 640px) { .chatwrap { right: 12px; bottom: 12px; } .chatpanel { height: calc(100vh - 112px); } }

/* Below the width the full menu needs, the menu folds behind a button */
@media (max-width: 1240px) {
  header { padding: 0 18px; min-height: 56px; flex-wrap: wrap; }
  header a.brand { margin-right: auto; }
  header a.brand .logo { height: 22px; }
  header .navtoggle, header .navtoggle:hover, header .navtoggle:focus { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 42px; height: 42px; padding: 0; border: 0; background: none; border-radius: 10px; }
  .navtoggle span { display: block; width: 20px; height: 2px; background: #fff; margin: 0 auto; border-radius: 2px; }
  header .nav { display: none; flex-direction: column; width: 100%; padding: 6px 0 10px; border-top: 1px solid rgba(243, 247, 246, .15); }
  header .nav.open { display: flex; }
  header .nav a { padding: 11px 6px; border-bottom: 0; border-left: 3px solid transparent; font-size: 15px; }
  header .nav a.active { border-left-color: var(--coral); background: rgba(255, 255, 255, .05); }
  header .nav .right { margin: 8px 6px 0; }
  header .nav .right a { padding: 0; border: 0; display: inline; }
}
@media (max-width: 760px) { header { padding: 0 14px; } header a.brand .logo { height: 22px; } }

/* Phones and small tablets */
pre { overflow-x: auto; max-width: 100%; }
img, svg, video { max-width: 100%; }
@media (max-width: 760px) {
  main { padding: 18px 16px 110px; }
  h1 { font-size: 26px; }
  .pagehead { gap: 6px 12px; margin-bottom: 12px; }
  .widgets { grid-template-columns: 1fr; gap: 12px; }
  .widget.wide { grid-column: span 1; }
  .widget.tall { grid-row: span 1; }
  .widget.full .actions { grid-template-columns: 1fr; }
  .action { grid-template-columns: 1fr; gap: 6px; }
  .action .kind { width: 64px; }
  .action .do { justify-content: flex-start; }
  .addform { grid-template-columns: 1fr; }
  .addform input[name=why] { grid-column: span 1; }
  .two, .results-grid, .results-grid.three { grid-template-columns: 1fr; }
  .two > *, .results-grid > *, .widgets > *, .grid > * { min-width: 0; }
  .grid { grid-template-columns: 1fr; }
  .row select, .row input { max-width: 100%; }
  .tablewrap { margin: 0 -16px; padding: 0 16px; }
  textarea.body { min-height: 360px; }
  .chip { white-space: normal; text-align: left; max-width: 100%; }
  .chat, .chat-form { max-width: none; }
  .tbar input.tbar-search { width: 100%; }
  [data-tip]:hover::after { max-width: 240px; }
  /* Lists that read as cards */
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: auto; }
  table.cards thead, table.cards tr:has(th) { display: none; }
  table.cards tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
  table.cards td { border: 0; padding: 3px 0; }
  table.cards td.num { text-align: left; }
  table.cards td:empty { display: none; }
  table.cards td.url { word-break: break-word; overflow-wrap: anywhere; }
  .widget table.cards tr { padding: 8px 10px; }
  .widget table.cards td[data-label] { display: inline-block; margin-right: 12px; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
  table.cards td.sel { position: absolute; }
  table.cards tr { position: relative; }
  table.cards td.sel + td { padding-left: 30px; }
  table.opps.cards td.rank { width: auto; font-size: 17px; }
  table.opps.cards td.rank:not(:empty)::before { content: "#"; color: var(--muted); font-size: 12px; margin-right: 2px; }
  table.opps.cards .factors { margin-top: 4px; }
  .chatpanel { width: calc(100vw - 24px); }
  .chart[viewBox^="0 0 560"] .axis { font-size: 16px; }
}
