/* Asia Amateur Radio Activity Report (Print-friendly) */
:root{
  --text: #111;
  --muted: #555;
  --rule: #ccc;
  --bg: #fff;
}

@page{
  size: Letter;
  margin: 1in;
}

html, body{
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.35;
  font-size: 11pt;
}

body{
  margin: 0;
  padding: 0;
}

main{
  /* Letter width (8.5in) minus 2in margins = 6.5in content box */
  max-width: 6.5in;
  margin: 0 auto;
  padding: 0 0.05in; /* tiny in-screen breathing room without violating print margins */
}

header{
  border-bottom: 1px solid var(--rule);
  padding: 0.1in 0 0.15in 0;
  margin-bottom: 0.15in;
}

h1{
  font-size: 18pt;
  margin: 0 0 0.06in 0;
}

.subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 11pt;
}

.meta{
  margin: 0.04in 0 0 0;
  color: var(--muted);
  font-size: 10.5pt;
}

h2{
  font-size: 14pt;
  margin: 0.22in 0 0.08in 0;
  padding-top: 0.06in;
  border-top: 1px solid var(--rule);
  break-after: avoid-page;
}

h3{
  font-size: 12pt;
  margin: 0.16in 0 0.06in 0;
  break-after: avoid-page;
}

p{ margin: 0.08in 0; }

ul, ol{ margin: 0.06in 0 0.10in 0.22in; padding: 0; }

hr{
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0.18in 0;
}

table{
  width: 100%;
  border-collapse: collapse;
  margin: 0.10in 0 0.14in 0;
  table-layout: fixed;
}

th, td{
  border: 1px solid var(--rule);
  padding: 0.08in 0.08in;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

th{
  background: #f3f3f3;
  font-weight: bold;
}

small, .small{
  font-size: 10pt;
  color: var(--muted);
}

.country{
  border: 1px solid var(--rule);
  padding: 0.12in 0.12in 0.02in 0.12in;
  border-radius: 8px;
  margin: 0.12in 0;
  break-inside: avoid;
}

.country .tagline{
  margin-top: 0;
  color: var(--muted);
}

.kpis{
  margin: 0.06in 0 0.10in 0.22in;
}

a{
  color: inherit;
  text-decoration: underline;
  word-break: break-all; /* ensures visible URLs never run outside the margin */
}

sup a{
  text-decoration: none;
}

.footnotes{
  font-size: 10.5pt;
  margin-top: 0.10in;
}

.footnotes li{
  margin: 0.07in 0;
}

.backref{
  margin-left: 0.06in;
  color: var(--muted);
  text-decoration: none;
}

.print-only{ display: none; }

@media print{
  a{ text-decoration: none; } /* URLs are already visible as text in the footnotes */
  header{ break-after: avoid; }
  .no-print{ display: none !important; }
  .print-only{ display: block; }
}