:root {
  --bg: #f8f7f2;
  --surface: #ffffff;
  --surface-2: #efeee7;
  --text: #1d2527;
  --muted: #687174;
  --line: #dedbd0;
  --accent: #d74f35;
  --accent-2: #0a7b83;
  --shadow: 0 18px 45px rgba(36, 43, 44, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.portal-brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--text);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  box-shadow: 4px 4px 0 var(--text);
}

.portal-menu {
  position: relative;
}

.portal-menu summary {
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

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

.portal-menu summary::after {
  content: "v";
  float: right;
  color: var(--muted);
}

.portal-menu div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portal-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.portal-menu a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.portal-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 86px) 24px;
}

.intro {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 46px;
}

.guide-card {
  display: grid;
  min-height: 280px;
  align-content: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.guide-card small {
  color: var(--accent-2);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-card h2 {
  margin: 18px 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.1;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
}

.guide-card span {
  align-self: end;
  width: max-content;
  margin-top: 34px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 760;
}

.guide-card.accent {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 42%),
    var(--surface);
}

.guide-card.tic {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%),
    var(--surface);
}

@media (max-width: 760px) {
  .portal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .portal-menu,
  .portal-menu summary {
    width: 100%;
  }

  .portal-menu div {
    right: auto;
    left: 0;
    width: 100%;
  }

  .portal-main {
    padding-inline: 18px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}
