/* ==========================================================================
   Tour Dog（旅汪）legal pages — static stylesheet
   No framework, no build step, no external resources.
   Colours / typography mirrored from www.tour-dog.com /terms & /privacy
   ========================================================================== */

:root {
  /* brand palette (sampled from the live site) */
  --td-bg: #ebeedb;              /* primary-light  */
  --td-card: #ffffff;
  --td-accent: #3a7a5a;          /* desktop page title */
  --td-secondary: #21835e;       /* mobile bar title / back button */
  --td-eyebrow: #7a8a6a;
  --td-divider: #a8b798;
  --td-title: #111827;
  --td-h2: #111827;
  --td-text: #4b5563;
  --td-strong: #1f2937;
  --td-hr: #e5e7eb;
  --td-border: #e5e7eb;

  --td-max: 896px;               /* content column (max-w-4xl) */
  --td-font: "Noto Sans TC", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--td-bg);
  color: var(--td-text);
  font-family: var(--td-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

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

/* --------------------------------------------------------------------------
   Desktop top bar (brand)
   -------------------------------------------------------------------------- */
.td-topbar {
  background: var(--td-card);
  border-bottom: 1px solid var(--td-border);
}

.td-topbar__inner {
  max-width: var(--td-max);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.td-topbar__mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.td-topbar__word {
  height: 26px;
  width: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Mobile bar (mirrors the app header: back chip + green title)
   -------------------------------------------------------------------------- */
.td-mobilebar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--td-card);
  border-bottom: 1px solid var(--td-border);
  padding: 8px 16px;
  align-items: center;
  gap: 16px;
}

.td-back {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: var(--td-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.td-back svg { width: 16px; height: 16px; display: block; }

.td-mobilebar__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--td-secondary);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.td-main {
  flex: 1 0 auto;
  padding: 16px 0 32px;
}

.td-col {
  max-width: var(--td-max);
  margin: 0 auto;
  padding: 0 16px;
}

.td-pagehead { margin-bottom: 32px; }

.td-pagehead__divider {
  height: 1px;
  background: var(--td-divider);
  margin-bottom: 12px;
}

.td-pagehead__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--td-accent);
}

.td-card {
  background: var(--td-card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Legal content typography (measured from the live prose block)
   -------------------------------------------------------------------------- */
.td-legal { font-size: 16px; }

.td-legal > :first-child { margin-top: 0; }

.td-legal h1 {
  margin: 32px 0 16px;
  font-size: 30px;
  font-weight: 600;
  line-height: 32px;
  color: var(--td-title);
}

.td-legal h2 {
  margin: 32px 0 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  color: var(--td-h2);
}

.td-legal p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 28px;
  color: var(--td-text);
}

.td-legal strong {
  font-weight: 600;
  color: var(--td-strong);
}

.td-legal ol,
.td-legal ul {
  margin: 0 0 16px;
  padding-left: 24px;
  list-style-position: inside;
  color: var(--td-text);
}

.td-legal ol { list-style-type: decimal; }
.td-legal ul { list-style-type: disc; }

.td-legal li {
  margin: 0 0 8px;
  line-height: 26px;
  color: var(--td-text);
}

.td-legal li + li { margin-top: 8px; }

.td-legal a {
  color: var(--td-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.td-legal a:hover,
.td-legal a:focus-visible {
  color: var(--td-accent);
  border-bottom-color: var(--td-accent);
}

.td-legal hr {
  border: 0;
  border-top: 1px solid var(--td-hr);
  margin: 24px 0 0;
}

/* --------------------------------------------------------------------------
   Index (landing) page
   -------------------------------------------------------------------------- */
.td-index-title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  color: var(--td-title);
}

.td-index-lead { margin: 0 0 24px; color: var(--td-text); line-height: 28px; }

.td-doclist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.td-doclist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--td-border);
  border-radius: 12px;
  background: #fbfcf6;
  color: var(--td-accent);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}

.td-doclist a:hover,
.td-doclist a:focus-visible {
  border-color: var(--td-accent);
  background: #f4f7ec;
}

.td-doclist span { color: var(--td-text); font-weight: 400; font-size: 15px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.td-footer {
  flex-shrink: 0;
  padding: 24px 16px 40px;
  text-align: center;
  font-size: 14px;
  color: var(--td-eyebrow);
}

.td-footer a {
  color: var(--td-eyebrow);
  text-decoration: none;
  margin: 0 8px;
}

.td-footer a:hover,
.td-footer a:focus-visible {
  color: var(--td-accent);
  text-decoration: underline;
}

.td-footer p { margin: 8px 0 0; }

/* --------------------------------------------------------------------------
   Mobile (mirrors the app's mobile layout: sticky bar, tighter card)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .td-topbar { display: none; }
  .td-mobilebar { display: flex; }
  .td-pagehead { display: none; }

  .td-main { padding: 16px 0 24px; }

  .td-col { padding: 0 16px; }

  .td-card {
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  /* mobile typography as rendered on the live site */
  .td-legal h1 {
    font-size: 24px;
    font-weight: 700;
    line-height: 36px;
    color: #1f2937;
    margin: 0 0 16px;
  }

  .td-legal h2 {
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    color: #374151;
    margin: 32px 0 16px;
  }

  .td-legal p { line-height: 25.6px; }

  .td-legal li { line-height: 24px; }

  .td-index-title { font-size: 24px; line-height: 34px; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; }
  .td-topbar, .td-mobilebar, .td-footer { display: none; }
  .td-card { box-shadow: none; padding: 0; }
}
