:root {
  --text: #1d2523;
  --muted: #6d7774;
  --line: #dfe3e1;
  --green: #28765f;
  --background: #fafafa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.5;
}

button { font: inherit; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: .5rem .75rem;
  background: var(--text);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

main {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 5rem 0;
}

.page-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text);
}

h1 { margin: 0; font-size: 1.5rem; }
.page-heading p { margin: 0; color: var(--muted); font-size: .85rem; }

.tool-row {
  display: grid;
  grid-template-columns: 40px minmax(220px, 1fr) 100px auto;
  gap: 1rem;
  min-height: 104px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.number { color: #8b9491; font-size: .75rem; }
.details { display: flex; flex-direction: column; }
.details strong { font-size: 1.05rem; }
.details a { color: inherit; text-decoration: none; }
.details a:hover { text-decoration: underline; text-underline-offset: 3px; }
.details > span { color: var(--muted); font-size: .85rem; }
.status { color: #929997; font-size: .75rem; }
.available { color: var(--green); }
.available::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .45rem; border-radius: 50%; background: #53a184; vertical-align: middle; }
.action { justify-self: end; color: inherit; font-size: .8rem; font-weight: 600; text-decoration: none; }
.action:hover { text-decoration: underline; text-underline-offset: 3px; }

.future-row { color: #6f7775; }
.admin-entry { margin-bottom: 2rem; text-align: right; }
.admin-entry a { color: var(--muted); font-size: .78rem; text-decoration: none; }
.admin-entry a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 3px solid #e8b849; outline-offset: 3px; }

@media (max-width: 700px) {
  main { width: min(100% - 32px, 820px); padding: 2.5rem 0; }
  .tool-row {
    grid-template-columns: 30px 1fr auto;
    gap: .65rem;
    padding: 1.2rem 0;
  }
  .status { grid-column: 2; }
  .action { grid-column: 3; grid-row: 1 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
