@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");

:root {
  --tmg-cream: #fdfcf0;
  --tmg-charcoal: #2d3436;
  --tmg-sage: #84a98c;
  --tmg-sage-hover: #6b8f74;
  --tmg-white: #ffffff;
  --tmg-bg: var(--tmg-cream);
  --tmg-text: var(--tmg-charcoal);
  --tmg-accent: var(--tmg-sage);
  --tmg-surface: var(--tmg-white);
  --tmg-success: #2e8540;
  --tmg-warning: #c47f00;
  --tmg-error: #b00020;
  --tmg-border: 1px solid rgba(45, 52, 54, 0.12);
  --tmg-border-hover: 1px solid rgba(132, 169, 140, 0.5);
  --tmg-bento-radius: 16px;
  --tmg-nav-radius: 8px;
  --tmg-btn-radius: 8px;
  --tmg-gap: 24px;
  --tmg-gap-sm: 12px;
  --tmg-shadow-sm: 0 1px 3px rgba(45, 52, 54, 0.08);
  --tmg-shadow-md: 0 2px 8px rgba(45, 52, 54, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: radial-gradient(
      circle at top right,
      rgba(132, 169, 140, 0.16),
      transparent 40%
    ),
    var(--tmg-bg);
  color: var(--tmg-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

:focus-visible {
  outline: 3px solid rgba(132, 169, 140, 0.4);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tmg-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tmg-sage);
  margin: 0 0 4px;
}

.tmg-page {
  min-height: calc(100vh - 56px);
  padding: var(--tmg-gap);
}

.tmg-container {
  max-width: 1280px;
  margin: 0 auto;
}

.tmg-page-header {
  margin-bottom: var(--tmg-gap);
}

.tmg-page-title {
  font-size: 28px;
  font-weight: 500;
  color: var(--tmg-charcoal);
  margin: 0 0 8px;
  line-height: 1.3;
}

.tmg-page-desc {
  font-size: 15px;
  color: rgba(45, 52, 54, 0.6);
  margin: 0;
}

.tmg-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--tmg-gap);
}

.tmg-card,
.tmg-card-wide {
  background: var(--tmg-white);
  border: var(--tmg-border);
  border-radius: var(--tmg-bento-radius);
  box-shadow: var(--tmg-shadow-sm);
}

.tmg-card {
  padding: 20px;
}

.tmg-card-wide {
  padding: 24px;
  grid-column: 1 / -1;
}

.tmg-card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(45, 52, 54, 0.5);
  margin: 0 0 8px;
}

.tmg-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--tmg-charcoal);
  margin: 0 0 14px;
  line-height: 1.3;
}

.tmg-card p {
  margin: 0;
}

.tmg-card p + p {
  margin-top: 10px;
}

.tmg-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tmg-white);
  border-bottom: var(--tmg-border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tmg-logo {
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--tmg-charcoal);
  text-decoration: none;
}

.tmg-logo-divider {
  width: 2px;
  height: 20px;
  background: var(--tmg-sage);
  border-radius: 2px;
  margin: 0 1px;
}

.tmg-page-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.tmg-page-links a {
  padding: 6px 12px;
  border-radius: var(--tmg-nav-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--tmg-charcoal);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.tmg-page-links a:hover,
.tmg-page-links a:focus-visible {
  background: rgba(132, 169, 140, 0.12);
  outline: none;
}

.tmg-page-links a[aria-current="page"] {
  background: rgba(132, 169, 140, 0.15);
  color: var(--tmg-sage-hover);
}

.tmg-dropdown-wrap {
  position: relative;
}

.tmg-dropdown-btn {
  background: transparent;
  border: 1px solid rgba(45, 52, 54, 0.2);
  border-radius: var(--tmg-btn-radius);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tmg-charcoal);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: background 0.15s;
}

.tmg-dropdown-btn:hover,
.tmg-dropdown-btn.open {
  background: rgba(132, 169, 140, 0.1);
}

.tmg-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.tmg-dropdown-btn.open .tmg-chevron {
  transform: rotate(180deg);
}

.tmg-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--tmg-white);
  border: var(--tmg-border);
  border-radius: 10px;
  padding: 6px;
  min-width: 220px;
  z-index: 200;
  box-shadow: var(--tmg-shadow-md);
}

.tmg-dropdown-menu.open {
  display: block;
}

.tmg-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--tmg-charcoal);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.tmg-dropdown-menu a:hover,
.tmg-dropdown-menu a:focus-visible {
  background: rgba(132, 169, 140, 0.12);
  color: var(--tmg-sage-hover);
  outline: none;
}

.tmg-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
}

.tmg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tmg-table th {
  background: rgba(132, 169, 140, 0.15);
  color: var(--tmg-charcoal);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(132, 169, 140, 0.25);
}

.tmg-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(45, 52, 54, 0.07);
  color: var(--tmg-charcoal);
}

.tmg-table tr:last-child td {
  border-bottom: none;
}

.tmg-table tr:hover td {
  background: rgba(132, 169, 140, 0.04);
}

.tmg-field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tmg-charcoal);
  margin-bottom: 6px;
}

.tmg-select {
  width: 100%;
  background: var(--tmg-white);
  color: var(--tmg-charcoal);
  border: var(--tmg-border);
  border-radius: var(--tmg-btn-radius);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}

.tmg-select:focus {
  outline: none;
  border-color: var(--tmg-sage);
  box-shadow: 0 0 0 3px rgba(132, 169, 140, 0.15);
}

.tmg-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.placeholder {
  color: var(--tmg-sage-hover);
  font-weight: 500;
}

.tmg-footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(45, 52, 54, 0.5);
  border-top: var(--tmg-border);
  margin-top: var(--tmg-gap);
}

.tmg-card a {
  color: var(--tmg-sage-hover);
}

.tmg-prose {
  max-width: 78ch;
}

.tmg-prose h2,
.tmg-prose h3,
.tmg-prose h4 {
  color: var(--tmg-charcoal);
  line-height: 1.35;
  margin-top: 28px;
  margin-bottom: 12px;
}

.tmg-prose h2 {
  font-size: 22px;
}

.tmg-prose h3 {
  font-size: 18px;
}

.tmg-prose p {
  margin: 0;
  line-height: 1.8;
}

.tmg-prose p + p {
  margin-top: 14px;
}

.tmg-prose ul,
.tmg-prose ol {
  margin: 0;
  padding-left: 1.4rem;
}

.tmg-prose p + ul,
.tmg-prose p + ol,
.tmg-prose ul + p,
.tmg-prose ol + p,
.tmg-prose ul + ul,
.tmg-prose ol + ol,
.tmg-prose ul + ol,
.tmg-prose ol + ul {
  margin-top: 14px;
}

.tmg-prose li + li {
  margin-top: 8px;
}

.tmg-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.94em;
  background: rgba(132, 169, 140, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
}

.tmg-prose strong {
  font-weight: 600;
}

@media (max-width: 720px) {
  .tmg-nav {
    padding: 0 12px;
    gap: 8px;
    overflow-x: auto;
  }

  .tmg-page {
    padding: 16px;
  }

  .tmg-page-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tmg-page-links a {
    padding: 6px 10px;
  }

  .tmg-dropdown-btn {
    padding: 6px 10px;
    white-space: nowrap;
  }

  .tmg-prose {
    max-width: 100%;
  }

  .tmg-prose h2 {
    font-size: 20px;
  }

  .tmg-prose h3 {
    font-size: 17px;
  }
}