/* the fonts, sizes and spacing of the Usecue kitchensink (usecue_kitchensink/assets/css/style.css) */

/* Geist (SIL Open Font License) for everything, in 400, 600, 700 and 800 */
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/geist-v4-latin-regular.woff2) format('woff2');
}

@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/geist-v4-latin-600.woff2) format('woff2');
}

@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/geist-v4-latin-700.woff2) format('woff2');
}

/* only for the numbers on the homepage */
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(../fonts/geist-v4-latin-800.woff2) format('woff2');
}

:root {
    --color-primary: #101010;
    --color-primary-dark: #000;
    --color-red: #e5322d;
    --color-text: #202124;
    --color-muted: #5f6368;
    --color-border: #dadce0;
    --color-bg: #f1f3f4;
    --color-white: #fff;
    --font-text: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, Menlo, Consolas, monospace;
    --topbar-height: 56px;
    /* only on the boxes: the comment thread, the menus and the form boxes */
    --radius: 4px;
    --shadow: 0 4px 24px rgba(0, 0, 0, .14), 0 1px 4px rgba(0, 0, 0, .08);
    /* the top bar, the address bar on the homepage and the form boxes, instead of a border */
    --shadow-small: 0 1px 6px rgba(32, 33, 36, .12);
    /* the black bar on the left of the homepage, the admin and the log in pages, 4px on smaller
       screens; the content starts this far from the left edge, so it clears the bar */
    --bar-width: 12px;
    --gutter-left: 44px;
    --gutter-right: 20px;
}

@media (max-width: 960px) {
    :root {
        --bar-width: 4px;
        --gutter-left: 28px;
        --gutter-right: 24px;
    }
}

/* no spacing from the browser, which differs per browser: every margin, padding and font size is set here */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font: 16px/1.5 var(--font-text);
    color: var(--color-text);
    background: var(--color-white);
}

/* form controls do not take the font of the page by default */
button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 34px;
}

h2 {
    margin: 20px 0;
    font-size: 26px;
}

h3 {
    margin: 18px 0;
    font-size: 18px;
}

h4 {
    margin: 20px 0;
    font-size: 16px;
}

p {
    margin: 15px 0;
}

a {
    color: var(--color-primary);
}

code,
pre {
    font-family: var(--font-mono);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

.muted {
    color: var(--color-muted);
}

/* ---- topbar ---------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--topbar-height);
    padding: 0 16px;
    background: var(--color-white);
    box-shadow: var(--shadow-small);
}

.brand,
.brand a {
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}

.brand .brand-suffix {
    font-weight: 400;
}

/* the logo: a black circle, as high as the hexagon in the header of cms.usecue.com (1.2rem there) */
.logo {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    vertical-align: -3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.toplink {
    color: var(--color-text);
    text-decoration: none;
}

.toplink:hover {
    color: var(--color-primary);
}

.icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
    background: var(--color-bg);
}

.icon-button svg,
.mode svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* ---- buttons & forms ------------------------------------------------------- */

/* like the buttons of pos.usecue.com: square, black and bold, with a border of the same color, so
   the reversed (ghost) button has the same size; as high as the fields */
.button,
.small-button {
    display: inline-block;
    height: 38px;
    padding: 0 24px;
    border: 2px solid var(--color-primary);
    border-radius: 0;
    background: var(--color-primary);
    color: var(--color-white);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 34px;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.small-button:hover {
    background: var(--color-primary-dark);
}

/* on top of the space between them in the html */
.button + .button,
.small-button + .small-button {
    margin-left: 6px;
}

.button:disabled {
    opacity: .6;
    cursor: default;
}

/* the focus ring of the browser (Tab), only moved: off the dark buttons, where it does not show, and
   inside the menu items and screen size buttons, whose box would cut it off */
.button:focus-visible,
.small-button:focus-visible {
    outline-offset: 2px;
}

.panel-item:focus-visible,
.mode:focus-visible {
    outline-offset: -2px;
}

.button.small,
.small-button {
    height: 28px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 24px;
}

.button.ghost {
    background: transparent;
    color: var(--color-primary);
}

.button.danger,
.small-button.danger {
    border-color: var(--color-red);
    background: var(--color-red);
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.link-button:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* a button that looks like a text link (an <a>), for an action that has to be posted */
.text-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-primary);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.form-group {
    position: relative;
    margin-bottom: 16px;
}

/* a link at the end of the label line ("Forgot password?"); after the field in the html, so Tab
   goes from field to field */
.label-link {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

/* like the fields of pos.usecue.com: square, a light border and a hint of gray; focused, the
   browser draws its own ring. The text is 16px, also where the text around it is smaller */
.form-control {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 0;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: inherit;
    background: rgba(0, 0, 0, .02);
}

/* one height in every browser: the 38px of the fields of pos.usecue.com */
.form-control:not(textarea) {
    height: 38px;
    padding-block: 0;
}

/* a field that can not be changed, like the email address on the account page */
.form-control:disabled {
    border-color: var(--color-border);
    background: var(--color-white);
    color: #9aa0a6;
    cursor: not-allowed;
}

/* 5px below the field; most are an empty span below every field, which takes no room */
.form-error {
    display: block;
    margin: 5px 0 0;
    color: var(--color-red);
    font-size: 14px;
}

.form-error:empty {
    display: none;
}

/* ---- layout ---------------------------------------------------------------- */

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px;
}

.container.wide {
    max-width: 1100px;
}

/* the pages (log in, register, password) are light gray like the annotation screen, with white cards on it; the home and the admin are white */
body.login {
    min-height: 100vh;
    background: var(--color-bg);
}

/* the log in pages (templates/login.phtml), like pos.usecue.com: the name above a narrow column
   on white, the forms without their card, with the black bar of the homepage on the left */
body.auth {
    /* centred in the white right of the bar */
    padding-left: var(--bar-width);
    background: var(--color-white);
    line-height: 1.45;
}

body.auth::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: var(--bar-width);
    height: 100vh;
    background: var(--color-primary);
}

.auth-column {
    max-width: calc(288px + 2 * 16px);
    margin: 0 auto;
    padding: 28px 16px 96px;
}

/* the name in 2rem, its icon 2.5rem high, like pos.usecue.com; smaller on a phone */
.auth-brand {
    margin: 20px 0 32px;
    font-size: clamp(22px, 7vw, 32px);
    line-height: 1;
}

.auth-brand .brand {
    display: inline-flex;
    align-items: center;
    font-size: inherit;
    line-height: 1;
}

.auth-brand .logo {
    width: 1.25em;
    height: 1.25em;
    margin-right: .375em;
}

body.auth .form-group label {
    margin-bottom: 6px;
}

/* "Reset" at the end of the label, as large as the label */
body.auth .label-link {
    font-size: inherit;
}

body.auth .card.narrow {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

/* no line above the links below the form: they follow with some room, like "New user? Register"
   on pos.usecue.com; more lines below the first one with less room */
body.auth .card.narrow hr {
    margin: 21px 0 0;
    border: 0;
}

body.auth .card.narrow hr ~ p,
body.auth .card.narrow hr ~ form p {
    margin-top: 12px;
    color: var(--color-text);
}

body.auth .card.narrow hr + p,
body.auth .card.narrow hr + form p {
    margin-top: 0;
}

/* one rhythm: 16px between the heading, the text and the fields, like between the fields, and
   32px above the buttons */
body.auth .card.narrow h2 {
    margin-bottom: 16px;
}

body.auth .card.narrow h2 + p {
    margin-top: 0;
}

body.auth .card.narrow p + form {
    margin-top: 16px;
}

body.auth .card.narrow form .button {
    margin-top: 16px;
}

/* also a button below the text ("Back to log in") */
body.auth .card.narrow p:has(> .button) {
    margin-top: 24px;
}

/* "Send a new code" on its own line below "No email? Check your spam.", as far as the next line */
body.auth .card.narrow hr ~ form .text-link[name="resend"] {
    display: block;
    margin-top: 12px;
}

/* the fields with the line height of the browser, like pos.usecue.com */
body.auth .form-control {
    line-height: normal;
}

.card {
    position: relative;
    margin-bottom: 16px;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
}

.card.narrow {
    max-width: 380px;
    margin: 40px auto;
    padding: 32px 28px;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-small);
}

/* room between the introduction of a form and its first field */
.card.narrow p + form {
    margin-top: 32px;
}

/* between a form and the links to the other forms below it */
.card.narrow hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

/* the links below the line are one group, also one that posts (a text-link button in a form) */
.card.narrow hr ~ p,
.card.narrow hr ~ form p {
    margin: 8px 0 0;
}

/* room between the last field and the buttons (submit and Cancel, so they stay aligned) */
.card.narrow form .button {
    margin-top: 8px;
}

.card h2,
.card h4 {
    margin-top: 0;
}

.card-actions {
    float: right;
    margin-left: 12px;
}

/* ---- two-step verification (see TwoFactor) ---------------------------------- */

/* six boxes behind one transparent input (so pasting and autofill still work), like
   cms.usecue.com. Each digit plus its letter-spacing takes one sixth of the width plus a gap (in
   cqw, the width of .codeboxes), and the left padding centres the first digit in its box */
.codeboxes {
    --gap: 8px;
    container-type: inline-size;
    position: relative;
    display: flex;
    gap: var(--gap);
    width: 100%;
    height: 52px;
    margin: 0 0 16px;
    overflow: hidden;
    /* hidden can still be scrolled by the browser (Firefox does, to show the caret after the last
       digit, which moves the digits off their boxes), clip can not */
    overflow: clip;
    font: 28px/1 var(--font-mono);
}

.codeboxes span {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, .2);
    background: rgba(0, 0, 0, .02);
}

.codeboxes:focus-within span.active {
    border-color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.codeboxes input {
    position: absolute;
    top: 0;
    left: 0;
    /* wider than the boxes (.codeboxes clips it), so the caret after the sixth digit fits */
    width: 200cqw;
    height: 100%;
    padding: 0 0 0 calc((100cqw - 5 * var(--gap)) / 12 - 0.5ch);
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    line-height: 52px;
    letter-spacing: calc((100cqw + var(--gap)) / 6 - 1ch);
}

/* the QR code of a new authenticator app, with its secret to type in below it */
.totpsetup {
    margin: 24px 0;
    border: 1px solid var(--color-border);
}

.totpsetup .qrcode {
    padding: 24px 16px 16px;
}

.totpsetup .qrcode img {
    display: block;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
}

/* like the divider of the kitchensink */
.totpsetup .or {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--color-muted);
    font-size: 15px;
}

.totpsetup .or::before,
.totpsetup .or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--color-border);
}

.totpsetup .secret {
    padding: 16px 16px 24px;
    font: 17px var(--font-mono);
    letter-spacing: .2em;
    text-align: center;
    word-break: break-all;
}

/* the tabs of the account pages (Info, Password, Security), each its own page, and of the
   annotations panel of the app */
.tabs {
    display: flex;
    gap: 24px;
    margin: 0 0 24px;
    border-bottom: 1px solid var(--color-border);
}

.tabs a,
.tabs button {
    margin-bottom: -1px;
    padding: 8px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--color-muted);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tabs a:hover,
.tabs button:hover {
    color: var(--color-text);
}

.tabs a.active,
.tabs button.active {
    border-bottom-color: var(--color-primary);
    color: var(--color-text);
}


/* the account pages: more room above each section (and not the room before a form with fields) */
.account h3 {
    margin-top: 32px;
}

.card.narrow.account p + form {
    margin-top: 0;
}

/* the trusted connections on the account page, each with a Forget button */
/* a line below the last connection ends the list, with room above it */
.trusted-list {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    list-style: none;
}

/* and less below it: the (hidden) divider of the account card after the list is smaller */
body.auth .card.narrow form:has(> .trusted-list) + hr {
    margin-top: 12px;
}

.trusted-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
}

/* a line between the connections */
.trusted-list li + li {
    border-top: 1px solid var(--color-border);
}

/* ---- homepage -------------------------------------------------------------- */

/* centred in the window like on cms.usecue.com */
.hero {
    padding: 80px var(--gutter-right) 64px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 34px;
}

.hero h1,
.steps h2,
.features h2,
.faq h2,
.cta h2 {
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.1;
}

.hero h1 {
    font-size: 64px;
}

@media (max-width: 750px) {
    .hero h1 {
        font-size: 56px;
    }
}

/* the line break after "Feedback" only on wider screens */
@media (max-width: 560px) {
    .hero h1 {
        font-size: 44px;
    }

    .hero h1 br {
        display: none;
    }
}

.lead {
    margin: 31px auto 0;
    max-width: 520px;
    color: var(--color-muted);
    font-size: 17px;
    line-height: 1.6;
}

/* a black border and a large shadow, so it stands out as the first thing to try */
.urlbar {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, .2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .07), 0 1px 3px rgba(0, 0, 0, .05);
    overflow: hidden;
    background: var(--color-white);
}

.urlbar input {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 16px;
}

.urlbar input::placeholder {
    color: var(--color-muted);
    opacity: 1;
}

/* the focus ring of the browser, like on the fields of the log in page, but around the whole bar:
   the input is only the part before the button, and the bar would cut off its ring */
.urlbar:has(input:focus) {
    outline: auto;
}

/* the button with the bar around it */
.urlbar .button {
    margin: 5px;
    border: 0;
    line-height: 38px;
}

/* who the homepage is for, above the heading, like the labels of the numbers */
.kicker {
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 13px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

/* the drawing of a page with an annotation, like the two windows on cms.usecue.com (img/annotate.svg) */
.drawing {
    width: min(520px, 100%);
    margin: 72px auto 16px;
    user-select: none;
}

/* the drawing is 520 by 250, with a margin of 40 around it in the svg for the shadows: the image
   sticks out that far (40/520 of the width) around its box */
.drawing img {
    display: block;
    width: 115.385%;
    max-width: none;
    height: auto;
    margin: -7.692%;
}

/* the black bar on the left and the top bar of cms.usecue.com, only on the homepage: not sticky,
   without a shadow, the name in its size and the links in gray */
body.home {
    --topbar-height: 70px;
}

body.home::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: var(--bar-width);
    height: 100vh;
    background: var(--color-primary);
}

body.home .topbar {
    position: relative;
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--gutter-right) 0 var(--gutter-left);
    box-shadow: none;
}

/* the admin pages in the layout of the homepage: the content lines up with the column of the top
   bar, the footer stays at the bottom of the window */
body.admin {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.admin .topbar {
    width: 100%;
}

body.admin main.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1280px;
    padding: 24px var(--gutter-right) 112px var(--gutter-left);
}

/* the sessions panel at the right edge of that column, not of the window (the pointer follows) */
body.home .panel {
    right: max(20px, calc((100% - 1280px) / 2 + 20px));
}

body.home .topbar .brand {
    display: flex;
    align-items: center;
    font-size: 21.6px;
    line-height: 1.15;
}

body.home .topbar .logo {
    width: 28.8px;
    height: 28.8px;
    margin-right: 12.6px;
}

body.home .topbar-right {
    gap: 24px;
}

/* no hover color, like the menu of cms.usecue.com */
body.home .toplink,
body.home .toplink:hover {
    color: rgba(16, 16, 16, .5);
    font-size: 16px;
}

body.home .topbar .button {
    height: 36px;
    padding: 0 20px;
    border: 0;
    font-size: 15px;
    line-height: 36px;
}

@media (max-width: 560px) {
    body.home .toplink {
        display: none;
    }
}

/* below the hero, like cms.usecue.com: the steps in a band, a screenshot that sticks out above it,
   a list of features, the questions, the close with the address bar again, the numbers and a black
   footer. The texts are at most 800px wide */
.steps,
.features,
.faq,
.cta,
.stats {
    padding: 0 max(var(--gutter-right), calc((100% - 800px) / 2)) 112px max(var(--gutter-left), calc((100% - 800px) / 2));
    text-align: center;
}

/* the questions and the numbers in a light gray band, like the steps, the close white between them */
.faq,
.stats {
    border-block: 1px solid rgba(0, 0, 0, .1);
    background: #fafafa;
}

.stats {
    padding-bottom: 0;
}

.stats ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 0;
    list-style: none;
}

.stats li div:first-child {
    font-size: 37px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.5;
}

.stats li div:last-child {
    opacity: .5;
    font-size: 13px;
    letter-spacing: 1.6px;
    line-height: 1.5;
    text-transform: uppercase;
}

/* like "How Annotation works" on annotate.site: the three steps side by side, below each other on a
   phone, their number in front of the title; in a band that is 280px high below them, as the
   screenshot sticks out 200px into it */
.steps {
    padding-bottom: 280px;
    border-block: 1px solid rgba(0, 0, 0, .1);
    background: #fafafa;
}

.steps ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 48px;
    margin-top: 48px;
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
}

.steps h3 {
    margin: 0 0 10px;
    color: var(--color-primary);
    font-size: 20px;
}

.steps h3::before {
    content: counter(step) ". ";
}

.steps p,
.faq p,
.cta h2 + p {
    margin: 0;
    color: var(--color-muted);
    font-size: 17px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .steps ol {
        grid-template-columns: 1fr;
    }
}

/* .5em below the h2, like cms.usecue.com; more space above the one of the steps, at the top of
   their band, the questions and the close, less above the one of the features, below the
   screenshot */
.steps h2,
.features h2,
.faq h2,
.cta h2 {
    margin: 0 0 18px;
    font-size: 37px;
}

.steps h2,
.faq h2,
.cta h2 {
    padding-top: 100px;
}

.features h2 {
    padding-top: 24px;
}

/* the questions below each other with a line between them, like the FAQ of most websites: a click
   on a question opens its answer, the plus at the end turns into a minus */
.faq details {
    max-width: 720px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    text-align: left;
}

.faq details:first-of-type {
    margin-top: 48px;
    border-top: 1px solid rgba(0, 0, 0, .1);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
    color: var(--color-primary);
    font-size: 17px;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "\2212";
}

/* the answer right below its question */
.faq details[open] summary {
    padding-bottom: 4px;
}

/* while the answer slides closed (js/home.js) */
.faq details.closing summary::after {
    content: "+";
}

.faq details p {
    padding: 0 40px 20px 0;
}

/* the close, below the questions: the line above its heading, like the one of the hero, takes the
   space above the heading; its text as wide as the address bar below it */
.cta .kicker {
    padding-top: 100px;
}

.cta .kicker + h2 {
    padding-top: 0;
}

.cta h2 {
    margin-bottom: 26px;
}

.cta h2 + p {
    max-width: 640px;
    margin: 0 auto 32px;
}

.features ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 0 32px;
    margin-top: 30px;
    color: var(--color-primary);
    opacity: .5;
    font-size: 17px;
    line-height: 2.2;
    list-style: none;
}

/* the image sticks out 200px into the band of the steps, 80px below them */
.screenshot {
    padding: 0 var(--gutter-right) 32px var(--gutter-left);
}

.screenshot a {
    display: block;
    max-width: 800px;
    margin: -200px auto 0;
    cursor: pointer;
}

.screenshot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* the screenshot large, on a black transparent overlay, like the lightbox of cms.usecue.com: at
   most 1200px, with a white cross at the top right */
.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .85);
    cursor: pointer;
}

.lightbox::backdrop {
    background: none;
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    display: block;
    width: auto;
    max-width: min(100%, 1200px);
    height: auto;
    max-height: min(100%, 1200px);
}

.lightbox-close {
    position: fixed;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
}

.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    top: 23px;
    left: 14px;
    width: 23px;
    height: 3px;
    background: var(--color-white);
    transform: rotate(-45deg);
}

.lightbox-close::after {
    transform: rotate(45deg);
}

.footer {
    padding: 28px 0 0;
    background: #111;
    color: #efefef;
    font-size: 15px;
    line-height: 2.2;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

/* the content in the 1280px of the top bar */
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0 64px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px var(--gutter-left) 32px;
}

.footer-inner > div {
    max-width: 352px;
}

.footer-inner > div + div {
    padding-left: 28px;
}

.footer .brand {
    display: flex;
    align-items: center;
    padding: 16px 0 11px;
    color: inherit;
    font-size: 24px;
    line-height: 1.15;
}

.footer .logo {
    width: 28.8px;
    height: 28.8px;
    margin-right: 12.6px;
    background: currentColor;
}

.footer-inner p {
    margin: 11px 0 0;
    opacity: .5;
    line-height: 1.5;
}

.footer h3 {
    margin: 22px 0 24px;
    font-size: 18px;
}

.footer li {
    list-style: none;
    opacity: .5;
}

/* the line goes over the whole width, the text lines up with the columns above it */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .05);
}

.footer-bottom .footer-inner {
    padding-block: 28px 24px;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 750px) {
    .footer-inner {
        flex-direction: column;
    }

    .footer-inner > div + div {
        padding-left: 0;
    }
}

/* ---- dropdown panels ------------------------------------------------------- */

.panel {
    position: fixed;
    top: calc(var(--topbar-height) + 12px);
    right: 12px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - var(--topbar-height) - 30px);
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow);
}

/* small triangle pointing at the button that opened it, like the comment thread; --pointer is
   its distance to the right side. The list scrolls instead of the panel, so it is not cut off. */
.panel::before {
    content: "";
    position: absolute;
    top: -6px;
    right: var(--pointer, 32px);
    margin-right: -6px;
    border: 6px solid transparent;
    border-top-width: 0;
    border-bottom-color: var(--color-white);
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

/* the tabs of the annotations panel of the app, on the line below the header */
/* on one baseline: the tab that is not selected is smaller and not bold */
.panel-header.tabs {
    align-items: baseline;
    margin: 0;
    padding: 0 16px;
}

.panel-header.tabs button {
    padding: 12px 0 10px;
    color: #80868b;
    font-size: 14px;
    font-weight: normal;
}

.panel-header.tabs button:hover {
    color: var(--color-text);
}

.panel-header.tabs button.active {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 600;
}

.panel-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin: 0;
    padding: 4px 0;
    border-radius: 0 0 var(--radius) var(--radius);
    list-style: none;
}

.panel-list li {
    position: relative;
}

.panel-item {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

a.panel-item,
#annotation-list .panel-item {
    padding-right: 44px;
}

.panel-item:hover {
    background: var(--color-bg);
}

.panel-dot {
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--color-red);
}

.dismissed .panel-dot,
.panel-dot.done {
    background: #c8cbce;
}

/* keeps its place, so the titles stay aligned */
.panel-dot[hidden] {
    display: block;
    visibility: hidden;
}

.dismissed .panel-title {
    color: var(--color-muted);
}

.panel-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel-title,
.panel-meta {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 13px, below the 14px of the rest, to keep the menu compact */
.panel-meta {
    color: var(--color-muted);
    font-size: 13px;
}

/* the toggle for the sessions without annotations (web/js/home.js) */
.panel-more {
    color: var(--color-muted);
    font-size: 13px;
}

.panel-more:hover {
    color: var(--color-primary);
}

.panel-empty {
    padding: 16px;
    color: var(--color-muted);
}

/* the Ctrl hint below the annotations, always in view: only the list above it scrolls */
.panel-remove {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--color-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* light, like the close button of the comment window */
.panel-remove:hover {
    background: var(--color-bg);
}

/* ---- annotation screen ----------------------------------------------------- */

body.app {
    height: 100vh;
    overflow: hidden;
}

.current-url {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0 10vw 0 0;
}

.current-url input {
    min-width: 0;
    flex: 1 1 auto;
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: 0;
    background: var(--color-bg);
    color: var(--color-muted);
    font: inherit;
    font-size: 14px;
    text-overflow: ellipsis;
}

.current-url input:focus {
    border-color: var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
}

.modes {
    display: flex;
    flex: none;
    box-sizing: border-box;
    height: 34px;
    margin-left: auto;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 0;
    border-left: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.mode:first-child {
    border-left: 0;
}

.mode svg {
    width: 18px;
    height: 18px;
}

.mode:hover {
    color: var(--color-text);
}

.mode.active {
    background: #e8eaed;
    color: var(--color-primary);
}

.app .topbar-right {
    margin-left: 0;
}

/* same height as the screen size buttons (Share, and Login on the homepage) */
.topbar .button {
    height: 34px;
    padding: 0 16px;
    font-size: 15px;
    line-height: 30px;
}

.stage {
    position: absolute;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0;
    overflow: hidden;
    background: var(--color-bg);
}

.frame-wrap {
    position: relative;
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
}

.frame-wrap.loading::after {
    content: "Loading…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .85);
    color: var(--color-muted);
}

.frame-wrap iframe {
    display: block;
    border: 0;
    transform-origin: 0 0;
}

/* the annotations as text for readers that do not run scripts (pages/s(app).phtml), not with "hidden" or
   "display: none", text extractors skip those; app.js removes it */
.transcript {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.thread {
    position: fixed;
    z-index: 25;
    display: flex;
    flex-direction: column;
    width: 320px;
    max-height: min(480px, calc(100vh - var(--topbar-height) - 16px));
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow);
    transition: opacity .15s;
}

/* small triangle pointing at the dot; data-pointer is the side of the window it is on */
.thread::before {
    content: "";
    position: absolute;
    border: 6px solid transparent;
}

.thread[data-pointer="none"]::before {
    display: none;
}

.thread[data-pointer="left"]::before {
    top: var(--pointer);
    left: -6px;
    margin-top: -6px;
    border-left-width: 0;
    border-right-color: var(--color-white);
}

.thread[data-pointer="right"]::before {
    top: var(--pointer);
    right: -6px;
    margin-top: -6px;
    border-right-width: 0;
    border-left-color: var(--color-white);
}

.thread[data-pointer="top"]::before {
    left: var(--pointer);
    top: -6px;
    margin-left: -6px;
    border-top-width: 0;
    border-bottom-color: var(--color-white);
}

.thread[data-pointer="bottom"]::before {
    left: var(--pointer);
    bottom: -6px;
    margin-left: -6px;
    border-bottom-width: 0;
    border-top-color: var(--color-white);
}

.thread.offscreen {
    opacity: .5;
}

/* hidden while Ctrl (or ⌘) is held, to see the page and follow its links; not with display: none,
   which would take the focus from a comment being typed */
.browsing .thread,
.browsing .panel {
    opacity: 0;
    pointer-events: none;
}

.thread-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 8px 10px 16px;
}

.thread-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-height: 280px;
    overflow: auto;
    padding-top: 4px;
    font-size: 14px;
}

.thread-label {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.thread-close {
    flex: none;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--color-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.thread-close:hover {
    background: var(--color-bg);
}

.thread-comments {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 4px 16px;
    border-top: 1px solid var(--color-border);
}

.thread-comments:empty {
    display: none;
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-bg);
}

.comment:last-child {
    border-bottom: 0;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.name-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.comment-head .name-button {
    font-weight: 700;
}

.name-button:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.comment-meta .link-button {
    font-size: inherit;
}

.comment-edit {
    margin: 6px 0 4px;
}

.comment-edit .form-control {
    margin-bottom: 8px;
    resize: vertical;
    font-weight: 400;
}

.comment-message,
.comment p {
    margin: 2px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.thread-form {
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
}

.thread-form .form-control {
    margin-bottom: 8px;
    resize: vertical;
}

.thread-status {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.thread-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--color-border);
}

.thread-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

/* the toasts at the bottom: a message for a moment, and the hint how to follow links, which stays
   until it is closed; they look the same and stack, the newest message on top */
.toasts {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
}

.toast,
.hint {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow);
}

/* a toast rises in and sinks away */
.toast {
    transition: opacity .15s, transform .15s;
}

@starting-style {
    .toast {
        opacity: 0;
        transform: translateY(8px);
    }
}

.toast-leaving {
    opacity: 0;
    transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: none;
    }
}

.hint {
    gap: 12px;
    padding-right: 10px;
}

.hint-close {
    display: flex;
    flex: none;
    padding: 4px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.hint-close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ---- admin ----------------------------------------------------------------- */

/* the trail above an admin page (Admin > Users > ...), set by the page like in megagen; one line
   is kept for it on every page, also without a trail (the dashboard), so the titles line up */
.breadcrumbs {
    min-height: 1.5em;
    margin-top: 16px;
    line-height: 1.5;
    color: silver;
}

.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumbs li + li::before {
    content: "›";
    margin: 0 6px;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

/* close to the title below them */
.breadcrumbs + h2 {
    margin-top: 0;
}

/* a text above a table, the tiles or a form, like the explanation on the dashboard, the email
   templates, the crons and the websites */
.admin p + table,
.admin p + .iconlinks,
.admin p + form {
    margin-top: 32px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: var(--color-white);
}

th,
td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

th:first-child,
td:first-child {
    padding-left: 0;
}

th:last-child,
td:last-child {
    padding-right: 0;
}

th {
    font-weight: 400;
    color: var(--color-muted);
}

table.details th {
    width: 120px;
}

table.details tr:last-child th,
table.details tr:last-child td {
    border-bottom: 0;
}

td.url,
p.url,
span.url {
    word-break: break-all;
}

/* the host above its boards in the list of boards */
tr.group th {
    padding-top: 24px;
    font-weight: 600;
    font-size: inherit;
    color: inherit;
}

tr.group .muted {
    font-weight: 400;
}

td.actions {
    text-align: right;
    white-space: nowrap;
}

/* the annotations of a session, each like its window in the app (.thread), side by side */
.threads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: start;
    gap: 16px;
    margin-bottom: 24px;
}

.thread-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow-small);
}

.thread-card .thread-header {
    padding-right: 16px;
}

.thread-card .thread-title {
    max-height: none;
}

.thread-card .thread-comments {
    max-height: 320px;
}

.thread-card .thread-actions {
    align-items: flex-end;
    gap: 12px;
}

.thread-place {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.inline-form {
    display: inline;
}

/* the buttons below a details table, with the room of a paragraph */
.actions-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 15px 0;
}

.actions-bar .button + .button {
    margin-left: 0;
}

/* three dots that open a menu with the less used actions, like the dropdown panels */
.kebab {
    position: relative;
}

.kebab summary {
    list-style: none;
}

.kebab summary::-webkit-details-marker {
    display: none;
}

.kebab[open] summary {
    background: var(--color-bg);
}

.kebab-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    min-width: 180px;
    padding: 4px 0;
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow);
}

.kebab-menu .panel-item {
    white-space: nowrap;
}

/* narrow and without a background next to Share */
.topbar .kebab summary {
    width: 24px;
    background: none;
}

/* at the right side of the topbar, so it opens to the left */
.topbar .kebab-menu {
    left: auto;
    right: 0;
}

.panel-item.danger {
    color: var(--color-red);
}

/* the status of a cron run or day, like in megagen: green when all ran, red with errors, orange
   with missed runs, gray while running or still to run today */
.status-dot {
    display: inline-block;
    width: .75em;
    height: .75em;
    margin-right: .5em;
    border-radius: 50%;
    background: #bdc1c6;
}

.status-dot.succeeded {
    background: #1e8e3e;
}

.status-dot.failed {
    background: var(--color-red);
}

.status-dot.missed {
    background: #f29900;
}

/* the errors and the output of a cron run */
pre.log {
    white-space: pre-wrap;
    word-break: break-all;
}

/* the search field above an admin list, like the admin of megagen: the full width, with a magnifier
   on the right instead of the clear button of the browser */
.search {
    margin-bottom: 16px;
}

.search input {
    padding-right: 40px;
    background: rgba(0, 0, 0, .02) url(../img/admin/search-solid-thick.svg) right 8px center / 24px no-repeat;
}

.search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* a heading with controls against the right side, like the switches next to "Boards" */
.heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    column-gap: 24px;
}

.heading .switches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.heading .switch {
    margin-bottom: 0;
}

/* a checkbox shown as a rounded slider, like "Hide empty boards" on the boards page */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch .slider {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--color-border);
    transition: background .15s;
}

.switch .slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: transform .15s;
}

.switch input:checked + .slider {
    background: var(--color-primary);
}

.switch input:checked + .slider::before {
    transform: translateX(16px);
}

.switch input:focus-visible + .slider {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* the dashboard: a square tile with a Line Awesome icon per admin page, like the admin of megagen */
.iconlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0;
    list-style: none;
}

.iconlinks a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 128px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.iconlinks a:hover {
    border-color: var(--color-primary);
}

.iconlinks img {
    display: block;
    height: 40px;
    margin-bottom: 5px;
    opacity: .8;
}

.iconlinks .badge {
    top: 8px;
    right: 8px;
}

/* the preview of an email template: its paragraphs and lists with the room a mail program gives them */
.email-preview {
    max-width: 640px;
}

.email-preview > :first-child {
    margin-top: 0;
}

.email-preview > :last-child {
    margin-bottom: 0;
}

.email-preview ul,
.email-preview ol {
    margin: 15px 0;
    padding-left: 24px;
}

/* ---- small screens --------------------------------------------------------- */

/* medium screens: the address bar is more useful than the app name */
@media (max-width: 750px) {
    .app .brand {
        display: none;
    }
}

/* small screens: only the screen sizes on the left and the actions on the right */
@media (max-width: 600px) {
    .current-url {
        display: none;
    }

    .modes {
        margin-left: 0;
    }

    .app .topbar-right {
        margin-left: auto;
    }
}

@media (max-width: 600px) {

    .stage {
        padding: 0;
    }

    .thread {
        left: 0 !important;
        right: 0;
        bottom: 0;
        top: auto !important;
        width: 100%;
        max-height: 60vh;
        border-radius: var(--radius) var(--radius) 0 0;
    }
}
