.page-aaf {
    background-image: url('../images/AAF_background.jpg');
    background-repeat: no-repeat;
    background-color: #cccccc;
    background-blend-mode: overlay;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.page-aaf {
    padding-top: 40px;
}

.page-aaf h2 {
  color: black;
  font-family: 'Veteran Typewriter';
  font-size: 350%;
  text-align: center;
}

.page-aaf h3 {
  color: black;
  font-family: 'Veteran Typewriter';
  font-size: 130%;
  text-align: left;
}

.page-aaf p {
  text-align: left;
  font-family: 'Special Elite';
}

.page-aaf button {
  color: black;
  font-family: 'Special Elite';
  font-size: 100%;
}

.page-aaf .squadron-buttons {
  width: 210px;
  height: 210px;
  border: none;
  border-radius: 10px;
  opacity: 0.8;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.page-aaf .sub-heading {
  color: black;
  font-family: 'Veteran Typewriter';
  font-size: 200%;
  text-align: center;
  margin: 30px auto;
  text-decoration: underline;
}

.page-aaf .panel-section {
  background-color: rgba(255,255,255,0.4);
  padding: 40px;
  margin: 60px auto;
  max-width: 800px;
  border: 2px solid #333;
  opacity: 0.9;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  font-family: 'Special Elite';
  color: #222;
}

.page-aaf .panel-content p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: black;
  opacity: 1;
}

.page-aaf #target-types .panel-content {
  padding: 0px 120px;
  column-count: 2;
  column-gap: 2rem;
}

.page-aaf .panel-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.page-aaf .panel-images img {
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-aaf .panel-buttons {
  border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  opacity: 0.8;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 120%;
  padding: 10px 20px;
  padding-top: 14px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-aaf .panel-buttons-large {
  border: 3px solid black;
  color: black;
  font-family: 'Special Elite';
  opacity: 0.8;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 135%;
  padding: 10px 20px;
  padding-top: 14px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-aaf .asrs-buttons {
  border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  opacity: 0.8;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 110%;
  padding: 10px 20px;
  padding-top: 14px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 6px;
}

/* ========================= */
/*   SQUADRON OVERLAY PANEL  */
/* ========================= */

.page-aaf #squadron-overlay {
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
  width: 1000px;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  overflow: hidden;
  background-color: rgba(255,255,255,0.85);
  padding: 20px;
}

.page-aaf #returnButton {
  font-family: 'Special Elite';
  font-size: 140%;
  padding: 10px 20px;
  padding-top: 15px;
  border: 2px solid black;
  background: white;
  cursor: pointer;
  margin-bottom: 20px;
}

/* ========================= */
/*   GLOBAL SQUADRON STYLES  */
/* ========================= */

.page-aaf .squadron-background {
  background-size: 100%;
  background-position: top;
  background-blend-mode: screen;
  padding: 40px;
  border-radius: 12px;
  position: relative;
}

.page-aaf .squadron-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.65);
  backdrop-filter: brightness(1.1);
  z-index: 0;
}

.page-aaf .squadron-background > * {
  position: relative;
  z-index: 1;
}

.page-aaf .squadron-background h2 {
  color: black;
  font-family: 'Special Elite';
  font-size: 300%;
  text-align: center;
  margin-top: 10px;
}

.page-aaf .squadron-background h3 {
  color: black;
  font-family: 'Special Elite';
  font-size: 200%;
  text-align: center;
}

.page-aaf .squadron-background h4 {
  color: black;
  font-family: 'Special Elite';
  font-size: 150%;
  text-align: left;
  margin-top: 5px;
}

.page-aaf .squadron-background p {
  margin-bottom: 5px;
  font-size: 110%;
}

.page-aaf .squadron-heading {
  font-family: 'Special Elite';
  font-size: 30px;
  margin-bottom: 10px;
}

.page-aaf .roster-log-button {
  background-color: transparent;
  border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 120%;
  padding: 10px 20px;
  padding-top: 15px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Roster background panel */

.page-aaf #roster-background {
  background-image: url('../images/chalkboard_texture.png');
  background-position: center/contain;
  padding: 40px;
  border-radius: 10px;
  margin: 50px 50px;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Pilot roster table */

.page-aaf #pilot-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Bradley Hand ITC;
  font-size: 130%;
  color: white;
  background-color: transparent;
}

.page-aaf #pilot-table th,
.page-aaf #pilot-table td {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding: 12px;
  text-align: left;
}

.page-aaf #pilot-table th {
  font-size: 120%;
  font-family: 'Special Elite';
  border-bottom: 2px solid white;
}

.page-aaf #pilot-table-body td:nth-child(3),
.page-aaf #pilot-table-body td:nth-child(4) {
  text-align: center;
}

/* Information */

.page-aaf #information-background {
  background-image: url('../images/chalkboard_texture.png');
  background-position: center/contain;
  width: 500px;
  padding: 40px;
  border-radius: 10px;
  margin: 50px 170px;
  opacity: 0.9;
  font-family: Bradley Hand ITC;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-aaf .info-content h3 {
  font-family: Bradley Hand ITC;
  font-size: 160%;
  font-weight: bold;
  color: white;
  text-align: left;
}

.page-aaf .info-content p {
  font-family: Bradley Hand ITC;
  font-size: 130%;
  color: white;
  text-align: left;
}

.page-aaf .section-line {
  position: relative;
  margin: 18px 0;
  height: 1px;
}

.page-aaf .section-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background-color: white;
}

/* Pilot links */

.page-aaf .pilot-link {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.page-aaf .pilot-link:hover {
  font-weight: bold;
  font-size: 100%;
}

/* Modal system */

.page-aaf .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow-y: auto;
}

.page-aaf .modal-content {
  background-image: url('../images/paper_file_texture.png');
  margin: 210px auto;
  padding: 40px;
  border: 2px solid #333;
  border-radius: 5px;
  font-family: 'Special Elite';
  opacity: 0.9;
  width: 600px;
  box-shadow: 0 0 10px #000;
}

.page-aaf #dossierContent {
  margin-top: 10px;
  margin-left: 8px;
  font-family: 'Special Elite';
  font-size: 90%;
}

/* Mission log cards */

.page-aaf .mission-card {
  background-image: url('../images/paper_file_texture_light.png');
  color: black;
  font-family: 'Veteran Typewriter';
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Mission log filters */

.page-aaf .filters {
  font-family: Courier;
  font-weight: bold;
}

/* AWARDS */

.page-aaf .no-decorations-watermark {
  text-align: center;
  font-family: 'Special Elite';
  font-size: 120%;
  opacity: 0.25;
  margin-top: -4px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.page-aaf .pilot-record {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.page-aaf .pilot-left {
  flex: 1;
}

.page-aaf .medal-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, 160px);
  gap: 12px 16px;
  justify-items: center;
  justify-content: start;
  margin: 10px 0 10px;
}

.page-aaf .medal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
}

.page-aaf .medal-item img {
  height: 180px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
}

.page-aaf .medal-label {
  font-family: 'Special Elite';
  font-size: 80%;
  margin-top: 4px;
  opacity: 0.8;
  text-align: center;
}

/* DOTTED LEADERS */

.page-aaf .ops-line {
  display: grid;
  grid-template-columns: max-content 1fr minmax(200px, max-content);
  column-gap: 8px;
  font-family: 'Veteran Typewriter', monospace;
  font-size: 18px;
  margin: 6px 0;
  align-items: center;
}

.page-aaf .ops-line .label {
  white-space: nowrap;
}

.page-aaf .ops-line .dots {
  border-bottom: 2px dotted rgba(0,0,0,0.6);
  height: 0.6em;
  margin-top: 4px;
}

.page-aaf .ops-line .value {
  white-space: nowrap;
  text-align: left;
}

.page-aaf .ops-line .label.bold {
  font-weight: bold;
}

.page-aaf .notable-action-block {
  margin-top: 20px;
  padding: 0 0;
}

.page-aaf .notable-action-label {
  font-family: 'Veteran Typewriter';
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.page-aaf .notable-action-text {
  font-family: 'Veteran Typewriter';
  font-size: 18px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  padding-left: 10px;
  padding-right: 30px;
}

/* PIU PANEL */

.page-aaf #piu-editor-container {
  width: 95%;
  border: 1px solid #999;
  background: #222;
  margin-top: 20px;
  position: relative;
}

.page-aaf #piu-tools,
.page-aaf #piu-editor-container {
  display: none;
}

.page-aaf .piu-toolbar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.page-aaf .piu-toolbar button {
  background: #ddd;
  border: 1px solid #666;
  padding: 6px 10px;
  cursor: pointer;
  font-family: "Courier New", monospace;
}

#piu-ops-tools {
    justify-content: center;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.4);
    padding: 8px 12px;
    border-radius: 6px;
    backdrop-filter: blur(3px);
}

.page-aaf .piu-toolbar button:hover {
  background: #fff;
}

.page-aaf #piu-ops-editor-canvas {
    position: relative;
    width: 100%;
    height: 600px;
    background: url('../images/PIU_desk.png') center/contain no-repeat;
    padding: 0px;
}

.piu-tool-active {
    background: #fff !important;
    border-color: #000 !important;
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* PIU LIBRARY */

.page-aaf .piu-library {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
  width: 100%;
}

.page-aaf #piu-library-panel {
  border: 2px solid #000;
  padding: 20px;
  margin-top: 30px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  max-height: 600px;
  overflow-y: auto;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.page-aaf #piu-library-header {
  margin-bottom: 20px;
  text-align: center;
}

.page-aaf .piu-library-filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.page-aaf .piu-library-filters select {
  padding: 8px 12px;
  border: 2px solid black;
  background: rgba(255,255,255,0.8);
  font-family: 'Special Elite';
  font-size: 110%;
  cursor: pointer;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  border-radius: 6px;
}

/* OUTER SLIDE MOUNT */

.page-aaf .piu-tile {
  position: relative;
  background: #f7f7f7;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.piu-tile[hidden] {
    display: none !important;
}

/* INNER PHOTO WRAPPER */

.page-aaf .piu-tile-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
}

/* PHOTO */

.page-aaf .piu-tile-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  border-radius: 2px;
  filter: grayscale(100%) contrast(120%) brightness(105%) sepia(20%);
  mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
}

/* METADATA STRIP */

.page-aaf .piu-tile-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.75);
  color: white;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  padding: 4px 6px;
  box-sizing: border-box;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.page-aaf .piu-meta-row {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

/* HOVER TILT */
.page-aaf .piu-tile:hover {
	transform: rotate(-1deg) scale(1.03);
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.page-aaf #piu-expanded-view {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: auto;
	max-width: 90vw;
	max-height: 90vh;
	background: rgba(255,255,255,0.9);
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 0 25px rgba(0,0,0,0.6);
	display: none;
	z-index: 9999;
	overflow: hidden;
	text-align: center;
}

.page-aaf #piu-expanded-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.05s linear;
    cursor: zoom-in;
	filter: grayscale(100%) contrast(120%) brightness(105%) sepia(20%);
}

/* ==============*/
/*   ASRS PANEL  */
/* ==============*/

.page-aaf .asr-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 30px;
}

.page-aaf .asr-table th, .asr-table td {
	border: 1px solid #444;
	padding: 8px 12px;
	text-align: left;
}

.page-aaf .asr-table th {
	background: #222;
	color: #fff;
}

.page-aaf .asr-empty {
	font-style: italic;
	opacity: 0.7;
	margin-bottom: 20px;
}

.page-aaf .asrs-title {
	font-size: 240%;
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.page-aaf .asrs-subtitle {
	font-style: italic;
	opacity: 0.8;
	margin-bottom: 25px;
}

.page-aaf .asrs-briefing-box {
	background: #f5f5f5;
	border-left: 6px solid #003366; /* RAF blue */
	padding: 18px 22px;
	margin-bottom: 30px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.page-aaf .asrs-briefing-box h3 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 135%;
	color: #003366;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.page-aaf .asrs-timestamp {
	font-size: 90%;
	opacity: 0.7;
	margin-top: 10px;
}

.page-aaf .asrs-output {
	background-image: url('../images/paper_file_texture_light.png');	
	background-blend-mode: lighten;
	background-size: cover;
	padding: 20px;
	font-family: 'Special Elite';
	font-size: 15px;
	line-height: 1.4;
	color: #2a2a2a;
	border: 1px solid #888;
	box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.page-aaf .asr-entry {
	margin-bottom: 25px;
	padding-bottom: 10px;
}

.page-aaf .asr-entry-header {
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 6px;
	border-bottom: 1px solid #444;
	padding-bottom: 3px;
}

.page-aaf .asr-entry-body div {
	margin: 2px 0;
}

.page-aaf .asr-divider {
	border: none;
	border-bottom: 1px dashed #555;
	margin: 15px 0;
}

.page-aaf .asr-entry.indented {
	margin-left: 25px;   /* adjust to taste */
}

.page-aaf .asr-document-header {
	text-align: center;
	margin-bottom: 20px;
}

.page-aaf .asr-section-title {
	text-align: center;
	font-weight: bold;
	text-transform: uppercase;
	margin: 20px 0 10px;
	border-bottom: 2px solid #444;
	padding-bottom: 3px;
}

.page-aaf .asr-header-title {
	text-align: center;
	font-weight: bold;
	font-size: 20px;
	letter-spacing: 2px;
	margin-bottom: 3px;
}

.page-aaf .asr-header-sub {
	text-align: center;
	font-size: 15px;
	margin-bottom: 10px;
	text-transform: uppercase;
}

.page-aaf .combat-report-button {
	border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  opacity: 0.8;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 110%;
  padding: 10px 20px;
  padding-top: 14px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 6px;
}

/* PIU Office Container */
.page-aaf #piu-office {
    display: none;
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    width: 100%;
}

/* Title styling */
.page-aaf .piu-office-title {
    font-size: 120%; /* bigger than default h3 */
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Description text */
.page-aaf .piu-office-desc {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.85;
}

/* Button spacing */
.page-aaf .piu-office-btn {
    margin-top: 10px;
    margin-bottom: 25px;
}

/* Divider */
.page-aaf .piu-office-divider {
    width: 60%;
    margin: 30px auto;
    border: 0;
    border-top: 1px solid #666;
    opacity: 0.5;
}


