@charset "UTF-8";

.megatools {
  --paper: #f6f7f3;
  --surface: #fff;
  --ink: #172a24;
  --muted: #50625a;
  --line: #d4ddd5;
  --forest: #12372f;
  --green: #235f45;
  --lime: #def58f;
  --radius: 18px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 Inter, system-ui, sans-serif;
}
.megatools *, .megatools *::before, .megatools *::after { box-sizing: border-box; }
.megatools [hidden] { display: none !important; }
.megatools a { color: inherit; text-underline-offset: .22em; }
.megatools :focus-visible { outline: 3px solid #21734e; outline-offset: 4px; }
.megatools h1, .megatools h2, .megatools h3, .megatools p { margin: 0; }
.megatools input, .megatools textarea, .megatools button { font: inherit; }
.shell { width: min(100%, 1260px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.page { padding-block: clamp(22px, 4vw, 52px) 64px; }
.skip, .sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.skip:focus { z-index: 10; top: 12px; left: 16px; width: auto; height: auto; clip-path: none; background: white; padding: 12px 16px; }

.mast { background: var(--surface); border-bottom: 1px solid var(--line); }
.mast-inner, .mast nav { display: flex; gap: clamp(12px, 3vw, 32px); align-items: center; flex-wrap: wrap; }
.mast-inner { justify-content: space-between; min-height: 72px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; font-size: 1.3rem; font-weight: 780; letter-spacing: -.045em; white-space: nowrap; text-decoration: none; }
.brand-mark { display: grid; place-items: center; margin-right: 8px; width: 33px; height: 33px; border-radius: 9px; background: var(--forest); color: var(--lime); }
.brand-dot { color: var(--muted); }
.mast nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: .93rem; }
.mast nav a:hover, .site-end a:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(22px, 5vw, 62px);
  background: radial-gradient(ellipse at 78% 0%, #315c3c, transparent 74%), var(--forest);
  color: white;
  border-radius: clamp(15px, 3vw, 28px);
}
.megatools h1 { font-size: clamp(2.25rem, 5.4vw, 4.35rem); line-height: 1.03; letter-spacing: -.055em; overflow-wrap: anywhere; }
.hero h1 em { color: var(--lime); font-family: Georgia, serif; font-weight: 400; }
.hero p { margin-top: 18px; max-width: 42ch; color: #e5eddf; }
.hero-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  min-height: 46px;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink) !important;
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
}
.hero-link:hover { background: #f0ffc9; }
.hero :focus-visible, .site-end :focus-visible { outline-color: var(--lime); }
.shortcuts { padding: clamp(16px, 2.6vw, 26px); border-radius: var(--radius); background: #f4f6e8; color: var(--ink); }
.shortcuts h2 { margin-bottom: 12px; font-size: 1.04rem; }
.shortcuts a, .card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}
.shortcuts a { min-height: 50px; padding-block: 7px; border-top: 1px solid #d5decb; }
.shortcuts a:hover strong { text-decoration: underline; }
.tool-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px; background: #e4efda; color: #274b34; font-size: .91rem; font-weight: 740; }
.arrow { font-size: 1rem; color: #42624f; }

#directory, #guides, .group { scroll-margin-top: 16px; }
#directory, #guides { margin-top: clamp(34px, 5vw, 64px); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-heading h2 { font-size: clamp(1.75rem, 4vw, 2.55rem); letter-spacing: -.045em; line-height: 1.1; }
.section-heading span, #status, .intro { color: var(--muted); }
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.search-bar input { flex: 1 1 240px; width: 100%; max-width: 640px; }
.megatools input:not([type="checkbox"]), .megatools textarea {
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #879f90;
  background: var(--surface);
  color: var(--ink);
  border-radius: 9px;
}
#status:not(:empty) { margin-top: 8px; }
.tabs { display: flex; gap: 8px; margin: 18px 0 24px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); padding: 6px 12px; background: white; border-radius: 9px; text-decoration: none; font-weight: 650; }
.tabs a:hover { background: #eaf1e4; }
.tabs span { color: var(--muted); font-size: .86rem; font-weight: 500; }
.group { margin-top: 30px; }
.group h3 { font-size: 1.4rem; letter-spacing: -.03em; }
.intro { padding-bottom: 12px; }
.grid, .stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card, .stories a { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px; }
.card { align-items: start; }
.card:hover, .stories a:hover { border-color: #5f826c; box-shadow: 0 5px 16px #15372c13; }
.card strong, .card small, .stories strong { display: block; overflow-wrap: anywhere; }
.card small { margin-top: 3px; color: var(--muted); font-size: .85rem; }
#developer .tool-icon { background: #e9e5f6; color: #514076; }
#units .tool-icon { background: #faebda; color: #69472f; }
#calculators .tool-icon { background: #dfedf2; color: #31596d; }
.stories a { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 20px; text-decoration: none; }
.stories strong { font-size: 1.1rem; line-height: 1.3; }
.stories p { color: var(--muted); }
.stories a > span { margin-top: auto; font-weight: 650; color: var(--green); }

.breadcrumbs { display: flex; gap: 8px; color: var(--muted); align-items: center; font-size: .92rem; }
.breadcrumbs a { padding-block: 8px; }
.page-heading { margin: 14px 0 24px; }
.page-heading p, .lead { margin-top: 12px !important; color: var(--muted); font-size: 1.08rem; max-width: 67ch; }
.workbench, .panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.workbench { overflow: hidden; }
.work-grid, .tool-details, .example-grid { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-grid { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.work-pane, .panel { min-width: 0; padding: clamp(16px, 3vw, 32px); }
.output { border-left: 1px solid var(--line); background: #edf3eb; }
.work-pane label { display: block; font-weight: 680; margin-bottom: 6px; }
.work-pane input:not([type="checkbox"]), .work-pane textarea { display: block; width: 100%; }
.work-pane input + label { margin-top: 12px; }
.work-pane textarea {
  min-height: 164px;
  resize: vertical;
  font: .97rem/1.5 "IBM Plex Mono", Consolas, monospace;
}
.work-pane .batch { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 550; margin: 0; }
.batch input { inline-size: 18px; block-size: 18px; accent-color: var(--green); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.megatools button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-weight: 650;
  cursor: pointer;
}
.megatools button:not(:disabled):hover { background: #184833; }
.megatools button.secondary { border-color: #a3b6a8; background: white; color: var(--ink); }
.megatools button.secondary:not(:disabled):hover { background: #eaf1e4; }
.megatools button:disabled { opacity: .62; cursor: default; }
.megatools .field-help { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.workbench noscript p { padding: 14px 20px; }
.file-import { margin-top: 12px; }
.megatools .file-import input[type="file"] { padding: 0; border: 0; max-width: 100%; }
.file-import input::file-selector-button {
  min-height: 44px;
  margin-inline-end: 8px;
  border: 1px solid #a3b6a8;
  border-radius: 8px;
  padding-inline: 10px;
  background: #edf3eb;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.tool-options { min-inline-size: 0; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.tool-options legend { font-weight: 700; padding-inline: 4px; }
.tool-options .batch input { flex: 0 0 auto; }
.tool-options select {
  min-height: 44px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #879f90;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.tool-options select + .batch { margin-top: 6px; }
#file-status:empty { display: none; }
.tool-details { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 18px; margin-top: 20px; align-items: start; }
.panel + .panel { margin-top: 18px; }
.panel h2 { letter-spacing: -.03em; line-height: 1.16; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.panel h3 { margin-top: 18px; }
.panel p { margin: 10px 0 0; max-width: 68ch; }
.panel table { width: 100%; border-collapse: collapse; margin-top: 14px; font-variant-numeric: tabular-nums; }
.panel th, .panel td { text-align: start; border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-wrap: anywhere; }
.panel thead { background: #edf3eb; }
.panel tbody th { font-weight: 500; }
.example-grid { margin-top: 8px; gap: 10px; }
.example-grid pre { background: #edf3eb; padding: 10px; border-radius: 8px; margin-block: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.related h2, .related h3 { margin-bottom: 10px; }
.related a { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 11px 0; font-weight: 600; text-decoration: none; }
.related a:hover { text-decoration: underline; }
.article { max-width: 810px; margin: 0 auto; }
.article h1 { margin-top: 15px; }
.article > .panel:first-of-type { margin-top: 22px; }
.article .panel > a { display: inline-block; padding-top: 10px; font-weight: 650; color: var(--green); }

.site-end { background: var(--forest); color: #f5faef; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 24px; padding-block: 36px; }
.site-end .brand-dot, .site-end p { color: #d0e3d5; }
.site-end .brand-mark { background: var(--lime); color: var(--forest); }
.site-end p { margin-top: 9px; max-width: 32ch; }
.site-end nav { display: flex; flex-direction: column; align-items: flex-start; }
.site-end nav strong { color: var(--lime); margin-bottom: 5px; }
.site-end nav a { text-decoration: none; padding: 7px 0; }

@media (max-width: 900px) {
  .grid, .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .hero, .tool-details, .work-grid { grid-template-columns: minmax(0, 1fr); }
  .mast-inner { gap: 0 16px; }
  .output { border-left: 0; border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .grid, .stories, .example-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading span { white-space: nowrap; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.megatools) { scroll-behavior: smooth; }
  .card, .stories a, .megatools button { transition: background-color .15s, border-color .15s, box-shadow .15s; }
}
