@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #334155;
    --text: #1e293b;
    --border: #cbd5e1;
    --accent: #eee;
}

* {
    box-sizing: border-box;
}

body {
    width: 8.5in;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #f8fafc;
    /* Light gray for screen viewing */
}

/* Simulate paper on screen */
.page {
    background: white;
    width: 8.5in;
    height: 11in;
    padding: 0.75in;
    margin: 20px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

h1,
h2,
h3 {
    font-family: 'Merriweather', serif;
    color: var(--primary);
}

h1 {
    font-size: 24pt;
    margin-bottom: 0.5em;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

h2 {
    font-size: 16pt;
    margin-top: 2em;
    margin-bottom: 0.5em;
}

h3 {
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 0.25em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

p,
li,
td {
    font-size: 11pt;
    line-height: 1.5;
}

/* FORM ELEMENTS */
.form-section {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 10pt;
    margin-bottom: 4px;
    color: #475569;
}

input[type="text"],
textarea,
.fillable-line {
    width: 100%;
    border: none;
    border-bottom: 1px dashed var(--border);
    background: transparent;
    font-family: 'Inter', sans-serif;
    /* Simulates handwriting if printed, but keeping clean for computer entry */
    font-size: 12pt;
    padding: 4px 0;
    margin-bottom: 10px;
}

input:focus,
textarea:focus {
    outline: none;
    border-bottom: 1px solid #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

textarea {
    border: 1px solid var(--border);
    padding: 8px;
    resize: none;
    height: 100px;
}

/* UTILITIES */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.box {
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.checkbox-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: start;
}

.checkbox-circle {
    width: 16px;
    height: 16px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    margin-top: 3px;
}

/* PRINT SETTINGS */
@media print {
    body {
        background: none;
        margin: 0;
        -webkit-print-color-adjust: exact;
    }

    .page {
        margin: 0;
        box-shadow: none;
        width: 100%;
        height: 100%;
        break-after: page;
    }

    .page:last-child {
        break-after: auto;
    }

    /* Hide specific browser headers if possible, but user usually controls this */
}

/* =========================================================
   EmergencySheet.com - Print Toolbar + Print Footer
   ========================================================= */

/* On-screen print toolbar */
.es-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0 18px;
}

.es-print-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .06s ease, border-color .06s ease;
}

.es-print-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.45);
}

.es-print-btn:active {
  transform: translateY(0);
}

/* Print-only footer */
.es-print-footer {
  display: none;
}

/* Print rules */
@media print {
  .es-no-print,
  .es-toolbar {
    display: none !important;
  }

  /* This prints on each page in most browsers */
  .es-print-footer {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
    font-size: 11px;
    color: rgba(0,0,0,0.65);
  }
}