/* =========================
   CSS VARIABLES
   ========================= */
:root {
  --black: #111;
  --white: #fff;
  --gray: #333;
  --light-gray: #f4f4f4;
}

/* =========================
   RESET
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

::selection,
::-moz-selection {
  color: var(--white);
  background: var(--black);
}

/* =========================
   LAYOUT
   ========================= */
body {
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--light-gray);
  color: var(--gray);
}

main {
  flex: 1;
  position: relative;
  width: 70%;
  max-width: 900px;
  margin: 60px auto 80px; /* bottom margin creates the gap */
  padding: 40px 30px 30px;
  text-align: center;
  color: var(--black);
  background: var(--white);
  border: 4px solid var(--black);
  box-shadow:
    6px 6px 0 var(--black),
    12px 12px 0 #ccc;
}

/* =========================
   HEADER / NAV
   ========================= */
header {
  text-align: center;
  padding: 1rem 0;
  background-color: var(--white);
  color: var(--black);
  border: 4px solid var(--black);
}

nav {
  display: flex;
  justify-content: center;
  background-color: var(--white);
  border-left: 4px solid var(--black);
  border-right: 4px solid var(--black);
  border-bottom: 4px solid var(--black);
}

.buttonList {
  display: flex;
  justify-content: center;
  border-left: 2px solid var(--black);
  border-right: 2px solid var(--black);
}

nav a {
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* =========================
   BUTTONS
   ========================= */
button {
  padding: 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--black);
  background-color: var(--white);
  border: 2px solid var(--black);
  border-top: none;
  border-bottom: none;
  cursor: pointer;
}

button:hover {
  background-color: var(--black);
  color: var(--white);
}

/* =========================
   TYPOGRAPHY
   ========================= */
h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

p,
ul {
  color: var(--gray);
  line-height: 1.6;
}

ul {
  padding-left: 1.2rem;
  display: inline-block;
}

section {
  margin-bottom: 2rem;
}

/* =========================
   FOOTER
   ========================= */
footer {
  width: 100%;
  margin-top: auto;
  padding: 1rem 0;
  text-align: center;
  background-color: var(--white);
  color: var(--black);
  border: 4px solid var(--black);
  border-bottom: none;
}
/* =========================
   PROGRESS BAR
   ========================= */
.progress-container {
  width: 90%;
  height: 18px;
  overflow: hidden;
  background-color: var(--white);
  background-image: repeating-conic-gradient(
    var(--white) 0% 25%,
    #000 0% 50%
  );
  background-size: 3px 3px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #000;
  transition: width 0.1s linear;
}

/* =========================
   DOC TABS
   ========================= */
.doc-tabs {
  position: absolute;
  top: -34px;
  left: 20px;
  display: flex;
  gap: 6px;
}

.doc-tabs label {
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
}

/* Hide radios */
.doc-container > input[type="radio"] {
  display: none;
}

/* Tab content */
.tab-content {
  display: none;
}

/* =========================
   TAB VISIBILITY LOGIC
   ========================= */
#tab-intro:checked ~ .doc-content .intro,
#tab-gettin-started:checked ~ .doc-content .gettin-started,
#tab-uploading-firmware:checked ~ .doc-content .uploading-firmware,
#tab-uploading-reading:checked ~ .doc-content .uploading-reading,
#tab-tips-tricks:checked ~ .doc-content .tips-tricks {
  display: block;
}

/* Active tab styling */
#tab-intro:checked ~ .doc-tabs label[for="tab-intro"],
#tab-gettin-started:checked ~ .doc-tabs label[for="tab-gettin-started"],
#tab-uploading-firmware:checked ~ .doc-tabs label[for="tab-uploading-firmware"],
#tab-uploading-reading:checked ~ .doc-tabs label[for="tab-uploading-reading"],
#tab-tips-tricks:checked ~ .doc-tabs label[for="tab-tips-tricks"] {
  background: var(--black);
  color: var(--white);
  box-shadow: 3px 3px 0 #ccc;
}

@media (max-width: 768px) {
  main {
    width: 100%;
    margin: 20px 12px;
    padding: 24px 16px;
  }
}

@media (max-width: 768px) {
  .doc-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  .doc-tabs label {
    flex: 0 0 auto;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {



  .buttonList button {
    font-size: clamp(0.6rem, 2vw, 1rem);
	border-top : 10px;
  }
}
nav {
line-height: 0;
}

@media (max-width: 768px) {
  main {
    box-shadow:
      4px 4px 0 var(--black),
      8px 8px 0 #ccc;
  }
}

@media (max-width: 768px) {
  main {
    width: 100%;
    margin: 20px auto;   /* centers perfectly */
    padding: 24px 16px;  /* inner spacing instead */
  }
}
