/* TommyAPI shared header and footer (2026-11-17).
   One header and one footer for every public page. Everything is namespaced under .tm-*, there are no
   element selectors, and nothing here depends on the page's own stylesheet, so it can be linked anywhere. */
.tm-header, .tm-footer { --tm-c-ink:#171717; --tm-c-muted:#5f6363; --tm-c-line:#e5e7eb; --tm-c-teal:#087f83; --tm-c-bg:#fff;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--tm-c-ink); box-sizing: border-box; }
.tm-header *, .tm-footer * { box-sizing: border-box; }
.tm-wrap { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }

.tm-header { position: sticky; top: 0; z-index: 90; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--tm-c-line); backdrop-filter: saturate(1.2) blur(8px); }
.tm-header-inner { display: flex; align-items: center; gap: 36px; min-height: 68px; }
.tm-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; letter-spacing: -.03em; color: var(--tm-c-ink); text-decoration: none; white-space: nowrap; }
.tm-brand img { display: block; border-radius: 7px; }
.tm-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.tm-nav a { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--tm-c-muted); text-decoration: none; transition: color .15s ease, background-color .15s ease; }
.tm-nav a:hover { color: var(--tm-c-ink); background: #f3f4f6; }
.tm-nav a[aria-current="page"] { color: var(--tm-c-ink); background: #f3f4f6; font-weight: 600; }
.tm-actions { display: flex; align-items: center; gap: 8px; }
.tm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease; }
.tm-btn-quiet { color: var(--tm-c-ink); border-color: var(--tm-c-line); background: #fff; }
.tm-btn-quiet:hover { background: #f3f4f6; }
.tm-btn-primary { color: #fff; background: #111; border-color: #111; }
.tm-btn-primary:hover { background: #2d2d2f; border-color: #2d2d2f; }
.tm-header a:focus-visible, .tm-footer a:focus-visible, .tm-menu summary:focus-visible { outline: 3px solid #35a8aa; outline-offset: 2px; }

.tm-menu { display: none; margin-left: auto; position: relative; }
.tm-menu summary { list-style: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--tm-c-line); border-radius: 8px; color: var(--tm-c-ink); cursor: pointer; background: #fff; }
.tm-menu summary::-webkit-details-marker { display: none; }
.tm-menu-panel { position: absolute; right: 0; top: 54px; width: min(280px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 2px; padding: 10px; background: #fff; border: 1px solid var(--tm-c-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17,24,39,.12); }
.tm-menu-panel a { padding: 12px 12px; border-radius: 8px; font-size: 15px; color: var(--tm-c-ink); text-decoration: none; }
.tm-menu-panel a:hover, .tm-menu-panel a[aria-current="page"] { background: #f3f4f6; }
.tm-menu-panel .tm-btn { margin-top: 6px; color: #fff; }
.tm-menu-panel .tm-btn:hover { background: #2d2d2f; }

.tm-footer { margin-top: 72px; border-top: 1px solid var(--tm-c-line); background: #fafafa; color: var(--tm-c-muted); font-size: 14px; }
.tm-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
.tm-footer-brand p { margin: 14px 0 12px; max-width: 30em; line-height: 1.75; color: var(--tm-c-muted); }
.tm-footer h2 { margin: 0 0 14px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--tm-c-ink); }
.tm-footer-grid a:not(.tm-brand) { display: block; padding: 5px 0; color: var(--tm-c-muted); text-decoration: none; }
.tm-footer-grid a:not(.tm-brand):hover { color: var(--tm-c-ink); text-decoration: underline; text-underline-offset: 4px; }
.tm-footer-bottom { padding: 18px 0 28px; border-top: 1px solid var(--tm-c-line); font-size: 12.5px; color: #737979; }

@media (max-width: 900px) {
  .tm-wrap { width: calc(100% - 40px); }
  .tm-nav, .tm-actions { display: none; }
  .tm-menu { display: block; }
  .tm-header-inner { min-height: 60px; }
  .tm-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; padding: 36px 0 24px; }
  .tm-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .tm-wrap { width: calc(100% - 32px); }
  .tm-brand { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .tm-header *, .tm-footer * { transition: none !important; } }
