.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.topbar {
  height: var(--top-height);
  padding: 0 max(20px, calc((100% - 1104px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #08783f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.topbar-note {
  font-weight: 400;
  letter-spacing: 0.04em;
}
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1152px;
  height: var(--header-height);
  margin: auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--green);
  font:
    700 32px Georgia,
    serif;
}
.brand strong {
  font-size: 22px;
  letter-spacing: -0.8px;
  color: var(--green);
}
.brand-light {
  font-weight: 500;
}
.brand small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  gap: 9px;
}
.icon-button,
.menu-button {
  height: 48px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--green);
}
.icon-button {
  width: 48px;
}
.menu-button {
  padding: 0 17px;
  font-size: 13px;
  font-weight: 700;
}
.menu-button svg {
  width: 20px;
}
.site-shell {
  max-width: 1152px;
  margin: auto;
  min-height: calc(100dvh - 104px);
  background: var(--page);
  box-shadow: var(--shadow);
  border-inline: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
main {
  padding: 48px 40px 64px;
  flex: 1;
  outline: none;
  scroll-margin-top: 96px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 800;
  color: var(--green);
  margin: 0 0 12px;
}
.heading-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -1.3px;
  margin: 0;
  font-weight: 750;
}
.page-heading > p:last-child {
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 0;
}
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 10px;
}
.status i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

#site-menu {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(90%, 360px);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#site-menu[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-enter 220ms ease-out;
}
@keyframes drawer-enter {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
#site-menu::backdrop,
.form-dialog::backdrop {
  background: #101b13a6;
  backdrop-filter: blur(2px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.drawer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.drawer-heading #menu-close {
  margin-left: auto;
  flex-shrink: 0;
}
.drawer-heading strong {
  font-size: 20px;
  letter-spacing: -0.8px;
}
.drawer-body {
  padding: 28px 18px;
  flex: 1;
}
.drawer-body nav {
  display: grid;
  gap: 7px;
}
.drawer-body nav a {
  display: flex;
  justify-content: space-between;
  padding: 15px 12px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.drawer-body nav a:hover {
  background: var(--soft);
}
.drawer-body nav a[aria-current] {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--line);
}
.drawer-body nav a {
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.nav-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-label svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--green);
}
.active-badge {
  display: none;
  background: var(--green);
  color: var(--surface);
  padding: 3px 7px;
  border-radius: 20px;
  font-size: 9px;
  white-space: nowrap;
}
a[aria-current] > .active-badge {
  display: inline-block;
}
a[aria-current] > .nav-arrow {
  display: none;
}
.nav-arrow {
  color: var(--green);
  font-size: 22px;
}
.drawer-summary {
  background: var(--green-soft);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 26px;
}
.drawer-summary .status {
  border: 0;
  padding: 0;
  color: var(--green);
}
.drawer-summary p {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.drawer-preferences {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.drawer-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
}
.theme-state {
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 360px) {
  .drawer-body nav a {
    padding-inline: 8px;
    font-size: 12px;
  }
  .nav-label {
    gap: 6px;
  }
  .active-badge {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #site-menu[open] {
    animation: none;
  }
}


.drawer-footer {
  padding: 24px 20px;
  border-top: 1px solid var(--line);
}
.drawer-footer p {
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0 0;
}
@media (min-width: 1200px) {
  main {
    padding-top: 56px;
  }
  .tool-card {
    padding: 26px;
  }
}
@media (max-width: 767px) {
  .topbar {
    justify-content: center;
    font-size: 9px;
  }
  .topbar-note {
    display: none;
  }
  .header-inner {
    padding: 0 16px;
    --header-height: 72px;
  }
  .site-shell {
    border: 0;
    box-shadow: none;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand small {
    font-size: 11px;
  }
  .brand-mark {
    width: 38px;
    height: 42px;
  }
  .brand {
    gap: 9px;
  }
  .menu-button {
    padding: 0;
    width: 48px;
  }
  .menu-button span {
    display: none;
  }
  main {
    padding: 32px 20px 40px;
  }
  .heading-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .status {
    font-size: 10px;
  }
  .section-label {
    margin-top: 30px;
  }
  .tool-card {
    padding: 18px;
  }
  .tool-card h3 {
    font-size: 17px;
  }
  .tool-card p {
    font-size: 12px;
  }
  .footer {
    padding: 26px 20px 84px;
  }
  .footer-top {
    flex-direction: column;
  }
  .footer nav {
    gap: 14px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 66px;
    font-size: 10px;
    font-weight: 650;
    gap: 1px;
    color: var(--muted);
  }
  .bottom-nav a > span {
    font-size: 23px;
    line-height: 28px;
  }
  .bottom-nav a[aria-current] {
    color: var(--green);
    background: var(--green-soft);
  }
  .empty-state {
    padding: 64px 16px;
  }
}
@media (max-width: 479px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card p {
    min-height: 0;
  }
  .tool-card h3 {
    margin-top: 16px;
  }
  .tool-card .card-bottom {
    margin-top: 18px;
  }
  .header-actions {
    gap: 6px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand small {
    font-size: 10px;
  }
  .brand-mark {
    width: 33px;
  }
  .footer-bottom {
    font-size: 9px;
  }
  .draft-note {
    align-items: flex-start;
  }
  .page-heading > p:last-child {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

