:root {
  --ink: #18201c;
  --muted: #647069;
  --line: #d8ded8;
  --paper: #f7f6f1;
  --white: #ffffff;
  --green: #1e6d4a;
  --green-dark: #134632;
  --clay: #b45f3e;
  --blue: #315f80;
  --shadow: 0 20px 70px rgba(22, 32, 28, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(247, 246, 241, 0.92);
  border-bottom: 1px solid rgba(24, 32, 28, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 50%;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a {
  padding: 10px 12px;
}

.nav-button {
  color: var(--green-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100vh - 72px));
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background-image: url("assets/hero-workshop.png");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 18, 14, 0.78), rgba(10, 18, 14, 0.36) 54%, rgba(10, 18, 14, 0.18)),
    linear-gradient(0deg, rgba(247, 246, 241, 0.08), transparent 36%);
}

.hero-content {
  width: min(880px, 100%);
  align-self: center;
  padding: clamp(56px, 8vw, 112px) clamp(18px, 6vw, 82px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f6bc8a;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.hero-actions,
.form-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.13);
}

.form-notice {
  margin: 16px 0 0;
  padding: 14px 16px;
  color: var(--green-dark);
  border: 1px solid rgba(30, 109, 74, 0.18);
  border-radius: var(--radius);
  background: rgba(30, 109, 74, 0.08);
  font-weight: 700;
}

.form-notice.error-notice {
  color: #8c2e1f;
  border-color: rgba(156, 61, 40, 0.18);
  background: rgba(156, 61, 40, 0.08);
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.trust-band div {
  padding: 28px clamp(18px, 4vw, 42px);
  background: var(--white);
}

.trust-band strong,
.trust-band span {
  display: block;
}

.trust-band strong {
  margin-bottom: 8px;
}

.trust-band span {
  color: var(--muted);
  line-height: 1.5;
}

.catalog-section,
.rules-section,
.form-section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 4vw, 56px);
}

.section-heading {
  width: min(980px, 100%);
  margin: 0 auto 34px;
}

.section-heading.narrow {
  width: min(760px, 100%);
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.section-heading.narrow p {
  margin-inline: auto;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 22px;
  width: min(1280px, 100%);
  margin: 0 auto;
  align-items: start;
}

.filters,
.maker-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.filters {
  position: sticky;
  top: 92px;
  padding: 20px;
}

label,
legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.search-box label,
.search-box input {
  display: block;
  width: 100%;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf8;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 109, 74, 0.13);
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

.filter-head h3 {
  margin: 0;
  font-size: 16px;
}

.text-button {
  color: var(--green);
  border: 0;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.checkbox-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.check-row input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 15px 18px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.result-bar p {
  margin: 0;
  color: var(--ink);
}

.result-bar span {
  font-size: 13px;
}

.maker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.maker-card {
  display: grid;
  gap: 16px;
  min-height: 360px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.maker-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.maker-top h3 {
  margin-bottom: 7px;
  font-size: 23px;
}

.maker-top a {
  color: var(--blue);
  font-weight: 800;
  word-break: break-word;
}

.verified {
  align-self: flex-start;
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--green-dark);
  border: 1px solid rgba(30, 109, 74, 0.22);
  border-radius: 999px;
  background: rgba(30, 109, 74, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.maker-card p {
  color: var(--muted);
  line-height: 1.58;
}

.meta-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.meta-list strong {
  color: var(--ink);
}

.meta-list a {
  color: var(--blue);
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 7px 9px;
  color: #4e5a54;
  background: #f0f2ed;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.rules-section {
  background: #ebece5;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.rule-grid article {
  padding: 24px;
  border: 1px solid rgba(24, 32, 28, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.rule-grid span {
  color: var(--clay);
  font-weight: 800;
}

.rule-grid h3 {
  margin: 12px 0 8px;
}

.rule-grid p {
  color: var(--muted);
  line-height: 1.58;
}

.maker-form {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 34px);
}

.field,
.field label {
  display: block;
}

.field {
  margin-bottom: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-categories {
  padding: 0;
  margin: 0 0 18px;
  border: 0;
}

.form-footer {
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-footer p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.76);
  background: var(--ink);
}

.site-footer strong {
  color: #fff;
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(180, 95, 62, 0.08), transparent 24%),
    linear-gradient(180deg, #f4f1ea 0%, #f7f6f1 100%);
}

.admin-main {
  padding: 32px clamp(18px, 4vw, 56px) 64px;
}

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.auth-panel {
  width: min(460px, 100%);
}

.admin-hero {
  width: min(900px, 100%);
  margin: 0 auto 28px;
}

.admin-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 62px);
}

.admin-hero p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 22px;
  width: min(1380px, 100%);
  margin: 0 auto;
  align-items: start;
}

.admin-column {
  display: grid;
  gap: 22px;
}

.admin-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel-head h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.admin-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  color: #fff;
  border-radius: 999px;
  background: var(--ink);
  font-weight: 800;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfcf9;
}

.admin-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-card-top h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.admin-card-top a {
  color: var(--blue);
  font-weight: 800;
  word-break: break-word;
}

.admin-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.admin-card-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-card-actions .button.secondary,
.admin-actions .button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.admin-editor {
  position: sticky;
  top: 92px;
}

.admin-form {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-approve {
  color: var(--green-dark);
  border-color: rgba(30, 109, 74, 0.22);
  background: rgba(30, 109, 74, 0.08);
}

.admin-reset {
  margin-left: auto;
}

.danger-button {
  color: #9c3d28;
}

@media (max-width: 980px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .maker-grid,
  .rule-grid,
  .trust-band,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-editor {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(10, 18, 14, 0.82), rgba(10, 18, 14, 0.46));
  }

  h1 {
    font-size: 43px;
  }

  .result-bar,
  .maker-top,
  .site-footer,
  .admin-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .two-col,
  .checkbox-grid.compact {
    grid-template-columns: 1fr;
  }

  .maker-card {
    min-height: auto;
  }

  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-reset {
    margin-left: 0;
  }
}
