* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #334155;
  --color-secondary: #0f172a;
  --color-accent: #94a3b8;
  --color-bg: #ffffff;
  --color-surface: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #cbd5e1;
  --font-main: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
  --max-width: 1100px;
  --radius: 0px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 0.5rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%);
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  position: relative;
  padding-left: 1rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  clip-path: polygon(0 0, 100% 5%, 100% 95%, 0 100%);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

h5 {
  font-size: 1.1rem;
  margin-top: 1rem;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

strong {
  font-weight: 700;
  color: var(--color-secondary);
}

em {
  font-style: italic;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  position: relative;
  font-style: italic;
  color: var(--color-text-muted);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
}

::selection {
  background: var(--color-primary);
  color: var(--color-bg);
}

.site-header {
  background: var(--color-secondary);
  color: var(--color-bg);
  padding: 1.5rem 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 20px));
  margin-bottom: 20px;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}

.site-nav {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-bg);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

.site-nav a:hover {
  background-color: var(--color-secondary);
  color: var(--color-accent);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

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

.site-footer {
  background: var(--color-surface);
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 3px solid var(--color-primary);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(45deg, transparent 0%, var(--color-surface) 50%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  font-size: 0.9rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs span {
  color: var(--color-text-muted);
}

.card {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: var(--color-surface);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.card:hover {
  box-shadow: 0 8px 16px rgba(51, 65, 85, 0.15);
  border-color: var(--color-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  overflow: hidden;
}

thead {
  background: var(--color-primary);
  color: var(--color-bg);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--color-secondary);
  position: relative;
}

th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:nth-child(even) {
  background: var(--color-surface);
}

tbody tr:hover {
  background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  transition: border-color 0.2s ease;
}

details[open] {
  border-color: var(--color-primary);
}

summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  user-select: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
  font-family: monospace;
  color: var(--color-primary);
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

details > *:not(summary) {
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

code {
  font-family: 'Courier New', monospace;
  background: var(--color-surface);
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--color-border);
  font-size: 0.9em;
  color: var(--color-secondary);
}

pre {
  background: var(--color-secondary);
  color: var(--color-accent);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 4px solid var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-accent);
}

ul, ol {
  margin: 1rem 0 1rem 2rem;
}

li {
  margin-bottom: 0.5rem;
}

hr {
  border: none;
  height: 3px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 50%, transparent 100%);
  margin: 2rem 0;
  clip-path: polygon(0 0, 98% 0, 100% 100%, 0 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--color-border);
}

button, input[type="submit"], input[type="button"] {
  font-family: var(--font-main);
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: var(--color-secondary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

button:focus-visible, input[type="submit"]:focus-visible, input[type="button"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-main);
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-secondary);
}

@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-header {
    padding: 2rem 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 30px));
    margin-bottom: 30px;
  }

  .site-header::after {
    bottom: -30px;
    height: 30px;
  }

  .site-nav ul {
    justify-content: flex-start;
  }

  .site-main {
    padding: 3rem 0;
  }

  .card {
    padding: 2rem;
  }

  table {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 3.5rem;
  }

  .site-header {
    padding: 2.5rem 0;
  }

  .site-nav a {
    padding: 1.25rem 2rem;
  }

  .container {
    padding: 0 2rem;
  }

  blockquote {
    padding: 2rem;
    margin: 2.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  details[open] summary::before {
    transform: none;
  }
}

@media print {
  .site-header, .site-nav, .site-footer, .breadcrumbs {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card {
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  table {
    border: 1px solid #000;
  }

  thead {
    background: #f0f0f0;
    color: #000;
  }

  tbody tr:nth-child(even) {
    background: #f9f9f9;
  }
}