/* Colours used across every tekzii page */
:root {
  --bg: #eef7fb;
  --paper: #ffffff;
  --fg: #3d4a52;
  --muted: #5f717b;
  --accent: #00bfff;
  --accent-ink: #ffffff;
  --bar: #0092c1;
  --heading-2: #0a4a70;
  --line: #d4e6ee;
  --shadow: 0 14px 36px rgba(8, 72, 96, 0.1);
  --shadow-hover: 0 20px 44px rgba(8, 72, 96, 0.16);
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", "Outfit", sans-serif;
  --wrap: 72rem;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 420px at 8% -8%, rgba(0, 191, 255, 0.28), transparent 58%),
    radial-gradient(900px 380px at 100% 0%, rgba(0, 146, 193, 0.16), transparent 52%),
    repeating-linear-gradient(
      -18deg,
      rgba(0, 146, 193, 0.035) 0 1px,
      transparent 1px 22px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='1.2' cy='1.2' r='1.1' fill='%230092c1' opacity='0.14'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--fg);
}

html.konami,
body.konami {
  background-color: #ff4d4d;
  background-image: linear-gradient(
    120deg,
    #ff4d4d,
    #ff9f1a,
    #ffe14a,
    #3dde6a,
    #3dc6ff,
    #7a5cff,
    #ff4db8,
    #ff4d4d
  );
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: tekzii-rainbow 10s linear infinite;
}

@keyframes tekzii-rainbow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--bar);
}

:focus-visible {
  outline: 2px solid var(--bar);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 0.9rem;
  background: var(--bar);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.inner {
  width: min(var(--wrap), calc(100% - 2.75rem));
  margin-inline: auto;
}

.brand-bar {
  background: linear-gradient(180deg, #4ad4ff 0%, #00bfff 48%, #00a7de 100%);
  padding: 1.85rem 0 1.55rem;
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    0 10px 28px rgba(0, 120, 160, 0.22);
}

.brand-bar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-account {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-youtube {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.header-youtube:hover {
  color: #111;
  background: #e9f8fd;
}

.header-youtube img {
  display: block;
  width: 22px;
  height: 22px;
}

.account-notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #e7f6fb;
  color: #14323c;
  font-weight: 700;
}

.account-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 1rem 0 1.25rem;
}

.account-search .field {
  flex: 1 1 16rem;
  margin: 0;
}

.accounts-board {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(26, 31, 54, 0.06);
  overflow: hidden;
}

.people-head,
.people-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.05rem 1.6rem;
}

.people-head {
  color: #b7bec8;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid #f2f3f5;
}

.people-head span:first-child {
  flex: 1 1 auto;
}

.people-head span:last-child {
  flex: 1 1 22rem;
  text-align: right;
}

.people-row {
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
}

.people-row:last-child {
  border-bottom: 0;
}

.people-who {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}

.people-who .avatar,
.people-who .avatar-fallback {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 0.95rem;
}

.people-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.people-id strong {
  color: #4a4a4a;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.people-id small {
  margin-top: 0.15rem;
  color: #b7bec8;
  font-size: 0.78rem;
  font-weight: 400;
}

.people-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 22rem;
  justify-content: flex-end;
}

.role-set {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.role-set-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.role-set select {
  padding: 0.28rem 0.45rem;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  background: #fff;
  color: #4a4a4a;
  font: inherit;
  font-size: 0.82rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.role-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.role-owner {
  color: #2f80ed;
  background: #eaf3ff;
}

.role-admin {
  color: #3ecf8e;
  background: #e8f9f0;
}

.role-member {
  color: #e0a83a;
  background: #fbf6e9;
}

.people-switch {
  border: 0;
  background: transparent;
  color: #c06a8a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.people-switch:hover {
  color: #a24d6c;
}

.people-empty {
  margin: 0;
  padding: 1.2rem 1.6rem;
  color: #8b95a3;
}

.people-status form {
  margin: 0;
}

@media (max-width: 700px) {
  .people-head,
  .people-row {
    flex-wrap: wrap;
  }

  .people-status,
  .people-head span:last-child {
    flex-basis: 100%;
  }
}

.avatar,
.header-avatar img,
.picture-preview img,
.avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback,
.header-avatar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d7f1f8;
  color: #046e96;
  font-weight: 700;
}

.header-avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
}

.header-avatar img,
.header-avatar span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.picture-preview {
  margin: 0.8rem 0 1rem;
}

.comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(12, 70, 95, 0.12);
}

.comments h2 {
  margin: 0 0 1rem;
  color: #14323c;
}

.comment {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #f0f2f4;
}

.comment-who {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.comment-who img,
.comment-who span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-who span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f6fb;
  color: #046e96;
  font-weight: 700;
}

.comment-who strong {
  display: block;
  color: #222;
}

.comment-who small {
  color: #7b8b93;
}

.comment p {
  margin: 0;
  color: #24343a;
}

.comment-delete,
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.comment-delete textarea,
.comment-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(12, 70, 95, 0.25);
  border-radius: 10px;
  font: inherit;
}

.comment-delete label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5c727a;
}

.comment-empty,
.comment-signin {
  color: #5c727a;
}

.comment-actions {
  display: flex;
  gap: 0.8rem;
}

.comment-action {
  border: 0;
  background: transparent;
  padding: 0;
  color: #046e96;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.comment-action-danger {
  color: #a33b4a;
}

.comment-replies {
  margin-left: 2.4rem;
  border-left: 2px solid #e7f2f6;
  padding-left: 0.8rem;
}

.popup[hidden] {
  display: none;
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(16, 32, 40, 0.45);
}

.popup-card {
  width: min(28rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.2rem 1.2rem 1rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.popup-card h2 {
  margin: 0 0 0.6rem;
  color: #14323c;
}

.popup-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

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

.alert-list li {
  border-top: 1px solid #f0f2f4;
}

.alert-list a {
  display: block;
  padding: 0.7rem 0;
  color: #14323c;
  text-decoration: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.header-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.header-icon:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.header-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.alert-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e0232a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.header-signin {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: #046e96;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.header-signin:hover {
  background: #03587a;
  color: #fff;
}

.header-who {
  font-weight: 700;
  color: #14323c;
}

.connect-shell {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 2rem;
}

.connect-card {
  width: min(28rem, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: 0 10px 28px rgba(0, 80, 110, 0.12);
}

.connect-card h1 {
  margin: 0 0 0.6rem;
  color: #111;
}

.connect-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: #14323c;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(12, 70, 95, 0.25);
}

.connect-btn img {
  width: 22px;
  height: 22px;
}

.connect-card label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  font-weight: 700;
}

.connect-card input[type="text"],
.connect-card input[type="email"] {
  width: 100%;
  margin-top: 0.3rem;
}

.header-logout {
  position: fixed;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 40;
  background: #fff;
  color: var(--bar);
}

.header-logout:hover {
  background: var(--bar);
  color: #fff;
}

.logo {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.logo img {
  display: block;
  height: clamp(4.25rem, 16vw, 7.5rem);
  width: auto;
  outline: none;
  filter: drop-shadow(0 6px 14px rgba(0, 70, 110, 0.18));
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #00a3d4, #008bb8);
  box-shadow: 0 8px 22px rgba(0, 70, 100, 0.2);
}

.site-nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(var(--wrap), 100%);
  padding-inline: 0.75rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  overflow: visible;
}

.nav-main,
.nav-side {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  flex-wrap: wrap;
}

.nav-main::-webkit-scrollbar,
.site-nav .inner::-webkit-scrollbar {
  display: none;
}

.nav-side {
  flex: 0 0 auto;
}

.nav-drop {
  position: relative;
}

.nav-drop summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent-ink);
  cursor: pointer;
  list-style: none;
}

.nav-drop summary::-webkit-details-marker {
  display: none;
}

.nav-drop summary::after {
  content: "";
  border: 5px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  transform: translateY(2px);
}

.nav-drop summary:hover,
.nav-drop[open] summary {
  background: rgba(255, 255, 255, 0.2);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 12.5rem;
  padding: 0.4rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(12, 70, 95, 0.18);
}

.nav-drop[open] .nav-menu {
  display: grid;
}

.site-nav .nav-menu a,
.site-nav .nav-menu a:hover,
.site-nav .nav-menu a[aria-current="page"] {
  color: #14323c;
  background: transparent;
  box-shadow: none;
  justify-content: flex-start;
  border-radius: 8px;
}

.site-nav .nav-menu a:hover {
  color: #0a4a70;
  background: #e7f6fb;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--accent-ink);
  white-space: nowrap;
  transition: background 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.2);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.site-nav a:focus-visible {
  outline-color: #ffffff;
}

@media (max-width: 480px) {
  .site-nav a {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.88rem;
  }
}

.site-main {
  flex: 1;
  padding: 2.75rem 0 3.5rem;
}

.hero {
  padding: 0.4rem 0 0.6rem;
}

.hero h1,
.section-page h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #111;
  text-wrap: balance;
}

.hero-lead,
.home-description {
  margin: 0;
  max-width: 42rem;
  color: var(--fg);
  font-size: 1.18rem;
  text-wrap: pretty;
}

.home-description p,
.blog-card-summary p,
.post-summary p {
  margin: 0 0 0.6rem;
}

.home-description p:last-child,
.blog-card-summary p:last-child,
.post-summary p:last-child {
  margin-bottom: 0;
}

.whats-new {
  margin-top: 2.6rem;
}

.whats-new h2 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  color: #111;
}

.featured-preview {
  display: grid;
  gap: 0.55rem;
  padding: 1.35rem 1.4rem 1.4rem;
  background: var(--paper);
  border: 1px solid rgba(0, 146, 193, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.featured-preview:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.9rem 0 0.2rem;
}

.project-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  color: var(--bar);
  box-shadow: inset 0 0 0 2px var(--bar);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.project-filter:hover,
.project-filter.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.project-group-title {
  margin: 2rem 0 0.8rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}

.embed-flag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bar);
}

.embed-wrap {
  margin: 1.1rem 0 1.4rem;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  max-width: 44rem;
  min-height: 315px;
  border: 0;
  border-radius: 14px;
  background: #000;
  box-shadow: var(--shadow);
}

.embed-wrap.embed-scratch {
  width: 100%;
  max-width: none;
}

.embed-wrap.embed-scratch iframe {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  aspect-ratio: 485 / 402;
}

.embed-fallback {
  margin: 0.8rem 0 1.2rem;
}

.featured-from,
.featured-flag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bar);
}

.featured-preview img {
  width: 100%;
  height: auto;
  margin-top: 0.35rem;
  object-fit: contain;
  border-radius: 14px;
  outline: 1px solid rgba(0, 146, 193, 0.12);
}

.featured-pick {
  display: grid;
  gap: 0.45rem;
  margin: 1.5rem 0 0;
  padding: 1.05rem 1.15rem 1.15rem;
  border: 1px solid rgba(0, 146, 193, 0.14);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.featured-pick label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.featured-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.featured-pick select {
  flex: 1 1 16rem;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--fg);
  font: inherit;
}

.home-links {
  display: grid;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.home-link {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 0.1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 180ms ease;
}

.home-link:hover {
  padding-left: 0.4rem;
  color: inherit;
}

.home-link-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.home-link-copy {
  color: var(--muted);
  font-size: 1rem;
}

.section-page p {
  margin: 0 0 1rem;
  max-width: 42rem;
  color: var(--fg);
  text-wrap: pretty;
}

.kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bar);
}

.site-footer {
  padding: 1.5rem 0 1.9rem;
  background: linear-gradient(180deg, #dff3fa, #cceaf4);
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 0 0 0.9rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--bar);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 6px;
}

.site-footer a {
  color: var(--bar);
}

.field-check label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.site-nav .nav-side a.nav-external,
.site-nav .nav-side a.nav-external:hover {
  gap: 0.45rem;
  border-radius: 999px;
  background: #046e96;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.site-nav .nav-side a.nav-external:hover {
  background: #03587a;
  color: #fff;
}

.site-nav .nav-side a.nav-external img {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 20px;
  margin-right: 0.55rem;
}

.post-header {
  position: relative;
}

.post-tools {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 0.35rem;
}

.post-header h1 {
  padding-right: 5.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .home-link,
  .blog-card,
  .featured-preview,
  .btn,
  .site-nav a {
    transition: none;
  }
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.section-heading h1 {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #33ccff, var(--accent));
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 146, 193, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.btn:hover {
  color: var(--accent-ink);
  background: var(--bar);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--bar);
  box-shadow: inset 0 0 0 2px var(--bar);
}

.btn-ghost:hover {
  color: var(--accent-ink);
  background: var(--bar);
}

.software-form {
  display: grid;
  gap: 1.15rem;
  max-width: 44rem;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid rgba(0, 146, 193, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field label,
.label-text {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--fg);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.hint {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.media-panel {
  margin-top: 0.75rem;
}

.media-panel[hidden] {
  display: none;
}

.media-frame {
  width: 100%;
  max-width: 800px;
  margin: 1.1rem 0 1.4rem;
}

.media-frame .embed-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0;
  aspect-ratio: 16 / 9;
}

.media-frame .embed-wrap iframe {
  width: 100%;
  max-width: 800px;
  height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.media-audio {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 0.8rem 0 1.2rem;
}

.picture-paste {
  margin: 0.35rem 0 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(0, 146, 193, 0.45);
  border-radius: 12px;
  background: #f4fbfd;
  color: var(--bar);
  font-weight: 700;
  cursor: text;
  caret-color: var(--bar);
}

.picture-paste img {
  display: none;
}

.picture-paste:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.25);
}

.picture-preview {
  display: block;
  margin-top: 0.75rem;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 12px;
  outline: 1px solid rgba(0, 146, 193, 0.12);
}

.picture-preview[hidden] {
  display: none;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.editor-toolbar button {
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: #f3f7f8;
  color: var(--bar);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.editor-toolbar button.ql-active,
.editor-toolbar button.is-on {
  background: var(--bar);
  color: #fff;
}

.editor-area.ql-container {
  height: auto;
  font-family: var(--font-body);
  font-size: 1.05rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.editor-area .ql-editor {
  min-height: 14rem;
  height: auto;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
}

.editor-area.editor-area-short .ql-editor {
  min-height: 7rem;
}

.editor-area .ql-editor p {
  margin: 0 0 0.75em;
}

.editor-area .ql-editor h3 {
  margin: 0.35em 0 0.3em;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading-2);
}

.editor-area h3,
.article-body h3,
.home-description h3,
.post-summary h3,
.blog-card-summary h3 {
  margin: 0.35em 0 0.3em;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--heading-2);
}

.editor-area {
  min-height: 14rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  white-space: normal;
}

.editor-area p,
.article-body p,
.home-description p,
.blog-card-summary p,
.post-summary p {
  margin: 0 0 0.75em;
}

.editor-area p:last-child,
.article-body p:last-child,
.home-description p:last-child,
.blog-card-summary p:last-child,
.post-summary p:last-child {
  margin-bottom: 0;
}

.editor-area-short {
  min-height: 7rem;
}

.editor-area:focus {
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.25);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-weight: 600;
}

.empty-copy,
.loading-copy {
  color: var(--muted);
}

.empty-copy p + p {
  margin-top: 1rem;
}

.attachment-list,
.post-files ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.4rem;
}

@media (max-width: 720px) {
  .blog-list {
    grid-template-columns: 1fr;
  }
}

.blog-list > .empty-copy {
  grid-column: 1 / -1;
}

.blog-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 1.2rem 1.2rem 1.25rem;
  background: var(--paper);
  border: 1px solid rgba(0, 146, 193, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card.has-tools {
  padding-right: 5.4rem;
}

.blog-card-link {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.blog-card-link:hover {
  color: inherit;
}

.card-tools {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #fff;
  color: var(--bar);
  border: 1px solid rgba(0, 146, 193, 0.28);
  box-shadow: 0 2px 8px rgba(12, 70, 95, 0.08);
}

.icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.icon-btn:hover {
  color: #111;
}

.icon-btn-danger:hover {
  color: #9b1c1c;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 191, 255, 0.45);
  color: inherit;
}

.blog-card img {
  width: 100%;
  height: auto;
  margin-top: 0.4rem;
  object-fit: contain;
  border-radius: 12px;
  outline: 1px solid rgba(0, 146, 193, 0.12);
}

.blog-card-date {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bar);
  margin-top: 0.15rem;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.blog-card-summary {
  color: var(--fg);
}

.post-header h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.03em;
  color: #111;
}

.post-date {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bar);
}

.post-summary {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.post-picture {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  object-fit: contain;
  border-radius: 16px;
  outline: 1px solid rgba(0, 146, 193, 0.14);
  box-shadow: var(--shadow);
}

.article-body {
  color: var(--fg);
  max-width: 44rem;
}

.article-body p,
.article-body li {
  line-height: 1.6;
}

.article-body h2 {
  font-family: var(--font-display);
  color: var(--heading-2);
}

.article-body h3 {
  font-family: var(--font-display);
  color: var(--bar);
}

.post-files {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.post-files h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--heading-2);
}
