/* --- 1. GLOBAL LAYOUT & CANVAS SETUP --- */
html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

:root {
  --width: 1100px; /* Matched to your website's max-width */
  --font-main: 'Times New Roman', Times, Baskerville, Georgia, serif;
  --font-secondary: 'Times New Roman', Times, Baskerville, Georgia, serif;
  --font-scale: 1em;
  
  /* Website Color Palette Integration */
  --background-color: #E2E4E6; /* Exact light ash grey canvas */
  --heading-color: #2C2C2C;    /* Structural text color */
  --text-color: #2C2C2C;       /* Soft charcoal for high legibility */
  --link-color: #4E3629;       /* Elegant deep brown-grey */
  --link-hover-color: #2C1E18; /* Darker brown tone for hover */
  --visited-color: #4E3629;    /* Kept unified with your scheme */
  --code-background-color: #d6d9dc;
  --code-color: #222;
  --blockquote-color: #655446;  /* Accent layout tint */
  --em-color: #2C2C2C;
}

body {
  font-family: var(--font-secondary) !important;
  font-size: 16px; /* Matched to website scale */
  margin: 0 auto;
  padding: 80px 24px; /* Integrated generous editorial padding */
  max-width: var(--width);
  text-align: left;
  background-color: var(--background-color) !important;
  color: var(--text-color);
  line-height: 1.625; /* Airy, modern spacing */
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 2. TYPOGRAPHY WEIGHTS & HEADINGS --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main) !important;
  color: var(--heading-color);
  font-weight: 300 !important; /* Delicate, thin, and elegant modern tracking */
  letter-spacing: -0.02em;    /* Sophisticated editorial squeeze */
}

h1#title {
  font-size: 24px !important; /* Forces title sizing match */
  line-height: 1.6;
  border-bottom: 1px solid rgba(78, 54, 41, 0.2);
  padding-bottom: 12px;
}

p {
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

/* --- 3. LINKS & INTERACTIONS --- */
a {
  color: var(--link-color) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(78, 54, 41, 0.35) !important;
  padding-bottom: 2px !important;
  transition: all 0.25s ease-in-out !important;
}

a:hover {
  color: var(--link-hover-color) !important;
  border-bottom: 1px solid rgba(44, 30, 24, 1) !important;
  text-decoration: none !important;
}

strong,
b {
  color: var(--heading-color);
  font-weight: 600;
}

main {
  line-height: 1.625;
  border-bottom: 1px solid rgba(78, 54, 41, 0.2);
  padding-bottom: 1.2em;
}

em,
i {
  color: var(--em-color);
}

hr {
  border: 0;
  border-top: 1px solid rgba(78, 54, 41, 0.2);
}

code {
  font-family: monospace;
  padding: 2px 6px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
  font-size: 0.9em;
}

blockquote {
  border-left: 2px solid var(--blockquote-color);
  color: var(--blockquote-color);
  padding-left: 20px;
  font-style: italic;
  margin: 1.5em 0;
}

footer {
  padding: 40px 0;
  text-align: center;
  font-size: 14px !important; 
  color: #655446 !important; /* Matches navigation utility text */
}

/* Form Inputs & Submit Buttons Grounding */
input[type="text"], 
input[type="email"], 
textarea {
  font-family: var(--font-secondary);
  font-size: 15px;
  padding: 10px;
  border: 1px solid rgba(78, 54, 41, 0.3);
  background-color: rgba(255, 255, 255, 0.5);
  color: #2C2C2C;
  border-radius: 2px;
}

input[type="submit"], 
button:not(.button-link) {
  font-family: var(--font-main);
  background-color: #4E3629;
  color: #E2E4E6;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

input[type="submit"]:hover, 
button:not(.button-link):hover {
  background-color: #2C1E18;
}

.inline {
  width: auto !important;
}

.highlight,
.code {
  padding: 1px 15px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
  margin-block-start: 1em;
  margin-block-end: 1em;
  overflow-x: auto;
}

.sr-only {
  display: none;
}

.button-link {
  background: none;
  border: none;
  color: var(--link-color) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(78, 54, 41, 0.35) !important;
  cursor: pointer;
  font: inherit;
  padding-bottom: 2px !important;
}

.button-link:hover {
  color: var(--link-hover-color) !important;
  border-bottom: 1px solid rgba(44, 30, 24, 1) !important;
}

/* Reply styling */
.guestbook-message-reply {
  margin-left: 2.5rem;
  padding-left: 1rem;
  border-left: 2px solid #655446;
  opacity: 0.95;
}

.guestbook-message-reply blockquote {
  margin: 0;
  padding-left: 0;
  border-left: none;
}

/* Proof of Work bot deterrent */
.guestbooks___pow-container {
  margin: 0.75em 0;
  font-size: 14px;
  color: #655446;
}

.guestbooks___pow-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  user-select: none;
}

.guestbooks___pow-checkbox-label input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  cursor: pointer;
}

.guestbooks___pow-label-text--loading {
  opacity: 0.7;
}

.guestbooks___pow-label-text--verified {
  color: #4E3629;
  font-weight: bold;
}

.guestbooks___pow-label-text--error {
  color: #a33b3b;
}