@font-face {
  font-family: "Grove Serif";
  src: local("Georgia");
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #1d352c;
  --muted: #465a50;
  --green: #214b39;
  --line: #dce3d7;
  --white: #fff;
  --paper: #f7f8f2;
  --lime: #dcebaf;
  --pale-sage: #ecf2e3;
  --error: #952f28;
  --serif: "Grove Serif", Georgia, serif;
  font-family: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #4b7750; outline-offset: 3px; }
::selection { color: #13271d; background: #d5eba4; }
h1, h2, h3, p { margin: 0; }
.container { width: min(1152px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; top: .6rem; left: .6rem; transform: translateY(-150%); z-index: 3; background: #fff; padding: .85rem; }
.skip:focus { transform: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { text-decoration: none; font-size: 1.23rem; font-weight: 750; letter-spacing: -.045em; display: inline-flex; gap: .62rem; align-items: center; white-space: nowrap; }
.mark { display: grid; place-items: center; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; padding: 8px; width: 33px; height: 33px; background: var(--green); border-radius: 9px; }
.mark i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #e5f1bf; }
.mark i:nth-child(2), .mark i:nth-child(3) { width: 7px; height: 2px; border-radius: 2px; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); font-size: .9375rem; font-weight: 650; }
.site-header nav a, .site-footer a { text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero { background: #eaf0df; border-bottom: 1px solid #d9e3d1; position: relative; overflow: clip; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 700px; height: 700px; right: -148px; top: -283px; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent 0 24px, #55765a1a 25px 26px);
  mask-image: linear-gradient(110deg, transparent 11%, #000 53%);
}
.hero-grid { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(285px, 364px); gap: clamp(2.25rem, 7vw, 7.4rem); padding-block: 60px; }
.hero h1 { font: 400 clamp(2.85rem, 5.4vw, 5.1rem)/.99 var(--serif); letter-spacing: -.068em; }
.hero h1 em { font-weight: 400; color: #3c644c; white-space: nowrap; }
.hero-copy > p { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55; max-width: 36ch; margin-top: 1.25rem; }
.search-area { margin-top: 1.85rem; max-width: 548px; }
.search-area label, .field label { display: block; margin-bottom: .48rem; font-size: .9375rem; font-weight: 700; }
.search-box { background: var(--white); display: flex; align-items: center; border: 1px solid #afbcae; border-radius: 11px; box-shadow: 0 3px 0 #2134290c; padding-inline: .95rem; gap: .7rem; }
.search-box:focus-within { outline: 3px solid #4b7750; outline-offset: 2px; }
.search-box input { color: var(--ink); background: transparent; padding: .92rem 0; border: 0; width: 100%; min-width: 0; }
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: #54635a; opacity: 1; }
.search-results {
  margin-top: .5rem; padding: .45rem; border-radius: 10px; border: 1px solid #b9c8b8; background: #fff;
}
.search-results p { color: var(--muted); padding: .35rem .55rem; font-size: .875rem; }
.search-results a {
  display: block; border-radius: 5px; padding: .48rem .55rem; font-weight: 650; text-decoration: none;
}
.search-results a:hover, .search-results a:focus-visible { background: #edf2e7; }
.magnifier { display: inline-block; width: 15px; aspect-ratio: 1; border: 2px solid #42624e; border-radius: 50%; position: relative; flex: 0 0 15px; margin-right: 2px; }
.magnifier::after { content: ""; height: 2px; width: 6px; background: #42624e; position: absolute; transform: rotate(45deg); top: 11px; left: 9px; }
kbd { font: 600 .875rem/1 "Segoe UI", sans-serif; color: #536555; background: #edf1e9; border: 1px solid #dce3d7; padding: .28rem .46rem; border-radius: 5px; }
.popular { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.popular a { display: inline-flex; align-items: center; min-height: 33px; text-decoration: none; padding: .32rem .65rem; border-radius: 6px; color: #284533; background: #ffffff72; border: 1px solid #c9d7c4; font-size: .875rem; font-weight: 650; }
.popular a:hover { background: white; }

.quick { padding: 19px; border-radius: 18px; background: #254638; color: #fff; box-shadow: 0 14px 32px #18352625, inset 0 1px #ffffff22; min-width: 0; }
.quick-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; margin-bottom: .78rem; }
.quick-bar h2 { font-size: 1.02rem; font-weight: 700; }
.quick-bar a { font-size: .875rem; color: #e3efb8; text-underline-offset: 3px; }
.quick :focus-visible { outline-color: #e7f6b2; }
.display { background: #f4f7e9; border-radius: 10px; color: var(--ink); padding: 8px 12px; text-align: right; margin-bottom: .7rem; min-height: 83px; }
.display label { font-size: .875rem; color: #4b5d50; }
.display input { background: transparent; color: #132a20; border: 0; text-align: right; display: block; width: 100%; min-width: 0; font-size: 1.55rem; line-height: 1.15; }
.display input::placeholder { opacity: 1; color: #586e58; }
.display input:focus-visible { outline-color: #365b48; }
#quick-result { min-height: 1.2rem; color: #365b48; font-weight: 650; font-size: .875rem; overflow-wrap: anywhere; }
#quick-result.error { color: var(--error); }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .42rem; }
.keys button { border: 0; min-height: 41px; border-radius: 7px; background: #385a4c; color: #fff; font-size: 1rem; font-weight: 650; }
.keys button:hover { background: #476e5d; }
.keys .operator { background: #496453; color: #eff7d9; }
.keys .equals { background: var(--lime); color: #20382a; grid-column: 1 / -1; font-size: 1.18rem; }
.keys .equals:hover { background: #ecf6c9; }

.scientific-controls {
  margin-bottom: 1rem;
  padding: clamp(.65rem, 2vw, 1rem);
  background: var(--pale-sage);
  border: 1px solid #d3decb;
  color: #2e4638;
  box-shadow: none;
}
.scientific-controls :focus-visible { outline-color: #4b7750; }
.scientific-controls #field-expression {
  background: rgb(255 255 255 / 75%);
  font-family: ui-monospace, Consolas, monospace;
}
.scientific-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .75rem;
}
.scientific-toolbar button {
  min-height: 46px;
  padding-inline: .7rem;
  border: 1px solid #aebda5;
  border-radius: 7px;
  color: inherit;
  background: rgb(255 255 255 / 54%);
}
.scientific-toolbar button:hover { background: #dfead6; }
.scientific-keypad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}
.scientific-keypad h2 {
  font-size: .875rem;
  margin-bottom: .5rem;
  color: #425d49;
}
.scientific-controls .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scientific-controls .keys button {
  min-height: 44px;
  padding-inline: .2rem;
  border: 1px solid #bfccb6;
  color: inherit;
  background: rgb(255 255 255 / 59%);
}
.scientific-controls .keys button:hover { background: #dfead6; }
.scientific-controls .keys .operator { background: rgb(151 174 131 / 20%); }
.scientific-controls .keys .operator:hover { background: #d4e2c9; }
.scientific-submit { margin-top: .42rem; }
.scientific-controls .scientific-submit .equals {
  grid-column: span 3;
  border-color: #9eb595;
  background: #cfe0c4;
}
.scientific-controls .scientific-submit .equals:hover { background: #c2d7b5; }

.category-section { padding-top: 2.6rem; }
.category-section h2, .catalog h2, .related h2 { font: 400 clamp(1.9rem, 3vw, 2.5rem)/1.12 var(--serif); letter-spacing: -.045em; }
.category-list { list-style: none; display: grid; padding: 0; margin: 1rem 0 0; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.category-list a { display: flex; min-height: 58px; align-items: center; gap: .6rem; padding: .5rem .65rem; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font-size: .9375rem; font-weight: 650; }
.category-list a:hover, .tool-card:hover { border-color: #8fa592; }
.icon { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; flex: 0 0 34px; background: #e6ece0; color: #335744; font-size: 1.16rem; font-weight: 700; line-height: 1; }
.icon.math { background: #daecd9; color: #296047; }
.icon.money, .icon.home-projects { background: #eeead4; color: #604f22; }
.icon.shopping, .icon.cooking { background: #f3e4d8; color: #71492d; }
.icon.dates-time, .icon.travel { background: #dfe9ee; color: #2d5366; }
.icon.school, .icon.everyday { background: #eae4f2; color: #584269; }
.icon.fitness-health { background: #f0e2e8; color: #743d55; }
.icon.conversions { background: #dcebe7; color: #315e58; }
.catalog { padding-block: 2.75rem 4rem; }
.section-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.section-top p, #empty { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.05rem 0 1.25rem; }
.filters button { min-height: 36px; border-radius: 100px; padding: .35rem .75rem; font-size: .875rem; font-weight: 650; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.filters button:hover { border-color: #8fa592; }
.filters button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); gap: .8rem; margin-top: 1rem; }
.tool-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 0; padding: 1rem; }
.tool-card h3 { font-size: 1rem; margin-top: .5rem; line-height: 1.37; }
.tool-card a { text-decoration: none; }
.tool-card a:hover { text-decoration: underline; }
.tool-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-card p { font-size: .9375rem; line-height: 1.5; color: var(--muted); margin-top: .3rem; }
#empty { margin-top: 1rem; }

.inner { padding-block: 1.7rem 4rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .3rem .65rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .65rem; color: #697d6e; }
.breadcrumbs a { text-underline-offset: .2rem; }
.page-title { margin: 2rem 0 1.55rem; max-width: 800px; }
.page-title .icon { width: 42px; height: 42px; font-size: 1.3rem; margin-bottom: .65rem; }
.page-title h1 { font: 400 clamp(2.25rem, 5vw, 4.1rem)/1.06 var(--serif); letter-spacing: -.055em; }
.page-title p { color: var(--muted); line-height: 1.55; font-size: 1.1rem; margin-top: .66rem; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); align-items: start; gap: clamp(1rem, 3.5vw, 2.75rem); }
.calculator-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: clamp(1rem, 3vw, 1.55rem); }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; align-items: end; }
.field.full { grid-column: 1 / -1; }
.field input, .field select { border: 1px solid #aab9ae; color: var(--ink); padding: .65rem .7rem; min-height: 46px; border-radius: 7px; width: 100%; min-width: 0; background-color: #fff; }
.field select { appearance: none; padding-right: 1.95rem; background-image: linear-gradient(45deg, transparent 50%, #365648 50%), linear-gradient(135deg, #365648 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0; }
.actions button { border-radius: 7px; min-height: 45px; padding: .65rem .95rem; font-weight: 680; border: 1px solid var(--green); }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #153a2a; }
.actions .secondary { background: #fff; border-color: #aab9ae; color: var(--ink); }
.secondary:hover { background: #eff4ec; }
.tool-result { border-radius: 10px; background: var(--pale-sage); padding: 1rem; min-height: 105px; overflow-wrap: anywhere; }
.result-label { font-weight: 650; font-size: .875rem; color: #415b46; }
.result-value { margin-top: .15rem; color: #234634; font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 750; letter-spacing: -.04em; }
.result-detail { margin-top: .25rem; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.tool-result.error { background: #fbebe7; }
.tool-result.error .result-value { color: var(--error); font-size: 1.25rem; }
.explanation { display: grid; gap: 1.1rem; }
.explanation section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.15rem; }
.explanation .example { background: #f0f1e1; }
.explanation h2 { font: 400 1.55rem/1.15 var(--serif); letter-spacing: -.025em; }
.explanation p { color: var(--muted); line-height: 1.58; margin-top: .5rem; }
.source a { color: var(--green); text-underline-offset: .2rem; font-size: .9375rem; }
.related { margin-top: 3rem; }
.site-footer { background: #edf1e8; border-top: 1px solid var(--line); }
.site-footer .bar { min-height: 92px; flex-wrap: wrap; padding-block: .9rem; }
.site-footer p, .site-footer .bar > a:last-child { color: var(--muted); font-size: .9375rem; }

@media (max-width: 960px) {
  .container { width: calc(100% - 48px); }
  .hero-grid { gap: 2rem; }
  .hero h1 em { white-space: normal; }
}
@media (max-width: 715px) {
  .container { width: calc(100% - 36px); }
  .hero-grid, .tool-layout { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 40px 28px; gap: 1.5rem; }
  .hero h1 { font-size: clamp(2.7rem, 8.4vw, 4rem); }
  .hero::before { right: -350px; top: 8%; }
  .quick { width: min(100%, 410px); }
  .keys button { min-height: 44px; }
  .category-section { padding-top: 2rem; }
  .catalog { padding-block: 2rem 3rem; }
  .category-list { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  .category-list a { padding: .4rem .5rem; font-size: .875rem; }
}
@media (max-width: 400px) {
  .logo { font-size: 1.05rem; gap: .42rem; }
  .site-header nav { gap: .7rem; font-size: .875rem; }
  .bar { gap: .45rem; min-height: 60px; }
  .form-fields { grid-template-columns: minmax(0, 1fr); }
  .desktop-break { display: none; }
  .hero h1 em { white-space: normal; }
  .search-box kbd { display: none; }
}
@media (max-width: 540px), (min-width: 716px) and (max-width: 900px) {
  .scientific-keypad { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .site-header .bar { flex-wrap: wrap; padding-block: .5rem; }
}
