/* Shared stylesheet for every Plus legal page.
   Linked by /legal/*, /learn-plus/legal/*, /spark-plus/legal/*,
   /bench-plus/legal/*, /money-plus/legal/*.

   Per-app accent: set data-app on <html> (learn | spark | bench | money).
   Omit it for the org-wide pages, which use the Learn+ blue. */

:root {
  --accent: #007AFF;
  --accent-tint: #e8f4fd;
  --ink: #1a1a1a;
  --body: #333;
  --faint: #666;
  --panel: #f5f5f7;
  --line: #e0e0e0;
}

html[data-app="learn"] { --accent: #007AFF; --accent-tint: #e8f4fd; }
html[data-app="spark"] { --accent: #4CAF50; --accent-tint: #ebf6eb; }
html[data-app="bench"] { --accent: #a85e0a; --accent-tint: #fcf2e4; }
html[data-app="money"] { --accent: #0f7a52; --accent-tint: #e7f5ef; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--ink);
  background-color: #ffffff;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

/* Pages authored with a <main> wrapper must not double-constrain the measure. */
main {
  max-width: none;
  padding: 0;
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 32px;
  margin-bottom: 12px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin-top: 20px;
  margin-bottom: 8px;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin-top: 16px;
  margin-bottom: 6px;
}

h5 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-top: 14px;
  margin-bottom: 6px;
}

p {
  margin-bottom: 16px;
  color: var(--body);
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--body);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

code {
  font-size: 14px;
  background: var(--panel);
  padding: 1px 5px;
  border-radius: 3px;
}

.last-updated {
  font-size: 14px;
  color: var(--faint);
  margin-bottom: 32px;
}

.section {
  margin-bottom: 24px;
}

/* Tinted callout. .lede and .callout are aliases kept so pages authored
   against either vocabulary render identically. */
.highlight-box,
.lede,
.callout {
  background-color: var(--accent-tint);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  color: var(--ink);
  font-size: 16px;
}

.highlight-box p:last-child,
.lede p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.contact-info {
  background-color: var(--panel);
  padding: 20px;
  border-radius: 12px;
  margin-top: 32px;
}

.contact-info h2 {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

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

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

td {
  color: var(--body);
}

.table-scroll {
  overflow-x: auto;
}

/* Section-per-product navigation block and product rules (family-wide pages). */
.product-nav {
  background-color: var(--panel);
  padding: 16px 20px;
  border-radius: 12px;
  margin: 24px 0 8px;
}

.product-nav p {
  margin-bottom: 8px;
}

.product-nav ul {
  margin-bottom: 0;
}

.app-header {
  border-top: 3px solid var(--accent);
  padding-top: 8px;
  margin-top: 40px;
}

/* Chooser page: one card per app. */
ul.apps {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

ul.apps li {
  margin-bottom: 12px;
}

ul.apps a {
  display: block;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
}

ul.apps a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

ul.apps .name {
  display: block;
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
}

ul.apps .desc {
  display: block;
  color: var(--body);
  font-size: 15px;
  margin-top: 2px;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}

footer a {
  color: var(--accent);
}

@media (max-width: 600px) {
  body {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 18px;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 8px;
  }
}
