:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #111318;
  --muted: #626b7a;
  --soft: #8993a4;
  --line: #e1e6ef;
  --line-strong: #cbd5e1;
  --accent: #84cc16;
  --accent-strong: #4d7c0f;
  --accent-soft: #ecfccb;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #111317;
  --surface-2: #191d24;
  --surface-glass: rgba(17, 19, 23, 0.78);
  --text: #f4f7fb;
  --muted: #a3adbd;
  --soft: #778295;
  --line: #262c36;
  --line-strong: #384252;
  --accent: #a3e635;
  --accent-strong: #bef264;
  --accent-soft: #1d2a13;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0, rgba(132, 204, 22, 0.16), transparent 26rem),
    radial-gradient(circle at 92% 12%, rgba(96, 165, 250, 0.12), transparent 26rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 28rem);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

:root[data-theme='dark'] body {
  background:
    radial-gradient(circle at 18% 0, rgba(132, 204, 22, 0.11), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(124, 58, 237, 0.14), transparent 28rem),
    linear-gradient(180deg, #050608 0, var(--bg) 30rem);
}

button,
input {
  font: inherit;
}

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

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--soft);
  font: 700 0.72rem/1 Inter, system-ui, sans-serif;
}

.material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 22px;
  line-height: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(20px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1520px, calc(100% - 48px));
  min-height: 66px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.brand strong {
  display: block;
}

.brand strong {
  font-size: 1.03rem;
  letter-spacing: -0.02em;
}

.brand-suffix {
  color: var(--accent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.brand:hover .brand-suffix,
.brand:focus-visible .brand-suffix {
  opacity: 1;
}

.nav-list {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 12px;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface-2);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: clamp(220px, 24vw, 360px);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.header-search-results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(420px, 92vw);
  max-height: 304px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
}

.header-search-results.open {
  display: grid;
  gap: 6px;
}

.header-search-result {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.header-search-result:hover,
.header-search-result:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  outline: 0;
}

.header-search-result > .material-symbols-rounded {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 20px;
}

.header-search-result strong,
.header-search-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search-result strong {
  font-size: 0.88rem;
  line-height: 1.25;
  white-space: nowrap;
}

.header-search-result small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.header-search-empty {
  color: var(--muted);
  padding: 14px;
  font-size: 0.88rem;
}

.header-search .material-symbols-rounded {
  flex: 0 0 auto;
  margin-right: 8px;
  font-size: 20px;
}

.header-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search input::placeholder {
  color: var(--muted);
}

.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow-soft);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  width: min(1520px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 24px;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 14px;
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.footer-links div {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  padding-top: 18px;
  font-size: 0.84rem;
  font-weight: 700;
}

.footer-company-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.footer-company-link:hover {
  color: var(--text);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 4vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(22px, 4vw, 54px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 76% 18%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 22rem),
    linear-gradient(135deg, var(--surface-glass), color-mix(in srgb, var(--surface) 84%, var(--surface-2)));
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 58px);
}

.hero-panel.compact {
  grid-template-columns: 1fr;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 780px;
}

.hero-copy h2 {
  max-width: 820px;
}

.hero-copy p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-visual {
  position: relative;
  z-index: 1;
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.hero-preview-top {
  display: flex;
  gap: 7px;
  margin-bottom: 15px;
}

.hero-preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--line-strong);
}

.hero-preview-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
}

.hero-preview-search strong {
  flex: 1;
  color: var(--text);
  font-size: 0.92rem;
}

.hero-preview-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--tool-color) 22%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--tool-color) 8%, var(--surface));
  padding: 12px;
}

.hero-preview-item > span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--tool-color) 20%, transparent);
  color: var(--tool-color);
}

.hero-preview-item strong,
.hero-preview-item small {
  display: block;
}

.hero-preview-item small {
  margin-top: 2px;
  color: var(--soft);
  font-weight: 700;
}

.trust-row,
.mini-badges {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.trust-pill,
.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-glass);
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
  font-size: 0.84rem;
}

.trust-pill span,
.mini-badge span {
  color: var(--accent-strong);
  font-size: 18px;
}

.stats-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
}

.stat {
  min-height: 108px;
  background: var(--surface-glass);
  padding: 18px;
}

.stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.hero-search-band {
  margin: 20px 0 4px;
}

.search-box {
  position: relative;
  display: block;
}

.search-box span {
  position: absolute;
  left: 18px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 18px 0 54px;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow-soft);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 38px 0 15px;
}

.section-header h2,
.toolbar h2,
.browser-note h2 {
  margin-bottom: 4px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-header p,
.browser-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-card {
  position: relative;
  min-height: 190px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color) 34%, transparent), transparent 64%);
  padding: 1px;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease;
}

.tool-card:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color) 58%, transparent), transparent 64%);
  box-shadow: 0 14px 38px color-mix(in srgb, var(--cat-color) 22%, transparent);
  transform: translateY(-3px);
}

.tool-card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at 18% 20%, color-mix(in srgb, var(--cat-color) 12%, transparent), transparent 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tool-card:hover .tool-card-glow {
  opacity: 1;
}

.tool-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  height: 100%;
  min-height: 188px;
  border: 1px solid color-mix(in srgb, var(--cat-color) 10%, var(--line));
  border-radius: 15px;
  background: var(--surface);
  padding: 17px;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tool-color) 18%, transparent);
  color: var(--tool-color);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover .tool-icon {
  box-shadow: 0 0 22px color-mix(in srgb, var(--tool-color) 34%, transparent);
  transform: scale(1.06);
}

.tool-category-label {
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-color) 15%, transparent);
  color: var(--cat-color);
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-card-body {
  flex: 1;
}

.tool-card strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.tool-card-footer span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-footer .material-symbols-rounded {
  color: var(--cat-color);
  font-size: 18px;
  opacity: 0;
  transform: translate(-4px, 2px);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-card:hover .tool-card-footer .material-symbols-rounded {
  opacity: 1;
  transform: translate(0);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 214px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  border-color: var(--cat-color);
  box-shadow: 0 0 0 1px var(--cat-color) inset, 0 14px 34px color-mix(in srgb, var(--cat-color) 22%, transparent);
  transform: translateY(-3px);
}

.category-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-color) 18%, transparent);
  color: var(--cat-color);
}

.category-card h3 {
  margin: 0;
}

.category-card small {
  color: var(--cat-color);
  font-size: 0.75rem;
  font-weight: 800;
}

.category-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
  list-style: none;
}

.category-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.category-card li span {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--cat-color);
}

.category-card > strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  color: var(--cat-color);
  font-size: 0.82rem;
}

.category-card > strong .material-symbols-rounded {
  font-size: 17px;
  transition: transform 180ms ease;
}

.category-card:hover > strong .material-symbols-rounded {
  transform: translateX(3px);
}

.browser-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  gap: 18px;
  align-items: center;
  margin: 40px 0 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent),
    var(--surface);
  padding: clamp(20px, 4vw, 30px);
}

.browser-note-grid {
  display: grid;
  gap: 10px;
}

.browser-note-grid > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.browser-note-grid .material-symbols-rounded {
  color: var(--accent-strong);
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 13px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip.active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.tool-page {
  display: grid;
  gap: 14px;
}

.tool-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  padding: 24px;
}

.tool-hero .tool-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.tool-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.08;
}

.tool-hero p {
  margin-bottom: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-tile {
  padding: 16px;
}

.feature-tile span {
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.feature-tile p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.unit-converter-shell {
  display: grid;
  grid-template-columns: 210px minmax(230px, 0.85fr) minmax(320px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.unit-converter-sidebar,
.unit-converter-list,
.unit-conversion-panel {
  padding: 14px;
}

.search-box.compact input {
  height: 46px;
  box-shadow: none;
}

.search-box.compact span {
  left: 14px;
}

.search-box.compact input {
  padding-left: 44px;
}

.unit-category-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.unit-category-button,
.unit-converter-tile {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.unit-category-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 800;
}

.unit-category-button span {
  color: var(--accent-strong);
  font-size: 19px;
}

.unit-category-button.active,
.unit-converter-tile.active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.unit-converter-list {
  display: grid;
  gap: 9px;
  max-height: 680px;
  overflow-y: auto;
}

.unit-converter-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
}

.unit-converter-tile > .material-symbols-rounded:first-child {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-strong);
}

.unit-converter-tile strong,
.unit-converter-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-converter-tile strong {
  font-size: 0.93rem;
}

.unit-converter-tile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.unit-conversion-header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.unit-conversion-header .tool-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.unit-conversion-header h3 {
  margin-bottom: 2px;
  font-size: 1.45rem;
}

.unit-conversion-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.unit-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.unit-field input,
.unit-field select,
.unit-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  outline: 0;
  font: inherit;
}

.unit-field input,
.unit-field select {
  height: 50px;
}

.unit-field textarea {
  min-height: 96px;
  padding-block: 12px;
  resize: vertical;
}

.unit-field input:focus,
.unit-field select:focus,
.unit-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.unit-select-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.unit-swap-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  cursor: pointer;
}

.unit-result {
  margin-top: 18px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 18px;
}

.unit-result span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unit-result strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.empty-state.compact {
  min-height: 120px;
  padding: 18px;
}

.calculator-page {
  gap: 10px;
}

.calculator-page .tool-hero {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
}

.calculator-page .tool-hero .tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.calculator-page .tool-hero h2 {
  margin-bottom: 2px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.calculator-page .tool-hero p {
  font-size: 0.88rem;
  line-height: 1.35;
}

.calculator-shell {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px;
}

.calculator-topbar {
  display: flex;
  justify-content: flex-end;
}

.calculator-mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 4px;
}

.calculator-mode-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
}

.calculator-mode-toggle button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
}

.calculator-mode-toggle .material-symbols-rounded {
  font-size: 17px;
}

.calculator-display {
  display: grid;
  align-content: end;
  justify-items: end;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px 14px;
  text-align: right;
}

.calculator-expression,
.calculator-answer {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calculator-expression {
  min-height: 1.4em;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.18rem);
  font-weight: 500;
}

.calculator-answer {
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
}

.calculator-keypad {
  display: grid;
  gap: 6px;
}

.calculator-keypad.basic {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calculator-keypad.scientific {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calculator-key {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: clamp(0.95rem, 1.8vw, 1.28rem);
  font-weight: 750;
  line-height: 1;
}

.calculator-key.operator {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.calculator-key.active {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
}

.calculator-key.equals {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.calculator-key sup {
  font-size: 0.6em;
  line-height: 0;
}

.qr-generator-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.qr-preview-panel,
.qr-card {
  padding: 18px;
}

.qr-preview-panel {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.qr-preview-frame {
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--qr-bg);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), var(--shadow-soft);
}

.qr-preview-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.qr-preview-meta {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: center;
}

.qr-preview-meta strong {
  font-size: 1.05rem;
}

.qr-preview-meta small {
  display: block;
  max-height: 4.4em;
  overflow: auto;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.qr-actions {
  justify-content: center;
}

.qr-action-button {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.qr-status {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 12px 14px;
  text-align: center;
  line-height: 1.4;
}

.qr-control-stack {
  display: grid;
  gap: 14px;
}

.qr-card {
  display: grid;
  gap: 14px;
}

.qr-card-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.qr-card-header > .material-symbols-rounded {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.qr-card-header h3 {
  margin-bottom: 2px;
  font-size: 1.08rem;
}

.qr-card-header p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.qr-form-grid,
.qr-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 13px;
  font-weight: 800;
}

.qr-toggle-row input {
  accent-color: var(--accent-strong);
}

.qr-swatch-section {
  display: grid;
  gap: 9px;
}

.qr-swatch-section > strong {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.qr-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.qr-swatch {
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.qr-swatch.active {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow-soft);
}

.business-card-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(340px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.business-card-preview-panel,
.business-card-control-card {
  padding: 18px;
}

.business-card-preview-panel,
.business-card-control-stack,
.business-card-control-card {
  display: grid;
  gap: 14px;
}

.business-card-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.business-card-preview-header h3 {
  margin: 0;
  font-size: 1.14rem;
}

.business-card-preview-header span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.business-card-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 14px;
  width: 100%;
  align-items: center;
}

.business-card-preview {
  --bc-accent: var(--accent);
  --bc-bg: var(--surface);
  --bc-text: var(--text);
  --bc-radius: 22px;
  --bc-aspect: 1050 / 600;
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: var(--bc-aspect);
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--bc-accent) 28%, var(--line));
  border-radius: var(--bc-radius);
  background: var(--bc-bg);
  color: var(--bc-text);
  padding: clamp(18px, 4.8%, 30px);
  box-shadow: var(--shadow-soft);
  font-family: var(--bc-font);
}

.business-card-preview.minimal::after,
.business-card-preview.split::before,
.business-card-preview.gradient::before,
.business-card-preview.classic::before {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.business-card-preview.minimal::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 8%;
  background: var(--bc-accent);
}

.business-card-preview.split::before {
  top: 0;
  bottom: 0;
  right: 0;
  width: 18%;
  background: var(--bc-accent);
}

.business-card-preview.gradient::before {
  inset: 0;
  background:
    radial-gradient(circle at 90% 14%, color-mix(in srgb, var(--bc-accent) 28%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--bc-accent) 9%, var(--bc-bg)), var(--bc-bg) 52%, color-mix(in srgb, #ffffff 56%, var(--bc-bg)));
}

.business-card-preview.classic::before {
  inset: 9%;
  border: 2px solid var(--bc-accent);
  border-radius: calc(var(--bc-radius) * 0.72);
}

.business-card-side-label {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.business-card-front-content,
.business-card-back-content {
  position: relative;
  height: 100%;
  min-width: 0;
}

.business-card-safe {
  max-width: 100%;
  overflow: hidden;
}

.business-card-clamp {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.business-card-clamp.one {
  -webkit-line-clamp: 1;
}

.business-card-clamp.two {
  -webkit-line-clamp: 2;
}

.business-card-front-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 3.2%, 18px);
}

.business-card-brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(10px, 3.8%, 18px);
  align-items: center;
  min-width: 0;
  max-width: 78%;
}

.business-card-brand-row.no-logo {
  grid-template-columns: minmax(0, 1fr);
}

.business-card-logo {
  display: grid;
  place-items: center;
  width: clamp(42px, 5.8vw, 62px);
  aspect-ratio: 1;
  border-radius: 24%;
  background: var(--bc-accent);
  color: #ffffff;
  overflow: hidden;
  padding: 0 6px;
  font-size: clamp(0.9rem, 1.65vw, 1.25rem);
  font-weight: 950;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--bc-accent) 25%, transparent);
}

.business-card-brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.business-card-brand-copy strong {
  color: var(--bc-text);
  font-size: clamp(0.78rem, 1.16vw, 0.96rem);
  line-height: 1.05;
}

.business-card-brand-copy span {
  color: color-mix(in srgb, var(--bc-text) 62%, transparent);
  font-size: clamp(0.66rem, 0.96vw, 0.8rem);
  font-weight: 680;
  line-height: 1.25;
}

.business-card-name-block {
  align-self: center;
  max-width: 83%;
  min-width: 0;
}

.business-card-name-block h3 {
  margin: 0;
  color: var(--bc-text);
  font-size: clamp(1.18rem, 2.45vw, 1.92rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.business-card-name-block p {
  margin: 7px 0 0;
  color: var(--bc-accent);
  font-size: clamp(0.78rem, 1.16vw, 0.94rem);
  font-weight: 750;
  line-height: 1.2;
}

.business-card-footer-line {
  width: min(44%, 150px);
  height: 4px;
  border-radius: 999px;
  background: var(--bc-accent);
}

.business-card-back-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(68px, 24%);
  gap: clamp(9px, 4%, 20px);
  align-items: center;
}

.business-card-contact-list {
  display: grid;
  gap: clamp(5px, 1.8%, 9px);
  min-width: 0;
}

.business-card-contact-item {
  display: grid;
  grid-template-columns: clamp(22px, 8%, 28px) minmax(0, 1fr);
  gap: clamp(6px, 2.8%, 10px);
  align-items: center;
  min-width: 0;
}

.business-card-contact-item .material-symbols-rounded {
  width: clamp(22px, 8%, 28px);
  height: clamp(22px, 8%, 28px);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bc-accent) 13%, transparent);
  color: var(--bc-accent);
  font-size: clamp(14px, 3vw, 17px);
}

.business-card-contact-item strong {
  color: var(--bc-text);
  font-size: clamp(0.66rem, 1.02vw, 0.84rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.business-card-qr {
  display: grid;
  gap: 5px;
  justify-items: center;
  align-content: center;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  padding: clamp(6px, 9%, 10px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.business-card-qr img {
  display: block;
  width: min(92px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.business-card-qr span {
  font-size: clamp(0.52rem, 0.9vw, 0.66rem);
  font-weight: 900;
}

.business-card-actions {
  justify-content: center;
}

.business-card-status {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 12px 14px;
  text-align: center;
  line-height: 1.4;
}

.business-card-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.business-card-form-grid .wide {
  grid-column: 1 / -1;
}

.business-card-toggle {
  align-self: end;
}

.business-color-field {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.business-color-field span {
  grid-column: 1 / -1;
}

.business-color-field input {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.business-color-field strong {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 0.86rem;
}

.business-reset-button {
  width: 100%;
  min-height: 50px;
  justify-content: center;
}

.contract-template-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.contract-control-stack,
.contract-card,
.contract-preview-panel {
  display: grid;
  gap: 14px;
}

.contract-card,
.contract-preview-panel {
  padding: 18px;
}

.contract-template-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contract-template-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 10px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.contract-template-option > .material-symbols-rounded {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong);
}

.contract-template-option strong,
.contract-template-option small {
  min-width: 0;
}

.contract-template-option strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.contract-template-option small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}

.contract-template-option.active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.contract-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contract-form-grid .wide {
  grid-column: 1 / -1;
}

.contract-clause-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contract-clause-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 3px 9px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--text);
  padding: 12px;
  cursor: pointer;
}

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

.contract-clause-toggle > .material-symbols-rounded {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  color: var(--accent-strong);
  font-size: 22px;
}

.contract-clause-toggle strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.contract-clause-toggle small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.contract-preview-panel {
  position: sticky;
  top: 86px;
}

.contract-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.contract-preview-header h3 {
  margin: 0;
  font-size: 1.18rem;
}

.contract-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.contract-stats span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.contract-disclaimer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
  color: var(--muted);
  padding: 12px;
}

.contract-disclaimer .material-symbols-rounded {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent-strong);
}

.contract-disclaimer p,
.contract-status {
  margin: 0;
  line-height: 1.45;
}

.contract-actions {
  justify-content: flex-start;
}

.contract-status {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 12px 14px;
  text-align: center;
}

.contract-preview-document {
  max-height: 780px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  padding: clamp(18px, 4vw, 32px);
  box-shadow: var(--shadow-soft);
}

.contract-document {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.65;
}

.contract-document-header {
  border-bottom: 2px solid #111827;
  padding-bottom: 18px;
}

.contract-document-header p {
  margin: 0 0 7px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contract-document-header h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.contract-document-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.contract-document-meta span {
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  color: #111827;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.contract-document-meta strong {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contract-document-section {
  display: grid;
  gap: 8px;
}

.contract-document-section h2 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}

.contract-document-section p,
.contract-document-section li {
  color: #334155;
  font-size: 0.92rem;
}

.contract-document-section p {
  margin: 0;
}

.contract-document-section ul {
  margin: 0;
  padding-left: 20px;
}

.contract-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.contract-signature-box {
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #f8fafc;
  padding: 16px;
}

.contract-signature-box span {
  display: block;
  height: 48px;
  border-bottom: 1px solid #111827;
  margin-bottom: 9px;
}

.contract-signature-box strong,
.contract-signature-box small {
  display: block;
  color: #334155;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.contract-document-note {
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  padding-top: 12px;
  font-size: 0.76rem;
}

.pomodoro-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.pomodoro-main-card,
.pomodoro-duration-card,
.pomodoro-session-card {
  padding: 18px;
}

.pomodoro-main-card {
  display: grid;
  gap: 20px;
  justify-items: center;
}

.pomodoro-mode-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.pomodoro-timer-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 282px);
  aspect-ratio: 1;
}

.pomodoro-progress {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pomodoro-progress-track,
.pomodoro-progress-value {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}

.pomodoro-progress-track {
  stroke: var(--surface-2);
}

.pomodoro-progress-value {
  stroke: var(--accent-strong);
  transition: stroke-dashoffset 220ms linear;
}

.pomodoro-timer-center {
  position: absolute;
  inset: 34px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.pomodoro-timer-center .material-symbols-rounded {
  color: var(--accent-strong);
  font-size: 36px;
}

.pomodoro-timer-center strong {
  margin-top: 8px;
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  line-height: 1;
}

.pomodoro-timer-center small {
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
}

.pomodoro-actions {
  justify-content: center;
}

.pomodoro-side-stack {
  display: grid;
  gap: 14px;
}

.pomodoro-session-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.pomodoro-session-card > .material-symbols-rounded {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pomodoro-session-card h3 {
  margin-bottom: 2px;
  font-size: 1.02rem;
}

.pomodoro-session-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.pomodoro-session-card > strong {
  font-size: 2rem;
  color: var(--accent-strong);
}

.pomodoro-duration-card {
  display: grid;
  gap: 12px;
}

.pomodoro-duration-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 40px 74px 40px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 10px;
}

.pomodoro-duration-row > .material-symbols-rounded {
  color: var(--accent-strong);
}

.pomodoro-duration-row > strong {
  font-size: 0.92rem;
}

.pomodoro-duration-value {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
  text-align: center;
}

.stopwatch-shell {
  display: grid;
  gap: 14px;
}

.stopwatch-face {
  display: grid;
  justify-items: center;
  gap: 12px;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 30px 18px;
  text-align: center;
}

.stopwatch-face > .material-symbols-rounded {
  font-size: 38px;
}

.stopwatch-face strong {
  max-width: 100%;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.stopwatch-actions .button {
  width: 100%;
}

.stopwatch-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.stopwatch-laps {
  min-height: 250px;
  overflow: hidden;
  padding: 0;
}

.stopwatch-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 250px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.stopwatch-empty .material-symbols-rounded {
  font-size: 42px;
}

.stopwatch-empty p {
  margin-bottom: 0;
}

.stopwatch-lap-table {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  max-height: 360px;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.stopwatch-lap-table > * {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-variant-numeric: tabular-nums;
}

.stopwatch-lap-table > strong {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.stopwatch-lap-table > span {
  color: var(--text);
  font-size: 0.95rem;
}

.stopwatch-lap-table > :nth-child(3n),
.stopwatch-lap-table > :nth-child(3n + 2) {
  text-align: right;
}

.stopwatch-lap-table .material-symbols-rounded {
  margin-right: 5px;
  font-size: 16px;
  vertical-align: -3px;
}

.device-info-page {
  padding-bottom: 84px;
}

.device-info-content {
  display: grid;
}

.device-section-card {
  padding: 18px;
}

.device-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.device-section-header > .material-symbols-rounded {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.device-section-header h3 {
  margin-bottom: 2px;
  font-size: 1.35rem;
}

.device-section-header p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.device-section-picker {
  position: sticky;
  z-index: 10;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 10px;
}

.device-table {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.2fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.device-table.three-column {
  grid-template-columns: minmax(160px, 0.8fr) minmax(110px, 0.38fr) minmax(0, 1.2fr);
}

.device-table > * {
  min-width: 0;
  background: var(--surface);
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.device-table > strong {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 0 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

.presence-pill.yes {
  color: #15803d;
}

.presence-pill.no {
  color: #b91c1c;
}

.device-graph-grid,
.device-test-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.device-test-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.device-metric-card,
.device-test-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
}

.device-metric-card.wide {
  grid-column: span 2;
}

.device-metric-card > .material-symbols-rounded,
.device-test-card > .material-symbols-rounded {
  color: var(--accent-strong);
}

.device-metric-card strong,
.device-test-card strong {
  font-size: 0.92rem;
}

.device-metric-card small,
.device-test-card small {
  color: var(--muted);
  line-height: 1.4;
}

.metric-bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: var(--surface);
}

.metric-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-strong);
}

.sensor-list {
  display: grid;
  gap: 10px;
}

.sensor-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 0;
}

.sensor-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 13px;
}

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

.sensor-card summary strong,
.sensor-card summary small {
  display: block;
}

.sensor-card summary small {
  margin-top: 3px;
  color: var(--muted);
}

.sensor-card .device-table {
  margin: 0 13px 12px;
}

.sensor-test-button {
  justify-self: end;
  margin: 0 13px 13px auto;
}

.sensor-test-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--accent-strong);
  border-radius: 999px;
  background: var(--accent-strong);
  color: #ffffff;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
}

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

.icon-button:active,
.button:active,
.tool-card:active,
.category-card:active,
.chip:active {
  transform: translateY(0);
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.settings-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.legal-page {
  display: grid;
  gap: 14px;
}

.legal-hero .eyebrow {
  margin-bottom: 4px;
}

.legal-content {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.legal-updated {
  margin: 0;
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.legal-section {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.legal-section h3 {
  margin: 0;
  font-size: 1.05rem;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.mobile-tabs {
  display: none;
}

@media (max-width: 1080px) {
  .hero-panel,
  .browser-note {
    grid-template-columns: 1fr;
  }

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

  .unit-converter-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .calculator-key {
    min-height: 54px;
  }

  .qr-generator-shell,
  .business-card-shell,
  .contract-template-shell {
    grid-template-columns: 1fr;
  }

  .contract-preview-panel {
    position: static;
  }

  .pomodoro-shell {
    grid-template-columns: 1fr;
  }

  .unit-conversion-panel {
    grid-column: 1 / -1;
  }

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

  .nav-list {
    display: none;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 760px) and (min-width: 760px) {
  .calculator-page .tool-hero {
    display: none;
  }

  .calculator-shell {
    grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
    align-items: stretch;
    max-width: 1040px;
  }

  .calculator-topbar {
    grid-column: 1 / -1;
  }

  .calculator-display {
    min-height: 0;
  }

  .calculator-key {
    min-height: 38px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-bottom: 72px;
  }

  .nav-bar,
  .content {
    width: min(100% - 28px, 1200px);
  }

  .footer-shell {
    width: min(100% - 28px, 1200px);
    padding-bottom: 88px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .nav-bar {
    min-height: 62px;
  }

  .header-search {
    width: min(44vw, 190px);
  }

  .content {
    padding-top: 18px;
  }

  .hero-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-visual {
    padding: 12px;
  }

  .trust-row {
    gap: 8px;
  }

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

  .section-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tool-grid,
  .feature-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .unit-converter-shell {
    grid-template-columns: 1fr;
  }

  .unit-converter-list {
    max-height: none;
  }

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

  .unit-select-grid {
    grid-template-columns: 1fr;
  }

  .calculator-shell {
    gap: 8px;
    padding: 10px;
  }

  .calculator-topbar {
    justify-content: stretch;
  }

  .calculator-mode-toggle {
    width: 100%;
  }

  .calculator-display {
    min-height: 86px;
    padding: 10px 12px;
  }

  .calculator-keypad {
    gap: 6px;
  }

  .calculator-keypad.scientific {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .calculator-key {
    min-height: 40px;
    border-radius: 12px;
    font-size: clamp(0.78rem, 3.2vw, 1.12rem);
  }

  .qr-form-grid,
  .qr-toggle-grid,
  .business-card-form-grid,
  .contract-form-grid,
  .contract-clause-grid,
  .contract-template-picker,
  .contract-document-meta,
  .contract-signature-grid {
    grid-template-columns: 1fr;
  }

  .contract-preview-header {
    flex-direction: column;
  }

  .contract-stats {
    justify-content: flex-start;
  }

  .contract-preview-document {
    max-height: none;
  }

  .business-card-preview-header {
    flex-direction: column;
    align-items: stretch;
  }

  .business-card-stage {
    grid-template-columns: 1fr;
  }

  .business-card-preview {
    padding: 18px;
  }

  .business-card-back-content {
    grid-template-columns: 1fr;
  }

  .business-card-qr {
    width: min(118px, 40%);
    justify-self: start;
  }

  .business-card-brand-row,
  .business-card-name-block {
    max-width: 100%;
  }

  .qr-preview-frame {
    min-height: 260px;
    padding: 14px;
  }

  .pomodoro-session-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .pomodoro-session-card > strong {
    grid-column: 1 / -1;
  }

  .stopwatch-face {
    padding: 22px 14px;
  }

  .stopwatch-actions {
    grid-template-columns: 1fr;
  }

  .stopwatch-lap-table {
    grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
    padding: 12px;
  }

  .pomodoro-duration-row {
    grid-template-columns: 28px minmax(0, 1fr) 36px 68px 36px;
    gap: 8px;
  }

  .unit-swap-button {
    justify-self: center;
  }

  .device-section-picker {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .device-table,
  .device-table.three-column {
    grid-template-columns: 1fr;
  }

  .device-table > strong {
    display: none;
  }

  .device-graph-grid,
  .device-test-grid {
    grid-template-columns: 1fr;
  }

  .device-metric-card.wide {
    grid-column: auto;
  }

  .tool-card,
  .tool-card-inner {
    min-height: 172px;
  }

  .tool-hero {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 18px;
  }

  .tool-hero .tool-icon {
    width: 58px;
    height: 58px;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-tabs {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px);
  }

  .mobile-tabs a {
    display: grid;
    justify-items: center;
    gap: 2px;
    color: var(--muted);
    padding: 8px 4px;
    font-size: 0.73rem;
    font-weight: 800;
  }

  .mobile-tabs a.active {
    color: var(--accent-strong);
  }
}

@media (max-width: 430px) {
  .stats-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .browser-note {
    border-radius: 20px;
  }

  .button {
    width: 100%;
  }

  .calculator-page .tool-hero {
    padding: 10px 12px;
  }

  .calculator-page .tool-hero p {
    display: none;
  }

  .calculator-mode-toggle button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.82rem;
  }

  .calculator-display {
    min-height: 74px;
  }

  .calculator-answer {
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  .calculator-key {
    min-height: 36px;
    font-size: clamp(0.72rem, 3vw, 1rem);
  }

  .tool-category-label {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
