/* Tenantoir static pages: shared header, side navigation, article and footer styles. */
:root {
  --primary: #0e9f6e;
  --primary-hover: #0b8a5f;
  --primary-pressed: #087550;
  --primary-tint: #e3f6ec;
  --ink: #0e241b;
  --page: #ecf8f2;
  --border: #d6ebdf;
  --body: #334940;
  --muted: #5b6a63;
  --danger: #cf2030;
  --white: #ffffff;
  --header-h: 68px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary-pressed);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand img,
.drawer__brand img {
  display: block;
  border-radius: 9px;
}

.top-nav {
  display: none;
  gap: 4px;
}

.top-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.top-nav a:hover {
  background: var(--primary-tint);
  color: var(--primary-pressed);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--primary-tint);
}

@media (min-width: 960px) {
  .top-nav {
    display: flex;
  }
}

/* Drawer (side navigation) */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(14 36 27 / 50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(360px, 88vw);
  padding: 20px 20px 28px;
  overflow-y: auto;
  background: var(--white);
  box-shadow: 0 24px 60px rgb(14 36 27 / 25%);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s;
}

.drawer.is-open {
  transform: none;
  visibility: visible;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.drawer__blurb {
  margin: 14px 0 6px;
  font-size: 0.925rem;
  color: var(--muted);
}

.drawer__title {
  margin: 22px 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer__list a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.drawer__list a:hover {
  background: var(--primary-tint);
  color: var(--primary-pressed);
}

.drawer__list a[aria-current='page'] {
  background: var(--primary-tint);
  color: var(--primary-pressed);
  font-weight: 600;
}

.drawer__foot {
  display: grid;
  gap: 2px;
  margin-top: 26px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--page);
  font-size: 0.9rem;
}

.drawer__foot span {
  color: var(--muted);
}

.drawer__foot a {
  font-weight: 600;
  word-break: break-all;
}

/* Page layout */
.legal-layout {
  display: grid;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 64px;
  grid-template-columns: minmax(0, 1fr);
}

.legal-side {
  display: none;
}

.legal-side h2 {
  margin: 0 0 10px;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-side ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-side a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--body);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
}

.legal-side a:hover {
  background: var(--white);
  color: var(--primary-pressed);
}

.legal-side a[aria-current='page'] {
  background: var(--white);
  color: var(--primary-pressed);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.legal-main {
  min-width: 0;
  padding: 28px 22px 34px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 24px rgb(14 36 27 / 6%);
}

.crumbs {
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-main h1 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
}

.meta {
  margin: 10px 0 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.intro {
  font-size: 1.05rem;
}

.toc {
  margin: 22px 0 8px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--page);
}

.legal-main .toc h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 1;
}

.toc li {
  padding: 2px 0;
}

.legal-main section {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.legal-main h2 {
  margin: 36px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 1.35rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.legal-main h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.legal-main ul,
.legal-main ol {
  margin: 0 0 1em;
  padding-left: 22px;
}

.legal-main li {
  margin-bottom: 6px;
}

.table-wrap {
  margin: 0 0 1.2em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--primary-tint);
  color: var(--ink);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.note {
  margin: 0 0 1.2em;
  padding: 14px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: var(--primary-tint);
  color: var(--ink);
}

.note p:last-child {
  margin-bottom: 0;
}

.note--warn {
  border-left-color: var(--danger);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--primary-pressed);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--ink);
  color: var(--white);
}

/* Footer */
.site-footer {
  padding: 40px 0 28px;
  background: var(--ink);
  color: rgb(255 255 255 / 72%);
  font-size: 0.925rem;
}

.site-footer a {
  color: rgb(255 255 255 / 85%);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.footer__bottom {
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 14%);
}

.footer__bottom p {
  margin: 0 0 4px;
}

@media (min-width: 720px) {
  .legal-main {
    padding: 40px 44px 48px;
  }

  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

@media (min-width: 1000px) {
  .legal-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }

  .legal-side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: block;
  }
}

@media print {
  .site-header,
  .drawer,
  .drawer-overlay,
  .legal-side,
  .skip-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
