.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  overflow: hidden;
}

.wiki-thumb {
  border-radius: 13px;
  max-width: 40%;
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  background: var(--border-color);
}

.wiki-thumb--logo {
  display: block;
  max-width: 80%;
  max-height: 60px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.75rem;
  margin: 0.75rem auto 2rem auto;
}

.wiki-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wiki-title {
  display: block;
  font-size: var(--font-large);
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  line-height: 1.1;
}

.wiki-title:hover {
  color: var(--link-hover, var(--link-color));
  text-decoration: underline;
}

.wiki-desc {
  margin-bottom: 1rem;
  font-size: var(--font-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.wiki-extract {
  font-size: var(--font-medium);
  color: var(--text-primary);
  display: inline;
}

.wiki-footer-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.wiki-footer-link:hover {
  color: var(--link-color);
  text-decoration: underline;
}

.math-widget {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  max-width: 652px;
  color: var(--text-primary);
}

.math-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.math-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.math-query {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.math-equals {
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.math-result {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.math-calc {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 652px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.math-calc-screen {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.math-calc-expr {
  width: 100%;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 12px;
  outline: none;
}

.math-calc-result {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  min-height: 1.6rem;
  padding: 0 0.75rem;
}

.math-calc-keys {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.math-calc-row {
  display: flex;
  gap: 0.4rem;
}

.math-calc-key {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.7rem 0;
  cursor: pointer;
  transition: background 0.15s;
}

.math-calc-key:hover {
  background: var(--bg-hover);
}

.math-calc-fn {
  color: var(--text-secondary);
}

.math-calc-eq {
  background: var(--brand-blue);
  color: #fff;
}

.math-calc-eq:hover {
  background: var(--brand-blue);
  opacity: 0.92;
}

.gh-slot-result {
  padding: 0;
  max-width: 100%;
  width: 100%;
  color: var(--text-primary);
  min-width: 0;
}

.gh-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gh-slot-section {
  margin-bottom: 0;
  min-width: 0;
}

.gh-slot-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.gh-slot-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  min-width: 0;
}

.gh-slot-grid::-webkit-scrollbar {
  display: none;
}

.gh-slot-grid::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 3px;
}

.gh-slot-grid::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.4;
  border-radius: 3px;
}

.gh-slot-card {
  display: block;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 280px;
  transition: background 0.15s ease;
}

.results-slot-panel-body a:hover {
  text-decoration: none;
}

.gh-slot-card {
  background: var(--bg-hover);
}

.gh-slot-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gh-slot-avatar--user {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.gh-slot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gh-slot-avatar-placeholder {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gh-slot-repo-head,
.gh-slot-user-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.gh-slot-repo-meta,
.gh-slot-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gh-slot-repo-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary, #0969da);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-slot-repo-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-stars {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.gh-slot-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-slot-user-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.gh-slot-user-login {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-user-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ac-item--history {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.ac-item--history .ac-item-icon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.ac-item--history .ac-item-icon--clock svg {
  width: 20px;
  height: 20px;
}

.ac-item--history .ac-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item--history .ac-item-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  opacity: 0.8;
}

.ac-item--history .ac-item-delete:hover {
  opacity: 1;
  background: var(--bg-hover);
  color: var(--danger);
}

.ac-item--history .ac-item-delete svg {
  width: 18px;
  height: 18px;
}

.search-history-result .result-favicon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--text-cite);
}

.search-history-result .result-favicon--clock svg {
  width: 22px;
  height: 22px;
}

.search-history-result .history-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
}

.search-history-result .history-delete-btn:hover {
  color: var(--danger);
  background: var(--bg-hover);
}

.search-history-result .history-delete-btn svg {
  width: 18px;
  height: 18px;
}


.time-result .time-place {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
}

.time-time {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.time-date {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.weather-result {
  padding: 1.5em 0;
  max-width: 652px;
  color: var(--text-primary);
}

.weather-result .ti {
  font-size: 1.25em;
  opacity: 0.9;
  color: var(--text-primary);
}

.weather-location {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.weather-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-hero-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.weather-hero-icon .ti {
  font-size: 2.5rem;
  color: var(--primary, #1a73e8);
}

.weather-hero-text {
  min-width: 0;
}

.weather-temp {
  font-size: 2rem;
  margin: 0 0 0.2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-desc {
  font-size: 0.9375rem;
  font-weight: 400;
  opacity: 0.85;
  color: var(--text-secondary);
}

.weather-feels {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.weather-now-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.weather-now-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.weather-now-icon {
  flex-shrink: 0;
  font-size: 1.1rem !important;
  opacity: 0.7;
  color: var(--text-secondary) !important;
}

.weather-value {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-week-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.weather-week-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

.weather-week-wrap {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-light);
  overflow: hidden;
}

.weather-week {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.weather-week th,
.weather-week td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-week th {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.7rem;
}

.weather-week tbody tr:last-child td {
  border-bottom: none;
}

.weather-week-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.weather-week-row:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.weather-week-row:focus {
  outline: 2px solid var(--primary, #1a73e8);
  outline-offset: -2px;
}

.weather-day {
  font-weight: 600;
  color: var(--text-primary);
  width: 3.5rem;
}

.weather-day-icon .ti {
  font-size: 1.35rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-day-temps {
  font-weight: 500;
  color: var(--text-primary);
}

.weather-day-precip {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.weather-day-precip .ti {
  font-size: 0.9rem !important;
  opacity: 0.8;
  margin-right: 0.2rem;
}

.weather-hourly-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  background: var(--bg-light);
}

.weather-hourly-cell {
  padding: 0.75rem 1rem !important;
  overflow: hidden;
}

.weather-hourly-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  margin: 0 -0.25rem 0 0;
}

.weather-hourly-strip {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  padding: 0 0.25rem 0 0;
}

.weather-hourly-scroll::-webkit-scrollbar {
  height: 6px;
}

.weather-hourly-scroll::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 3px;
}

.weather-hourly-scroll::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.3;
  border-radius: 3px;
}

.weather-hour-card {
  flex: 0 0 auto;
  min-width: 4.25rem;
  padding: 0.6rem 0.5rem;
  background: var(--search-bar-bg, #fff);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.weather-hour-time {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.weather-hour-icon {
  font-size: 1.5rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-hour-temp {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-hour-precip {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Match LiterallyGoogle suggestion icon column (theme ::before at 0.8rem, 1.125rem). */
.ac-item--bang {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-block: 0.5rem;
    padding-inline-end: 0.75rem;
    padding-inline-start: 2.75rem;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 400;
}

.ac-item--bang .ac-item-icon {
    position: absolute;
    inset-inline-start: 0.8rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--text-secondary);
}

.ac-item--bang .ac-item-icon svg {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
}

.ac-item--bang::before {
    content: none !important;
    display: none !important;
}

.ac-item--bang .ac-item-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    overflow: hidden;
}

.ac-item--bang .ac-item-bang-trigger {
    flex: none;
    flex-shrink: 0;
    min-width: max-content;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
    font-weight: 700;
    color: var(--primary);
}

.ac-item--bang .ac-item-bang-name {
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-primary);
}

.ac-item--bang .ac-item-bang-desc {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.88em;
}

.ac-item--bang:hover,
.ac-item--bang.active,
.ac-item--bang.ac-active,
.ac-item--bang.ac-item--bang-active {
    background: var(--bg-hover);
}

.auto-bang-help code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
}

.speedtest-card {
    container-type: inline-size;
    --speedtest-accent: #4285f4;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans, sans-serif);
}

.speedtest-card__controls {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.speedtest-card__controls--footer {
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
}

.speedtest-card__button-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-left: auto;
}

.speedtest-card__server-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 250px;
    align-items: flex-start;
}

.speedtest-card__server-picker-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
    white-space: nowrap;
}

.speedtest-card__server-select {
    min-width: 250px;
    max-width: 280px;
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-light, #2f3033);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.94rem;
}

.speedtest-card__server-select:disabled {
    opacity: 0.72;
}

.speedtest-card__action {
    flex-shrink: 0;
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        opacity 160ms ease;
    margin-left: auto;
}

.speedtest-card__button-group .speedtest-card__action {
    margin-left: 0;
}

.speedtest-card__action--cancel {
    border-color: color-mix(in srgb, #d93025 36%, var(--border));
    background: color-mix(in srgb, #d93025 10%, transparent);
    color: #f28b82;
}

.speedtest-card__action--cancel:hover:not(:disabled) {
    background: color-mix(in srgb, #d93025 16%, transparent);
}

.speedtest-card__action:hover:not(:disabled) {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.speedtest-card__action:disabled {
    cursor: default;
    opacity: 0.7;
}

.speedtest-card__gauge-shell {
    position: relative;
    min-height: 352px;
    max-height: 420px;
    padding: 1.15rem 0 0.95rem;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
    opacity: 1;
    transition:
        max-height 220ms ease,
        min-height 220ms ease,
        padding 220ms ease,
        opacity 160ms ease,
        border-color 160ms ease;
}

.speedtest-card__gauge {
    display: block;
    width: min(100%, 610px);
    margin: 0 auto;
}

.speedtest-card__gauge-track,
.speedtest-card__gauge-fill {
    fill: none;
    stroke-linecap: round;
    stroke-width: 15;
}

.speedtest-card__gauge-track {
    stroke: color-mix(in srgb, var(--border) 82%, transparent);
}

.speedtest-card__gauge-fill {
    stroke: var(--speedtest-accent);
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 220ms ease;
}

.speedtest-card__gauge-tip {
    fill: #ffffff;
    transition: transform 220ms ease;
    /* initial transform is 0 degrees around the center of the arc */
    transform: rotate(0deg);
    transform-origin: 160px 170px;
}

.speedtest-card__ticks text {
    fill: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: middle;
}

.speedtest-card__center {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.14rem;
    width: min(100%, 300px);
    text-align: center;
    pointer-events: none;
}

.speedtest-card__phase {
    min-height: 1rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.speedtest-card__value {
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.speedtest-card__unit {
    margin-top: 0.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.speedtest-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--bg-light, #2f3033);
}

.speedtest-card--compact .speedtest-card__gauge-shell {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    border-bottom-color: transparent;
    opacity: 0;
}

.speedtest-card--compact .speedtest-card__stats {
    border-top: 1px solid var(--border-light);
}

.speedtest-card__stat {
    padding: 1rem 1.1rem;
}

.speedtest-card__stat + .speedtest-card__stat {
    border-left: 1px solid var(--border-light);
}

.speedtest-card__stat-value {
    font-size: 2.45rem;
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.speedtest-card__stat-label {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.speedtest-card__details {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 0 0;
}

.speedtest-card__detail {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.speedtest-card__detail strong {
    color: var(--text-primary);
    font-weight: 600;
}

.speedtest-card__assessment {
    margin: 1rem 0 0;
    font-size: 1rem;
    line-height: 1.45;
}

.speedtest-card__status {
    margin: 0.7rem 0 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.speedtest-card__debug {
    margin: 0.9rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
}

.speedtest-card__debug-summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.92rem;
    user-select: none;
}

.speedtest-card__debug[open] .speedtest-card__debug-summary {
    margin-bottom: 0.7rem;
}

.speedtest-card__debug-output {
    margin: 0;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-light, #2f3033);
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    font:
        0.82rem/1.45 ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}

@container (min-width: 640px) {
    .speedtest-card__details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (max-width: 639px) {
    .speedtest-card__controls--footer {
        width: 100%;
    }

    .speedtest-card__server-picker {
        width: 100%;
    }

    .speedtest-card__server-select {
        width: 100%;
        max-width: none;
    }

    .speedtest-card__button-group {
        width: 100%;
        justify-content: flex-end;
    }

    .speedtest-card__action {
        align-self: auto;
    }

    .speedtest-card__gauge-shell {
        min-height: 312px;
        max-height: 360px;
        padding: 0.95rem 0 0.85rem;
    }

    .speedtest-card__center {
        top: 61%;
        width: min(100%, 260px);
    }

    .speedtest-card__value {
        font-size: 2.75rem;
    }

    .speedtest-card__ticks text {
        font-size: 11px;
    }

    .speedtest-card__stat {
        padding: 0.9rem 1rem;
    }
}

.speedtest-card :where(button, input, select, a[href], [role="button"]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
