/* Terms of Service Theme */
:root {
  --text-color: #1a1a1a;
  --bg-color: #ffffff;
  --primary-color: #1a365d;
  --secondary-color: #4a5568;
  --accent-color: #c53030;
  --border-color: #e2e8f0;
  --code-bg: #f7fafc;
  --card-bg: #f8fafc;
  --header-bg: #f7fafc;
  --watermark-color: rgba(0, 0, 0, 0.03);
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: 'Times New Roman', Times, serif;
  font-size: 12pt;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  counter-reset: section;
  position: relative;
}

body::before {
  content: "CONFIDENTIAL";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 72pt;
  color: var(--watermark-color);
  pointer-events: none;
  z-index: 0;
}

.markdown-preview {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 1in;
  background: var(--bg-color);
  box-shadow: 0 0 0.5in rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* Header */
.markdown-preview h1:first-of-type {
  text-align: center;
  font-size: 16pt;
  font-weight: bold;
  margin-bottom: 2em;
  border-bottom: none;
  padding-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.markdown-preview h1:first-of-type::after {
  content: '';
  display: block;
  width: 2in;
  height: 1px;
  background: var(--text-color);
  margin: 1em auto;
}

.markdown-preview h1:first-of-type + p {
  text-align: center;
  font-size: 10pt;
  color: var(--secondary-color);
  margin-bottom: 3em;
  font-style: italic;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  font-weight: bold;
  font-family: 'Times New Roman', Times, serif;
  page-break-after: avoid;
}

h1 { 
  font-size: 14pt;
  counter-reset: subsection;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1::before {
  counter-increment: section;
  content: counter(section) ". ";
}

h2 { 
  font-size: 12pt;
  margin-left: 2em;
  text-indent: -2em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h2::before {
  counter-increment: subsection;
  content: counter(section) "." counter(subsection) " ";
}

h3 { 
  font-size: 12pt;
  font-style: italic;
  margin-left: 4em;
  text-indent: -2em;
}

h4, h5, h6 { 
  font-size: 12pt;
  font-style: italic;
  margin-left: 6em;
  text-indent: -2em;
}

p {
  margin: 1em 0;
  text-align: justify;
  text-indent: 2em;
  orphans: 3;
  widows: 3;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: underline;
}

a:hover {
  color: var(--accent-color);
}

/* Images */
.markdown-preview img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em auto;
  border: 1px solid var(--border-color);
  page-break-inside: avoid;
}

/* Blockquotes */
blockquote {
  margin: 1.5em 0;
  padding: 1em;
  background-color: var(--card-bg);
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  page-break-inside: avoid;
}

blockquote p {
  margin: 0;
  text-indent: 0;
}

/* Lists */
ul, ol {
  margin: 1em 0;
  padding-left: 4em;
  page-break-inside: avoid;
}

li {
  margin: 0.5em 0;
  text-indent: 0;
}

/* Code blocks */
pre, code {
  background-color: var(--code-bg);
  font-family: 'Courier New', monospace;
  font-size: 10pt;
  page-break-inside: avoid;
}

pre {
  padding: 1em;
  margin: 1em 0;
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

code {
  padding: 0.2em 0.4em;
}

/* Footer */
.markdown-preview > p:last-of-type:not(h2 + p) {
  margin-top: 3em;
  text-align: center;
  font-size: 10pt;
  color: var(--secondary-color);
  border-top: 1px solid var(--border-color);
  padding-top: 1em;
}

/* Conclusion */
.markdown-preview h2:last-of-type + p {
  font-size: 12pt;
  text-align: justify;
  color: var(--text-color);
  margin-top: 1em;
  margin-bottom: 3em;
}

/* Page Numbers */
@page {
  margin: 1in;
  @bottom-right {
    content: counter(page);
    font-size: 10pt;
  }
  @top-right {
    content: "CONFIDENTIAL";
    font-size: 8pt;
    color: var(--secondary-color);
  }
}

/* Signatures */
.signature-block {
  margin-top: 3em;
  page-break-inside: avoid;
}

.signature-line {
  width: 3in;
  border-bottom: 1px solid var(--text-color);
  margin: 2em 0 0.5em;
}

.signature-label {
  font-size: 10pt;
  color: var(--secondary-color);
}

/* Definitions */
.definition {
  font-style: italic;
  margin-left: 2em;
  text-indent: -2em;
}

.definition-term {
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 8.5in) {
  .markdown-preview {
    padding: 0.5in;
    margin: 0.5in;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 11pt;
  }
  
  .markdown-preview {
    padding: 0.25in;
    margin: 0.25in;
  }
  
  h1 {
    font-size: 13pt;
  }
  
  h2 {
    font-size: 11pt;
  }
} 