:root {
  color-scheme: dark;
  --bg-1: #080b10;
  --bg-2: #0d1118;
  --bg-3: #141922;
  --surface: rgba(15, 19, 26, 0.78);
  --surface-strong: rgba(18, 23, 31, 0.96);
  --surface-muted: rgba(23, 29, 38, 0.88);
  --text: #f3f5f7;
  --muted: #858e99;
  --muted-strong: #b8c0ca;
  --line: rgba(235, 240, 245, 0.09);
  --line-strong: rgba(235, 240, 245, 0.15);
  --primary: #d8bd7a;
  --primary-strong: #f0d99a;
  --primary-soft: rgba(216, 189, 122, 0.12);
  --accent: #6e8799;
  --accent-soft: rgba(110, 135, 153, 0.13);
  --success: #9bbda8;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
  --ring: rgba(216, 189, 122, 0.3);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-1);
  color: var(--text);
}

html[data-theme='light'] {
  color-scheme: light;
  --bg-1: #f6f3ee;
  --bg-2: #ece8df;
  --bg-3: #ded8cc;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-strong: rgba(255, 252, 247, 0.96);
  --surface-muted: rgba(244, 239, 230, 0.9);
  --text: #1b1e24;
  --muted: #76736d;
  --muted-strong: #4a4c50;
  --line: rgba(27, 30, 36, 0.11);
  --line-strong: rgba(27, 30, 36, 0.17);
  --primary: #8d6f32;
  --primary-strong: #6f541f;
  --primary-soft: rgba(141, 111, 50, 0.12);
  --accent: #536371;
  --accent-soft: rgba(83, 99, 113, 0.12);
  --success: #3f7458;
  --shadow: 0 30px 90px rgba(35, 31, 24, 0.12);
  --shadow-soft: 0 16px 44px rgba(35, 31, 24, 0.09);
  --ring: rgba(141, 111, 50, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.25rem;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% -10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 30rem),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 42%, var(--bg-3) 100%);
  background-attachment: fixed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--primary-soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

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

a:hover {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  letter-spacing: 0;
  font-weight: 600;
}

p {
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-140%);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-weight: 800;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.5rem) 0;
}

.site-nav {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 94%, transparent), color-mix(in srgb, var(--surface) 92%, transparent));
  box-shadow: var(--shadow-soft);
  padding: 0.52rem;
  backdrop-filter: blur(20px) saturate(1.08);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.aegis-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    #10141c;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.aegis-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
}

.aegis-brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
}

.brand-copy {
  display: grid;
  gap: 0.12rem;
  line-height: 1.1;
}

.nav-spacer {
  min-width: 0;
}

.brand-link strong {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.brand-link small {
  color: color-mix(in srgb, var(--muted) 84%, var(--primary));
  font-size: 0.72rem;
  font-weight: 700;
}

.top-tool-tabs {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 0.2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-muted) 52%, transparent);
  padding: 0.22rem;
  scrollbar-width: none;
}

.top-tool-tabs::-webkit-scrollbar {
  display: none;
}

.theme-toggle,
.button,
.filter-button,
.tab-button,
.mode-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background-color 170ms ease,
    box-shadow 170ms ease,
    color 170ms ease;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.44rem 0.72rem;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.tab-button[data-favorite='true']::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.42rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 15%, transparent);
}

.tab-button:hover,
.tab-button:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.theme-toggle {
  justify-self: end;
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
  border-color: var(--line);
  color: var(--text);
  min-height: 36px;
  padding: 0.44rem 0.76rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.theme-toggle:hover,
.button:hover,
.filter-button:hover,
.tab-button:hover,
.mode-button:hover {
  transform: translateY(-2px);
}

.intro-section,
.workbench-section,
.workspace-section,
.section-band,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.intro-section {
  display: grid;
  max-width: 760px;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0 0.75rem;
}

.hero-copy {
  display: grid;
  gap: 0.5rem;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero-lede {
  max-width: 62ch;
  color: var(--muted-strong);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
}

.hero-support {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace-hub,
.collection-card,
.tool-search-result,
.panel-workspace,
.context-pill,
.empty-chip,
.panel-action {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.workspace-hub {
  display: grid;
  gap: 0.85rem;
  width: min(100%, 980px);
  border-radius: 18px;
  padding: 0.95rem;
  backdrop-filter: blur(18px) saturate(1.06);
}

.workspace-section {
  display: grid;
  gap: 1rem;
  padding: 0 0 clamp(3rem, 7vw, 5rem);
}

.workspace-hint {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-search-shell {
  display: block;
}

.tool-search-shell input {
  min-height: 48px;
  border-radius: 14px;
  padding-inline: 1rem;
}

.tool-search-results {
  display: grid;
  gap: 0.55rem;
}

.tool-search-results:empty {
  display: none;
}

.tool-search-result {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 0.8rem 0.9rem;
  text-align: left;
}

.tool-search-result strong,
.collection-header h2,
.context-label {
  font-size: 0.88rem;
  font-weight: 800;
}

.tool-search-result span,
.collection-header span,
.context-empty,
.empty-chip {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-collections {
  display: grid;
  gap: 0.75rem;
}

.collection-card {
  display: grid;
  gap: 0.75rem;
  border-radius: 16px;
  padding: 0.8rem 0.85rem;
}

.collection-header {
  display: grid;
  gap: 0.15rem;
}

.chip-list,
.context-pill-row,
.panel-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.collection-empty {
  display: grid;
  gap: 0.75rem;
}

.collection-empty p,
.context-empty,
.workspace-status {
  margin: 0;
}

.collection-empty p,
.context-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip-button,
.context-pill,
.panel-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.55rem 0.8rem;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background-color 170ms ease,
    color 170ms ease;
}

.chip-button,
.context-pill,
.panel-action {
  cursor: pointer;
}

.chip-button:hover,
.chip-button:focus-visible,
.context-pill:hover,
.context-pill:focus-visible,
.panel-action:hover,
.panel-action:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chip-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.chip-button[data-kind='favorite'] {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.tool-panel {
  position: relative;
}

.panel-utilities {
  justify-content: flex-start;
}

.panel-action[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.panel-workspace {
  display: grid;
  border-radius: var(--radius-md);
  margin: 0 0 1rem;
}

.panel-workspace summary {
  list-style: none;
}

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

.panel-workspace-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 0.9rem;
}

.panel-workspace[open] .panel-workspace-summary {
  border-bottom: 1px solid var(--line);
}

.panel-workspace-heading {
  font-size: 0.88rem;
  font-weight: 800;
}

.panel-workspace-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-workspace-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
}

.workspace-status {
  min-height: 1.2rem;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.context-group {
  display: grid;
  gap: 0.45rem;
}

.context-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.context-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-actions,
.button-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.button-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-strong) 78%, white), var(--primary));
  color: #12100a;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 18%, transparent);
}

html[data-theme='dark'] .button-primary {
  color: #12100a;
}

.button-secondary {
  background: var(--surface-strong);
  border-color: var(--line);
  color: var(--text);
}

.button-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted-strong);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.metric-row,
.result-card,
.clock-card,
.tool-subpanel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.metric-row span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.section-band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-heading {
  max-width: 760px;
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted-strong);
  max-width: 68ch;
}

.seo-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.seo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-card,
.faq-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 1.1rem 1.1rem 1.15rem;
}

.seo-card {
  display: grid;
  gap: 0.55rem;
}

.seo-card h3,
.faq-item h3 {
  font-size: 1.08rem;
}

.seo-card p,
.faq-item p {
  color: var(--muted-strong);
}

.seo-card a:hover,
.seo-card a:focus-visible {
  color: var(--primary-strong);
}

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

.faq-item {
  display: grid;
  gap: 0.5rem;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
}

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

.faq-item summary::after {
  content: '+';
  color: var(--primary-strong);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '−';
}

label input,
label select,
label textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.78rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

label input:hover,
label select:hover,
label textarea:hover {
  border-color: color-mix(in srgb, var(--line-strong) 82%, var(--primary));
}

label select {
  appearance: none;
}

label input[type='range'] {
  accent-color: var(--primary);
  padding-inline: 0.75rem;
}

label textarea {
  resize: vertical;
  min-height: 10rem;
  line-height: 1.55;
}

.filter-button,
.tab-button,
.mode-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted-strong);
  padding: 0.58rem 0.9rem;
  font-weight: 700;
}

.filter-button[aria-pressed='true'],
.tab-button[aria-selected='true'],
.mode-button[aria-pressed='true'] {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  color: var(--primary-strong);
}

.workbench-section {
  padding: 0 0 clamp(3rem, 7vw, 5rem);
  scroll-margin-top: 7.25rem;
}

.tool-panel {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 96%, transparent), color-mix(in srgb, var(--surface) 94%, transparent));
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.4vw, 1.35rem);
  scroll-margin-top: 7.25rem;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h3 {
  margin-top: 0.25rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.005em;
}

.panel-note {
  margin-top: 0.55rem;
  max-width: 56ch;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.speed-actions {
  justify-content: flex-end;
}

.speed-layout,
.timer-layout,
.password-layout,
.text-tool-layout,
.qr-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
}

.speed-gauge {
  display: grid;
  place-items: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
  padding: 1.2rem;
}

.speed-server {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.gauge-ring {
  --progress: 0deg;
  display: grid;
  place-items: center;
  width: min(240px, 70vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    conic-gradient(var(--primary) var(--progress), color-mix(in srgb, var(--line) 68%, transparent) 0),
    var(--surface-strong);
}

.gauge-ring span {
  display: grid;
  place-items: center;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--surface-strong);
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

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

.speed-setup {
  margin-top: 1rem;
}

.speed-setup-copy {
  color: var(--muted-strong);
}

.speed-checklist {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted-strong);
}

.speed-checklist li + li {
  margin-top: 0.42rem;
}

.metric-row strong {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-grid label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.timezone-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr);
}

.random-grid,
.converter-grid,
.password-options-grid,
.alert-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkbox-field {
  align-self: end;
  min-height: 46px;
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: 0.7rem 0.85rem;
}

.checkbox-field input {
  width: 18px;
  min-height: auto;
  height: 18px;
  accent-color: var(--primary);
  padding: 0;
}

.result-card {
  margin-top: 1rem;
  padding: 1.15rem 1.2rem;
  color: var(--text);
}

.timezone-result {
  display: grid;
}

.result-card strong,
.random-result,
.converter-result {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  font-weight: 600;
}

.result-card span {
  color: var(--muted);
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.clock-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem;
}

.clock-card strong {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
}

.clock-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.timer-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-subpanel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.subpanel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.subpanel-heading h4 {
  font-size: 1.05rem;
}

.subpanel-heading span,
.inline-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.time-display {
  display: grid;
  place-items: center;
  min-height: 118px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.duration-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.duration-inputs label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.alert-options {
  display: grid;
  gap: 0.75rem;
}

.lap-list {
  display: grid;
  gap: 0.45rem;
  max-height: 176px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lap-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: 0.65rem 0.75rem;
  color: var(--muted-strong);
}

.random-result {
  word-break: break-word;
}

.converter-result {
  display: grid;
  gap: 0.45rem;
}

.converter-result small {
  color: var(--muted);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.password-layout,
.qr-layout {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
}

.text-tool-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.password-result,
.text-preview {
  min-height: 5.5rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.password-result {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  line-height: 1.35;
}

.text-preview {
  max-height: 18rem;
  overflow: auto;
  color: var(--muted-strong);
}

.strength-meter {
  width: 100%;
  height: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
}

.strength-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #b35c5c;
  transition:
    width 180ms ease,
    background-color 180ms ease;
}

.strength-meter span[data-strength='fair'] {
  background: #c9984d;
}

.strength-meter span[data-strength='good'] {
  background: #b4a962;
}

.strength-meter span[data-strength='strong'] {
  background: var(--success);
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mode-button {
  min-height: 36px;
  padding: 0.42rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.counter-card {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  padding: 1rem;
}

.counter-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.counter-card strong {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.qr-preview-panel {
  align-content: start;
}

.qr-canvas-frame {
  display: grid;
  place-items: center;
  min-height: min(70vw, 23rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: clamp(0.7rem, 2vw, 1rem);
}

.qr-canvas-frame canvas {
  width: min(100%, 21rem);
  height: auto;
  border-radius: 6px;
  image-rendering: pixelated;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.site-footer {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.4rem 0 1.8rem;
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
}

.footer-meta {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.continental-signature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 20rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    color-mix(in srgb, var(--surface-strong) 72%, transparent);
  box-shadow: none;
  padding: 0.65rem 0.85rem;
  text-align: center;
}

.continental-signature-copy {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.continental-signature-copy span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.continental-signature-copy img {
  width: min(10rem, 100%);
  height: auto;
  object-fit: contain;
  opacity: 0.86;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.85rem;
  max-width: 100%;
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer-links a {
  color: var(--muted-strong);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--primary-strong);
}

.footer-links a[aria-current='page'] {
  color: var(--primary-strong);
}

.document-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 3rem;
}

.document-shell {
  display: grid;
  gap: 1rem;
  max-width: 78ch;
}

.document-shell h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.document-lede,
.document-meta {
  color: var(--muted-strong);
}

.document-stack {
  display: grid;
  gap: 1rem;
}

.document-panel {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    color-mix(in srgb, var(--surface-strong) 72%, transparent);
  padding: clamp(1rem, 2vw, 1.3rem);
  box-shadow: var(--shadow-soft);
}

.document-panel p,
.document-panel li {
  color: var(--muted-strong);
}

.document-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.document-actions {
  margin-top: 0.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 940px) {
  .site-nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .top-tool-tabs {
    grid-column: 1 / -1;
    justify-self: stretch;
    order: 3;
  }

  .speed-layout,
  .timer-layout,
  .password-layout,
  .text-tool-layout,
  .qr-layout,
  .seo-grid,
  .timezone-grid,
  .random-grid,
  .converter-grid,
  .password-options-grid,
  .alert-options {
    grid-template-columns: 1fr;
  }

  .clock-grid,
  .counter-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.45rem 0.5rem 0;
  }

  .site-nav {
    border-radius: 15px;
    gap: 0.5rem;
    padding: 0.45rem;
  }

  .brand-link {
    gap: 0.55rem;
  }

  .aegis-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .brand-link strong {
    font-size: 0.92rem;
  }

  .top-tool-tabs {
    padding: 0.2rem;
  }

  .theme-toggle {
    min-height: 34px;
    padding: 0.4rem 0.68rem;
    font-size: 0.82rem;
  }

  .theme-toggle,
  .button,
  .filter-button,
  .tab-button,
  .mode-button {
    min-height: 36px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .tab-button {
    min-height: 34px;
    padding: 0.38rem 0.62rem;
    font-size: 0.76rem;
  }

  .intro-section,
  .workbench-section,
  .workspace-section,
  .section-band,
  .site-footer,
  .document-main {
    width: min(100% - 1rem, 1180px);
  }

  .intro-section {
    padding-top: 1rem;
  }

  .workspace-hub,
  .collection-card,
  .panel-workspace-summary,
  .panel-workspace-body {
    padding: 0.8rem;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-actions,
  .button-row,
  .document-actions {
    align-items: stretch;
  }

  .button,
  .button-row .button {
    width: 100%;
  }

  .clock-grid,
  .counter-grid,
  .duration-inputs {
    grid-template-columns: 1fr;
  }

  .panel-utilities {
    flex-direction: column;
  }

  .panel-header {
    flex-direction: column;
    margin-bottom: 0.85rem;
  }

  .panel-header .button,
  .panel-action,
  .chip-button {
    width: 100%;
  }

  .panel-workspace-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .time-display {
    min-height: 112px;
  }

  .tool-panel {
    padding: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
