@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700;800&display=swap');

:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #1e40af;
  --primary-foreground: #ffffff;
  --secondary: #eff6ff;
  --secondary-foreground: #1e40af;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #eff6ff;
  --accent-foreground: #1e40af;
  --destructive: #e40014;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #3b82f6;
  --radius: 0.75rem;
  --announcement-offset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.swal2-container {
  z-index: 10050 !important;
}

.cookie-settings-link {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  cursor: pointer;
}

.cookie-settings-link:hover {
  color: var(--primary);
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: none;
  color: var(--foreground);
  font-family: "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  pointer-events: none;
}

.cookie-preferences.is-open {
  display: block;
  pointer-events: none;
}

.cookie-preferences::before {
  display: none;
}

.cookie-preferences__shell {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}

.cookie-preferences__panel {
  width: min(660px, calc(100vw - 48px)) !important;
  max-width: 660px !important;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: var(--card);
  padding: 15px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.13);
  pointer-events: auto;
}

.cookie-preferences__header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-bottom: 14px;
}

.cookie-preferences__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #eef2ff;
  color: var(--primary);
}

.cookie-preferences__icon svg {
  width: 21px;
  height: 21px;
}

.cookie-preferences h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.cookie-preferences p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 12.5px;
  line-height: 1.45;
}

.cookie-preferences__groups {
  display: grid;
  gap: 8px;
}

.cookie-category {
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #ffffff;
}

.cookie-category__summary {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  background: #ffffff;
  padding: 7px 13px;
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cookie-category__summary:hover {
  background: #f8fafc;
}

.cookie-category__summary:focus-visible,
.cookie-preferences__button:focus-visible,
.cookie-settings-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.cookie-category__name {
  font-size: 13.5px;
  font-weight: 700;
}

.cookie-category__badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  padding: 3px 12px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.cookie-category__badge--always {
  background: #dbe7ff;
  color: #1e40af;
}

.cookie-category__badge--optional {
  background: #f1f5f9;
  color: #334155;
}

.cookie-category__detail {
  display: none;
  border-top: 1px solid #dbe4ef;
  padding: 12px 16px 15px;
}

.cookie-category.is-open .cookie-category__detail {
  display: block;
}

.cookie-category__detail p {
  margin: 0;
}

.cookie-category__detail ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.65;
}

.cookie-category__detail li + li {
  margin-top: 4px;
}

.cookie-category__detail strong {
  color: #64748b;
  font-weight: 800;
}

.cookie-preferences__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.cookie-preferences__button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.cookie-preferences__button:active {
  transform: translateY(1px);
}

.cookie-preferences__button--primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}

.cookie-preferences__button--primary:hover {
  background: #183899;
  border-color: #183899;
}

.cookie-preferences__button--secondary {
  border: 1px solid #dbe4ef;
  background: #ffffff;
  color: var(--foreground);
}

.cookie-preferences__button--secondary:hover {
  background: #f8fafc;
}

.cookie-preferences__privacy {
  margin-top: 10px !important;
  text-align: center;
}

.cookie-preferences__privacy a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .cookie-preferences__shell {
    bottom: 16px;
    padding: 0 22px;
  }

  .cookie-preferences__panel {
    width: min(342px, calc(100vw - 44px)) !important;
    max-width: 342px !important;
    max-height: 84vh;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    padding: 18px;
  }

  .cookie-preferences__header {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
  }

  .cookie-preferences__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .cookie-preferences h2 {
    font-size: 15px;
  }

  .cookie-preferences p {
    font-size: 11.5px;
    line-height: 1.45;
  }

  .cookie-category__summary {
    min-height: 34px;
    padding: 6px 11px;
  }

  .cookie-category__name {
    font-size: 12.5px;
  }

  .cookie-category__badge {
    padding: 2px 9px;
    font-size: 10px;
  }

  .cookie-preferences__actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 13px;
  }

  .cookie-preferences__button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .cookie-preferences__privacy {
    margin-top: 9px !important;
    font-size: 11.5px !important;
  }
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-placeholder::before,
.product-placeholder::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.product-placeholder::before {
  width: 10rem;
  height: 10rem;
  right: -2.5rem;
  top: -2.5rem;
}

.product-placeholder::after {
  width: 8rem;
  height: 8rem;
  left: -2rem;
  bottom: -2rem;
  background: rgba(255, 255, 255, 0.05);
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.is-open .faq-panel { max-height: 8rem; }
.faq-item.is-open .faq-plus { display: none; }
.faq-item:not(.is-open) .faq-minus { display: none; }

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-slide-in-left { animation: 0.4s ease-out forwards slide-in-left; }
.animate-slide-in-right { animation: 0.35s ease-out forwards slide-in-right; }
.animate-fade-in { animation: 0.3s ease-out forwards fade-in; }

.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }
.stagger-7 { animation-delay: 350ms; }
.stagger-8 { animation-delay: 400ms; }

.md-content {
  color: var(--foreground);
  line-height: 1.8;
}
.md-content .md-h1 {
  margin: 2rem 0 1rem;
  font-size: 1.75rem;
  font-weight: 800;
}
.md-content .md-h2 {
  margin: 2rem 0 0.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
}
.md-content .md-h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.md-content .md-p {
  margin: 0.75rem 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}
.md-content .md-blockquote {
  margin: 1rem 0;
  border-left: 4px solid var(--primary);
  border-radius: 0 0.75rem 0.75rem 0;
  background: var(--accent);
  padding: 0.75rem 1.25rem;
  color: var(--foreground);
  font-size: 0.9375rem;
}
.md-content .md-hr {
  margin: 2rem 0;
  border: 0;
  border-top: 2px solid var(--border);
}
.md-content .md-ul,
.md-content .md-ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}
.md-content .md-ul { list-style-type: disc; }
.md-content .md-ol { list-style-type: decimal; }
.md-content .md-uli,
.md-content .md-oli {
  margin: 0.375rem 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}
.md-content .md-code {
  border-radius: 0.375rem;
  background: var(--muted);
  padding: 0.15rem 0.4rem;
  color: var(--primary);
  font-family: IBM Plex Mono, ui-monospace, monospace;
  font-size: 0.8125rem;
}
.md-content .md-pre {
  margin: 1rem 0;
  overflow-x: auto;
  border-radius: 0.75rem;
  background: #0F172A;
  padding: 1.25rem;
  color: #CBD5E1;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.md-content .md-pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: IBM Plex Mono, ui-monospace, monospace;
}
.md-content .md-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.md-content .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.md-content .md-table th {
  background: var(--muted);
  padding: 0.625rem 1rem;
  text-align: left;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 600;
}
.md-content .md-table td {
  border-top: 1px solid var(--border);
  padding: 0.625rem 1rem;
  color: var(--muted-foreground);
}
.md-content .md-table tr:hover td { background: var(--accent); }
.md-content .md-img {
  margin: 1em 0;
  max-width: 100%;
  border-radius: 8px;
}
.md-content strong {
  color: var(--foreground);
  font-weight: 600;
}
.md-content del {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Tools pages use inline SVGs from the old AdsPlus templates. Without
   explicit dimensions those SVGs render at the browser default 300x150. */
.page :where(button, a, .result-title, .section-title-icon, .feature-icon, .review-icon, .empty-icon, .modal-title, .count-pill) > svg,
.page .fa-icon,
.page .button-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.page .fa-icon {
  fill: currentColor;
  stroke: none;
}

.page .tab-button > svg,
.page .faq-question > svg {
  width: 1rem;
  height: 1rem;
}

.page .tab-button > svg:not([fill="none"]) {
  fill: currentColor;
}

.page .result-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.page .result-title > svg,
.page .result-title .fa-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-basis: 1.25rem;
}

.page .panel-action > svg,
.page .panel-action .fa-icon,
.page .menu-option > svg,
.page .menu-option .fa-icon,
.page .copy-input > svg,
.page .segment > svg {
  width: 0.875rem;
  height: 0.875rem;
}

.page .section-title-icon > svg,
.page .feature-icon > svg,
.page .review-icon > svg,
.page .empty-icon > svg {
  width: 1.125rem;
  height: 1.125rem;
}

.page .guide-card > svg {
  width: 2rem;
  height: 2rem;
  flex-basis: 2rem;
}

.page .guide-card p,
.page .step-desc,
.page .feature-item p,
.page .review-copy p {
  overflow-wrap: anywhere;
}

.page .summary-card svg {
  width: 1.75rem;
  height: 1.75rem;
}

.page #summaryPanel {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)) !important;
  gap: 1rem;
  align-items: stretch;
}

.page #summaryPanel:not(.is-empty) {
  display: grid !important;
}

.page #summaryPanel.is-empty {
  display: none !important;
}

.page #summaryPanel .summary-card {
  width: 100%;
  min-width: 0;
}

.page .summary-card > div:last-child {
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted-foreground);
}

.page .result-title.found > svg,
.page .result-title.found .fa-icon,
.page .result-title.available > svg,
.page .result-title.available .fa-icon,
.page .result-title.live > svg,
.page .result-title.live .fa-icon,
.page .result-title.live-verified > svg,
.page .result-title.live-verified .fa-icon {
  color: var(--primary);
}

.page .summary-card.found > div:last-child,
.page .summary-card.available > div:last-child,
.page .summary-card.live > div:last-child,
.page .summary-card.live-verified > div:last-child {
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary);
}

.page .result-title.live-unverified > svg,
.page .result-title.live-unverified .fa-icon {
  color: #155DFC;
}

.page .summary-card.live-unverified > div:last-child {
  background: rgba(21, 93, 252, 0.1);
  color: #155DFC;
}

.page .result-title.not-found > svg,
.page .result-title.not-found .fa-icon,
.page .result-title.unavailable > svg,
.page .result-title.unavailable .fa-icon,
.page .result-title.dead > svg,
.page .result-title.dead .fa-icon,
.page .result-title.dead-verified > svg,
.page .result-title.dead-verified .fa-icon {
  color: var(--destructive);
}

.page .summary-card.not-found > div:last-child,
.page .summary-card.unavailable > div:last-child,
.page .summary-card.dead > div:last-child,
.page .summary-card.dead-verified > div:last-child {
  background: rgba(228, 0, 20, 0.1);
  color: var(--destructive);
}

.page .result-title.dead-unverified > svg,
.page .result-title.dead-unverified .fa-icon {
  color: #7F22FE;
}

.page .summary-card.dead-unverified > div:last-child {
  background: rgba(127, 34, 254, 0.1);
  color: #7F22FE;
}

.page .result-title.failed > svg,
.page .result-title.failed .fa-icon,
.page .result-title.error > svg,
.page .result-title.error .fa-icon {
  color: #E17100;
}

.page .summary-card.failed > div:last-child,
.page .summary-card.error > div:last-child {
  background: rgba(225, 113, 0, 0.12);
  color: #E17100;
}

.page .summary-card.total > div:last-child {
  background: rgba(21, 93, 252, 0.1);
  color: #155DFC;
}

.page .summary-card > div:last-child svg {
  color: inherit;
}

.page .modal-title > svg,
.page .icon-button > svg,
.page .search-icon {
  width: 1rem;
  height: 1rem;
}

.page .result-groups,
.page .summary {
  margin-top: 1rem;
}

.page .result-groups {
  display: grid;
  gap: 1rem;
}

.page .panel-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex: 0 0 auto;
}

.page .action-menu {
  position: relative;
}

.page .dropdown-menu svg {
  width: 0.875rem;
  height: 0.875rem;
  flex: 0 0 auto;
}

.page .results-tools:not(.is-visible),
.page .bulk-result:not(.is-visible) {
  display: none !important;
}

.page .results-tools.is-visible {
  display: flex !important;
}

.page .toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.page .switch {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  flex: 0 0 2.25rem;
  border-radius: 999px;
  background: #94A3B8;
  transition: background 160ms ease;
}

.page .switch::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 160ms ease;
}

.page .toggle input:checked + .switch {
  background: var(--primary);
}

.page .toggle input:checked + .switch::after {
  transform: translateX(1rem);
}

.page .email-list {
  display: grid;
  gap: 0.75rem;
}

.page .email-card,
.page .single-card,
.page .id-row,
.page .mobile-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.page .email-card {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem;
  color: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.page .email-card:hover,
.page .id-row:hover,
.page .single-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.page .email-card.unread {
  background: #EFF6FF;
}

.page .email-icon,
.page .success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--primary);
}

.page .email-icon svg,
.page .success-icon svg,
.page .bulk-success > svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.page .email-main,
.page .single-inner,
.page .id-main {
  min-width: 0;
}

.page .email-main {
  flex: 1 1 auto;
}

.page .email-row,
.page .single-title,
.page .id-row,
.page .id-main {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.page .email-row {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.page .subject,
.page .id-value,
.page .result-id,
.page .source-link,
.page .mobile-url {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-weight: 650;
}

.page .from,
.page .preview,
.page .date {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.page .preview {
  display: -webkit-box;
  margin-top: 0.375rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page .date {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  margin-top: 0.625rem;
  font-size: 0.75rem;
}

.page .date svg {
  width: 0.875rem;
  height: 0.875rem;
}

.page .badge-new,
.page .type-badge,
.page .menu-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--primary);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.page .single-card {
  padding: 1rem;
}

.page .single-head {
  margin-bottom: 0.875rem;
}

.page .single-title {
  align-items: flex-start;
}

.page .single-title h3 {
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.35;
}

.page .source-link,
.page .mobile-url {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--primary);
  font-size: 0.8125rem;
  text-decoration: none;
}

.page .id-list {
  display: grid;
  gap: 0.5rem;
}

.page .id-row {
  position: relative;
  justify-content: space-between;
  padding: 0.625rem;
}

.page .copy-small {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.875rem;
  padding: 0 0.625rem;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 0.25rem);
  background: #ffffff;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
}

.page .copy-small svg {
  width: 0.875rem;
  height: 0.875rem;
}

.page .menu-list {
  display: none;
}

.page .menu.is-open .menu-list {
  display: block;
}

.page .result-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.page .result-shell th,
.page .result-shell td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.page .result-shell th {
  background: var(--muted);
  color: var(--foreground);
  font-weight: 700;
}

.page .mobile-results {
  display: none;
}

.page .is-hidden,
.page .hidden,
.modal[aria-hidden="true"] {
  display: none !important;
}

.modal.is-open,
.modal[aria-hidden="false"] {
  display: flex !important;
}

.page .tabs,
.page [role="tablist"] {
  min-width: 0;
}

.page .tab-button {
  min-width: 0;
  overflow: hidden;
  background: transparent !important;
  color: var(--muted-foreground) !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.page .tab-button.is-active,
.page .tab-button[aria-selected="true"] {
  background: #ffffff !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

.page .tab-button:not(.is-active):not([aria-selected="true"]) svg {
  color: var(--muted-foreground);
}

.page .tab-button span,
.page .result-title span {
  min-width: 0;
}

.page .steps-guide {
  overflow: hidden;
}

.page .step {
  min-width: 0;
}

.page .step::before {
  pointer-events: none;
}

@media (max-width: 860px) {
  .page .toolbar,
  .page .bulk-tools,
  .page .results-tools,
  .page [aria-label="Output options"] {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .page .steps-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page .result-table-wrap {
    display: none;
  }

  .page .mobile-results {
    display: grid;
  }
}

@media (max-width: 560px) {
  .page {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
  }

  .page .checker,
  .page .reader,
  .page > section[aria-label]:not([aria-labelledby]) {
    padding: 1rem !important;
    border-radius: 1rem !important;
  }

  .page .field-top {
    align-items: flex-start !important;
  }

  .page textarea {
    min-height: 9.75rem;
  }

  .page .actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.625rem !important;
    align-items: stretch !important;
  }

  .page .actions > button {
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .page .actions > [aria-label="Output options"] {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.5rem !important;
    width: 100%;
  }

  .page .actions > [aria-label="Output options"] > span[aria-hidden="true"] {
    display: none !important;
  }

  .page .actions > [aria-label="Output options"] > div {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto !important;
  }

  .page .segment {
    min-width: 0;
    min-height: 2.25rem;
    height: auto !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    white-space: normal;
    line-height: 1.1;
  }

  .page section[aria-label] > .flex:has(.result-title),
  .page .result-head {
    align-items: flex-start !important;
    flex-wrap: wrap;
    gap: 0.625rem !important;
  }

  .page .result-title {
    width: 100%;
    flex: 1 1 100%;
    align-items: flex-start;
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
  }

  .page .result-title > svg,
  .page .result-title .fa-icon {
    margin-top: 0.0625rem;
  }

  .page .panel-buttons {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page .panel-action {
    min-height: 1.875rem;
  }

  .page [role="tablist"] {
    gap: 0.25rem !important;
    padding: 0.25rem !important;
  }

  .page [role="tablist"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page .tab-button {
    min-height: 2.25rem !important;
    height: auto !important;
    padding: 0.375rem 0.5rem !important;
  }

  .page .tab-panel {
    padding: 1rem !important;
  }

  .page .steps-guide {
    grid-template-columns: 1fr;
    gap: 1.25rem !important;
  }

  .page .step::before {
    display: none !important;
  }

  .page .step-title,
  .page .step-desc {
    max-width: 15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .animate-slide-in-left,
  .animate-slide-in-right,
  .animate-fade-in {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}
