:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6875;
  --line: #d9dee7;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --surface-muted: #ebeef3;
  --primary: #1f4f46;
  --primary-dark: #10251f;
  --accent: #a26320;
  --accent-soft: #f2e8db;
  --blue: #284d73;
  --success: #24613d;
  --danger: #9b3326;
  --teal: var(--primary);
  --teal-dark: var(--primary-dark);
  --coral: #b85d3e;
  --amber: #a9762f;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06), 0 12px 28px rgba(17, 24, 39, 0.07);
  --shadow-md: 0 24px 70px rgba(17, 24, 39, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary-dark);
  font-weight: 800;
  transition: transform 180ms ease;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 max(24px, 5vw);
  border-bottom: 1px solid rgba(217, 222, 231, 0.86);
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: #111827;
  font-size: 0.86rem;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-toggle:hover {
  border-color: #b8c0cc;
  background: #f7f8fa;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.nav-toggle-lines::before {
  transform: translateY(-6px);
}

.nav-toggle-lines::after {
  transform: translateY(6px);
}

.site-header.nav-open .nav-toggle-lines {
  background: transparent;
}

.site-header.nav-open .nav-toggle-lines::before {
  background: var(--ink);
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle-lines::after {
  background: var(--ink);
  transform: rotate(-45deg);
}

.top-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.top-nav > a:hover,
.nav-menu summary:hover,
.nav-menu-panel a:hover,
.site-footer a:hover {
  color: var(--ink);
}

.top-nav > a,
.nav-menu summary {
  border-bottom: 2px solid transparent;
  padding: 20px 0 18px;
  transition: color 180ms ease, border-color 180ms ease;
}

.top-nav > a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] summary {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-menu-panel {
  position: fixed;
  top: 64px;
  right: max(24px, 5vw);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 18px;
  width: min(980px, 90vw);
  padding: 22px;
  border: 1px solid rgba(217, 222, 231, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-menu-panel section {
  display: grid;
  align-content: start;
  gap: 7px;
}

.nav-menu-heading {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.2;
}

.nav-menu-panel a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-menu-panel a.active {
  color: var(--ink);
}

.nav-menu-panel a:hover {
  transform: translateX(2px);
}

.hero {
  width: 100%;
  margin: 0;
  padding: 34px max(24px, 5vw) 24px;
  background: #111827;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero-copy-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #d2a468;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 3.75rem;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 620px;
  color: #c8d0dc;
  font-size: 1.13rem;
}

.hero h1 {
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-summary {
  display: grid;
}

.hero-console {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.console-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #d8dee8;
  background: rgba(0, 0, 0, 0.16);
  font-weight: 800;
}

.console-topline strong {
  color: #86efac;
}

.hero-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.hero-summary dl div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.hero-summary dt {
  color: #aeb8c7;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-summary dd {
  margin: 4px 0 0;
  color: #fff;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1.15;
}

.quick-start-list {
  display: grid;
  gap: 8px;
}

.quick-start-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.quick-start-list a:hover {
  border-color: rgba(210, 164, 104, 0.56);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.quick-start-list strong {
  color: #d2a468;
  font-size: 0.82rem;
}

.primary-button,
.secondary-button,
.full-button,
.inline-actions button,
.quiet-button,
.light-button,
.tool-filter-row button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}

.primary-button {
  color: #fff;
  background: #d08a3f;
}

.secondary-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.full-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-button:hover,
.light-button:hover,
.inline-actions button:hover {
  border-color: #c3cad6;
  background: #f3f5f8;
  transform: translateY(-1px);
}

.hero .secondary-button:hover {
  border-color: rgba(210, 164, 104, 0.52);
  background: rgba(255, 255, 255, 0.13);
}

.tool-section,
.content-band,
.directory-section,
.page-main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.tool-section {
  padding: 46px 0 74px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.tool-section-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.tool-count {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}

.tool-command-bar {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.tool-search-label {
  gap: 8px;
}

.tool-search-label span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.tool-search-label input {
  border-color: #cfd6e1;
  background: #fff;
}

.tool-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tool-filter-row button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cfd6e1;
  color: var(--muted);
  background: #fff;
  font-size: 0.88rem;
}

.tool-filter-row button:hover {
  border-color: #aeb8c7;
  color: var(--ink);
  background: #f7f8fa;
}

.tool-filter-row button[aria-pressed="true"] {
  border-color: #1f2937;
  color: #fff;
  background: #1f2937;
}

.tool-empty-state {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px dashed #b9c1cf;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.tool-empty-state h3 {
  margin-bottom: 4px;
}

.tool-empty-state p {
  margin: 0;
  color: var(--muted);
}

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

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

.tool-category-list {
  display: grid;
  gap: 22px;
}

.tool-category {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.tool-category-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tool-category-header h3 {
  margin: 0;
  font-size: 1.22rem;
}

.tool-category-header p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-link-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  min-height: 144px;
  align-content: start;
  gap: 10px 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tool-link-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 3px;
  content: "";
  background: currentColor;
  opacity: 0.78;
}

.tool-link-card:hover {
  border-color: #b5bfcd;
  background: #fbfcfd;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.tool-link-card:active {
  transform: translateY(0);
}

.tool-link-card[hidden],
.tool-category[hidden] {
  display: none;
}

.tool-link-card h3 {
  margin-bottom: 0;
  font-size: 1.04rem;
}

.tool-link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.48;
}

.tool-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 42%, white);
  border-radius: var(--radius);
  color: var(--primary-dark);
  background: #eef6f1;
  font-size: 0.82rem;
  font-weight: 900;
}

.tool-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.tool-card-meta {
  grid-column: 2;
  align-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.tool-card-action {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: end;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 900;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.tool-link-card:hover .tool-card-action {
  border-color: #1f2937;
  color: #fff;
  background: #1f2937;
}

.text-accent::before,
.text-accent .tool-icon {
  color: var(--primary-dark);
  background: #eef6f1;
}

.security-accent::before,
.security-accent .tool-icon {
  color: #91412e;
  background: #f7ece7;
}

.convert-accent::before,
.convert-accent .tool-icon {
  color: #345f7d;
  background: #ecf2f6;
}

.health-accent::before,
.health-accent .tool-icon {
  color: #58662f;
  background: #f1f5e8;
}

.design-accent::before,
.design-accent .tool-icon {
  color: #856024;
  background: #f7efdf;
}

.date-accent::before,
.date-accent .tool-icon {
  color: #5b5477;
  background: #f0eef6;
}

.crypto-accent::before,
.crypto-accent .tool-icon {
  color: #2d5a87;
  background: #edf3f8;
}

.rates-accent::before,
.rates-accent .tool-icon {
  color: #32745f;
  background: #edf6f2;
}

.data-accent::before,
.data-accent .tool-icon {
  color: #52637f;
  background: #eef2f8;
}

.web-accent::before,
.web-accent .tool-icon {
  color: #6f602b;
  background: #f5f1e2;
}

.time-accent::before,
.time-accent .tool-icon {
  color: #7a4d57;
  background: #f6eaed;
}

.finance-accent::before,
.finance-accent .tool-icon {
  color: #386846;
  background: #edf5ef;
}

.layout-accent::before,
.layout-accent .tool-icon {
  color: #775334;
  background: #f5eee7;
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 388px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tool-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #e6f1ed;
  font-size: 0.76rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 12px;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--teal);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

input[type="color"] {
  height: 48px;
  padding: 4px;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 127, 122, 0.25);
  outline-offset: 2px;
}

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

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

.metric-grid output {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-dark);
  background: #f6faf7;
  font-weight: 800;
  text-align: center;
}

.inline-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.inline-actions button {
  border: 1px solid var(--line);
  background: #f8faf7;
  color: var(--ink);
}

.option-row {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.option-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.result-box {
  display: grid;
  min-height: 64px;
  align-items: center;
  margin: auto 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.full-button {
  width: 100%;
  color: #fff;
  background: var(--primary);
}

.quiet-button,
.light-button {
  width: 100%;
  padding: 0 16px;
}

.quiet-button {
  color: #fff;
  background: var(--blue);
}

.light-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #f8faf7;
}

.large-result {
  display: grid;
  min-height: 110px;
  place-items: center;
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary-dark);
  text-align: center;
  font-size: 1.45rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.color-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: auto;
}

.color-swatch {
  display: block;
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2f7f7a;
}

.color-row output {
  display: block;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

.content-band {
  padding: 54px 0 70px;
  border-top: 1px solid var(--line);
}

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

.content-columns article {
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.operations-band {
  padding-top: 50px;
}

.operations-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
}

.operation-number {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
}

.operations-grid h3 {
  margin-bottom: 0;
}

.content-columns p,
.directory-section p,
.page-main p,
.page-main li {
  color: var(--muted);
}

.directory-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
  padding: 76px 0 94px;
}

.directory-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.directory-list span {
  color: var(--muted);
}

.directory-list strong {
  text-align: right;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 5vw;
  border-top: 1px solid var(--line);
  background: #edf3ef;
}

.site-footer p {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-hero {
  padding: 64px 0 28px;
}

.page-hero h1 {
  color: var(--ink);
  font-size: 3.4rem;
}

.page-content {
  max-width: 860px;
  padding: 24px 0 88px;
}

.page-content section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.page-content a {
  color: var(--teal-dark);
  font-weight: 800;
}

.tool-page-main {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding-bottom: 82px;
}

.tool-page-hero {
  display: grid;
  max-width: 880px;
  gap: 8px;
  padding: 56px 0 28px;
}

.tool-page-hero h1 {
  color: var(--ink);
  font-size: 3.35rem;
}

.tool-page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.14rem;
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.tool-panel,
.tool-aside {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.tool-panel {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.tool-aside {
  padding: 24px;
}

.tool-aside h2 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.tool-aside p {
  color: var(--muted);
}

.tool-aside p:last-child {
  margin-bottom: 0;
}

.tool-aside a,
.learning-section a {
  color: var(--teal-dark);
  font-weight: 800;
}

.learning-section {
  display: grid;
  gap: 28px;
  margin-top: 38px;
}

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

.info-card,
.faq-card,
.related-tools {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

.info-card,
.faq-card {
  padding: 22px;
}

.info-card h2,
.faq-card h2 {
  font-size: 1.2rem;
}

.info-card p,
.faq-card p,
.info-card li,
.faq-card li {
  color: var(--muted);
}

.faq-card {
  display: grid;
  gap: 16px;
}

.faq-card article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-card article:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 18px;
}

.related-tools strong {
  margin-right: 6px;
}

.related-tools a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-dark);
  background: #f8faf7;
  font-weight: 800;
}

.password-output {
  margin: 0;
  min-height: 76px;
  font-size: 1.05rem;
}

.password-list-output {
  min-height: 190px;
}

.crypto-workspace {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

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

.button-stack {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 10px;
  align-content: end;
}

.mono-output {
  min-height: 230px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.compact-mono-output {
  min-height: 150px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.result-list strong,
.result-list output {
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 900;
}

.status-line {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f0f4f1;
  font-size: 0.92rem;
  font-weight: 800;
}

.status-line[data-status="success"] {
  color: #1f5f36;
  background: #e7f5ea;
}

.status-line[data-status="error"] {
  color: #8b2f22;
  background: #fbe9e5;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  width: min(920px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(219, 228, 223, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-md);
}

.cookie-banner h2 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.cookie-banner a {
  color: var(--teal-dark);
  font-weight: 800;
}

.cookie-banner-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: center;
}

.exchange-result-card {
  display: grid;
  min-height: 220px;
  align-content: center;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary-dark);
}

.exchange-result-card output {
  display: block;
  overflow-wrap: anywhere;
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
}

.exchange-result-card span {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.bmi-result-card {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary-dark);
  text-align: center;
}

.bmi-result-card output {
  font-size: 4.4rem;
  font-weight: 900;
  line-height: 1;
}

.bmi-result-card span {
  font-size: 1.08rem;
  font-weight: 800;
}

.assessment-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  background: #f8fbf8;
}

.assessment-card[data-tone="low"] {
  border-left-color: var(--amber);
}

.assessment-card[data-tone="high"] {
  border-left-color: var(--coral);
}

.assessment-card[data-tone="very-high"] {
  border-left-color: #9b3d31;
}

.assessment-card h2 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.assessment-card p {
  margin: 0;
  color: var(--muted);
}

.range-list {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.range-list li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.range-list span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.range-list strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.date-result-card output {
  font-size: 3.6rem;
}

.large-color-row {
  grid-template-columns: 160px 1fr;
  margin-top: 8px;
}

.large-color-row .color-swatch {
  width: 160px;
  height: 160px;
}

.color-values {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.color-values output {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .tool-grid,
  .content-columns,
  .directory-section,
  .tool-workspace,
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-card {
    min-height: 360px;
  }

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

  .tool-command-bar {
    grid-template-columns: 1fr;
  }

  .tool-filter-row {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 5vw;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .top-nav {
    grid-column: 1 / -1;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-height: calc(100vh - 88px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
  }

  .site-header.nav-open .top-nav {
    display: flex;
  }

  .site-footer nav {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .top-nav > a,
  .nav-menu summary {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: #f8fafc;
  }

  .top-nav > a.active {
    border-color: #1f2937;
    color: #fff;
    background: #1f2937;
  }

  .top-nav > a:hover,
  .nav-menu summary:hover {
    border-color: #c8d0dc;
    background: #fff;
  }

  .top-nav > a.active:hover {
    border-color: #1f2937;
    color: #fff;
    background: #1f2937;
  }

  .nav-menu {
    width: 100%;
  }

  .nav-menu[open] summary {
    border-color: #c8d0dc;
    color: var(--ink);
    background: #fff;
  }

  .nav-menu-panel {
    position: static;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border-color: #e0e5ee;
    box-shadow: none;
  }

  .nav-menu-panel section {
    display: grid;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .nav-menu-panel section:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .nav-menu-heading {
    padding: 4px 6px;
    font-size: 0.8rem;
  }

  .nav-menu-panel a {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #f8fafc;
  }

  .nav-menu-panel a:hover,
  .nav-menu-panel a.active {
    color: var(--ink);
    background: #eef2f7;
    transform: none;
  }

  h1,
  .page-hero h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy {
    font-size: 1.06rem;
  }

  .hero {
    padding: 22px 5vw 12px;
  }

  .hero-inner {
    gap: 18px;
    padding: 14px 0 22px;
  }

  .hero-summary {
    display: none;
  }

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

  .tool-grid,
  .directory-grid,
  .content-columns,
  .directory-section,
  .tool-workspace,
  .info-grid,
  .metric-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .result-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-list strong,
  .result-list output {
    text-align: left;
  }

  .tool-section {
    padding-top: 28px;
  }

  .tool-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .tool-count {
    width: 100%;
  }

  .tool-command-bar {
    padding: 12px;
  }

  .tool-filter-row button {
    flex: 1 1 auto;
  }

  .tool-category {
    padding: 14px;
  }

  .tool-category-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .tool-link-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .tool-card-action {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-page-hero {
    padding-top: 54px;
  }

  .tool-page-hero h1 {
    font-size: 2.1rem;
  }

  .tool-panel,
  .tool-aside {
    padding: 20px;
  }

  .button-stack {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    right: 12px;
    bottom: 12px;
    grid-template-columns: 1fr;
    width: calc(100vw - 24px);
  }

  .exchange-result-card output {
    font-size: 2.35rem;
  }

  .large-color-row {
    grid-template-columns: 1fr;
  }

  .large-color-row .color-swatch {
    width: 100%;
    height: 128px;
  }

  .bmi-result-card output {
    font-size: 3.4rem;
  }

  .directory-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-list strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
