/* Page-level styles added with the Logs, Commands and Get started reworks, and the look settings. Quiet: space and type instead of boxes. */
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover:not(:disabled) { text-decoration: underline; } .link-btn:disabled { color: var(--fg-subtle); cursor: default; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--canvas-overlay); }
.seg { border: 0; border-radius: 999px; padding: 5px 14px; background: none; color: var(--fg-muted); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; transition: background .2s, color .2s; }
.seg:hover { color: var(--fg); }
.seg[aria-pressed="true"] { background: var(--canvas-subtle); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* Look settings */
.prefs .box-body { display: grid; gap: 0; padding-block: 4px; }
.pref-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 12px 24px; align-items: center; padding: 16px 0; }
.pref-row + .pref-row { border-top: 1px solid var(--border-muted); }
.pref-label { display: grid; gap: 2px; } .pref-label span { color: var(--fg-muted); font-size: 13px; }
@media (max-width: 700px) { .pref-row { grid-template-columns: 1fr; } }
.prefs .ui-choices { grid-template-columns: repeat(2, minmax(0, 190px)); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; background: var(--sw, var(--av)); cursor: pointer; outline-offset: 3px; transition: transform .15s; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--canvas-subtle), 0 0 0 4px var(--sw, var(--av)); }
.swatch:hover { transform: scale(1.08); } .swatches.small .swatch { width: 22px; height: 22px; }
.avatar-swatch { --sw: var(--av); }
.avatar-swatch[data-color="ultramarine"] { --av: #2057d6; } .avatar-swatch[data-color="coral"] { --av: #c43d2a; } .avatar-swatch[data-color="moss"] { --av: #2f7d5b; }
.avatar-swatch[data-color="violet"] { --av: #7a45d6; } .avatar-swatch[data-color="amber"] { --av: #905f00; } .avatar-swatch[data-color="graphite"] { --av: #3d4452; }
.avatar-editor { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; } .avatar-editor .avatar.lg { width: 56px; height: 56px; font-size: 28px; }
.stack-s { display: grid; gap: 12px; }
.avatar-picks { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.pick { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border-muted); background: var(--canvas-subtle); font-size: 17px; cursor: pointer; color: var(--fg); }
.pick:hover { background: var(--canvas-overlay); } .pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-subtle); }
.avatar-input { width: 64px !important; min-height: 34px !important; padding: 4px 8px !important; text-align: center; }

/* Logs */
.logs { gap: 20px; }
.logs-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.logs-searchbox { position: relative; flex: 1 1 280px; } .logs-searchbox .octicon { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: var(--fg-subtle); pointer-events: none; }
.logs-search { width: 100%; padding-inline-start: 38px !important; border-radius: 999px !important; }
.logs-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.logs-tools select { min-height: 34px; padding: 4px 28px 4px 12px; border-radius: 999px; font-size: 13.5px; }
.logs-list { display: grid; gap: 4px; }
.log-day { margin: 18px 0 4px; font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.log-group { list-style: none; margin: 0; padding: 0; display: grid; }
.log-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 9px 8px; border: 0; border-radius: 12px; background: none; color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.log-row:hover, .log-row[aria-expanded="true"] { background: var(--canvas-subtle); }
.log-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--canvas-overlay); color: var(--fg-muted); }
.log-badge .octicon { width: 15px; height: 15px; }
.log-row.warn .log-badge { background: var(--attention-subtle); color: var(--attention); } .log-row.error .log-badge { background: var(--danger-subtle); color: var(--danger); }
.log-row[data-x] .log-badge { background: var(--accent-subtle); }
.log-text { min-width: 0; overflow-wrap: anywhere; } .log-time { color: var(--fg-subtle); font-size: 13px; font-variant-numeric: tabular-nums; }
.log-detail { margin: 0 8px 8px 52px; padding: 10px 14px; display: grid; gap: 6px; border-radius: 12px; background: var(--canvas-subtle); font-size: 13.5px; }
.log-detail div { display: grid; grid-template-columns: 80px 1fr; gap: 8px; } .log-detail dt { color: var(--fg-muted); } .log-detail dd { margin: 0; overflow-wrap: anywhere; }
.log-empty { padding: 48px 0; text-align: center; color: var(--fg-muted); } .log-empty strong { color: var(--fg); font-size: 16px; } .log-empty p { margin: 6px 0 0; }
.log-more { justify-self: center; margin-top: 12px; }
.log-skeleton { display: grid; gap: 10px; } .log-skeleton i { height: 44px; border-radius: 12px; background: var(--canvas-subtle); animation: sk 1.2s ease-in-out infinite alternate; }
@keyframes sk { to { opacity: .45; } }
@media (max-width: 600px) { .log-row { grid-template-columns: 32px 1fr; } .log-time { grid-column: 2; } }

/* Commands */
.commands { gap: 20px; }
.cmd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cmd-form { display: grid; gap: 16px; } .cmd-form .field { margin: 0; max-width: none; display: grid; gap: 4px; } .cmd-form .field label { margin: 0; }
.cmd-form :is(input, textarea) { width: 100%; background: var(--canvas-inset); color: var(--fg); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; font: inherit; }
.hint-inline { color: var(--fg-muted); font-weight: 400; font-size: 13px; }
.cmd-preview { position: sticky; top: 76px; display: grid; gap: 10px; } .cmd-preview h2 { margin: 0; font-size: 15px; color: var(--fg-muted); font-weight: 600; }
@media (max-width: 1000px) { .cmd-layout { grid-template-columns: minmax(0, 1fr); } .cmd-preview { position: static; } }

/* Get started: tabs instead of a long stack; the cards inside stay calm. */
.gs-head { display: grid; gap: 8px; justify-items: start; margin-bottom: 8px; } .gs-head .section-lead { margin: 0; }
.gs-tabs { max-width: 100%; overflow-x: auto; }
.gs-panel { display: grid; gap: 16px; }
.gs-panel > .section, .gs-panel .section-title { margin-top: 0; }
.gs-panel details.box { overflow: hidden; }
.gs-panel details.box > summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.gs-panel details.box > summary::-webkit-details-marker { display: none; }
.gs-panel details.box[open] > summary { border-bottom: 1px solid var(--border-muted); }
.gs-panel .box-body { padding: 18px; }
.logs-tools select { width: auto; min-width: 0; } .logs-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmd-form .actions-row { justify-content: flex-start; align-items: center; gap: 14px; }
.gs-panel .section-title { display: none; }

/* Interaction hygiene: visible keyboard focus on every new control, no double-tap delay, balanced headings. */
:is(.seg, .swatch, .pick, .log-row, .link-btn, .user-menu-btn, .user-menu-pop a, .user-menu-pop button):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.user-menu-pop :is(a, button):focus-visible { outline-offset: -2px; }
button, a, select, summary, [role="button"] { touch-action: manipulation; }
h1, h2, h3, .pagehead-title { text-wrap: balance; }
.user-menu-pop { overscroll-behavior: contain; }
select { background-color: var(--canvas-inset); color: var(--fg); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--accent-emphasis); color: var(--on-accent); text-decoration: none; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 12px; }
.pref-row .segmented, .pref-row .swatches { justify-self: start; }

/* From the design critique: checkboxes line up with their text and use the accent; the delete icon matches its neighbours; table headings are readable. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-emphasis); width: 18px; height: 18px; margin: 0; flex: none; }
label.check, .check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.task-card-actions .task-action.danger { background: transparent; border-color: var(--border); color: var(--danger); }
.task-card-actions .task-action.danger:hover { background: var(--danger-subtle); border-color: var(--danger); color: var(--danger); }
th { font-size: 13px; font-weight: 600; color: var(--fg-muted); letter-spacing: 0; text-transform: none; }
.field { max-width: 480px; }

/* From the accessibility review */
::placeholder { color: var(--fg-subtle); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (pointer: coarse) {
  .user-menu-btn { min-width: 44px; min-height: 44px; justify-content: center; }
  .seg { min-height: 40px; } .pick { width: 44px; height: 44px; } .swatch { width: 36px; height: 36px; } .swatches.small .swatch { width: 32px; height: 32px; }
  .log-row { min-height: 48px; } .link-btn { min-height: 40px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { .user-menu-pop { animation: none !important; } .log-skeleton i { animation: none; } .user-menu-btn .octicon, .seg, .swatch { transition: none; } }

/* Emoji */
.re-emoji { width: 1.4em; height: 1.4em; vertical-align: -.35em; object-fit: contain; }
.emoji-picker { position: relative; }
.emoji-pop { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline-start: 0; width: min(360px, 86vw); max-height: 340px; overflow: auto; padding: 10px; border: 1px solid var(--border-muted); border-radius: 16px; background: var(--canvas-subtle); box-shadow: var(--shadow); overscroll-behavior: contain; }
.emoji-search { width: 100%; margin-bottom: 8px; border-radius: 999px !important; }
.emoji-title { margin: 8px 2px 4px; font-size: 12.5px; font-weight: 600; color: var(--fg-muted); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-cell { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: none; font-size: 20px; cursor: pointer; }
.emoji-cell:hover, .emoji-cell:focus-visible { background: var(--canvas-overlay); outline: 2px solid transparent; }
.emoji-cell:focus-visible { outline-color: var(--accent); }
.emoji-cell img { width: 28px; height: 28px; object-fit: contain; }
@media (pointer: coarse) { .emoji-cell { width: 44px; height: 44px; } }

/* Get started: one channel open at a time, its parts as tabs */
.route-list { display: grid; gap: 10px; }
.route-panel { display: grid; gap: 18px; }
.route-tabs { justify-self: start; margin-bottom: 8px; }
.route-footer { justify-content: flex-start; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border-muted); }
.route-card > .route-fields { padding: 8px 20px 20px; }
.route-group { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.route-group > legend:not(.sr-only) { padding: 0; margin-bottom: 6px; font-weight: 600; color: var(--fg-muted); font-size: 13.5px; }
.embed-row { align-items: end; }
.embed-drop input[type="url"] { min-height: 40px; }

/* People with their icon: Users, Logs and the overview's recent changes */
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who .avatar { width: 32px; height: 32px; font-size: 16px; }
.log-person { display: inline-flex; width: 32px; height: 32px; } .log-person .avatar { width: 32px; height: 32px; font-size: 16px; }
.recent-list { list-style: none; margin: 0; padding: 6px 12px 10px; display: grid; gap: 2px; }
.recent-item { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 8px 6px; }
.recent-item .when { color: var(--fg-subtle); font-size: 13px; display: block; }
.recent-item .log-badge { width: 32px; height: 32px; }

/* Emoji pictures (Twemoji) and avatars with emoji */
.emoji-pic { width: 22px; height: 22px; vertical-align: middle; } .emoji-cell .emoji-pic { width: 26px; height: 26px; }
.emoji-btn .emoji-pic { width: 16px; height: 16px; }
.twemoji.dc-emoji { width: 1.375em; height: 1.375em; vertical-align: -.3em; }
.avatar { overflow: hidden; } .avatar-emoji { width: 62%; height: 62%; object-fit: contain; vertical-align: middle; }
.pick .emoji-pic { width: 22px; height: 22px; }

/* Your own page background (Settings > Background) */
html[data-bg="custom"] body { background: var(--bg-custom); background-attachment: fixed; }
html[data-bg="custom"] .dashboard-shell::before { display: none; }
html[data-bg="custom"] .dashboard-workspace { background-image: none; }
.bg-editor { display: grid; gap: 12px; justify-items: start; }
.bg-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bg-colors label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg-muted); }
.bg-color { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--canvas-inset); cursor: pointer; }
.bg-angle input[type="range"] { width: 140px; accent-color: var(--accent-emphasis); }
.bg-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-preset { width: 52px; height: 34px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; }
.bg-preset:hover { transform: scale(1.05); }
.avatar-picks .emoji-picker { display: inline-block; }

/* Embeds: cards for the parts, a toolbar in two groups, send bar that stays in view */
.embed-form { display: grid; gap: 16px; min-width: 0; align-content: start; }
.embed-card { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--border-muted); border-radius: 18px; background: var(--canvas-subtle); box-shadow: var(--h-shadow, none); min-width: 0; }
details.embed-card > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-weight: 650; font-size: 16px; }
details.embed-card > summary::-webkit-details-marker { display: none; }
details.embed-card > summary::after { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid var(--fg-muted); border-block-end: 2px solid var(--fg-muted); transform: rotate(45deg); transition: transform .2s; }
details.embed-card[open] > summary::after { transform: rotate(-135deg); }
details.embed-card:not([open]) { gap: 0; }
.embed-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.tool-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.embed-toolbar .btn { min-height: 34px; }
.embed-toolbar .combo { width: 150px; } .embed-toolbar .combo-box { min-height: 34px; padding-block: 0; flex-wrap: nowrap; }
.embed-actions { position: sticky; bottom: 12px; z-index: 5; display: grid; gap: 8px; padding: 12px 16px; border: 1px solid var(--border-muted); border-radius: 18px; background: color-mix(in srgb, var(--canvas-subtle) 92%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.embed-actions-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .embed-actions .embed-count { text-align: start; }
.embed-actions:not(:has(.flash > *)) .flash:empty { display: none; }
.embed-preview h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--fg-muted); }
.embed-layout { gap: 24px; }
.embed-toolbar .combo { width: 128px; } .embed-toolbar .combo-input, .embed-toolbar .combo-input::placeholder { font-size: 14px; }
.emoji-pop.up { top: auto; bottom: calc(100% + 6px); }
.embed-card label { font-size: 15px; font-weight: 600; }
.embed-row { align-items: start; }
.embed-card :is(input[type="text"], input[type="url"]) { height: 40px; min-height: 40px; }
.embed-drop { min-height: 40px; }
/* An open emoji picker stays above the cards that follow it. */
:is(.box, .embed-card):has(.emoji-pop:not([hidden])) { position: relative; z-index: 20; }

/* Cards: your own color, glass or tinted (Settings > Look > Cards) */
html[data-cards="custom"] .dashboard-workspace :is(.box, .stat, .task-card, .panel, .embed-card) { background: var(--card-bg); }
html[data-glass="on"] .dashboard-workspace :is(.box, .stat, .task-card, .panel, .embed-card) {
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  border-color: color-mix(in srgb, #fff 24%, transparent);
  background-image: linear-gradient(145deg, rgb(255 255 255 / .16), rgb(255 255 255 / 0) 55%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 12px 32px rgb(0 0 0 / .16);
}
html[data-cardtone="dark"] .dashboard-workspace :is(.box, .stat, .task-card, .panel, .embed-card) {
  --fg: #eaf0fb; --fg-muted: #b3bed6; --fg-subtle: #a2aecb; --canvas-inset: rgb(255 255 255 / .08); --canvas-overlay: rgb(255 255 255 / .12); --border: rgb(255 255 255 / .18); --border-muted: rgb(255 255 255 / .12); color: var(--fg);
}
html[data-cardtone="light"] .dashboard-workspace :is(.box, .stat, .task-card, .panel, .embed-card) {
  --fg: #121a2e; --fg-muted: #4c5875; --fg-subtle: #576280; --canvas-inset: rgb(0 0 0 / .05); --canvas-overlay: rgb(0 0 0 / .08); --border: rgb(0 0 0 / .16); --border-muted: rgb(0 0 0 / .1); color: var(--fg);
}
.card-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-auto { min-height: 34px; }

/* Stats and Translate tabs */
.stat-bars { display: flex; flex-direction: column; gap: 6px; }
.stat-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; text-align: left;
  font: inherit; color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.stat-row:hover { background: var(--canvas-subtle); }
.stat-row.on { border-color: var(--accent); background: var(--accent-subtle); }
.stat-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.stat-sub { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 500; color: var(--fg-muted); }
.stat-track { display: block; height: 10px; border-radius: 6px; background: var(--border-muted); overflow: hidden; }
.stat-fill { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.stat-fill.button { background: var(--success); }
.stat-fill.message { background: var(--done); }
.stat-count { font-variant-numeric: tabular-nums; color: var(--fg-muted); min-width: 2.5em; text-align: right; }
.day-bar { fill: var(--accent); }
.day-hit { fill: transparent; }
.day-hit:hover { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
/* Stats: commands compared in the chart, one colour per chosen command */
.stat-picker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--canvas); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.stat-chip:hover { background: var(--canvas-subtle); }
.stat-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-subtle); }
.stat-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--fg-muted); }
.stat-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.stat-swatch.s0, .day-bar.s0 { background: var(--accent); fill: var(--accent); }
.stat-swatch.s1, .day-bar.s1 { background: var(--success); fill: var(--success); }
.stat-swatch.s2, .day-bar.s2 { background: var(--attention); fill: var(--attention); }
.stat-swatch.s3, .day-bar.s3 { background: var(--done); fill: var(--done); }
.stat-swatch.s4, .day-bar.s4 { background: var(--danger); fill: var(--danger); }
.stat-swatch.s5, .day-bar.s5 { background: var(--neutral); fill: var(--neutral); }
@media (max-width: 640px) { .stat-chip { min-height: 40px; } }
.flow-card .value.small { font-size: 22px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; }
.translate-view .usage { margin-top: 12px; }
.tr-tool .tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tr-tool .tr-bar label { font-weight: 600; }
.tr-tool .field.wide { max-width: none; }
.tr-tool textarea { width: 100%; resize: vertical; background: var(--canvas-inset); color: var(--fg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font: inherit; }
.tr-tool .tr-actions { margin-top: 8px; align-items: center; }
.tr-tool .tr-out { margin-top: 14px; }
.tr-tool .tr-result { min-height: 72px; padding: 12px 14px; border: 1px solid var(--border-muted); border-radius: 8px; background: var(--canvas-subtle); }
.tr-tool .tr-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Invites: links without a name, folded below the named ones */
.invite-others { border-top: 1px solid var(--border-muted); }
.invite-others > summary .muted { font-size: 13px; font-weight: 500; }
@media (max-width: 640px) { .invite-others > summary { flex-wrap: wrap; } .invite-others > summary .muted { flex-basis: 100%; order: 3; } }
/* Invites: compact action buttons with icons, always one row */
.invite-actions { flex-wrap: nowrap; justify-content: flex-end; }
.invite-actions .btn, .icon-actions .btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.invite-actions .btn .octicon, .icon-actions .btn .octicon { width: 13px; height: 13px; flex: none; }
.invite-actions .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-subtle); color: var(--accent); }
@media (max-width: 640px) { .invite-actions { flex-wrap: wrap; justify-content: flex-start; } }

/* Dropdowns: one look everywhere — rounded, own chevron, a single focus ring, themed option list */
select.inline, .field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-inline-end: 34px; background-color: var(--canvas-subtle); color: var(--fg);
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
select.inline { min-height: 34px; padding: 5px 34px 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
select.inline:hover:not(:disabled), .field select:hover:not(:disabled) { border-color: var(--fg-subtle); background-color: var(--canvas-overlay); }
select.inline:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
select.inline:disabled, .field select:disabled { opacity: .55; cursor: not-allowed; }
select.inline option, .field select option { background: var(--canvas-overlay); color: var(--fg); font-weight: 500; }

/* Invites table: roomy, nothing wraps mid-value, icon buttons in line */
.invite-links table { width: 100%; }
.invite-links th { white-space: nowrap; }
.invite-links td { vertical-align: middle; }
.invite-links .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invite-links .nowrap { white-space: nowrap; }
.invite-links .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.invite-who strong, .invite-who > .muted { display: block; font-size: 15px; }
.invite-code { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.invite-code code { font-size: 12px; color: var(--fg-muted); background: none; padding: 0; }
.invite-actions .icon-btn { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; justify-content: center; border-radius: 999px; }
.invite-actions .icon-btn .octicon { width: 15px; height: 15px; }
.invite-actions .btn-slot { width: 34px; flex: none; }
@media (max-width: 640px) {
  .invite-links .num { text-align: left; }
  .invite-actions .btn-slot { display: none; }
  .invite-actions .icon-btn { width: 44px; height: 44px; }
}
.invite-links > .hint { margin: 0; padding: 12px 18px 16px; }

/* Invites table never scrolls sideways: tighter cells, and below ~860px of room each link becomes a compact card */
.invite-links { container-type: inline-size; }
.invite-links th, .invite-links td { padding-inline: 12px; }
.invite-who { min-width: 0; overflow-wrap: anywhere; }
.invite-code { flex-wrap: wrap; column-gap: 6px; row-gap: 2px; }
.invite-created { font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
@container (max-width: 860px) {
  .invite-links .table-wrap { overflow: visible; }
  .invite-links table, .invite-links tbody { display: block; width: 100%; }
  .invite-links thead { display: none; }
  .invite-links tbody tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 4px 12px; align-items: start;
    padding: 12px 14px; border-top: 1px solid var(--border-muted); }
  .invite-links td { display: block; padding: 0; border: 0; min-width: 0; }
  .invite-links td.invite-who { grid-column: 1 / -2; }
  .invite-links td.invite-act { grid-column: -2 / -1; grid-row: 1; align-self: center; }
  .invite-links td.num, .invite-links td.nowrap { text-align: left; grid-row: 2; }
  .invite-links td.num::before, .invite-links td.nowrap::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700;
    letter-spacing: .6px; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }
  .invite-links .invite-actions .btn-slot { display: none; }
}
@container (max-width: 520px) {
  .invite-links tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .invite-links td.invite-who { grid-column: 1 / -1; }
  .invite-links td.invite-act { grid-column: 1 / -1; grid-row: auto; }
  .invite-links td.num, .invite-links td.nowrap { grid-row: auto; }
}

/* Search fields: one look everywhere — pill, magnifier, soft focus ring, themed clear button */
input[type="search"] {
  width: 100%; min-height: 40px; padding: 8px 16px 8px 40px; font: inherit; font-size: 14px; line-height: 20px; color: var(--fg);
  background-color: var(--canvas-inset); border: 1px solid var(--border); border-radius: 999px; outline: none; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238e8e96' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px 50%; background-size: 15px 15px;
  transition: border-color .15s, background-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
input[type="search"]::placeholder { color: var(--fg-subtle); opacity: 1; }
input[type="search"]:hover { border-color: var(--fg-subtle); }
input[type="search"]:focus, input[type="search"]:focus-visible { outline: none; border-color: var(--accent); background-color: var(--canvas-subtle); box-shadow: 0 0 0 3px var(--accent-subtle); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; opacity: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' stroke='%238e8e96' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E") center / 14px no-repeat; }
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }
/* fields that bring their own magnifier icon, and the page palette, keep their padding without a second icon */
.logs-search, .task-search-field input[type="search"], #pin { background-image: none; }
.invite-search { max-width: none; margin: 0; padding: 14px 18px 6px; }
.invite-search input { max-width: 520px; }
/* Logs filters match the other dropdowns */
.logs-tools select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 34px; background-color: var(--canvas-subtle);
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; font-weight: 600; }
.logs-tools select:hover { border-color: var(--fg-subtle); background-color: var(--canvas-overlay); }
.logs-tools select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }

/* Overview: Cloudflare website card */
.cf-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(90px, .8fr) minmax(110px, 1fr) minmax(200px, 1.6fr) minmax(60px, .5fr); gap: 14px; align-items: center; }
.cf-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-label { font-size: 12px; color: var(--fg-muted); font-weight: 600; }
.cf-domain { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; color: var(--fg); }
.cf-cell .octicon { width: 14px; height: 14px; vertical-align: -2px; }
.cf-pill { align-self: flex-start; padding: 3px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--fg); background: var(--canvas-subtle); white-space: nowrap; }
.cf-pill:hover { text-decoration: none; border-color: var(--accent); }
.cf-pill.warn { border-color: var(--attention); color: var(--attention); background: var(--attention-subtle); }
.cf-spark-row { display: flex; align-items: center; gap: 12px; }
.cf-spark-row strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.cf-spark { width: 140px; height: 34px; flex: none; overflow: visible; }
.cf-line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cf-area { fill: var(--accent-subtle); }
.cf-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 10px; border-top: 1px solid var(--border-muted); }
.cf-totals strong { color: var(--fg); }
@container (max-width: 700px) { .cf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cf-visitors { grid-column: 1 / -1; } }
@media (max-width: 760px) { .cf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cf-visitors { grid-column: 1 / -1; } }
.cf-card { container-type: inline-size; }

/* Overview sub-pages (Bot / Server / Website) */
.ov-tabs { max-width: 100%; overflow-x: auto; }
/* Overview > Server */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 20px; }
.srv-meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.srv-meter-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--fg-muted); font-weight: 600; }
.srv-meter-head strong { font-size: 22px; color: var(--fg); font-variant-numeric: tabular-nums; }
.srv-track { display: block; height: 8px; border-radius: 6px; background: var(--border-muted); overflow: hidden; }
.srv-fill { display: block; height: 100%; border-radius: 6px; background: var(--success); transition: width .4s; }
.srv-fill.warn { background: var(--attention); } .srv-fill.bad { background: var(--danger); }
.srv-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 10px; border-top: 1px solid var(--border-muted); }
.srv-facts strong { color: var(--fg); } .srv-facts .octicon { width: 13px; height: 13px; vertical-align: -2px; }
.srv-legend { display: flex; align-items: center; gap: 14px; }
.srv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.srv-dot.cpu { background: var(--accent); } .srv-dot.mem { background: var(--done); }
.srv-chart { width: 100%; height: 120px; display: block; overflow: visible; }
.srv-chart .grid { stroke: var(--border-muted); stroke-width: 1; }
.srv-cpu, .srv-mem { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.srv-cpu { stroke: var(--accent); } .srv-mem { stroke: var(--done); }
.srv-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Get started: questionnaire cards put the fields left and the live Discord preview right; pings span the card. */
.q-body > * { grid-column: 1 / -1; }
.q-body .questionnaire-grid > .questionnaire-discord-preview { align-self: start; position: sticky; top: 80px; }
.q-body .questionnaire-fields { display: grid; gap: 14px; min-width: 0; }
.q-body .questionnaire-notifications { display: block; border-top: 1px solid var(--border-muted); padding-top: 14px; }
.questionnaire-notifications h4 { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
.notify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px 20px; align-items: start; }
.notify-grid .field, .route-messages .field { max-width: none; margin: 0; }
.route-messages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px 20px; align-items: start; }
.route-messages > .hint { grid-column: 1 / -1; margin: 0; }
.rich-area.disabled { opacity: .6; pointer-events: none; }
@media (max-width: 900px) { .q-body .questionnaire-grid > .questionnaire-discord-preview { position: static; } }
.questionnaire-grid > .questionnaire-discord-preview { grid-column: auto; }
.rich-area[data-ph] .re-surface[data-empty="1"] .re-line:first-child::before { content: var(--re-placeholder); inset-inline-end: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
@media (max-width: 650px) { .questionnaire-grid > .questionnaire-discord-preview { grid-column: 1 / -1; } }
