@import 'reset.css';
@import url("https://use.typekit.net/zrh1dhy.css");

/* Define CSS color variables */
:root {
    --color-primary: #CAE600;
    --color-on-primary: #000000;
    --color-secondary: #D6B8FF;
    --color-tertiary: #0096C7;
    --color-on-secondary: #000000;
    --color-text: #000000;
    --color-button-bg: #000000;
    --color-button-text: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --border-color: #000000;
}

header {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body, input, textarea, button, select {
    font-family: "aglet-mono-variable", sans-serif;
    font-variation-settings: "wght" 400;
    font-size: 20px;
    line-height: 1.5;
}

/* Apply primary-color outline on focus for form elements */
input:focus, textarea:focus, button:focus, select:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "kensington", sans-serif;
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
}

h3 {
    text-transform: uppercase;
    font-size: 2em;
    padding-bottom: 0.5em;
}

header h1 {
    margin: 0;
    line-height: 0;
}

header h1 a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 10px 40px;
    height: 100%;
}

header h1 a img.site-logo {
    width: 200px;
    height: 80px;
}

header nav a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 20px 20px;

}

header nav a:hover {
    text-decoration: underline;
}

header nav ul {
    display: flex;
    gap: 0;
    margin: 0;
}

header nav ul li {
    margin: 0;
}

main, .marketplace-preview {
    margin: 100px 50px 200px 50px;
}

main h2 {
    margin-bottom: 50px;
    font-size: 100px;
    text-align: center;
}

main p {
    margin-bottom: 20px;
}


/* Labels above inputs and textareas */
main form.common-form label {
    display: block;
    margin-bottom: 0.5em;
}

/* Full-width text inputs and textareas */
main form.common-form input[type="text"],
main form.common-form input[type="number"],
main form.common-form textarea,
main form.common-form select,
textarea.edit-field {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1em;
    font-size: 1.5em;
    padding: 10px;
    border: 1px solid var(--border-color);
    color: var(--color-text);
    border-radius: 0px;
}

/* Custom chevron dropdown styling for select */
main form.common-form select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1em;
    font-size: 1.5em;
    padding: 10px;
    border: 1px solid var(--border-color);
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.5em;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='currentColor'/%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 1em;
    color: var(--color-text);
    border-radius: 0px;
}

main form.common-form label {
    display: block;
    margin-bottom: 0.5em;
    font-size: 1.2em;
    text-transform: uppercase;
}

main form.common-form.test-form textarea,
main form.common-form.run-form textarea {
    margin-bottom: 0em;
}

/* Instruction entries: align remove button and spacing */
main form.common-form .instruction-item {
    margin-bottom: 1.5em;
}

main form.common-form .instruction-item textarea {
    margin-bottom: 0.25em;
}

main form.common-form .instruction-item .remove-instruction {
    display: block;
    margin: 0.25em 0 0 auto;
}

/* Input entries: align remove button and spacing */
main form.common-form .input-item {
    margin-bottom: 1.5em;
}
main form.common-form .input-item input,
main form.common-form .input-item textarea {
    margin-bottom: 0.25em;
}
main form.common-form .input-item .remove-input {
    display: block;
    margin: 0.25em 0 0 auto;
}

/* Example entries: align remove button and spacing */
main form.common-form .example-item {
    margin-bottom: 1.5em;
}
main form.common-form .example-item textarea {
    margin-bottom: 0.25em;
}
main form.common-form .example-item .remove-example {
    display: block;
    margin: 0.25em 0 0 auto;
}

/* Output entries: align remove button and spacing */
main form.common-form .output-item {
    margin-bottom: 1.5em;
}
main form.common-form .output-item .remove-output {
    display: block;
    margin: 0.25em 0 0 auto;
}

main form.common-form h3,
#test-note-result h3 {
    margin-bottom: 1em;
    font-size: 2.5em;
    text-transform: uppercase;
}

main form.common-form button#generate-btn,
main form.common-form button#add-instruction,
main form.common-form button#add-input,
main form.common-form button#add-output,
main form.common-form button#add-example {
    margin-bottom: 4em;
}

pre {
    font-size: 1.5em;
    line-height: 1.5;
    margin-bottom: 1em;
    text-overflow: wrap;
    white-space: pre-wrap;
}

button {
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2em;
    text-transform: uppercase;
    margin-bottom: 1em;
}

.centered-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.centered-buttons button {
    width: 100%;
    max-width: 800px;
}

.centered-buttons button.premier {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}

input[type="submit"] {
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    width: 100%;
    font-size: 2em;
    text-transform: uppercase;
    cursor: pointer;
}

/* Side by side layout for edit-template and test-run sections */
.flex-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.flex-item {
  flex: 1;
}

/* Floating footer with generate and save buttons */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: 100%;
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  z-index: 1000;
}

/* Style buttons inside floating footer */
.fixed-footer input[type="submit"], .fixed-footer .button {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding: 15px 40px;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 2em;
  text-transform: uppercase;
  box-sizing: border-box;
  flex: 1;
  width: auto;
  max-width: 500px;
  margin: 0;
}

/* Hide inline submit buttons */
#test-run-form input[type="submit"],
#save-note-form input[type="submit"],
#edit-template-form input[type="submit"] {
  display: none;
}

#notes-list a {
    color: #000;
    font-size: 1.4em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.common-list {
    list-style: none;
}

.common-list li {
    margin: 0 auto 2em;
    max-width: 1200px;
}

.common-list h3 a {
    text-decoration: none;
    color: #000;
}

.common-list h3 {
    margin-bottom: 0.25em;
    font-size: 3em;
    text-transform: none;
}

.common-list.changelog-list article h3 {
  margin: 0em;
  padding: 0em;
}

.common-list li {
    margin-bottom: 2em;
}

.common-list .template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: 2em;
}

.button {
    background-color: #000;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 900;
    display: inline-block;
    text-align: center;
    margin-bottom: 1em;
}

#loading-indicator {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--overlay-bg);
  color: var(--color-button-text);
  padding: 0.5em 1em;
  border-radius: 5px;
  font-size: 1em;
  z-index: 2000;
  display: none;
}

/* Flash messages container styling */
#flash-messages {
  position: fixed;
  top: 7rem;
  right: 1rem;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.flash-message {
  background: var(--overlay-bg);
  color: var(--color-button-text);
  padding: 0.5em 1em;
  border-radius: 5px;
  max-width: 90%;
}

.loading-dots {
  overflow: visible !important;
  width: auto !important;
  white-space: nowrap;
}
.loading-dots::after {
  content: none !important;
  animation: none !important;
}

/* Landing page styles */
.landing-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100vh);
    text-align: center;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}
.landing-container h1 {
    margin-top: -200px;
    margin-bottom: 3em;
    text-transform: uppercase;
}
.landing-container h1 img.landing-logo {
    display: block;
    width: 600px;
    height: auto;
}

/* Landing page: remove main margins */
body.landing main {
    margin: 0;
    padding: 0;
}

/* User menu dropdown styling */
header nav ul li.user-menu {
    position: relative;
}
header nav ul li:last-of-type a {
    padding-right: 40px;
}
header nav ul li.user-menu ul.dropdown-menu {
    position: absolute;
    top: calc(100%);
    left: 20px;
    background: var(--color-primary);
    list-style: none;
    margin: 0;
    padding: 0.5em 0;
    z-index: 1000;
}
header nav ul li.user-menu ul.dropdown-menu li a {
    display: block;
    padding: 0.5em 1em;
    color: var(--color-text);
    text-decoration: none;
    width: 200px;
}
header nav ul li.user-menu ul.dropdown-menu li a:hover {
    background: rgba(0,0,0,0.05);
}

/* Hamburger menu icon - hidden on desktop */
.hamburger {
  display: none;
}

/* Mobile optimizations */
@media (max-width: 1000px) {

.landing-container h1 img.landing-logo {
  display: block;
  width: 400px;
  height: auto;
}

  /* Show hamburger */
  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--color-text);
    cursor: pointer;
    margin-left: auto;
    margin-top: -10px;
    padding: 0 20px;
  }

  /* Hide desktop nav */
  header nav {
    display: none;
  }

  /* Mobile menu overlay */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
  }
  .mobile-menu a {
    color: var(--color-on-primary);
    text-decoration: none;
    font-size: 2em;
    display: block;
    padding: 1rem 0;
  }
  .mobile-menu a:hover {
    text-decoration: underline;
  }
  .mobile-menu ul li:nth-last-child(2) {
    margin-top: 2em;
  }
  .mobile-menu ul li:nth-last-child(1) {
    color: var(--color-on-primary);
    text-decoration: none;
    font-size: 1.4em;
  }
  .mobile-menu-close {
    position: absolute;
    top: -.3rem;
    right: -.3rem;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--color-on-primary);
    cursor: pointer;
  }
  /* Style select like text input */
  .notes-app .mobile-controls #note-select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1em;
    padding: 10px;
    padding-right: 2.5em;
    font-size: 1.5em;
    border: 1px solid var(--border-color);
    -webkit-appearance: none;
    color: var(--color-text);
    appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='currentColor'/%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 1em;
    border-radius: 0px;
  }
  .notes-app .mobile-controls #new-note-mobile {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1em;
  }
  /* Style the note form to match the mobile dropdown style */
  .notes-app .flex-container #note-detail form.common-form {
    width: 100%;
    box-sizing: border-box;
    margin: 0 1rem 1em;
    padding: 10px;
    background: white;
    border-radius: 0px;
  }
  /* Style the template model dropdown like the note select */
  #edit-template-form select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1em;
    padding: 10px;
    padding-right: 2.5em;
    font-size: 1.5em;
    border: 1px solid var(--border-color);
    -webkit-appearance: none;
    appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='currentColor'/%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 1em;
    border-radius: 0px;
  }
}

/* Responsive font for fixed-footer buttons: prevent wrapping and shrink text to fit */
.fixed-footer input[type="submit"], .fixed-footer .button {
    white-space: nowrap;
    font-size: clamp(1em, 6vw, 2em);
    font-weight: 900;
    margin: 0 40px;
}

/* Responsive font for fixed-footer buttons: prevent wrapping and shrink text to fit */
.fixed-footer.fixed-footer-edit input[type="submit"]:first-of-type {
    margin: 0 20px;
}

.fixed-footer.fixed-footer-edit input[type="submit"]:last-of-type {
    margin: 0 20px;
}

/* Scoped tabs styles for edit-template page */
.edit-template-app .tabs {
    display: flex !important;
    gap: 1rem;
    padding: 0 1rem;
    margin-bottom: 1rem;
    margin-top: -40px;
}
.edit-template-app .tabs .tab {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding-bottom: 0.5em;
    text-transform: uppercase;
    margin-bottom: 2em;
    font-size: 1.6em;
}
.edit-template-app .tabs .tab.active {
    border-bottom: 3px solid var(--color-primary);
}
.edit-template-app .flex-container {
    display: block !important;
}
.edit-template-app .flex-container .flex-item {
    display: none !important;
}
.edit-template-app .flex-container .flex-item.active {
    display: block !important;
}

/* Notes page mobile controls */
.notes-app .mobile-controls {
    display: none;
}
@media (max-width: 1000px) {
    .notes-app .mobile-controls {
        display: block;
        margin: 1rem;
    }
    /* Show only the form panel on mobile, hide the list sidebar */
    .notes-app .flex-container {
        display: block;
    }
    .notes-app .flex-container > .flex-item:first-child {
        display: none;
    }
    .notes-app .mobile-controls {
        margin-bottom: 4rem;
    }
    /* Style select like text input */
    .notes-app .mobile-controls #note-select {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1em;
        padding: 10px;
        padding-right: 2.5em;
        font-size: 1.5em;
        border: 1px solid var(--border-color);
        -webkit-appearance: none;
        color: var(--color-text);
        appearance: none;
        background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='currentColor'/%3E%3C/svg%3E") no-repeat right 1rem center;
        background-size: 1em;
        border-radius: 0px;
    }
    .notes-app .mobile-controls #new-note-mobile {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1em;
    }
    /* Style the note form to match the mobile dropdown style */
    .notes-app .flex-container #note-detail form.common-form {
        width: 100%;
        box-sizing: border-box;
        margin: 0 1rem 1em;
        padding: 10px;
        border: 1px solid var(--border-color);
        background: white;
        border-radius: 0px;
    }
}

/* Note selection sidebar */
.note-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  z-index: 2000;
  display: none;
  flex-direction: column;
}
.note-sidebar.open {
  display: flex;
  box-shadow: 0 0 12px 7px rgba(0, 0, 0, 0.1);
}
.note-sidebar .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0 2rem;
  text-transform: uppercase;
}
.sidebar-close {
  background: none;
  border: none;
  font-size: 2em;
  color: var(--color-on-primary);
  cursor: pointer;
}
.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
.note-list li.no-notes {
  padding: 0.75em 1.5em;
}
.note-list li a {
  display: block;
  padding: 0.75em 1.5em;
  color: var(--color-on-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-list li a:hover {
  background: rgba(0,0,0,0.1);
}
@media (min-width: 1000px) {
  .note-sidebar {
    width: 400px;
  }
}


.use-note-link {
    text-align: right;
    display: block;
    margin-bottom: 2em;
}

/* Custom styled checkbox for allow_web_search */
#edit-template-form input[type="checkbox"] {
    vertical-align: middle;
    align-self: center;
    /* Remove default styling */
    -webkit-appearance: none;
    appearance: none;
    /* Layout */
    display: inline-grid;
    place-content: center;
    width: 1.2em;
    height: 1.2em;
    margin: 0;
    padding: 0;
    /* Visuals */
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
}
#edit-template-form input[type="checkbox"]::before {
    content: "";
    width: 0.6em;
    height: 0.6em;
    background-color: var(--border-color);
    transform: scale(0);
    transition: transform 120ms ease-in-out;
}
#edit-template-form input[type="checkbox"]:checked::before {
    transform: scale(1);
}
#edit-template-form input[type="checkbox"] + label {
    display: inline-block;
    margin: 0 0 0 1em;
    line-height: 1.4em;
    vertical-align: middle;
    cursor: pointer;
}

/* Flex alignment for checkbox and label */
#edit-template-form .checkbox-field {
    display: flex;
    align-items: center;
    margin-bottom: 4em;
}

/* Show inline Test Run button inside Test Run panel */
#test-run-form input[type="submit"] {
    display: inline-block !important;
}

/* Show Save as Note button on run page */
#save-note-form input[type="submit"] {
  display: inline-block !important;
}

/* Preserve whitespace and formatting in note previews */
#test-note-preview, #note-preview {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 80px 0;
}

#test-note-preview h2, #note-preview h2 {
    margin-bottom: 10px;
    margin-top: 60px;
}

#test-note-preview h2:first-of-type, #note-preview h2:first-of-type {
    margin-top: 0px;
}

#test-note-preview h3, #note-preview h3 {
    margin-top: 60px;
}

#test-note-preview h3:first-of-type, #note-preview h3:first-of-type {
    margin-top: 0px;
}

/* Pricing page styles */
.pricing-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 1rem;
}
.plan-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  flex: 1 1 250px;
  max-width: 300px;
}
.plan-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.plan-card .price {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.plan-card .features {
  flex: 1 0 auto;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.plan-card .features li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5em;
}
.plan-card .features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-button-bg);
}
.plan-card button {
  margin-top: auto;
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
}
.plan-card.premier {
    box-shadow: 0 0 10px 0px var(--color-primary);
}

/* Pricing hero background behind cards */
.pricing-hero {
    margin: -100px -50px 2rem -50px;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    padding: 4rem 1rem;
}
.pricing-hero h2 {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 2rem;
}
.pricing-hero .pricing-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* FAQ section styles */
.faq-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1rem;
}
.faq-section h2 {
  text-align: center;
}
.faq-item {
  margin-bottom: 2rem;
}
.faq-item h3 {
  margin-bottom: 0.5rem;
}
.faq-item p {
  margin: 0;
}

/* Styles for the new footer */
.app-footer {
  background-color: #111;
  color: #f5f5f5;
  padding: 4rem 2rem 8rem;
}
.app-footer .footer-top {
  text-align: center;
  margin-bottom: 2rem;
}
.app-footer .footer-cta h2 {
  font-size: 4.5rem;
  margin-bottom: 2rem;
}
.app-footer .cta-button {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding: 1rem 2rem;
  border-radius: 40px;
  text-decoration: none;
  display: inline-block;
}
.app-footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
}
.app-footer .footer-section {
  flex: 1 1 200px;
}
.app-footer .footer-section h4 {
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-size: 2em;
}
.app-footer .footer-section ul {
  list-style: none;
  padding: 0;
}
.app-footer .footer-section ul li {
  margin-bottom: 0.5rem;
}
.app-footer a {
  color: #f5f5f5;
}
.app-footer a:hover {
    text-decoration: none;
}
.app-footer .social-icons {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.app-footer .social-icons a {
  margin-right: 0.5rem;
}
.hero-button {
    font-size: 1.5em;
    padding: 15px 40px;
    border-radius: 40px;
    width: 100%;
    max-width: 300px;
}

/* Tabs styles for combined templates page */
.templates-page .tabs {
    display: flex !important;
    gap: 1rem;
    padding: 0 1rem;
    margin: -40px auto 1rem;
    max-width: 1200px;
}
.templates-page .tabs .tab {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding-bottom: 0.5em;
    text-transform: uppercase;
    margin-bottom: 1em;
    font-size: 1.6em;
}
.templates-page .tabs .tab.active {
    border-bottom: 3px solid var(--color-primary);
}
.template-description {
  font-size: 1.4em;
  margin-bottom: 4em;
  text-align: center;
  text-transform: none;
}

.app-footer .footer-logo {
    width: 60px;
    height: 60px;
    margin: 0 0 20px;
    display: block;
}

article {
  max-width: 1000px;
  margin: 0 auto;
}

article h3 {
  padding: 2em 0 1em;
}

/* Card grid for template list */
.template-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
}
@media (max-width: 800px) {
    .template-list {
        grid-template-columns: 1fr;
    }
}

/* Individual template card */
.template-list li {
    background: var(--color-secondary);
    color: var(--color-on-secondary);
    padding: 2rem;
    border-radius: 8px;
    list-style: none; /* Ensure no bullet */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 0; /* grid gap handles spacing */
    position: relative; /* for absolute run button */
}

.template-list h3 {
    margin-bottom: 1rem;
    font-size: 2.2em;
    text-transform: none;
    padding-right: 8rem; /* reserve space for run button */
}

.template-list h3 a {
    color: inherit;
}

/* Align actions at bottom of card */
.template-list .template-actions {
    margin-top: auto;
}

/* Buttons inside card: use primary outline for visibility on secondary background */
.template-list .template-actions .button {
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
}

/* Run button positioned top-right */
.run-btn {
    position: absolute;
    top: 2.4rem;
    right: 1.7rem;
}

/* Card grid for templates page (authenticated users) */
.templates-page .panel .common-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
}
@media (max-width: 800px) {
    .templates-page .panel .common-list {
        grid-template-columns: 1fr;
    }
}

.templates-page .panel .common-list li {
    background: var(--color-secondary);
    color: var(--color-on-secondary);
    padding: 2rem;
    border-radius: 8px;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0; /* grid gap handles spacing */
    position: relative; /* for absolute run button */
}

.templates-page .panel .common-list h3 {
    margin-bottom: 1rem;
    font-size: 3em;
    text-transform: none;
    padding-right: 8rem; /* reserve space for run button */
}

.templates-page .panel .common-list h3 a {
    color: inherit;
}

.templates-page .panel .common-list .template-actions {
    margin-top: auto;
}

/* Description within template cards */
.template-desc {
    font-size: 1.2em;
    margin-bottom: 1rem;
    text-transform: none;
}

/* Status label (Published) */
.status-label {
    background: rgba(0,0,0,0.15);
    color: var(--color-text);
    padding: 0.8em 0.8em;
    font-size: 0.8em;
    margin-top: -28px;
    margin-bottom: 30px;
    width: auto;
    align-self: flex-start;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-label.published {
    /* Further customization if needed */
}

/* Edit link - simple text within actions */
.template-actions .edit-link {
    background: none;
    color: var(--color-text);
    padding: 0 20px 0 0;
    border: none;
    font-size: 1.2em;
    text-decoration: underline;
    font-weight: 900;
    text-transform: none;
    margin: 10px 0 0 0;
}

/* Delete link */
.delete-link {
    background: none;
    color: #c00;
    border: none;
    padding: 0;
    font-size: 1.2em;
    text-transform: uppercase;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 900;
}

/* -------- Changelog-specific styles -------- */
.common-list.changelog-list ol {
    list-style: decimal inside;
    margin-left: 2rem;
    margin-bottom: 1.5em;
    margin-top: 2em;
}

.common-list.changelog-list ul {
    list-style: disc inside;
    margin-left: 2rem;
    margin-bottom: 1.5em;
    margin-top: 2em;
}

.common-list.changelog-list strong {
    font-weight: 700;
}

.common-list.changelog-list em {
    font-style: italic;
}