/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  margin: 0;
  background: #fff;
  color: #1a1a1a;
}

header.site-header {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

header.site-header nav {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
}

header.site-header a {
  text-decoration: none;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
}

header.site-header a:hover {
  color: #111;
}

header.site-header .brand {
  font-family: Georgia, Palatino, "Times New Roman", serif;
  font-style: italic;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #1a1a1a;
}

header.site-header .logo {
  display: block;
  width: 40px;
  height: 40px;
}

main.site-main {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 4rem;
}

svg.horde {
  display: block;
  width: 100%;
  max-width: 1152px;
  height: auto;
}

svg.horde a {
  cursor: pointer;
}

svg.horde a:focus {
  outline: none;
}

svg.horde a:focus-visible polygon {
  stroke: #1a1a1a;
  stroke-width: 4;
}

.horde-page {
  font-family: system-ui, sans-serif;
  padding-top: 2rem;
}

.horde-page h1 {
  margin: 0 0 0.75rem;
  font-family: Georgia, Palatino, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

.horde-page p {
  margin: 0 0 1.5rem;
  line-height: 1.5;
  color: #444;
}

.horde-page .horde {
  margin-bottom: 1.5rem;
}

ul.corsairs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.corsairs a {
  color: #1a1a1a;
  font-size: 1.125rem;
  text-decoration: none;
}

ul.corsairs a:hover {
  text-decoration: underline;
}

.corsair-heading,
.project-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.horde-page .corsair-heading p.corsair-back,
.horde-page .project-heading p.corsair-back,
.horde-page .project-heading h1 {
  margin: 0;
}

.corsair-edit,
a.project-action {
  flex: 0 0 auto;
  font-size: 0.875rem;
  color: #444;
  text-decoration: none;
}

.corsair-edit:hover,
a.project-action:hover {
  color: #111;
}

.corsair-back {
  margin-bottom: 0.5rem;
}

.corsair-back a {
  color: #444;
  font-size: 0.875rem;
}

.corsair-show {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.corsair-headshot {
  display: block;
  width: 11rem;
  height: 11rem;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid #e5e5e5;
  background: #f4f4f4;
}

.corsair-show h1 {
  margin-top: 0.15rem;
}

.signed-in-name {
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
  cursor: pointer;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  vertical-align: middle;
}

.account-menu[open] summary {
  color: #111;
}

header.site-header .account-menu > a {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  display: block;
  min-width: 7.5rem;
  padding: 0.5rem 0.85rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  text-align: left;
  white-space: nowrap;
}

header.site-header .account-menu > a:hover {
  background: #f6f6f6;
}

body:has(.auth) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.auth) > header.site-header,
body:has(.auth) > main.site-main,
body:has(.auth) > .site-footer {
  box-sizing: border-box;
  width: 100%;
}

body:has(.auth) main.site-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
}

.auth {
  width: 100%;
  max-width: 24rem;
  min-width: 0;
  margin-inline: auto;
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-family: system-ui, sans-serif;
}

.auth h1 {
  margin: 0 0 1rem;
  font-family: Georgia, Palatino, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

.auth p {
  margin: 1rem 0 0;
}

.auth form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.auth label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #444;
}

.auth input[type="email"],
.auth input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.auth input[type="submit"] {
  margin-top: 1rem;
  width: fit-content;
  font: inherit;
  padding: 0.55rem 0.9rem;
  background: #1a1a1a;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.auth-alert,
.auth-notice {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
}

.auth-alert {
  background: #fde8e8;
  color: #7f1d1d;
}

.auth-notice {
  background: #e8f6ec;
  color: #14532d;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list > li {
  margin: 0 0 1.25rem;
}

.project-list a {
  color: #1a1a1a;
  font-size: 1.25rem;
  text-decoration: none;
}

.project-list a:hover {
  text-decoration: underline;
}

.project-list a.project-card-link,
.project-list a.project-card-link:hover {
  display: block;
  max-width: 36rem;
  margin: 0 0 0.5rem;
  text-decoration: none;
}

.project-card,
.project-hero,
.project-hero-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.project-hero {
  margin: 0 0 1.25rem;
}

.project-hero-preview img {
  margin: 0.25rem 0 0.5rem;
}

.project-excerpt {
  margin: 0.25rem 0 0;
  color: #444;
}

.horde-page h2 {
  margin: 1.75rem 0 0.5rem;
  font-family: Georgia, Palatino, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.service-summary {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  color: #1a1a1a;
}

.service-visibility {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.35rem;
  color: #444;
  font-size: 0.875rem;
}

.service-visibility form,
.service-visibility button.text-button,
.project-actions .service-status {
  margin: 0;
}

.project-actions .service-status {
  font-size: 0.875rem;
  color: #444;
}

.horde-page .log-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.25rem 0 1rem;
  color: #444;
  font-size: 0.875rem;
}

a.log-author-link,
a.log-author-link:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1a1a1a;
  font-size: 0.875rem;
  text-decoration: none;
}

a.log-author-link:hover {
  text-decoration: underline;
}

img.log-author {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  flex: 0 0 auto;
}

.project-actions {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 1rem;
  margin: 0;
}

.project-actions form {
  margin: 0;
}

.project-heading button.text-button {
  margin-top: 0;
  text-decoration: none;
}

.project-description {
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.project-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-links a {
  color: #1a1a1a;
}

.project-form {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  font-family: system-ui, sans-serif;
}

.project-form label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #444;
}

.project-form input[type="text"],
.project-form input[type="url"],
.project-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.project-form label.check-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.project-form input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: 0.875rem;
}

.corsair-avatar-preview {
  margin: 0.25rem 0 0.5rem;
}

.project-form label.remove-avatar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.project-form trix-editor {
  box-sizing: border-box;
  width: 100%;
  background: #fff;
}

.project-form input[type="submit"] {
  margin-top: 1rem;
  width: fit-content;
  font: inherit;
  padding: 0.55rem 0.9rem;
  background: #1a1a1a;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.project-form fieldset {
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.project-form legend {
  font-family: Georgia, Palatino, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.5rem;
}

.project-link-fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

.project-form .text-button,
button.text-button {
  width: fit-content;
  margin-top: 0.5rem;
  padding: 0;
  background: none;
  color: #444;
  border: 0;
  font: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
}

.remove-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.project-errors {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1.6rem;
  background: #fde8e8;
  color: #7f1d1d;
}

.site-footer {
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.site-footer__inner {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 0;
}

.site-footer__copy {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  color: #666;
}

@media (max-width: 720px) {
  header.site-header {
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  header.site-header nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  header.site-header .brand {
    font-size: 1.5rem;
  }

  main.site-main,
  .site-footer__inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .corsair-show {
    flex-direction: column;
    gap: 1rem;
  }

  .corsair-headshot {
    width: 9rem;
    height: 9rem;
  }
}
